Fix EnvVar template parsing on Python 3.14#116
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request updates envstack to support Python 3.14 and improves cross-version compatibility (notably Python 3.8) by adjusting template parsing behavior, dependency markers, and test discovery/configuration.
Changes:
- Add Python 3.14 to CI and published metadata (classifiers), and bump version to
1.0.3. - Fix
EnvVar.vars()to avoidstring.Templateaccess patterns that error on Python 3.14. - Improve test reliability by constraining pytest discovery to
tests/and excludingtmp/, and silence a Python 3.8 cryptography deprecation warning during import.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pytest.ini | Restricts pytest discovery to tests/ and avoids collecting from tmp/. |
| pyproject.toml | Bumps version, adds Python 3.14 classifier, and constrains cryptography on Python 3.8. |
| lib/envstack/env.py | Adjusts variable extraction to avoid Python 3.14 template parsing issues. |
| lib/envstack/encrypt.py | Suppresses Python 3.8 cryptography import warning for cleaner CLI/tests. |
| lib/envstack/init.py | Bumps library version constant to 1.0.3. |
| CHANGELOG.md | Documents changes/fixes for release 1.0.3. |
| .gitignore | Ignores additional local agent/tool directories/files. |
| .github/workflows/tests.yml | Extends CI matrix to include Python 3.14. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
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.
This pull request updates the project to support Python 3.14 and improves compatibility and test reliability across Python versions. It adds Python 3.14 to the test matrix and metadata, addresses compatibility issues with Python 3.14 and 3.8, and makes test discovery more robust. The following are the most important changes:
Bumps version to 1.0.3.
Python 3.14 Support and Compatibility:
.github/workflows/tests.ymland updated theCHANGELOG.mdto reflect this addition. [1] [2]pyproject.tomlto include Python 3.14 in theclassifiersand to set the package version to1.0.3in bothpyproject.tomlandlib/envstack/__init__.py. [1] [2] [3]EnvVar.vars()by avoiding direct access tostring.Templateinternals that now raise errors under Python 3.14.Python 3.8 Compatibility and Dependency Management:
cryptographydependency to<47for Python 3.8 inpyproject.tomlto avoid incompatibilities, while allowing newer versions for Python 3.9+.cryptographyPython 3.8 deprecation warning during import inlib/envstack/encrypt.pyto keep the CLI and tests quiet on supported 3.8 installs. [1] [2]Test Suite Improvements:
tests/directory and excluded thetmp/directory to prevent accidental test collection from helper files, as configured inpytest.ini.