Skip to content

Support Python 3#2

Closed
kxrob wants to merge 2 commits intorembish:masterfrom
kxrob:PY6_compat
Closed

Support Python 3#2
kxrob wants to merge 2 commits intorembish:masterfrom
kxrob:PY6_compat

Conversation

@kxrob
Copy link
Copy Markdown

@kxrob kxrob commented Mar 6, 2022

No description provided.

@rembish
Copy link
Copy Markdown
Owner

rembish commented Feb 18, 2026

Both fixes from this PR (integer division //= and explicit cp1252 decoding) were incorporated during the Python 3.12 modernisation in v2.0.0. Closing as superseded.

@rembish rembish closed this Feb 18, 2026
rembish added a commit that referenced this pull request Feb 18, 2026
2.0.0:
- Drop Python 2 and old Python 3; require Python 3.12+
- Replace setup.py with pyproject.toml (PEP 517/518)
- Add full type annotations and py.typed marker (PEP 561)
- Add __enter__/__exit__ context manager to DocReader
- Add __repr__ to DocReader
- Switch @cached to functools.cached_property following cfb 0.9.x API
- Fix Python 3 bytes decoding: compressed text as cp1252, uncompressed as utf-16-le
- Fix integer division bug: fc_fc /= 2 -> fc_fc //= 2
- Add pytest test suite, Black, Ruff, mypy (strict), pre-commit, GitHub Actions CI

2.0.1:
- Modernise test suite: autouse suppress_warnings with catch_warnings() + yield,
  reader fixture with proper teardown via context manager
- Add test_read_full_content and test_n_table_name tests
- Close superseded PR #2 (both its fixes were already in 2.0.0)
@kxrob
Copy link
Copy Markdown
Author

kxrob commented Feb 18, 2026

Both fixes from this PR (integer division //= and explicit cp1252 decoding) were incorporated during the Python 3.12 modernisation in v2.0.0. Closing as superseded.

requires-python = ">=3.12"

Is it necessary for certain features to have such a restriction for very latest versions? Rather unusual.
I deal with cases where 3.8 can't be changed easily. I'll need to build custom when pip etc. don't work.
functools.cached_property() is since 3.8

@rembish
Copy link
Copy Markdown
Owner

rembish commented Feb 18, 2026

Thanks for raising this — you were right, the 3.12 floor was unnecessarily strict.

Both cfb and Miette now support Python 3.8+ as of cfb v0.9.3 and Miette v2.0.2. The changes were minimal:

  • from __future__ import annotations to defer annotation evaluation (handles X | Y union syntax and built-in generic subscripts)
  • typing_extensions added as a runtime dependency for Self
  • CI matrix expanded to 3.8, 3.10, 3.12, and 3.13

functools.cached_property was already fine as you noted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants