Skip to content
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

Improve Version implementation used for Python interpreter #599

Open
cnpryer opened this issue Apr 11, 2023 · 4 comments
Open

Improve Version implementation used for Python interpreter #599

cnpryer opened this issue Apr 11, 2023 · 4 comments
Labels
good first issue Good for newcomers
Milestone

Comments

@cnpryer
Copy link
Owner

cnpryer commented Apr 11, 2023

All the struct implements right now is naive release data that expects vec![major,minor,micro/patch], doing things like defaulting to 0 for each if not provided. In general the struct has little surface area, one major use-case, and limited in behaviors. For those reasons I’ll tag this as a good first issue, but feel free to ping me if you have any questions.

@cnpryer cnpryer added the good first issue Good for newcomers label Apr 11, 2023
@Tomperez98
Copy link

Hatch has a simple but clean approach to versioning. Maybe something similar can be supported.

https://hatch.pypa.io/latest/version/

The __version__ attribute is compliant with PEP specification. https://peps.python.org/pep-0621/#version

@Tomperez98
Copy link

Tomperez98 commented Apr 20, 2023

This is what it would look like.

[project]
...
dynamic = ["version"]

[tool.hatch.version]
path = "{{pkg_name}}/__about__.py"

I guess a middle point can be found. I don't know how cargo manages lib or bin version. But something similar might be doable with the pyproject.toml if the approach hatch has is too different from the cargo experience.

I guess you would only need something like this

[project]
version = "0.0.1"

And then the command will update the field directly in the pyproject.toml

@cnpryer
Copy link
Owner Author

cnpryer commented Apr 20, 2023

Hi! Thanks for sharing this. So maybe I can do a better job clarifying here. This issue is related to the Version struct Im using for the Python interpreter version numbers Huak finds.

If you want to create an issue for this idea that'd be great :) Could gather more feedback there.

@cnpryer cnpryer added this to the General-use release milestone Oct 26, 2023
@cnpryer
Copy link
Owner Author

cnpryer commented Oct 29, 2023

I've added RequestedVersion to huak-python-manager. It'd be ideal to have some dynamic semver struct to use RequestedVersion throughout the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants