v0.14.0 - VCS URL Parsing framework, type annotations
What's new
-
New and improved logo
-
Improved typings
Now
mypy --strictcompliant (#390) -
Parser: Experimental VCS URL parsing added (#376, #381, #384, #386):
VCS Parsers return
dataclasses.dataclass()instances. The new tools support validation, parsing, mutating and exporting into URLs consumable by the VCS.Warning
APIs are unstable and subject to break until we get it right.
-
-
GitBaseURL- Parse git URLs,git(1)compatible-
to_url()- exportgit clone-compatible URL
-
GitPipURL- Pip URLs,is_valid(),to_url() -
GitURL- Compatibility focused,is_valid()to_url()
-
Detection can be extended through writing
Matchers and adding them to the classes'MatcherRegistryYou can write your own VCS parser by implementing
URLProtocol, but it would be most efficient if you studied the source of thegit(1)parser to see how it's done. -
Breaking changes
-
#391 Removed
flatkeyword argument forlibvcs.projects.git.GitProject. This was unused and the equivalent can be retrieved via.to_dict()onGitRemote -
#379 Support for
git+gitURLs removed. Pip removed these in 21.0 due to them being insecure [1] -
#372 Typings moved from
libvcs.types->libvcs._internal.types -
#377 Remove deprecated functions and exceptions
-
Removed
libvcs.shortcuts-
Removed
libvcs.shortcuts.create_project_from_pip_url(): This will be replaced in future versions by #376 / parsing utilities -
Moved
libvcs.shortcuts.create_project()tolibvcs._internal.shortcuts.create_project()
-
-
Removed
libvcs.exc.InvalidPipURL
-
Fixes
-
Minor spelling fix in Git's
convert_pip_url()exception -
Fix mercurial cloning in
libvcs.projects.hg.MercurialProjectBackport from 0.13.1
Typings
-
Rename
VcsLiteral->VCSLiteralBackport from 0.13.4
-
create_project(): Add overloads that return the typed project (e.g.GitProject)Backport from 0.13.3
Cleanup
- #378 #380 Remove duplicate
uses_netlocscheme forgit+ssh(this was in cpython since 2.7 / 3.1 [2][3])
Autogenerated
- refactor(types): Move to
_internalsby @tony in #372 - Remove 0.14.x deprecations by @tony in #377
- chore(git): Remove
uses_netlocforgit+ssh, already in cpython by @tony in #378 - chore!(git): Remove insecure
git+gitsupport by @tony in #379 - chore(git): Remove another already supported netloc scheme ('git') by @tony in #380
- Parsing / detection and location by @tony in #376
- Parsing tests by @tony in #381
- Parser: Improvements, tests by @tony in #384
- Parser: Support explicit matchers, critical bug fixes by @tony in #386
- refactor!(projects[git]): Remove flat=True keyword from
.remotes()by @tony in #391 - Strict mypy by @tony in #390
- ci(poetry): Poetry 1.1.12 -> 1.1.14 by @tony in #393
Full Changelog: v0.13.6...v0.14.0