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

[BUGFIX] rename optional deps v1 #5164

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

frascuchon
Copy link
Member

Description

Apparently naming python optional dependencies with v1 is not allowed and the installation process fails

...
    self._link_candidate_cache[link] = LinkCandidate(
  File "/Users/frascuchon/.pyenv/versions/3.9.18/envs/2.0.0/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 303, in __init__
    super().__init__(
  File "/Users/frascuchon/.pyenv/versions/3.9.18/envs/2.0.0/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 158, in __init__
    self.dist = self._prepare()
  File "/Users/frascuchon/.pyenv/versions/3.9.18/envs/2.0.0/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 247, in _prepare
    self._check_metadata_consistency(dist)
  File "/Users/frascuchon/.pyenv/versions/3.9.18/envs/2.0.0/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 229, in _check_metadata_consistency
    list(dist.iter_dependencies(list(dist.iter_provided_extras())))
  File "/Users/frascuchon/.pyenv/versions/3.9.18/envs/2.0.0/lib/python3.9/site-packages/pip/_internal/metadata/pkg_resources.py", line 250, in iter_provided_extras
    return self._extra_mapping.keys()
  File "/Users/frascuchon/.pyenv/versions/3.9.18/envs/2.0.0/lib/python3.9/site-packages/pip/_internal/metadata/pkg_resources.py", line 94, in _extra_mapping
    canonicalize_name(extra): extra for extra in self._dist.extras
  File "/Users/frascuchon/.pyenv/versions/3.9.18/envs/2.0.0/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3026, in extras
    return [dep for dep in self._dep_map if dep]
  File "/Users/frascuchon/.pyenv/versions/3.9.18/envs/2.0.0/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3072, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/Users/frascuchon/.pyenv/versions/3.9.18/envs/2.0.0/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3089, in _compute_dependencies
    common = types.MappingProxyType(dict.fromkeys(reqs_for_extra(None)))
  File "/Users/frascuchon/.pyenv/versions/3.9.18/envs/2.0.0/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3086, in reqs_for_extra
    if not req.marker or req.marker.evaluate({'extra': extra}):
  File "/Users/frascuchon/.pyenv/versions/3.9.18/envs/2.0.0/lib/python3.9/site-packages/pip/_vendor/packaging/markers.py", line 325, in evaluate
    return _evaluate_markers(self._markers, current_environment)
  File "/Users/frascuchon/.pyenv/versions/3.9.18/envs/2.0.0/lib/python3.9/site-packages/pip/_vendor/packaging/markers.py", line 225, in _evaluate_markers
    groups[-1].append(_eval_op(lhs_value, op, rhs_value))
  File "/Users/frascuchon/.pyenv/versions/3.9.18/envs/2.0.0/lib/python3.9/site-packages/pip/_vendor/packaging/markers.py", line 183, in _eval_op
    return spec.contains(lhs, prereleases=True)
  File "/Users/frascuchon/.pyenv/versions/3.9.18/envs/2.0.0/lib/python3.9/site-packages/pip/_vendor/packaging/specifiers.py", line 552, in contains
    normalized_item = _coerce_version(item)
  File "/Users/frascuchon/.pyenv/versions/3.9.18/envs/2.0.0/lib/python3.9/site-packages/pip/_vendor/packaging/specifiers.py", line 28, in _coerce_version
    version = Version(version)
  File "/Users/frascuchon/.pyenv/versions/3.9.18/envs/2.0.0/lib/python3.9/site-packages/pip/_vendor/packaging/version.py", line 202, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
pip._vendor.packaging.version.InvalidVersion: Invalid version: ''

We need to change the v1 to another valid name: sdk-v1

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation update

How Has This Been Tested

Checklist

  • I added relevant documentation
  • I followed the style guidelines of this project
  • I did a self-review of my code
  • I made corresponding changes to the documentation
  • I confirm My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have added relevant notes to the CHANGELOG.md file (See https://keepachangelog.com/)

@frascuchon frascuchon changed the base branch from develop to releases/2.0.0rc2 July 4, 2024 13:43
Copy link

github-actions bot commented Jul 4, 2024

The URL of the deployed environment for this PR is https://argilla-quickstart-pr-5164-ki24f765kq-no.a.run.app

@frascuchon frascuchon merged commit 0e2a195 into releases/2.0.0rc2 Jul 4, 2024
15 checks passed
@frascuchon frascuchon deleted the bugfix/rename-optional-deps-v1 branch July 4, 2024 14:55
@frascuchon frascuchon restored the bugfix/rename-optional-deps-v1 branch July 5, 2024 07:19
frascuchon added a commit that referenced this pull request Jul 5, 2024
frascuchon added a commit that referenced this pull request Jul 5, 2024
Reverts changes from #5164 and rename dependencies to
`legacy`
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.

1 participant