#737 Updates for Python 3.14 - #738
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
| @@ -204,22 +203,6 @@ def assertTextContains(self, pattern, source): | |||
| message = f'{pattern!r} not contained in\n{source!r}.' | |||
There was a problem hiding this comment.
⚠️ Bug: Removing assertStartsWith/assertEndsWith breaks Python < 3.13.2
assertion.py deletes the custom assertStartsWith/assertEndsWith from AssertionMixin, and all call sites were re-ordered to match the stdlib signature (s, prefix). But unittest.TestCase.assertStartsWith/assertEndsWith only exist in Python 3.13.2+/3.14, while pyproject.toml still declares requires-python = "~=3.8". On any supported interpreter below 3.13.2 these calls raise AttributeError — breaking this repo's own test suite and any downstream project that uses the public ChevahTestCase/AssertionMixin helpers. Either keep the custom methods (with the new (source, prefix) order) or bump requires-python to >=3.13.2 to match the actual supported range.
Was this helpful? React with 👍 / 👎
|
Code Review
|
| Auto-apply | Compact |
|
|
Was this helpful? React with 👍 / 👎 | Gitar
|
Reviews (2): Last reviewed commit: "Reformat." | Re-trigger Greptile |
There was a problem hiding this comment.
Pull request overview
Updates chevah-compat for Python 3.14.
Changes:
- Upgrades Python and development dependencies.
- Adopts Python 3.14 assertion APIs and removes
six.text_typeusage. - Bumps the release to 1.8.0.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
pythia.conf |
Selects Python 3.14. |
pyproject.toml |
Bumps version and development dependencies. |
release-notes.rst |
Documents Python 3.14 support. |
src/chevah_compat/testing/assertion.py |
Removes legacy assertion helpers and six conversion. |
src/chevah_compat/testing/testcase.py |
Changes inheritance order and assertion usage. |
src/chevah_compat/tests/normal/testing/test_mockup.py |
Updates assertion argument order. |
src/chevah_compat/tests/normal/testing/test_assertion.py |
Updates assertion argument order. |
src/chevah_compat/tests/normal/test_filesystem.py |
Updates assertion argument order. |
src/chevah_compat/tests/elevated/test_capabilities.py |
Updates assertion argument order. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
||
|
|
||
| class ChevahTestCase(TwistedTestCase, AssertionMixin): | ||
| class ChevahTestCase(AssertionMixin, TwistedTestCase): |
Scope
Fixes #737
These are the updates to get compat working on Python 3.14
Changes
Use latest pythia from chevah/pythia#77 ... which depends on this branch
Fix assertion that are introduces now in stdlib