New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(python): Migrate build to poetry #2024
base: master
Are you sure you want to change the base?
feat(python): Migrate build to poetry #2024
Conversation
Ok, so poetry is an alternative to pip. In order to use poetry, wouldn't we also need to update github's actions to make a release in poetrie's registry or how does it work in practice? |
In any case, this seems like an alternative to pip, so not really resolving the issue #1979 which is for pip users. |
@manast A few responses to your questions. Appreciate you giving the PR the time of day.
|
Ok, I see. So it may actually solve the issue, we should use poetry to publish to pypi instead of twine then. |
Yeah if you opt to use poetry for the packaging/dependencies then its trivial to use for publishing to pypi as well. Just let me know and I can expand the scope of the PR to add poetry into the CI if you like. |
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about adding semantic-release section here too? https://python-semantic-release.readthedocs.io/en/latest/ to replace setup.cfg config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Poetry manages that too via the pyproject.toml and you can bump the version with poetry version <major | minor | prerelease | ...>
. Then I typically do the following to make __version__
always match what is in the pyproject.toml
# bullmq/__init__.py
import importlib.metadata
__version__ = importlib.metadata.version("bullmq")
Also as a sidenote... since this lib is using
And if I was being overly opinionated I would maybe even limit support to >=3.9 or even 3.10... Not sure what level of community adoption is out there with this library so far. |
@theelderbeever I had faced the same issue in the slim docker image which was running an older python. The solution I tried was to upgrade the python image. Limiting the library too 3.10 sounds like a good solution for now? |
@vraj-fyno I would say >=3.10 but yes. IMHO at this point in python's versioning I struggle to see any new projects starting that wouldn't be using 3.10 or 3.11. This also opens the opportunity of using the newer On another opensource project that I am involved in that was started early last year we made the decision to not support below 3.10 as well. |
Totally respect just ignoring this PR but I ran into the same problem as noted in #1979 and quickly whipped together a poetry project which appears to address the dependency problem. Feel free to consider it.
closes #1979