Skip to content

fix: require Python >=3.11 to match stdlib tomllib import - #806

Merged
IPMegladon merged 1 commit into
sensepost:masterfrom
citizen204:fix-799-tomllib-python-requirement
Jul 23, 2026
Merged

fix: require Python >=3.11 to match stdlib tomllib import#806
IPMegladon merged 1 commit into
sensepost:masterfrom
citizen204:fix-799-tomllib-python-requirement

Conversation

@citizen204

Copy link
Copy Markdown
Contributor

Summary

objection/__init__.py imports tomllib at module level, but tomllib only exists in the standard library from Python 3.11. Since pyproject.toml declared requires-python = ">=3.10", installation succeeded on Python 3.10 but import objection immediately crashed with ModuleNotFoundError: No module named 'tomllib'.

As suggested by @IPMegladon in the issue thread, this bumps the version requirement rather than adding a tomli fallback dependency.

Fixes #799

Changes

  • pyproject.toml: requires-python bumped from >=3.10 to >=3.11 so pip refuses installation on Python versions where tomllib is unavailable

objection/__init__.py imports tomllib at module level, which only
exists in the standard library from Python 3.11. With requires-python
set to >=3.10, installation succeeds on 3.10 but 'import objection'
immediately fails with ModuleNotFoundError.

Fixes sensepost#799
@IPMegladon
IPMegladon merged commit b62c7e0 into sensepost:master Jul 23, 2026
3 checks passed
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.

[bug] Tomllib import fails

2 participants