@@ -15,6 +15,18 @@ $ pip install --user --upgrade --pre libvcs
15
15
16
16
### Breaking changes
17
17
18
+ - Moves (#408 ):
19
+
20
+ - ` libvcs.parse ` -> ` libvcs.url `
21
+ - ` libvcs.projects ` -> ` libvcs.sync `
22
+
23
+ - Renames (#408 ):
24
+
25
+ - ` BaseProject ` -> ` BaseSync `
26
+ - ` MercurialProject ` -> ` HgSync `
27
+ - ` SubversionProject ` -> ` SvnSync `
28
+ - ` GitProject ` -> ` GitSync `
29
+
18
30
- Deprecate custom functions in favor of standard library:
19
31
- ` which() ` in favor of {func}` shutil.which ` , via #397
20
32
- ` mkdir_p() ` in favor of {func}` os.makedirs ` and {meth}` pathlib.Path.mkdir ` w/ ` parents=True ` ,
@@ -60,41 +72,41 @@ $ pip install --user --upgrade --pre libvcs
60
72
61
73
:::
62
74
63
- - {mod}` libvcs.parse .git `
75
+ - {mod}` libvcs.url .git `
64
76
65
- - {class}` ~libvcs.parse .git.GitBaseURL ` - Parse git URLs, ` git(1) ` compatible
77
+ - {class}` ~libvcs.url .git.GitBaseURL ` - Parse git URLs, ` git(1) ` compatible
66
78
67
- - {meth}` ~libvcs.parse .git.GitBaseURL.is_valid `
68
- - {meth}` ~libvcs.parse .git.GitBaseURL.to_url ` - export ` git clone ` -compatible URL
79
+ - {meth}` ~libvcs.url .git.GitBaseURL.is_valid `
80
+ - {meth}` ~libvcs.url .git.GitBaseURL.to_url ` - export ` git clone ` -compatible URL
69
81
70
- - {class}` ~libvcs.parse .git.GitPipURL ` - Pip URLs, {meth}` ~libvcs.parse .git.GitPipURL.is_valid ` ,
71
- {meth}` ~libvcs.parse .git.GitPipURL.to_url `
82
+ - {class}` ~libvcs.url .git.GitPipURL ` - Pip URLs, {meth}` ~libvcs.url .git.GitPipURL.is_valid ` ,
83
+ {meth}` ~libvcs.url .git.GitPipURL.to_url `
72
84
73
- - {class}` ~libvcs.parse .git.GitURL ` - Compatibility focused,
74
- {meth}` ~libvcs.parse .git.GitURL.is_valid ` {meth}` ~libvcs.parse .git.GitURL.to_url `
85
+ - {class}` ~libvcs.url .git.GitURL ` - Compatibility focused,
86
+ {meth}` ~libvcs.url .git.GitURL.is_valid ` {meth}` ~libvcs.url .git.GitURL.to_url `
75
87
76
- - {mod}` libvcs.parse .hg `
88
+ - {mod}` libvcs.url .hg `
77
89
78
- - {class}` ~libvcs.parse .hg.HgURL ` - Parse Mercurial URLs
79
- - {meth}` ~libvcs.parse .hg.HgURL.is_valid `
80
- - {meth}` ~libvcs.parse .hg.HgURL.to_url ` - export ` hg clone ` -compatible URL
90
+ - {class}` ~libvcs.url .hg.HgURL ` - Parse Mercurial URLs
91
+ - {meth}` ~libvcs.url .hg.HgURL.is_valid `
92
+ - {meth}` ~libvcs.url .hg.HgURL.to_url ` - export ` hg clone ` -compatible URL
81
93
82
- - {mod}` libvcs.parse .svn `
94
+ - {mod}` libvcs.url .svn `
83
95
84
- - {class}` ~libvcs.parse .svn.SvnURL ` - Parse Subversion URLs
85
- - {meth}` ~libvcs.parse .svn.SvnURL.is_valid `
86
- - {meth}` ~libvcs.parse .svn.SvnURL.to_url ` - export ` svn checkout ` -compatible URL
96
+ - {class}` ~libvcs.url .svn.SvnURL ` - Parse Subversion URLs
97
+ - {meth}` ~libvcs.url .svn.SvnURL.is_valid `
98
+ - {meth}` ~libvcs.url .svn.SvnURL.to_url ` - export ` svn checkout ` -compatible URL
87
99
88
- Detection can be extended through writing {class}` ~libvcs.parse .base.Matcher ` s and adding them to
89
- the classes' {class}` ~libvcs.parse .base.MatcherRegistry `
100
+ Detection can be extended through writing {class}` ~libvcs.url .base.Matcher ` s and adding them to
101
+ the classes' {class}` ~libvcs.url .base.MatcherRegistry `
90
102
91
- You can write your own VCS parser by implementing {class}` ~libvcs.parse .base.URLProtocol ` , but it
103
+ You can write your own VCS parser by implementing {class}` ~libvcs.url .base.URLProtocol ` , but it
92
104
would be most efficient if you studied the source of the ` git(1) ` parser to see how it's done.
93
105
94
106
### Breaking changes
95
107
96
- - #391 Removed ` flat ` keyword argument for {class}` libvcs.projects .git.GitProject ` . This was unused
97
- and the equivalent can be retrieved via ` .to_dict() ` on ` GitRemote `
108
+ - #391 Removed ` flat ` keyword argument for {class}` libvcs.sync .git.GitSync ` . This was unused and the
109
+ equivalent can be retrieved via ` .to_dict() ` on ` GitRemote `
98
110
- #379 Support for ` git+git ` URLs removed. Pip removed these in 21.0 due to them being insecure
99
111
[ ^ pip-git+git ]
100
112
- #372 Typings moved from ` libvcs.types ` -> {mod}` libvcs._internal.types `
@@ -111,7 +123,7 @@ $ pip install --user --upgrade --pre libvcs
111
123
### Fixes
112
124
113
125
- Minor spelling fix in Git's ` convert_pip_url() ` exception
114
- - Fix mercurial cloning in {class}` libvcs.projects .hg.MercurialProject `
126
+ - Fix mercurial cloning in {class}` libvcs.sync .hg.HgSync `
115
127
116
128
_ Backport from 0.13.1_
117
129
@@ -122,7 +134,7 @@ $ pip install --user --upgrade --pre libvcs
122
134
_ Backport from 0.13.4_
123
135
124
136
- {func}` ~libvcs.shortcuts.create_project ` : Add overloads that return the typed project (e.g.
125
- {class}` ~libvcs.projects .git.GitProject ` )
137
+ {class}` ~libvcs.sync .git.GitSync ` )
126
138
127
139
_ Backport from 0.13.3_
128
140
@@ -165,19 +177,19 @@ $ pip install --user --upgrade --pre libvcs
165
177
### Typings
166
178
167
179
- ` create_project() ` : Add overloads that return the typed project (e.g.
168
- {class}` ~libvcs.projects .git.GitProject ` )
180
+ {class}` ~libvcs.sync .git.GitSync ` )
169
181
170
182
## libvcs 0.13.2 (2022-06-12)
171
183
172
184
### Typings
173
185
174
- - {func}` libvcs.projects .git.GitProject .remotes ` : Add overload
186
+ - {func}` libvcs.sync .git.GitSync .remotes ` : Add overload
175
187
176
188
## libvcs 0.13.1 (2022-06-01)
177
189
178
190
### Fixes
179
191
180
- - Fix mercurial cloning in {class}` libvcs.projects .hg.MercurialProject `
192
+ - Fix mercurial cloning in {class}` libvcs.sync .hg.HgSync `
181
193
182
194
## libvcs 0.13.0, "Jane" (2022-05-30)
183
195
@@ -204,7 +216,7 @@ $ pip install --user --upgrade --pre libvcs
204
216
205
217
- ` run(cmd, ...) ` is now ` run(args, ...) ` to match ` Popen ` 's convention.
206
218
207
- - {class}` libvcs.projects .base.BaseProject ` :
219
+ - {class}` libvcs.sync .base.BaseSync ` :
208
220
209
221
- Removed ` parent_dir ` :
210
222
@@ -223,13 +235,13 @@ $ pip install --user --upgrade --pre libvcs
223
235
Deprecated in >=0.13:
224
236
225
237
``` python
226
- GitProject (' https://github.com/vcs-python/libvcs.git' )
238
+ GitSync (' https://github.com/vcs-python/libvcs.git' )
227
239
```
228
240
229
241
New style in >= 0.13 :
230
242
231
243
```python
232
- GitProject (url = ' https://github.com/vcs-python/libvcs.git' )
244
+ GitSync (url = ' https://github.com/vcs-python/libvcs.git' )
233
245
```
234
246
235
247
[pep 570 ]: https:// peps.python.org/ pep- 0570 /
@@ -322,20 +334,20 @@ $ pip install --user --upgrade --pre libvcs
322
334
323
335
# ## Breaking
324
336
325
- - `GitRepo` , `SVNRepo` , `MercurialRepo` , `BaseRepo` have been renamed to `GitProject ` , `SVNProject` ,
326
- `MercurialProject ` , `BaseProject ` (# 327)
327
- - `GitProject ` , `SVNProject` , `MercurialProject ` , `BaseProject ` have been moved to
328
- `libvcs.projects .{module}.{Module}Project`
337
+ - `GitRepo` , `SVNRepo` , `MercurialRepo` , `BaseRepo` have been renamed to `GitSync ` , `SVNProject` ,
338
+ `HgSync ` , `BaseSync ` (# 327)
339
+ - `GitSync ` , `SVNProject` , `HgSync ` , `BaseSync ` have been moved to
340
+ `libvcs.sync .{module}.{Module}Project`
329
341
- `repo_dir` param is renamed to `dir ` :
330
342
331
- Before: `GitProject (url = ' ...' , repo_dir = ' ...' )`
343
+ Before: `GitSync (url = ' ...' , repo_dir = ' ...' )`
332
344
333
- After: `GitProject (url = ' ...' , dir = ' ...' )`
345
+ After: `GitSync (url = ' ...' , dir = ' ...' )`
334
346
335
347
# 324
336
348
337
- - `dir ` to `pathlib` , `BaseProject .path` -> `BaseProject .dir`
338
- - Logging functions moved to {attr}`libvcs.projects .base.BaseProject .log` (# 322)
349
+ - `dir ` to `pathlib` , `BaseSync .path` -> `BaseSync .dir`
350
+ - Logging functions moved to {attr}`libvcs.sync .base.BaseSync .log` (# 322)
339
351
- Rename `ProjectLoggingAdapter` to `CmdLoggingAdapter`
340
352
- `CmdLoggingAdapter` : Rename `repo_name` param to `keyword`
341
353
- `create_repo` -> `create_project`
@@ -369,10 +381,10 @@ $ pip install --user --upgrade --pre libvcs
369
381
- {meth}`libvcs.cmd.hg.Hg.run`
370
382
- {meth}`libvcs.cmd.hg.Hg.clone`
371
383
372
- - {class }`libvcs.projects .git.GitProject ` now accepts remotes in `__init__ `
384
+ - {class }`libvcs.sync .git.GitSync ` now accepts remotes in `__init__ `
373
385
374
386
```python
375
- repo = GitProject (
387
+ repo = GitSync (
376
388
url = " https://github.com/vcs-python/libvcs" ,
377
389
repo_dir = checkout,
378
390
remotes = {
@@ -382,7 +394,7 @@ $ pip install --user --upgrade --pre libvcs
382
394
```
383
395
384
396
```python
385
- repo = GitProject (
397
+ repo = GitSync (
386
398
url = " https://github.com/vcs-python/libvcs" ,
387
399
repo_dir = checkout,
388
400
remotes = {
@@ -394,7 +406,7 @@ $ pip install --user --upgrade --pre libvcs
394
406
)
395
407
```
396
408
397
- - {meth}`libvcs.projects .git.GitProject .update_repo` now accepts `set_remotes=True `
409
+ - {meth}`libvcs.sync .git.GitSync .update_repo` now accepts `set_remotes=True `
398
410
399
411
# ## Compatibility
400
412
@@ -411,9 +423,9 @@ $ pip install --user --upgrade --pre libvcs
411
423
[@ actions/ setup v3.1](https:// github.com/ actions/ setup- python/ releases/ tag/ v3.1.0), (# 316)
412
424
- New constants for `str ` -> class mappings
413
425
414
- - {data}`libvcs.projects .constants.DEFAULT_VCS_CLASS_MAP `
415
- - {data}`libvcs.projects .constants.DEFAULT_VCS_CLASS_UNION `
416
- - {data}`libvcs.projects .constants.DEFAULT_VCS_LITERAL `
426
+ - {data}`libvcs.sync .constants.DEFAULT_VCS_CLASS_MAP `
427
+ - {data}`libvcs.sync .constants.DEFAULT_VCS_CLASS_UNION `
428
+ - {data}`libvcs.sync .constants.DEFAULT_VCS_LITERAL `
417
429
418
430
- Remove tox and tox- poetry- installer. It turns out installing poetry inside a poetry project
419
431
doesn' t work well. (`poetry update`, `poetry publish`, etc. commands would fail)
0 commit comments