Debian Codegraph @

UPGRADING.rst

raw
1
2 Upgrade Guide
3 =============
4
5
6 From 0.12.1 to 1.0.0
7 --------------------
8
9 `PathSpec`:
10
11 - The "gitwildmatch" pattern has been replaced by "gitignore". Use ``PathSpec.from_lines('gitignore', ...)`` instead of ``PathSpec.from_lines('gitwildmatch', ...)``.
12
13 `PathSpec.from_lines('gitignore', ...)`:
14
15 - Patterns of the form "``foo/*``" will no longer match files in subdirectories. "``foo/test.json``" will match, but "``foo/bar/hello.c``" will no longer match. `GitIgnoreSpec` will continue to match those files. See `Issue #95`_.
16 - The exact pattern "``/``" will now match every file (equivalent to "``**``"). `GitIgnoreSpec` will continue to discard this pattern.
17
18 `PathSpec.from_lines('gitwildmatch', ...)`:
19
20 - "gitwildmatch" patterns are deprecated and will be removed in a future version.
21 - Its behavior is unchanged and does not have the changes documented above for "gitignore" patterns.
22 - To maintain this exact behavior, `GitIgnoreSpecPattern` can be used, though this use is discouraged because it's a hybrid between Git's behavior and the `gitignore`_ docs.
23
24 `GitIgnoreSpec`:
25
26 - No changes.
27
28 `GitWildMatchPattern`:
29
30 - This class is deprecated and will be removed in a future version.
31 - This has been split into `pathspec.patterns.gitignore.basic.GitIgnoreBasicPattern` and `pathspec.patterns.gitignore.spec.GitIgnoreSpecPattern`. `GitIgnoreSpecPattern` is the unchanged implementation. `GitIgnoreBasicPattern` has the changes documented above for "gitignore".
32
33 `GitWildMatchPatternError`:
34
35 - This class is deprecated and will be removed in a future version.
36 - This has been renamed to `pathspec.patterns.gitignore.GitIgnorePatternError`.
37
38
39 .. _`Issue #95`: https://github.com/cpburnz/python-pathspec/issues/95
40 .. _`gitignore`: https://git-scm.com/docs/gitignore