Skip to content

Commit 0e2a195

Browse files
authored
[BUGFIX] rename optional deps v1 (#5164)
# Description <!-- Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change. --> Apparently naming python optional dependencies with `v1` is not allowed and the installation process fails ```bash ... 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** <!-- Please delete options that are not relevant. Remember to title the PR according to the type of change --> - Bug fix (non-breaking change which fixes an issue) - Documentation update **How Has This Been Tested** <!-- Please add some reference about how your feature has been tested. --> **Checklist** <!-- Please go over the list and make sure you've taken everything into account --> - 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/)
1 parent c56ba2f commit 0e2a195

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

argilla/docs/how_to_guides/migrate_from_legacy_datasets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The guide will take you through three steps:
2828

2929
Connect to the Argilla V1 server via the new `argilla` package. First, you should install an extra dependency:
3030
```bash
31-
pip install "argilla[v1]"
31+
pip install "argilla[sdk-v1]"
3232
```
3333

3434
Now, you can use the `v1` module to connect to the Argilla V1 server.

argilla/pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ dynamic = ["version"]
1313
dependencies = [
1414
"httpx>=0.26.0",
1515
"pydantic>=2.6.0, <3.0.0",
16-
1716
"tqdm>=4.60.0",
1817
"rich>=10.0.0",
1918
]
@@ -23,7 +22,7 @@ io = [
2322
"datasets>=2.0.0",
2423
]
2524

26-
v1 = [
25+
sdk-v1 = [
2726
"argilla-v1[listeners]",
2827
]
2928

argilla/src/argilla/v1/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from argilla_v1 import * # noqa
1919
except ModuleNotFoundError as ex:
2020
raise Exception(
21-
'The package argilla-v1 is not installed. Please install it by typing: pip install "argilla[v1]"',
21+
'The package argilla-v1 is not installed. Please install it by typing: pip install "argilla[sdk-v1]"',
2222
) from ex
2323

2424

0 commit comments

Comments
 (0)