Prepare package for PyPI: fix versioning, lazy imports, Python constraint#3
Merged
Merged
Conversation
- Single source of truth for version: pyproject.toml is authoritative, importlib.metadata reads it at runtime, _FALLBACK_VERSION as fallback - Expose __version__ in pyfuse.__init__ - Make RedisBackend import lazy in remote.py (consistent with other backends) - Remove eager backend imports from backends/__init__.py - Lower requires-python from >=3.13 to >=3.10 (no 3.13-specific features) - Add test_packaging.py: version consistency + isolated venv install tests - Update README badge and classifiers Agent-Logs-Url: https://github.com/codeSamuraii/pyfuse/sessions/92c23804-a854-46b3-978f-2599f056b232 Co-authored-by: codeSamuraii <17270548+codeSamuraii@users.noreply.github.com>
…r script - Catch PackageNotFoundError instead of bare Exception in version.py - Extract _venv_python() and _create_venv_and_install() helpers in test - Use multi-line script string instead of semicolons Agent-Logs-Url: https://github.com/codeSamuraii/pyfuse/sessions/92c23804-a854-46b3-978f-2599f056b232 Co-authored-by: codeSamuraii <17270548+codeSamuraii@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
codeSamuraii
April 13, 2026 19:13
View session
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.
Package wasn't publishable to PyPI: version was hardcoded in two places,
import pyfuseeagerly pulled in optional backend deps (redis,aio-pika), andrequires-python >=3.13was unnecessarily restrictive given no 3.13-specific features are used.Versioning — single source of truth
pyproject.tomlis authoritative;pyfuse/core/version.pyreads it at runtime viaimportlib.metadata, falls back to_FALLBACK_VERSIONfor editable/source installspyfuse.__version__in__init__.pyand__all__Lazy backend imports
RedisBackendimport inremote.pymoved inside_create_backend(), matching existing pattern forLocalBackend/RabbitMQBackendbackends/__init__.pyonly re-exports the abstractBackendbasePython version constraint
requires-pythonfrom>=3.13to>=3.10(sys.stdlib_module_namesis the floor)Isolated installation tests (
tests/test_packaging.py)pyproject.toml,__version__is exported