forked from scanny/python-pptx
-
Notifications
You must be signed in to change notification settings - Fork 0
Update from master #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This improves packaging reliability because it prevents tests from running against the current directory instead of the installed version of the package.
- Add `pyproject.toml` and gather configuration there. Move `.ruff.toml` contents into `pyproject.toml`. - Add `requirements-test.txt`.
Add type-annotations broadly, but prioritizing interface objects and methods. Adjust text-width to 100, remove Python 2 support, etc.
scanny#943 Remove mention of a `Px` subtype of `Length` since no such subtype exists. Turns out a pixel has various sizes on different systems so no standard unit of measure is possible.
scanny#972 Naive "max + 1" slide-id allocation algorithm assumed that slide-ids were assigned from bottom up. Apparently some client assigns slide ids from the top (2,147,483,647) down and the naive algorithm would assign an invalid slide-id in that case. Detect when the assigned id is out-of-range and fall-back to a robust algorithm for assigning a valid id based on a "first unused starting at bottom" policy.
Accommodate system dates before 1980-01-01. This should have no effect for users with "normal" system clocks but allows the package to save files in the unusual case the system clock is set to a date prior to 1980.
At least one client, perhaps Adobe PDF Converter, produces a PPTX with JPEG images mapped to the non-existent `image/jpg` MIME-type rather than the correct `image/jpeg`. Accept `image/jpg` as an alias for `image/jpeg`, which is consistent with the behavior of PowerPoint which loads these files without complaint.
- Move to `pyproject.toml` - Update support to 3.8+
Indicate availability of type annotations to type-checkers.
Some enum values like `MSO_SHAPE_TYPE.MIXED` are never produced by `python-pptx` and so were removed during the enum modernization in commit `01b86e64`. However, in at least one downstream system these values are referenced even though they can never actually occur. Replace these "read-only" values to avoid downstream breakage.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.