Skip to content

Python312 compat#65

Open
greatheights82 wants to merge 11 commits into
masterfrom
python312-compat
Open

Python312 compat#65
greatheights82 wants to merge 11 commits into
masterfrom
python312-compat

Conversation

@greatheights82

@greatheights82 greatheights82 commented Jul 2, 2026

Copy link
Copy Markdown

Thanks to the folks who have contributed PRs while this project went stale for a while. I've done my best to give everyone credit for the changes I pulled into this PR, which is aimed at upgrading the project dependecies to address vulnerabilities and limitations due to outdated deps.

0.7.0 (2026-07-01)

  • Drop support for Python < 3.9.
  • Add support for Python 3.12 and pytest >= 8.
  • Require docker >= 7.0.0 and pluggy >= 1.0.0; remove urllib3 < 2 pin.
  • Replace deprecated inspect.getcallargs with inspect.Signature.bind.
  • Switch build backend from setuptools to poetry-core.
  • Add container_env parameter to LocalstackSession.

Joel-Pearce and others added 9 commits July 1, 2026 15:15
Replace the mismatched setuptools build backend with poetry-core,
which is correct for a Poetry-managed project.

(cherry picked from commit a9b047f in Joel-Pearce/pytest-localstack)
Co-authored-by: Cursor <cursoragent@cursor.com>
inspect.getcallargs emits DeprecationWarning on Python 3.12+ and is
slated for removal in 3.15. Use inspect.Signature.bind() instead.

Also wraps with inspect.unwrap() to handle newer botocore versions
that decorate create_client with wrappers.

(cherry picked from commit 5774db7 in Joel-Pearce/pytest-localstack,
amended with inspect.unwrap per jairov4 PR #61)
Add container_env parameter to LocalstackSession for passing arbitrary
environment variables to the LocalStack container.

(cherry picked from commit 66293a2 in Joel-Pearce/pytest-localstack)
- Raise Python floor from 3.7 to 3.9 (3.7/3.8 are EOL)
- Bump docker from ^6.0.0 to >=7.0.0 (6.x uses ssl.match_hostname,
  removed in Python 3.12)
- Bump pluggy from ^0.12.0 to >=1.0.0 (0.x has no 3.12 support)
- Remove urllib3 <2 pin (modern botocore handles this per-Python-version)
- Set pytest floor to >=7 (compatible with pytest 8)
- Update classifiers for Python 3.9-3.12
- Bump version to 0.7.0

Co-authored-by: Jairo Velasco <jairov4@users.noreply.github.com>
Replace deprecated [tool.poetry.dev-dependencies] section with
[tool.poetry.group.dev.dependencies] per Poetry 1.2+ convention.
mypy ^0.812 requires typed-ast, which fails to compile on Python 3.12.
mypy 1.0+ uses the built-in ast module instead.
- Remove pyproject-flake8 (flake8 6+ reads pyproject.toml natively)
- Bump flake8 to >=6.0, coverage to >=7.0, pytest-cov to >=4.0,
  pytest-xdist to >=3.0, bandit to >=1.7.5
- Add pyyaml >=6.0.1 floor (6.0 fails to build on Python 3.12)
- Loosen remaining dev dep pins from ^ to >=

@jwjacobs88 jwjacobs88 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the Readme.md could use some updates with these changes. Specifically there are references to testing with python 3.6+

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.

4 participants