Skip to content

Update from master#3

Closed
pgonvaz88 wants to merge 15 commits into
linux-fontsfrom
master
Closed

Update from master#3
pgonvaz88 wants to merge 15 commits into
linux-fontsfrom
master

Conversation

@pgonvaz88
Copy link
Copy Markdown

No description provided.

scanny and others added 15 commits August 2, 2024 20:52
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.
@pgonvaz88 pgonvaz88 closed this Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants