Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-pathspec for openSUSE:Factory
checked in at 2023-03-29 23:26:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pathspec (Old)
and /work/SRC/openSUSE:Factory/.python-pathspec.new.31432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pathspec"
Wed Mar 29 23:26:10 2023 rev:13 rq:1074507 version:0.11.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pathspec/python-pathspec.changes
2022-12-15 19:24:10.523704758 +0100
+++
/work/SRC/openSUSE:Factory/.python-pathspec.new.31432/python-pathspec.changes
2023-03-29 23:26:16.399195111 +0200
@@ -1,0 +2,14 @@
+Sun Mar 26 19:50:29 UTC 2023 - Dirk Müller <[email protected]>
+
+- update to 0.11.1:
+ * `Issue #74`_: Include directory should override exclude file.
+ * `Pull #75`_: Fix partially unknown PathLike type.
+ * Convert `os.PathLike` to a string properly using `os.fspath`.
+ * Major changes:
+ * Changed build backend to `flit_core.buildapi`_ from
+ `setuptools.build_meta`_. Building with `setuptools` through
+ `setup.py` is still supported for distributions that need it.
+ * `Issue #72`_/`Pull #73`_: Please consider switching the
+ build-system to flit_core to ease setuptools bootstrap.
+
+-------------------------------------------------------------------
Old:
----
pathspec-0.10.3.tar.gz
New:
----
pathspec-0.11.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pathspec.spec ++++++
--- /var/tmp/diff_new_pack.Hz9AIE/_old 2023-03-29 23:26:17.351199584 +0200
+++ /var/tmp/diff_new_pack.Hz9AIE/_new 2023-03-29 23:26:17.355199602 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-pathspec
#
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pathspec
-Version: 0.10.3
+Version: 0.11.1
Release: 0
Summary: Utility library for gitignore style pattern matching of file
paths
License: MPL-2.0
++++++ pathspec-0.10.3.tar.gz -> pathspec-0.11.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pathspec-0.10.3/CHANGES.rst
new/pathspec-0.11.1/CHANGES.rst
--- old/pathspec-0.10.3/CHANGES.rst 2022-12-10 05:43:40.000000000 +0100
+++ new/pathspec-0.11.1/CHANGES.rst 2023-03-15 01:50:39.560463400 +0100
@@ -3,6 +3,40 @@
==============
+0.11.1 (2023-03-14)
+-------------------
+
+Bug fixes:
+
+- `Issue #74`_: Include directory should override exclude file.
+
+Improvements:
+
+- `Pull #75`_: Fix partially unknown PathLike type.
+- Convert `os.PathLike` to a string properly using `os.fspath`.
+
+.. _`Issue #74`: https://github.com/cpburnz/python-pathspec/issues/74
+.. _`Pull #75`: https://github.com/cpburnz/python-pathspec/pull/75
+
+
+
+0.11.0 (2023-01-24)
+-------------------
+
+Major changes:
+
+- Changed build backend to `flit_core.buildapi`_ from
`setuptools.build_meta`_. Building with `setuptools` through `setup.py` is
still supported for distributions that need it. See `Issue #72`_.
+
+Improvements:
+
+- `Issue #72`_/`Pull #73`_: Please consider switching the build-system to
flit_core to ease setuptools bootstrap.
+
+
+.. _`flit_core.buildapi`: https://flit.pypa.io/en/latest/index.html
+.. _`Issue #72`: https://github.com/cpburnz/python-pathspec/issues/72
+.. _`Pull #73`: https://github.com/cpburnz/python-pathspec/pull/73
+
+
0.10.3 (2022-12-09)
-------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pathspec-0.10.3/PKG-INFO new/pathspec-0.11.1/PKG-INFO
--- old/pathspec-0.10.3/PKG-INFO 2022-12-10 05:48:58.911429000 +0100
+++ new/pathspec-0.11.1/PKG-INFO 1970-01-01 01:00:00.000000000 +0100
@@ -1,14 +1,10 @@
Metadata-Version: 2.1
Name: pathspec
-Version: 0.10.3
+Version: 0.11.1
Summary: Utility library for gitignore style pattern matching of file paths.
-Home-page: https://github.com/cpburnz/python-pathspec
-Author: Caleb P. Burns
Author-email: "Caleb P. Burns" <[email protected]>
-License: MPL 2.0
-Project-URL: Source Code, https://github.com/cpburnz/python-pathspec
-Project-URL: Documentation,
https://python-path-specification.readthedocs.io/en/latest/index.html
-Project-URL: Issue Tracker, https://github.com/cpburnz/python-pathspec/issues
+Requires-Python: >=3.7
+Description-Content-Type: text/x-rst
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
@@ -24,9 +20,9 @@
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
-Requires-Python: >=3.7
-Description-Content-Type: text/x-rst
-License-File: LICENSE
+Project-URL: Documentation,
https://python-path-specification.readthedocs.io/en/latest/index.html
+Project-URL: Issue Tracker, https://github.com/cpburnz/python-pathspec/issues
+Project-URL: Source Code, https://github.com/cpburnz/python-pathspec
PathSpec
@@ -167,7 +163,6 @@
required:
- `build`_ (>=0.6.0)
-- `setuptools`_ (>=40.8.0)
*pathspec* can then be built and installed with::
@@ -176,7 +171,6 @@
.. _`PyPI`: http://pypi.python.org/pypi/pathspec
.. _`build`: https://pypi.org/project/build/
-.. _`setuptools`: https://pypi.org/project/setuptools/
Documentation
@@ -202,6 +196,40 @@
==============
+0.11.1 (2023-03-14)
+-------------------
+
+Bug fixes:
+
+- `Issue #74`_: Include directory should override exclude file.
+
+Improvements:
+
+- `Pull #75`_: Fix partially unknown PathLike type.
+- Convert `os.PathLike` to a string properly using `os.fspath`.
+
+.. _`Issue #74`: https://github.com/cpburnz/python-pathspec/issues/74
+.. _`Pull #75`: https://github.com/cpburnz/python-pathspec/pull/75
+
+
+
+0.11.0 (2023-01-24)
+-------------------
+
+Major changes:
+
+- Changed build backend to `flit_core.buildapi`_ from
`setuptools.build_meta`_. Building with `setuptools` through `setup.py` is
still supported for distributions that need it. See `Issue #72`_.
+
+Improvements:
+
+- `Issue #72`_/`Pull #73`_: Please consider switching the build-system to
flit_core to ease setuptools bootstrap.
+
+
+.. _`flit_core.buildapi`: https://flit.pypa.io/en/latest/index.html
+.. _`Issue #72`: https://github.com/cpburnz/python-pathspec/issues/72
+.. _`Pull #73`: https://github.com/cpburnz/python-pathspec/pull/73
+
+
0.10.3 (2022-12-09)
-------------------
@@ -551,3 +579,4 @@
------------------
- Initial release.
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pathspec-0.10.3/README-dist.rst
new/pathspec-0.11.1/README-dist.rst
--- old/pathspec-0.10.3/README-dist.rst 2022-12-10 05:48:56.000000000 +0100
+++ new/pathspec-0.11.1/README-dist.rst 2023-03-15 01:56:33.877085700 +0100
@@ -137,7 +137,6 @@
required:
- `build`_ (>=0.6.0)
-- `setuptools`_ (>=40.8.0)
*pathspec* can then be built and installed with::
@@ -146,7 +145,6 @@
.. _`PyPI`: http://pypi.python.org/pypi/pathspec
.. _`build`: https://pypi.org/project/build/
-.. _`setuptools`: https://pypi.org/project/setuptools/
Documentation
@@ -172,6 +170,40 @@
==============
+0.11.1 (2023-03-14)
+-------------------
+
+Bug fixes:
+
+- `Issue #74`_: Include directory should override exclude file.
+
+Improvements:
+
+- `Pull #75`_: Fix partially unknown PathLike type.
+- Convert `os.PathLike` to a string properly using `os.fspath`.
+
+.. _`Issue #74`: https://github.com/cpburnz/python-pathspec/issues/74
+.. _`Pull #75`: https://github.com/cpburnz/python-pathspec/pull/75
+
+
+
+0.11.0 (2023-01-24)
+-------------------
+
+Major changes:
+
+- Changed build backend to `flit_core.buildapi`_ from
`setuptools.build_meta`_. Building with `setuptools` through `setup.py` is
still supported for distributions that need it. See `Issue #72`_.
+
+Improvements:
+
+- `Issue #72`_/`Pull #73`_: Please consider switching the build-system to
flit_core to ease setuptools bootstrap.
+
+
+.. _`flit_core.buildapi`: https://flit.pypa.io/en/latest/index.html
+.. _`Issue #72`: https://github.com/cpburnz/python-pathspec/issues/72
+.. _`Pull #73`: https://github.com/cpburnz/python-pathspec/pull/73
+
+
0.10.3 (2022-12-09)
-------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pathspec-0.10.3/README.rst
new/pathspec-0.11.1/README.rst
--- old/pathspec-0.10.3/README.rst 2022-08-31 05:29:39.000000000 +0200
+++ new/pathspec-0.11.1/README.rst 2023-01-22 04:11:50.736258700 +0100
@@ -137,7 +137,6 @@
required:
- `build`_ (>=0.6.0)
-- `setuptools`_ (>=40.8.0)
*pathspec* can then be built and installed with::
@@ -146,7 +145,6 @@
.. _`PyPI`: http://pypi.python.org/pypi/pathspec
.. _`build`: https://pypi.org/project/build/
-.. _`setuptools`: https://pypi.org/project/setuptools/
Documentation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pathspec-0.10.3/pathspec/_meta.py
new/pathspec-0.11.1/pathspec/_meta.py
--- old/pathspec-0.10.3/pathspec/_meta.py 2022-12-10 05:44:56.000000000
+0100
+++ new/pathspec-0.11.1/pathspec/_meta.py 2023-03-15 01:52:16.504086300
+0100
@@ -3,7 +3,7 @@
"""
__author__ = "Caleb P. Burns"
-__copyright__ = "Copyright © 2013-2022 Caleb P. Burns"
+__copyright__ = "Copyright © 2013-2023 Caleb P. Burns"
__credits__ = [
"dahlia <https://github.com/dahlia>",
"highb <https://github.com/highb>",
@@ -49,6 +49,7 @@
"haimat <https://github.com/haimat>",
"Avasam <https://github.com/Avasam>",
"yschroeder <https://github.com/yschroeder>",
+ "axesider <https://github.com/axesider>",
]
__license__ = "MPL 2.0"
-__version__ = "0.10.3"
+__version__ = "0.11.1"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pathspec-0.10.3/pathspec/gitignore.py
new/pathspec-0.11.1/pathspec/gitignore.py
--- old/pathspec-0.10.3/pathspec/gitignore.py 2022-12-03 15:19:34.000000000
+0100
+++ new/pathspec-0.11.1/pathspec/gitignore.py 2023-02-26 01:15:37.923807900
+0100
@@ -128,7 +128,10 @@
# Pattern matched by a file
pattern.
priority = 2
- if priority >= out_priority:
+ if pattern.include and dir_mark:
+ out_matched = pattern.include
+ out_priority = priority
+ elif priority >= out_priority:
out_matched = pattern.include
out_priority = priority
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pathspec-0.10.3/pathspec/pathspec.py
new/pathspec-0.11.1/pathspec/pathspec.py
--- old/pathspec-0.10.3/pathspec/pathspec.py 2022-12-03 15:46:23.000000000
+0100
+++ new/pathspec-0.11.1/pathspec/pathspec.py 2023-02-23 01:35:42.683848400
+0100
@@ -3,6 +3,7 @@
of files.
"""
+import sys
from collections.abc import (
Collection as CollectionType)
from itertools import (
@@ -24,6 +25,7 @@
from .pattern import (
Pattern)
from .util import (
+ StrPath,
TreeEntry,
_filter_patterns,
_is_iterable,
@@ -164,13 +166,13 @@
def match_file(
self,
- file: Union[str, PathLike],
+ file: StrPath,
separators: Optional[Collection[str]] = None,
) -> bool:
"""
Matches the file to this path-spec.
- *file* (:class:`str` or :class:`os.PathLike`) is the file path
to be
+ *file* (:class:`str` or :class:`os.PathLike[str]`) is the file
path to be
matched against :attr:`self.patterns <PathSpec.patterns>`.
*separators* (:class:`~collections.abc.Collection` of
:class:`str`)
@@ -184,14 +186,14 @@
def match_files(
self,
- files: Iterable[Union[str, PathLike]],
+ files: Iterable[StrPath],
separators: Optional[Collection[str]] = None,
- ) -> Iterator[Union[str, PathLike]]:
+ ) -> Iterator[StrPath]:
"""
Matches the files to this path-spec.
*files* (:class:`~collections.abc.Iterable` of :class:`str` or
- :class:`os.PathLike`) contains the file paths to be matched
against
+ :class:`os.PathLike[str]`) contains the file paths to be
matched against
:attr:`self.patterns <PathSpec.patterns>`.
*separators* (:class:`~collections.abc.Collection` of
:class:`str`;
@@ -200,7 +202,7 @@
information.
Returns the matched files (:class:`~collections.abc.Iterator` of
- :class:`str` or :class:`os.PathLike`).
+ :class:`str` or :class:`os.PathLike[str]`).
"""
if not _is_iterable(files):
raise TypeError(f"files:{files!r} is not an iterable.")
@@ -213,7 +215,7 @@
def match_tree_entries(
self,
- root: Union[str, PathLike],
+ root: StrPath,
on_error: Optional[Callable] = None,
follow_links: Optional[bool] = None,
) -> Iterator[TreeEntry]:
@@ -221,7 +223,7 @@
Walks the specified root path for all files and matches them to
this
path-spec.
- *root* (:class:`str` or :class:`os.PathLike`) is the root
directory
+ *root* (:class:`str` or :class:`os.PathLike[str]`) is the root
directory
to search.
*on_error* (:class:`~collections.abc.Callable` or :data:`None`)
@@ -240,7 +242,7 @@
def match_tree_files(
self,
- root: Union[str, PathLike],
+ root: StrPath,
on_error: Optional[Callable] = None,
follow_links: Optional[bool] = None,
) -> Iterator[str]:
@@ -248,7 +250,7 @@
Walks the specified root path for all files and matches them to
this
path-spec.
- *root* (:class:`str` or :class:`os.PathLike`) is the root
directory
+ *root* (:class:`str` or :class:`os.PathLike[str]`) is the root
directory
to search for files.
*on_error* (:class:`~collections.abc.Callable` or :data:`None`)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pathspec-0.10.3/pathspec/util.py
new/pathspec-0.11.1/pathspec/util.py
--- old/pathspec-0.10.3/pathspec/util.py 2022-12-10 05:22:21.000000000
+0100
+++ new/pathspec-0.11.1/pathspec/util.py 2023-02-23 01:35:19.410271000
+0100
@@ -7,6 +7,7 @@
import pathlib
import posixpath
import stat
+import sys
import warnings
from collections.abc import (
Collection as CollectionType,
@@ -30,6 +31,11 @@
from .pattern import (
Pattern)
+if sys.version_info >= (3, 9):
+ StrPath = Union[str, PathLike[str]]
+else:
+ StrPath = Union[str, PathLike]
+
NORMALIZE_PATH_SEPS = [
__sep
for __sep in [os.sep, os.altsep]
@@ -141,14 +147,14 @@
def iter_tree_entries(
- root: Union[str, PathLike],
+ root: StrPath,
on_error: Optional[Callable] = None,
follow_links: Optional[bool] = None,
) -> Iterator['TreeEntry']:
"""
Walks the specified directory for all files and directories.
- *root* (:class:`str` or :class:`os.PathLike`) is the root directory to
+ *root* (:class:`str` or :class:`os.PathLike[str]`) is the root
directory to
search.
*on_error* (:class:`~collections.abc.Callable` or :data:`None`)
@@ -257,14 +263,14 @@
def iter_tree_files(
- root: Union[str, PathLike],
+ root: StrPath,
on_error: Optional[Callable] = None,
follow_links: Optional[bool] = None,
) -> Iterator[str]:
"""
Walks the specified directory for all files.
- *root* (:class:`str` or :class:`os.PathLike`) is the root directory to
+ *root* (:class:`str` or :class:`os.PathLike[str]`) is the root
directory to
search for files.
*on_error* (:class:`~collections.abc.Callable` or :data:`None`)
@@ -365,14 +371,14 @@
def normalize_file(
- file: Union[str, PathLike],
+ file: StrPath,
separators: Optional[Collection[str]] = None,
) -> str:
"""
Normalizes the file path to use the POSIX path separator (i.e.,
:data:`'/'`), and make the paths relative (remove leading :data:`'/'`).
- *file* (:class:`str` or :class:`os.PathLike`) is the file path.
+ *file* (:class:`str` or :class:`os.PathLike[str]`) is the file path.
*separators* (:class:`~collections.abc.Collection` of :class:`str`; or
:data:`None`) optionally contains the path separators to normalize.
@@ -388,7 +394,7 @@
separators = NORMALIZE_PATH_SEPS
# Convert path object to string.
- norm_file = str(file)
+ norm_file: str = os.fspath(file)
for sep in separators:
norm_file = norm_file.replace(sep, posixpath.sep)
@@ -405,9 +411,9 @@
def normalize_files(
- files: Iterable[Union[str, PathLike]],
+ files: Iterable[StrPath],
separators: Optional[Collection[str]] = None,
-) -> Dict[str, List[Union[str, PathLike]]]:
+) -> Dict[str, List[StrPath]]:
"""
DEPRECATED: This function is no longer used. Use the
:func:`.normalize_file`
function with a loop for better results.
@@ -415,7 +421,7 @@
Normalizes the file paths to use the POSIX path separator.
*files* (:class:`~collections.abc.Iterable` of :class:`str` or
- :class:`os.PathLike`) contains the file paths to be normalized.
+ :class:`os.PathLike[str]`) contains the file paths to be normalized.
*separators* (:class:`~collections.abc.Collection` of :class:`str`; or
:data:`None`) optionally contains the path separators to normalize.
@@ -423,7 +429,7 @@
Returns a :class:`dict` mapping each normalized file path (:class:`str`)
to the original file paths (:class:`list` of :class:`str` or
- :class:`os.PathLike`).
+ :class:`os.PathLike[str]`).
"""
warnings.warn((
"util.normalize_files() is deprecated. Use
util.normalize_file() "
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pathspec-0.10.3/pathspec.egg-info/PKG-INFO
new/pathspec-0.11.1/pathspec.egg-info/PKG-INFO
--- old/pathspec-0.10.3/pathspec.egg-info/PKG-INFO 2022-12-10
05:48:58.000000000 +0100
+++ new/pathspec-0.11.1/pathspec.egg-info/PKG-INFO 1970-01-01
01:00:00.000000000 +0100
@@ -1,553 +0,0 @@
-Metadata-Version: 2.1
-Name: pathspec
-Version: 0.10.3
-Summary: Utility library for gitignore style pattern matching of file paths.
-Home-page: https://github.com/cpburnz/python-pathspec
-Author: Caleb P. Burns
-Author-email: "Caleb P. Burns" <[email protected]>
-License: MPL 2.0
-Project-URL: Source Code, https://github.com/cpburnz/python-pathspec
-Project-URL: Documentation,
https://python-path-specification.readthedocs.io/en/latest/index.html
-Project-URL: Issue Tracker, https://github.com/cpburnz/python-pathspec/issues
-Classifier: Development Status :: 4 - Beta
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
-Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.7
-Classifier: Programming Language :: Python :: 3.8
-Classifier: Programming Language :: Python :: 3.9
-Classifier: Programming Language :: Python :: 3.10
-Classifier: Programming Language :: Python :: 3.11
-Classifier: Programming Language :: Python :: Implementation :: CPython
-Classifier: Programming Language :: Python :: Implementation :: PyPy
-Classifier: Topic :: Software Development :: Libraries :: Python Modules
-Classifier: Topic :: Utilities
-Requires-Python: >=3.7
-Description-Content-Type: text/x-rst
-License-File: LICENSE
-
-
-PathSpec
-========
-
-*pathspec* is a utility library for pattern matching of file paths. So
-far this only includes Git's wildmatch pattern matching which itself is
-derived from Rsync's wildmatch. Git uses wildmatch for its `gitignore`_
-files.
-
-.. _`gitignore`: http://git-scm.com/docs/gitignore
-
-
-Tutorial
---------
-
-Say you have a "Projects" directory and you want to back it up, but only
-certain files, and ignore others depending on certain conditions::
-
- >>> import pathspec
- >>> # The gitignore-style patterns for files to select, but we're
including
- >>> # instead of ignoring.
- >>> spec_text = """
- ...
- ... # This is a comment because the line begins with a hash: "#"
- ...
- ... # Include several project directories (and all descendants)
relative to
- ... # the current directory. To reference a directory you must end with
a
- ... # slash: "/"
- ... /project-a/
- ... /project-b/
- ... /project-c/
- ...
- ... # Patterns can be negated by prefixing with exclamation mark: "!"
- ...
- ... # Ignore temporary files beginning or ending with "~" and ending
with
- ... # ".swp".
- ... !~*
- ... !*~
- ... !*.swp
- ...
- ... # These are python projects so ignore compiled python files from
- ... # testing.
- ... !*.pyc
- ...
- ... # Ignore the build directories but only directly under the project
- ... # directories.
- ... !/*/build/
- ...
- ... """
-
-We want to use the ``GitWildMatchPattern`` class to compile our patterns. The
-``PathSpec`` class provides an interface around pattern implementations::
-
- >>> spec =
pathspec.PathSpec.from_lines(pathspec.patterns.GitWildMatchPattern,
spec_text.splitlines())
-
-That may be a mouthful but it allows for additional patterns to be implemented
-in the future without them having to deal with anything but matching the paths
-sent to them. ``GitWildMatchPattern`` is the implementation of the actual
-pattern which internally gets converted into a regular expression. ``PathSpec``
-is a simple wrapper around a list of compiled patterns.
-
-To make things simpler, we can use the registered name for a pattern class
-instead of always having to provide a reference to the class itself. The
-``GitWildMatchPattern`` class is registered as **gitwildmatch**::
-
- >>> spec = pathspec.PathSpec.from_lines('gitwildmatch',
spec_text.splitlines())
-
-If we wanted to manually compile the patterns we can just do the following::
-
- >>> patterns = map(pathspec.patterns.GitWildMatchPattern,
spec_text.splitlines())
- >>> spec = PathSpec(patterns)
-
-``PathSpec.from_lines()`` is simply a class method which does just that.
-
-If you want to load the patterns from file, you can pass the file instance
-directly as well::
-
- >>> with open('patterns.list', 'r') as fh:
- >>> spec = pathspec.PathSpec.from_lines('gitwildmatch', fh)
-
-You can perform matching on a whole directory tree with::
-
- >>> matches = spec.match_tree('path/to/directory')
-
-Or you can perform matching on a specific set of file paths with::
-
- >>> matches = spec.match_files(file_paths)
-
-Or check to see if an individual file matches::
-
- >>> is_matched = spec.match_file(file_path)
-
-There is a specialized class, ``pathspec.GitIgnoreSpec``, which more closely
-implements the behavior of **gitignore**. This uses ``GitWildMatchPattern``
-pattern by default and handles some edge cases differently from the generic
-``PathSpec`` class. ``GitIgnoreSpec`` can be used without specifying the
pattern
-factory::
-
- >>> spec = pathspec.GitIgnoreSpec.from_lines(spec_text.splitlines())
-
-
-License
--------
-
-*pathspec* is licensed under the `Mozilla Public License Version 2.0`_. See
-`LICENSE`_ or the `FAQ`_ for more information.
-
-In summary, you may use *pathspec* with any closed or open source project
-without affecting the license of the larger work so long as you:
-
-- give credit where credit is due,
-
-- and release any custom changes made to *pathspec*.
-
-.. _`Mozilla Public License Version 2.0`: http://www.mozilla.org/MPL/2.0
-.. _`LICENSE`: LICENSE
-.. _`FAQ`: http://www.mozilla.org/MPL/2.0/FAQ.html
-
-
-Source
-------
-
-The source code for *pathspec* is available from the GitHub repo
-`cpburnz/python-pathspec`_.
-
-.. _`cpburnz/python-pathspec`: https://github.com/cpburnz/python-pathspec
-
-
-Installation
-------------
-
-*pathspec* is available for install through `PyPI`_::
-
- pip install pathspec
-
-*pathspec* can also be built from source. The following packages will be
-required:
-
-- `build`_ (>=0.6.0)
-- `setuptools`_ (>=40.8.0)
-
-*pathspec* can then be built and installed with::
-
- python -m build
- pip install dist/pathspec-*-py3-none-any.whl
-
-.. _`PyPI`: http://pypi.python.org/pypi/pathspec
-.. _`build`: https://pypi.org/project/build/
-.. _`setuptools`: https://pypi.org/project/setuptools/
-
-
-Documentation
--------------
-
-Documentation for *pathspec* is available on `Read the Docs`_.
-
-.. _`Read the Docs`: https://python-path-specification.readthedocs.io
-
-
-Other Languages
----------------
-
-The related project `pathspec-ruby`_ (by *highb*) provides a similar library as
-a `Ruby gem`_.
-
-.. _`pathspec-ruby`: https://github.com/highb/pathspec-ruby
-.. _`Ruby gem`: https://rubygems.org/gems/pathspec
-
-
-
-Change History
-==============
-
-
-0.10.3 (2022-12-09)
--------------------
-
-New features:
-
-- Added utility function `pathspec.util.append_dir_sep()` to aid in
distinguishing between directories and files on the file-system. See `Issue
#65`_.
-
-Bug fixes:
-
-- `Issue #66`_/`Pull #67`_: Package not marked as py.typed.
-- `Issue #68`_: Exports are considered private.
-- `Issue #70`_/`Pull #71`_: 'Self' string literal type is Unknown in pyright.
-
-Improvements:
-
-- `Issue #65`_: Checking directories via match_file() does not work on Path
objects.
-
-
-.. _`Issue #65`: https://github.com/cpburnz/python-pathspec/issues/65
-.. _`Issue #66`: https://github.com/cpburnz/python-pathspec/issues/66
-.. _`Pull #67`: https://github.com/cpburnz/python-pathspec/pull/67
-.. _`Issue #68`: https://github.com/cpburnz/python-pathspec/issues/68
-.. _`Issue #70`: https://github.com/cpburnz/python-pathspec/issues/70
-.. _`Pull #71`: https://github.com/cpburnz/python-pathspec/pull/71
-
-
-0.10.2 (2022-11-12)
--------------------
-
-Bug fixes:
-
-- Fix failing tests on Windows.
-- Type hint on *root* parameter on
`pathspec.pathspec.PathSpec.match_tree_entries()`.
-- Type hint on *root* parameter on
`pathspec.pathspec.PathSpec.match_tree_files()`.
-- Type hint on *root* parameter on `pathspec.util.iter_tree_entries()`.
-- Type hint on *root* parameter on `pathspec.util.iter_tree_files()`.
-- `Issue #64`_: IndexError with my .gitignore file when trying to build a
Python package.
-
-Improvements:
-
-- `Pull #58`_: CI: add GitHub Actions test workflow.
-
-
-.. _`Pull #58`: https://github.com/cpburnz/python-pathspec/pull/58
-.. _`Issue #64`: https://github.com/cpburnz/python-pathspec/issues/64
-
-
-0.10.1 (2022-09-02)
--------------------
-
-Bug fixes:
-
-- Fix documentation on `pathspec.pattern.RegexPattern.match_file()`.
-- `Pull #60`_: Remove redundant wheel dep from pyproject.toml.
-- `Issue #61`_: Dist failure for Fedora, CentOS, EPEL.
-- `Issue #62`_: Since version 0.10.0 pure wildcard does not work in some cases.
-
-Improvements:
-
-- Restore support for legacy installations using `setup.py`. See `Issue #61`_.
-
-
-.. _`Pull #60`: https://github.com/cpburnz/python-pathspec/pull/60
-.. _`Issue #61`: https://github.com/cpburnz/python-pathspec/issues/61
-.. _`Issue #62`: https://github.com/cpburnz/python-pathspec/issues/62
-
-
-0.10.0 (2022-08-30)
--------------------
-
-Major changes:
-
-- Dropped support of EOL Python 2.7, 3.5, 3.6. See `Issue #47`_.
-- The *gitwildmatch* pattern `dir/*` is now handled the same as `dir/`. This
means `dir/*` will now match all descendants rather than only direct children.
See `Issue #19`_.
-- Added `pathspec.GitIgnoreSpec` class (see new features).
-- Changed build system to `pyproject.toml`_ and build backend to
`setuptools.build_meta`_ which may have unforeseen consequences.
-- Renamed GitHub project from `python-path-specification`_ to
`python-pathspec`_. See `Issue #35`_.
-
-API changes:
-
-- Deprecated: `pathspec.util.match_files()` is an old function no longer used.
-- Deprecated: `pathspec.match_files()` is an old function no longer used.
-- Deprecated: `pathspec.util.normalize_files()` is no longer used.
-- Deprecated: `pathspec.util.iter_tree()` is an alias for
`pathspec.util.iter_tree_files()`.
-- Deprecated: `pathspec.iter_tree()` is an alias for
`pathspec.util.iter_tree_files()`.
-- Deprecated: `pathspec.pattern.Pattern.match()` is no longer used. Use
or implement
- `pathspec.pattern.Pattern.match_file()`.
-
-New features:
-
-- Added class `pathspec.gitignore.GitIgnoreSpec` (with alias
`pathspec.GitIgnoreSpec`) to implement *gitignore* behavior not possible with
standard `PathSpec` class. The particular *gitignore* behavior implemented is
prioritizing patterns matching the file directly over matching an ancestor
directory.
-
-Bug fixes:
-
-- `Issue #19`_: Files inside an ignored sub-directory are not matched.
-- `Issue #41`_: Incorrectly (?) matches files inside directories that do match.
-- `Pull #51`_: Refactor deprecated unittest aliases for Python 3.11
compatibility.
-- `Issue #53`_: Symlink pathspec_meta.py breaks Windows.
-- `Issue #54`_: test_util.py uses os.symlink which can fail on Windows.
-- `Issue #55`_: Backslashes at start of pattern not handled correctly.
-- `Pull #56`_: pyproject.toml: include subpackages in setuptools config
-- `Issue #57`_: `!` doesn't exclude files in directories if the pattern
doesn't have a trailing slash.
-
-Improvements:
-
-- Support Python 3.10, 3.11.
-- Modernize code to Python 3.7.
-- `Issue #52`_: match_files() is not a pure generator function, and it impacts
tree_*() gravely.
-
-
-.. _`python-path-specification`:
https://github.com/cpburnz/python-path-specification
-.. _`python-pathspec`: https://github.com/cpburnz/python-pathspec
-.. _`pyproject.toml`:
https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/
-.. _`setuptools.build_meta`:
https://setuptools.pypa.io/en/latest/build_meta.html
-.. _`Issue #19`: https://github.com/cpburnz/python-pathspec/issues/19
-.. _`Issue #35`: https://github.com/cpburnz/python-pathspec/issues/35
-.. _`Issue #41`: https://github.com/cpburnz/python-pathspec/issues/41
-.. _`Issue #47`: https://github.com/cpburnz/python-pathspec/issues/47
-.. _`Pull #51`: https://github.com/cpburnz/python-pathspec/pull/51
-.. _`Issue #52`: https://github.com/cpburnz/python-pathspec/issues/52
-.. _`Issue #53`: https://github.com/cpburnz/python-pathspec/issues/53
-.. _`Issue #54`: https://github.com/cpburnz/python-pathspec/issues/54
-.. _`Issue #55`: https://github.com/cpburnz/python-pathspec/issues/55
-.. _`Pull #56`: https://github.com/cpburnz/python-pathspec/pull/56
-.. _`Issue #57`: https://github.com/cpburnz/python-pathspec/issues/57
-
-
-0.9.0 (2021-07-17)
-------------------
-
-- `Issue #44`_/`Pull #50`_: Raise `GitWildMatchPatternError` for invalid git
patterns.
-- `Pull #45`_: Fix for duplicate leading double-asterisk, and edge cases.
-- `Issue #46`_: Fix matching absolute paths.
-- API change: `util.normalize_files()` now returns a `Dict[str,
List[pathlike]]` instead of a `Dict[str, pathlike]`.
-- Added type hinting.
-
-.. _`Issue #44`: https://github.com/cpburnz/python-pathspec/issues/44
-.. _`Pull #45`: https://github.com/cpburnz/python-pathspec/pull/45
-.. _`Issue #46`: https://github.com/cpburnz/python-pathspec/issues/46
-.. _`Pull #50`: https://github.com/cpburnz/python-pathspec/pull/50
-
-
-0.8.1 (2020-11-07)
-------------------
-
-- `Pull #43`_: Add support for addition operator.
-
-.. _`Pull #43`: https://github.com/cpburnz/python-pathspec/pull/43
-
-
-0.8.0 (2020-04-09)
-------------------
-
-- `Issue #30`_: Expose what patterns matched paths. Added
`util.detailed_match_files()`.
-- `Issue #31`_: `match_tree()` doesn't return symlinks.
-- `Issue #34`_: Support `pathlib.Path`\ s.
-- Add `PathSpec.match_tree_entries` and `util.iter_tree_entries()` to support
directories and symlinks.
-- API change: `match_tree()` has been renamed to `match_tree_files()`. The old
name `match_tree()` is still available as an alias.
-- API change: `match_tree_files()` now returns symlinks. This is a bug fix but
it will change the returned results.
-
-.. _`Issue #30`: https://github.com/cpburnz/python-pathspec/issues/30
-.. _`Issue #31`: https://github.com/cpburnz/python-pathspec/issues/31
-.. _`Issue #34`: https://github.com/cpburnz/python-pathspec/issues/34
-
-
-0.7.0 (2019-12-27)
-------------------
-
-- `Pull #28`_: Add support for Python 3.8, and drop Python 3.4.
-- `Pull #29`_: Publish bdist wheel.
-
-.. _`Pull #28`: https://github.com/cpburnz/python-pathspec/pull/28
-.. _`Pull #29`: https://github.com/cpburnz/python-pathspec/pull/29
-
-
-0.6.0 (2019-10-03)
-------------------
-
-- `Pull #24`_: Drop support for Python 2.6, 3.2, and 3.3.
-- `Pull #25`_: Update README.rst.
-- `Pull #26`_: Method to escape gitwildmatch.
-
-.. _`Pull #24`: https://github.com/cpburnz/python-pathspec/pull/24
-.. _`Pull #25`: https://github.com/cpburnz/python-pathspec/pull/25
-.. _`Pull #26`: https://github.com/cpburnz/python-pathspec/pull/26
-
-
-0.5.9 (2018-09-15)
-------------------
-
-- Fixed file system error handling.
-
-
-0.5.8 (2018-09-15)
-------------------
-
-- Improved type checking.
-- Created scripts to test Python 2.6 because Tox removed support for it.
-- Improved byte string handling in Python 3.
-- `Issue #22`_: Handle dangling symlinks.
-
-.. _`Issue #22`: https://github.com/cpburnz/python-pathspec/issues/22
-
-
-0.5.7 (2018-08-14)
-------------------
-
-- `Issue #21`_: Fix collections deprecation warning.
-
-.. _`Issue #21`: https://github.com/cpburnz/python-pathspec/issues/21
-
-
-0.5.6 (2018-04-06)
-------------------
-
-- Improved unit tests.
-- Improved type checking.
-- `Issue #20`_: Support current directory prefix.
-
-.. _`Issue #20`: https://github.com/cpburnz/python-pathspec/issues/20
-
-
-0.5.5 (2017-09-09)
-------------------
-
-- Add documentation link to README.
-
-
-0.5.4 (2017-09-09)
-------------------
-
-- `Pull #17`_: Add link to Ruby implementation of *pathspec*.
-- Add sphinx documentation.
-
-.. _`Pull #17`: https://github.com/cpburnz/python-pathspec/pull/17
-
-
-0.5.3 (2017-07-01)
-------------------
-
-- `Issue #14`_: Fix byte strings for Python 3.
-- `Pull #15`_: Include "LICENSE" in source package.
-- `Issue #16`_: Support Python 2.6.
-
-.. _`Issue #14`: https://github.com/cpburnz/python-pathspec/issues/14
-.. _`Pull #15`: https://github.com/cpburnz/python-pathspec/pull/15
-.. _`Issue #16`: https://github.com/cpburnz/python-pathspec/issues/16
-
-
-0.5.2 (2017-04-04)
-------------------
-
-- Fixed change log.
-
-
-0.5.1 (2017-04-04)
-------------------
-
-- `Pull #13`_: Add equality methods to `PathSpec` and `RegexPattern`.
-
-.. _`Pull #13`: https://github.com/cpburnz/python-pathspec/pull/13
-
-
-0.5.0 (2016-08-22)
-------------------
-
-- `Issue #12`_: Add `PathSpec.match_file()`.
-- Renamed `gitignore.GitIgnorePattern` to
`patterns.gitwildmatch.GitWildMatchPattern`.
-- Deprecated `gitignore.GitIgnorePattern`.
-
-.. _`Issue #12`: https://github.com/cpburnz/python-pathspec/issues/12
-
-
-0.4.0 (2016-07-15)
-------------------
-
-- `Issue #11`_: Support converting patterns into regular expressions without
compiling them.
-- API change: Subclasses of `RegexPattern` should implement
`pattern_to_regex()`.
-
-.. _`Issue #11`: https://github.com/cpburnz/python-pathspec/issues/11
-
-
-0.3.4 (2015-08-24)
-------------------
-
-- `Pull #7`_: Fixed non-recursive links.
-- `Pull #8`_: Fixed edge cases in gitignore patterns.
-- `Pull #9`_: Fixed minor usage documentation.
-- Fixed recursion detection.
-- Fixed trivial incompatibility with Python 3.2.
-
-.. _`Pull #7`: https://github.com/cpburnz/python-pathspec/pull/7
-.. _`Pull #8`: https://github.com/cpburnz/python-pathspec/pull/8
-.. _`Pull #9`: https://github.com/cpburnz/python-pathspec/pull/9
-
-
-0.3.3 (2014-11-21)
-------------------
-
-- Improved documentation.
-
-
-0.3.2 (2014-11-08)
-------------------
-
-- `Pull #5`_: Use tox for testing.
-- `Issue #6`_: Fixed matching Windows paths.
-- Improved documentation.
-- API change: `spec.match_tree()` and `spec.match_files()` now return
iterators instead of sets.
-
-.. _`Pull #5`: https://github.com/cpburnz/python-pathspec/pull/5
-.. _`Issue #6`: https://github.com/cpburnz/python-pathspec/issues/6
-
-
-0.3.1 (2014-09-17)
-------------------
-
-- Updated README.
-
-
-0.3.0 (2014-09-17)
-------------------
-
-- `Pull #3`_: Fixed trailing slash in gitignore patterns.
-- `Pull #4`_: Fixed test for trailing slash in gitignore patterns.
-- Added registered patterns.
-
-.. _`Pull #3`: https://github.com/cpburnz/python-pathspec/pull/3
-.. _`Pull #4`: https://github.com/cpburnz/python-pathspec/pull/4
-
-
-0.2.2 (2013-12-17)
-------------------
-
-- Fixed setup.py.
-
-
-0.2.1 (2013-12-17)
-------------------
-
-- Added tests.
-- Fixed comment gitignore patterns.
-- Fixed relative path gitignore patterns.
-
-
-0.2.0 (2013-12-07)
-------------------
-
-- Initial release.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pathspec-0.10.3/pathspec.egg-info/SOURCES.txt
new/pathspec-0.11.1/pathspec.egg-info/SOURCES.txt
--- old/pathspec-0.10.3/pathspec.egg-info/SOURCES.txt 2022-12-10
05:48:58.000000000 +0100
+++ new/pathspec-0.11.1/pathspec.egg-info/SOURCES.txt 1970-01-01
01:00:00.000000000 +0100
@@ -1,35 +0,0 @@
-CHANGES.rst
-LICENSE
-MANIFEST.in
-README-dist.rst
-README.rst
-prebuild.py
-pyproject.toml
-setup.cfg
-setup.py
-tox.ini
-doc/Makefile
-doc/source/api.rst
-doc/source/changes.rst
-doc/source/conf.py
-doc/source/index.rst
-doc/source/readme.rst
-pathspec/__init__.py
-pathspec/_meta.py
-pathspec/gitignore.py
-pathspec/pathspec.py
-pathspec/pattern.py
-pathspec/py.typed
-pathspec/util.py
-pathspec.egg-info/PKG-INFO
-pathspec.egg-info/SOURCES.txt
-pathspec.egg-info/dependency_links.txt
-pathspec.egg-info/top_level.txt
-pathspec/patterns/__init__.py
-pathspec/patterns/gitwildmatch.py
-tests/__init__.py
-tests/test_gitignore.py
-tests/test_gitwildmatch.py
-tests/test_pathspec.py
-tests/test_util.py
-tests/util.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pathspec-0.10.3/pathspec.egg-info/dependency_links.txt
new/pathspec-0.11.1/pathspec.egg-info/dependency_links.txt
--- old/pathspec-0.10.3/pathspec.egg-info/dependency_links.txt 2022-12-10
05:48:58.000000000 +0100
+++ new/pathspec-0.11.1/pathspec.egg-info/dependency_links.txt 1970-01-01
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pathspec-0.10.3/pathspec.egg-info/top_level.txt
new/pathspec-0.11.1/pathspec.egg-info/top_level.txt
--- old/pathspec-0.10.3/pathspec.egg-info/top_level.txt 2022-12-10
05:48:58.000000000 +0100
+++ new/pathspec-0.11.1/pathspec.egg-info/top_level.txt 1970-01-01
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-pathspec
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pathspec-0.10.3/prebuild.py
new/pathspec-0.11.1/prebuild.py
--- old/pathspec-0.10.3/prebuild.py 2022-09-02 03:00:25.000000000 +0200
+++ new/pathspec-0.11.1/prebuild.py 2023-01-22 04:11:50.736258700 +0100
@@ -50,16 +50,16 @@
'long_description_content_type': "text/x-rst",
'name': config['project']['name'],
'url': config['project']['urls']['Source Code'],
- 'version': f"attr:
{config['tool']['setuptools']['dynamic']['version']['attr']}",
+ 'version': "attr: pathspec._meta.__version__",
}
output['options'] = {
'packages': "find:",
'python_requires': config['project']['requires-python'],
- 'setup_requires': ", ".join(config['build-system']['requires']),
+ 'setup_requires': "setuptools>=40.8.0",
'test_suite': "tests",
}
output['options.packages.find'] = {
- 'include': ",
".join(config['tool']['setuptools']['packages']['find']['include'])
+ 'include': "pathspec, pathspec.*",
}
with open("setup.cfg", 'w', encoding='utf8') as fh:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pathspec-0.10.3/pyproject.toml
new/pathspec-0.11.1/pyproject.toml
--- old/pathspec-0.10.3/pyproject.toml 2022-09-01 02:23:01.000000000 +0200
+++ new/pathspec-0.11.1/pyproject.toml 2023-01-25 04:55:08.761434000 +0100
@@ -1,27 +1,27 @@
[build-system]
-build-backend = "setuptools.build_meta"
-requires = ["setuptools>=40.8.0"]
+build-backend = "flit_core.buildapi"
+requires = ["flit_core >=3.2,<4"]
[project]
authors = [
{name = "Caleb P. Burns", email = "[email protected]"},
]
classifiers = [
- "Development Status :: 4 - Beta",
- "Intended Audience :: Developers",
- "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
- "Operating System :: OS Independent",
- "Programming Language :: Python",
- "Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.7",
- "Programming Language :: Python :: 3.8",
- "Programming Language :: Python :: 3.9",
- "Programming Language :: Python :: 3.10",
- "Programming Language :: Python :: 3.11",
- "Programming Language :: Python :: Implementation :: CPython",
- "Programming Language :: Python :: Implementation :: PyPy",
- "Topic :: Software Development :: Libraries :: Python Modules",
- "Topic :: Utilities",
+ "Development Status :: 4 - Beta",
+ "Intended Audience :: Developers",
+ "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
+ "Operating System :: OS Independent",
+ "Programming Language :: Python",
+ "Programming Language :: Python :: 3",
+ "Programming Language :: Python :: 3.7",
+ "Programming Language :: Python :: 3.8",
+ "Programming Language :: Python :: 3.9",
+ "Programming Language :: Python :: 3.10",
+ "Programming Language :: Python :: 3.11",
+ "Programming Language :: Python :: Implementation :: CPython",
+ "Programming Language :: Python :: Implementation :: PyPy",
+ "Topic :: Software Development :: Libraries :: Python Modules",
+ "Topic :: Utilities",
]
description = "Utility library for gitignore style pattern matching of file
paths."
dynamic = ["version"]
@@ -35,8 +35,18 @@
"Documentation" =
"https://python-path-specification.readthedocs.io/en/latest/index.html"
"Issue Tracker" = "https://github.com/cpburnz/python-pathspec/issues"
-[tool.setuptools.dynamic]
-version = {attr = "pathspec._meta.__version__"}
-[tool.setuptools.packages.find]
-include = ["pathspec", "pathspec.*"]
+[tool.flit.sdist]
+include = [
+ "*.cfg",
+ "*.in",
+ "*.ini",
+ "*.py",
+ "*.rst",
+ "LICENSE",
+ "doc/",
+ "tests/",
+]
+exclude = [
+ "doc/build/",
+]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pathspec-0.10.3/setup.cfg
new/pathspec-0.11.1/setup.cfg
--- old/pathspec-0.10.3/setup.cfg 2022-12-10 05:48:58.911429000 +0100
+++ new/pathspec-0.11.1/setup.cfg 2023-03-15 01:56:33.877085700 +0100
@@ -34,7 +34,3 @@
[options.packages.find]
include = pathspec, pathspec.*
-[egg_info]
-tag_build =
-tag_date = 0
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pathspec-0.10.3/tests/test_gitignore.py
new/pathspec-0.11.1/tests/test_gitignore.py
--- old/pathspec-0.10.3/tests/test_gitignore.py 2022-11-12 17:34:39.000000000
+0100
+++ new/pathspec-0.11.1/tests/test_gitignore.py 2023-02-26 00:51:47.766684000
+0100
@@ -358,3 +358,33 @@
}
ignores = set(spec.match_files(files))
self.assertEqual(ignores, files)
+
+ def test_07_issue_74(self):
+ """
+ Test include directory should override exclude file.
+ """
+ spec = GitIgnoreSpec.from_lines([
+ '*', # Ignore all files by default
+ '!*/', # but scan all directories
+ '!*.txt', # Text files
+ '/test1/**', # ignore all in the directory
+ ])
+ files = {
+ 'test1/b.bin',
+ 'test1/a.txt',
+ 'test1/c/c.txt',
+ 'test2/a.txt',
+ 'test2/b.bin',
+ 'test2/c/c.txt',
+ }
+ ignores = set(spec.match_files(files))
+ self.assertEqual(ignores, {
+ 'test1/b.bin',
+ 'test1/a.txt',
+ 'test1/c/c.txt',
+ 'test2/b.bin',
+ })
+ self.assertEqual(files - ignores, {
+ 'test2/a.txt',
+ 'test2/c/c.txt',
+ })