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

fix invalid zarr packaging requirement #59

Merged
merged 1 commit into from
Mar 1, 2023

Conversation

fmigneault
Copy link
Contributor

@fmigneault fmigneault commented Feb 28, 2023

Detail

When installing geotiff since this change: ef74e58 (>= https://github.com/KipCrossing/geotiff/releases/tag/0.2.6)
The following error is generated.

Traceback (most recent call last):
  File "/home/dev/.conda/envs/weaver/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3039, in _dep_map
    return self.__dep_map
  File "/home/dev/.conda/envs/weaver/lib/python3.9/site-packages/pkg_resources/__init__.py", line 2835, in __getattr__
    raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/dev/.conda/envs/weaver/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/requirements.py", line 35, in __init__
    parsed = parse_requirement(requirement_string)
  File "/home/dev/.conda/envs/weaver/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/_parser.py", line 64, in parse_requirement
    return _parse_requirement(Tokenizer(source, rules=DEFAULT_RULES))
  File "/home/dev/.conda/envs/weaver/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/_parser.py", line 82, in _parse_requirement
    url, specifier, marker = _parse_requirement_details(tokenizer)
  File "/home/dev/.conda/envs/weaver/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/_parser.py", line 120, in _parse_requirement_details
    specifier = _parse_specifier(tokenizer)
  File "/home/dev/.conda/envs/weaver/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/_parser.py", line 209, in _parse_specifier
    tokenizer.consume("WS")
  File "/home/dev/.conda/envs/weaver/lib/python3.9/contextlib.py", line 126, in __exit__
    next(self.gen)
  File "/home/dev/.conda/envs/weaver/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/_tokenizer.py", line 183, in enclosing_tokens
    self.raise_syntax_error(
  File "/home/dev/.conda/envs/weaver/lib/python3.9/site-packages/pkg_resources/_vendor/packaging/_tokenizer.py", line 163, in raise_syntax_error
    raise ParserSyntaxError(
pkg_resources.extern.packaging._tokenizer.ParserSyntaxError: Expected closing RIGHT_PARENTHESIS
    zarr (>=2.10.*)
         ~~~~~~~^

This is because the use of .* is only valid when combined with == or != (which was fine before), but is now invalid with >= (though some tools will allow it silently).

https://peps.python.org/pep-0440/#inclusive-ordered-comparison indicates that the version is zero-padded for doing >= comparison against other versions, so >=2.10 or >=2.10.0 should be equivalent, and there shouldn't be any lower version than PATCH=0.

Relevant references:

Affected Packages (not exhaustive)

FYI @Zeitsperre @f-PLT

@Zeitsperre
Copy link
Collaborator

Zeitsperre commented Feb 28, 2023

@KipCrossing Would it be possible to tag a new release?

fmigneault added a commit to crim-ca/weaver that referenced this pull request Feb 28, 2023
fmigneault added a commit to crim-ca/weaver that referenced this pull request Feb 28, 2023
@KipCrossing KipCrossing merged commit 7731ed7 into KipCrossing:main Mar 1, 2023
@KipCrossing
Copy link
Owner

@KipCrossing Would it be possible to tag a new release?

https://pypi.org/project/geotiff/0.2.8/

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.

None yet

3 participants