Migration and deprecation notes for libvcs are here, see {ref}history as well.
1. 📌 For safety, **always** pin the package
2. 📖 Check the migration notes _(You are here)_
3. 📣 If you feel something got deprecated and it interrupted you - past, present, or future - voice your opinion on the [tracker].
We want to make libvcs fun, reliable, and useful for users.
API changes can be painful.
If we can do something to draw the sting, we'll do it. We're taking a balanced approach. That's why these notes are here!
(Please pin the package. 🙏)
[tracker]: https://github.com/vcs-python/libvcs/discussions
Notes on the upcoming release will be added here
- pytest:
gitconfigrenamed tovcs_gitconfig - pytest:
set_gitconfigrenamed toset_vcs_gitconfig - pytest:
hgconfigrenamed tovcs_hgconfig - pytest:
set_hgconfigrenamed toset_vcs_hgconfig
The unprefixed names collided with the third-party
pytest-gitconfig plugin,
which exposes a gitconfig fixture returning a GitConfig helper rather
than a pathlib.Path. When both plugins auto-loaded, downstream tests
crashed with AttributeError: 'PosixPath' object has no attribute 'set'.
No deprecation alias is provided -- update parameter names in test
suites, conftests, and any embedded pytester.makeconftest text that
references these fixtures.
- pytest:
git_local_clonerenamed toexample_git_repo
libvcs.cmd.git.GitCmd._list()->libvcs.cmd.git.Git.ls()libvcs.cmd.svn.Svn._list()->libvcs.cmd.svn.Svn.ls()
-
RE_PIP_REVmoved fromlibvcs.url.gittolibvcs.url.constants. -
RE_PATHhas changed:- The pattern for user matching (e.g.,
git@) has been extracted toRE_USER. RE_PATHandSCP_REGEX(nowRE_SCP) no longer include user regex pattern- Existing patterns now use
RE_USERexplicitly.
- The pattern for user matching (e.g.,
-
REGEX_SCPrenamed toRE_SCPfor consistency.
URL.rule_map is now a class attribute rather than a dataclass attribute.
Before Python 3.11 rejected mutable dataclass defaults:
>>> import dataclasses
>>> from libvcs.url.base import RuleMap
>>> @dataclasses.dataclass(repr=False)
... class GitLabURL:
... rule_map: RuleMap = RuleMap(_rule_map={})
Traceback (most recent call last):
...
ValueError: mutable default <class 'libvcs.url.base.RuleMap'> for field rule_map is not allowed: use default_factoryAfter release:
>>> import dataclasses
>>> from libvcs.url.base import RuleMap
>>> from libvcs.url.git import GitURL, DEFAULT_RULES
>>> @dataclasses.dataclass(repr=False)
... class MyGitURL(GitURL):
... rule_map = RuleMap(
... _rule_map={'gitlab_prefix': DEFAULT_RULES}
... )