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

Issue with name casing #365

Open
TheGreatRefrigerator opened this issue Mar 2, 2022 · 6 comments
Open

Issue with name casing #365

TheGreatRefrigerator opened this issue Mar 2, 2022 · 6 comments
Labels

Comments

@TheGreatRefrigerator
Copy link

Hi all,

i'm using geoalchemy2 in a poetry project. My current pyproject.toml includes geoalchemy2 = "^0.9.4".

By trying to update with poetry add geoalchemy2@^0.10.2 i get:
...depends on both geoalchemy2 (^0.9.4) and GeoAlchemy2 (^0.10.2), version solving failed.

I've already solved my issue by adjusting the version in the toml file and do a poetry update but still would like to know,
if there is a reasoning for the difference in the casing (apart from mirroring the SQLAlchemy setup) between the distribution info folder and the actual package folder.

The pypi project hast the capital casing as well. I suppose it's not easy to just chage to a lowercase name for an already published package, but i would like to know if that is something that should be considered?

I'm not 100% sure the poetry problem originates in the name difference but it seems likely.

Best regards

@adrien-berchet
Copy link
Member

Hi @TheGreatRefrigerator
Thank you for your report. I never work with poetry but I did a few tests and as far as I can see it seems that your case can only happen if geoalchemy2 = "^0.9.2" is added manually to the pyproject.toml file. But if it is added using the command poetry add geoalchemy2@^0.9.2 it actually adds the line GeoAlchemy2 = "^0.9.2", so the case is correct.
I am surprised that poetry is case sensitive while pip is not, I don't know which is correct? But as far as I can see here: https://pip.pypa.io/en/latest/reference/requirement-specifiers/#requirement-specifiers and here: https://python-poetry.org/docs/basic-usage/#specifying-dependencies , the requirements should be project names for both pip and poetry, so GeoAlchemy2 in our case (not geoalchemy2).
Anyway, the package name does not have to be equal to the package folder, so I think we can keep the repository as is, though it can indeed lead to weird situations with the poetry tool.

@TheGreatRefrigerator
Copy link
Author

TheGreatRefrigerator commented Mar 2, 2022

Hi @adrien-berchet,

thx for the quick answer.

only happen if geoalchemy2 = "^0.9.2" is added manually to the pyproject.toml file

that's probably what i did originally.

Although it doesn't have to be equal, i still think it would be good to have a consistent name and also more in line with PEP 423.
This might only be a problem for poetry now but might as well spark further problems down the line.

Of course renaming is quite some effort and your desicion whether to do or not.
There are some guiding steps if you decide to do it after all.
If not, at least a statement would be nice, probably as they suggest in form of a wontfix label in this issue.

@adrien-berchet
Copy link
Member

I did not know this PEP 423, thanks :-)
I am not sure what is the best solution for this issue. I am not going to fix this for now because it's quite big change, but I might at some point if it becomes too annoying. In this case I guess we should change the package name to lower case so it might only break the requirements but not the import geoalchemy2 statements in the codes.

@adrien-berchet
Copy link
Member

Do you think it's reasonable to label this issue as wontfix for now and fix it only when it becomes mandatory?

@TheGreatRefrigerator
Copy link
Author

Sure!

@adrien-berchet
Copy link
Member

Ok, thanks!

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

No branches or pull requests

2 participants