From cdf61e2aab6b88c97a8219bc2da24cebc13e4b75f443df5ab84e0bfdbf5282df Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sun, 18 Aug 2024 16:59:22 +0000 Subject: [PATCH] - update to 17.0.0: * Removed deprecated methods getcwd, abspath, ext, listdir, isdir, isfile, and text. * Removed deprecated support for passing bytes to write_text and write_lines(linesep=) parameter. * Implement .replace. * Add .home classmethod. * Replaced 'open' overloads with 'functools.wraps(open)' for simple re-use. * Add type hints for .with_name, .suffix, .with_stem. * Add type hint for .absolute. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-path?expand=0&rev=25 --- .gitattributes | 23 +++ .gitignore | 1 + _multibuild | 3 + path-16.14.0.tar.gz | 3 + path-17.0.0.tar.gz | 3 + python-path.changes | 370 ++++++++++++++++++++++++++++++++++++++++++++ python-path.spec | 90 +++++++++++ 7 files changed, 493 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _multibuild create mode 100644 path-16.14.0.tar.gz create mode 100644 path-17.0.0.tar.gz create mode 100644 python-path.changes create mode 100644 python-path.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/path-16.14.0.tar.gz b/path-16.14.0.tar.gz new file mode 100644 index 0000000..d6e2304 --- /dev/null +++ b/path-16.14.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dbaaa7efd4602fd6ba8d82890dc7823d69e5de740a6e842d9919b0faaf2b6a8e +size 50076 diff --git a/path-17.0.0.tar.gz b/path-17.0.0.tar.gz new file mode 100644 index 0000000..cd9afe9 --- /dev/null +++ b/path-17.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e1540261d22df1416fb1b498b3b1ed5353a371a48fe197d66611bb01e7fab2d5 +size 49721 diff --git a/python-path.changes b/python-path.changes new file mode 100644 index 0000000..73223bb --- /dev/null +++ b/python-path.changes @@ -0,0 +1,370 @@ +------------------------------------------------------------------- +Sun Aug 18 16:59:02 UTC 2024 - Dirk Müller + +- update to 17.0.0: + * Removed deprecated methods getcwd, abspath, ext, listdir, + isdir, isfile, and text. + * Removed deprecated support for passing bytes to write_text + and write_lines(linesep=) parameter. + * Implement .replace. + * Add .home classmethod. + * Replaced 'open' overloads with 'functools.wraps(open)' for + simple re-use. + * Add type hints for .with_name, .suffix, .with_stem. + * Add type hint for .absolute. + +------------------------------------------------------------------- +Mon Apr 15 08:25:30 UTC 2024 - Dirk Müller + +- update to 16.14.0: + * Add .symlink_to and .hardlink_to. + * Add .cwd method and deprecated .getcwd. + * Create 'absolute' method and deprecate 'abspath'. + * In readlink, prefer the display path to the substitute path. + +------------------------------------------------------------------- +Sat Apr 6 12:08:15 UTC 2024 - Dirk Müller + +- update to 16.12.1: + * Restore functionality in .isdir and .isfile. + * Added .is_dir and .is_file for parity with pathlib. + Deprecates .isdir and .isfile. + * Inlined some types. + * Fix iterdir - it also accepts match. Ref #220. + * Add type annotation for iterdir. + +------------------------------------------------------------------- +Wed Feb 7 20:16:20 UTC 2024 - Dirk Müller + +- update to 16.10.0: + * Added .with_name and .with_stem. + * Prefer .suffix to .ext and deprecate .ext. + +------------------------------------------------------------------- +Tue Jan 2 19:09:13 UTC 2024 - Dirk Müller + +- update to 16.9.0: + * Features - Added Path.iterdir() and deprecated + Path.listdir(). + * Use '.' as the default path. + * Set stacklevel=2 in deprecation warning for .text. + * Added .permissions attribute. + * Require Python 3.8 or later. + +------------------------------------------------------------------- +Fri Apr 21 12:29:04 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Thu Apr 13 22:42:55 UTC 2023 - Matej Cepl + +- Make calling of %{sle15modernpython} optional. + +------------------------------------------------------------------- +Wed Dec 7 20:00:17 UTC 2022 - Yogalakshmi Arunachalam + +- Update to version 16.6.0 + * .mtime and .atime are now settable. + +------------------------------------------------------------------- +Wed Oct 12 13:55:19 UTC 2022 - Yogalakshmi Arunachalam + +- Update to version 16.5.0 + * Refreshed packaging. + #197: Fixed default argument rendering in docs. + #209: Refactored write_lines to re-use open semantics. Deprecated the linesep parameter. + +------------------------------------------------------------------- +Wed Mar 30 19:11:53 UTC 2022 - Ben Greiner + +- update to version 16.4.0 + * #207: Added type hints and declare the library as typed. +- Release 16.3.0 + * Require Python 3.7 or later. + * #205: test_listdir_other_encoding now automatically skips + itself on file systems where it's not appropriate. +- Release 16.2.0 + * Deprecated passing bytes to write_text. Instead, users should + call write_bytes. +- Release 16.1.0 + * #204: Improved test coverage across the package to 99%, fixing + bugs in uncovered code along the way. +- Release 16.0.0 + * #200: TempDir context now cleans up unconditionally, even if an + exception occurs. +- Release 15.1.2 + * #199: Fixed broken link in README. +- Release 15.1.1 + * Refreshed package metadata. +- Release 15.1.0 + * Added ExtantPath and ExtantFile objects that raise errors when + they reference a non-existent path or file. +- Release 15.0.1 + * Refreshed package metadata. +- Release 15.0.0 + * Removed __version__ property. To determine the version, use + importlib.metadata.version('path'). +- Release 14.0.1 + * Fixed regression on Python 3.7 and earlier where lru_cache did + not support a user function. +- Release 14.0.0 + * Removed namebase property. Use stem instead. + * Removed update parameter on method to Path.merge_tree. Instead, + to only copy newer files, provide a wrapped copy function, as + described in the doc string. + * Removed FastPath. Just use Path. + * Removed path.CaseInsensitivePattern. Instead use + path.matchers.CaseInsensitive. + * Removed path.tempdir. Use path.TempDir. + * #154: Added Traversal class and support for customizing the + behavior of a Path.walk. +- Release 13.3.0 + * #186: Fix test failures on Python 3.8 on Windows by relying on + realpath() instead of readlink(). + * #189: realpath() now honors symlinks on Python 3.7 and earlier, + approximating the behavior found on Python 3.8. + * #187: lines() no longer relies on the deprecated .text(). + +------------------------------------------------------------------- +Wed Mar 11 15:41:44 UTC 2020 - Marketa Calabkova + +- update to version 13.2.0 + * Require Python 3.6 or later. + +------------------------------------------------------------------- +Tue Dec 3 13:56:29 CET 2019 - Matej Cepl + +- Update to 13.1.0: + - #170: Added read_text and read_bytes methods to align with + pathlib behavior. Deprecated text method. If you require + newline normalization of text, use + jaraco.text.normalize_newlines(Path.read_text()). + - #169: Renamed package from path.py to path. The docs make + reference to a pet name "path pie" for easier discovery. + - #169: Moved project at GitHub from jaraco/path.py to + jaraco/path. + - #171: Fixed exception in rmdir_p when target is not empty. + - #174: Rely on importlib.metadata on Python 3.8. + - Refreshed package metadata. + +- Rename of the package from path.py to path. + +------------------------------------------------------------------- +Mon Oct 21 08:18:00 UTC 2019 - Tomáš Chvátal + +- Add patch to build with pytest5: + * pytest5.patch + +------------------------------------------------------------------- +Fri Jul 26 16:56:38 CEST 2019 - Matej Cepl + +- Update to 12.0.1: + - #166: Removed 'universal' wheel support. + - #148: Dropped support for Python 2.7 and 3.4. + Moved 'path' into a package. + +------------------------------------------------------------------- +Fri Jul 19 10:05:17 UTC 2019 - Tomáš Chvátal + +- Update to 11.5.2: + * #163: Corrected 'pymodules' typo in package declaration. + +------------------------------------------------------------------- +Fri Jul 19 10:04:28 UTC 2019 - Tomáš Chvátal + +- Restrict version requirement on pytest to <5.x for now + +------------------------------------------------------------------- +Tue Feb 26 10:47:11 UTC 2019 - Tomáš Chvátal + +- Add missing python2 dependency on backports.os + +------------------------------------------------------------------- +Tue Feb 26 08:25:06 UTC 2019 - Tomáš Chvátal + +- Update to 11.5.0: + * Many fixes all around for detailed list see CHANGES.rst +- Use multibuild to avoid buildcycles + +------------------------------------------------------------------- +Tue Jul 4 09:45:39 UTC 2017 - aloisio@gmx.com + +- Update to version 10.3.1 + * #124: Fixed ``rmdir_p`` raising ``FileNotFoundError`` when + directory does not exist on Windows. + 10.3: + * #115: Added a new performance-optimized implementation + for listdir operations, optimizing ``listdir``, ``walk``, + ``walkfiles``, ``walkdirs``, and ``fnmatch``, presented + as the ``FastPath`` class. + Please direct feedback on this implementation to the ticket, + especially if the performance benefits justify it replacing + the default ``Path`` class. + 10.2: + * Symlink no longer requires the ``newlink`` parameter + and will default to the basename of the target in the + current working directory. + 10.1: + * #123: Implement ``Path.__fspath__`` per PEP 519. + 10.0: + * Once again as in 8.0 remove deprecated ``path.path``. + 9.1: + * #121: Removed workaround for #61 added in 5.2. ``path.py`` + now only supports file system paths that can be effectively + decoded to text. It is the responsibility of the system + implementer to ensure that filenames on the system are + decodeable by ``sys.getfilesystemencoding()``. + 9.0: + * Drop support for Python 2.6 and 3.2 as integration + dependencies (pip) no longer support these versions. + 8.3: + * Merge with latest skeleton, adding badges and test runs by + default under tox instead of pytest-runner. + * Documentation is no longer hosted with PyPI. + 8.2.1: + * #112: Update Travis CI usage to only deploy on Python 3.5. + 8.2: + * Refreshed project metadata based on `jaraco's project + skeleton _. + * Releases are now automatically published via Travis-CI. + * #111: More aggressively trap errors when importing + ``pkg_resources``. + 8.1.2: + * #105: By using unicode literals, avoid errors rendering the + backslash in __get_owner_windows. + +- Converted to single-spec + +------------------------------------------------------------------- +Tue Jul 4 09:40:55 UTC 2017 - aloisio@gmx.com + +- Update to version 10.3.1 (see CHANGES.rst) + +------------------------------------------------------------------- +Wed Sep 16 15:02:34 UTC 2015 - toddrme2178@gmail.com + +- Update to version 8.1.1 + * Restored path.path with a DeprecationWarning. + * Removed path.path. Clients must now refer to the canonical + name, path.Path as introduced in 6.2. + * Added support for resolving certain directories on a system to + platform-friendly locations using the appdirs library. + * In order to support "multipath" results, where multiple paths + are returned in a single, os.pathsep-separated string, a new + class MultiPath now represents those special results. This + functionality is experimental and may change. Feedback is + invited. + +------------------------------------------------------------------- +Wed Aug 12 14:22:58 UTC 2015 - toddrme2178@gmail.com + +- Update to version 7.6 + - Pull Request #100: Add ``merge_tree`` method for merging + two existing directory trees. + - Uses `setuptools_scm `_ + for version management. +- Update to version 7.5 + - #97: ``__rdiv__`` and ``__rtruediv__`` are now defined. +- Update to version 7.4 + - #93: chown now appears in docs and raises NotImplementedError if + ``os.chown`` isn't present. + - #92: Added compatibility support for ``.samefile`` on platforms without + ``os.samefile``. +- Update to version 7.3 + - #91: Releases now include a universal wheel. +- Update to version 7.2 + - In chmod, added support for multiple symbolic masks (separated by commas). + - In chmod, fixed issue in setting of symbolic mask with '=' where + unreferenced permissions were cleared. +- Update to version 7.1 + - #23: Added support for symbolic masks to ``.chmod``. +- Update to version 7.0 + - The ``open`` method now uses ``io.open`` and supports all of the + parameters to that function. ``open`` will always raise an ``OSError`` + on failure, even on Python 2. + - Updated ``write_text`` to support additional newline patterns. + - The ``text`` method now always returns text (never bytes), and thus + requires an encoding parameter be supplied if the default encoding is not + sufficient to decode the content of the file. +- Update to version 6.2 + - ``path`` class renamed to ``Path``. The ``path`` name remains as an alias + for compatibility. +- Update to version 6.1 + - ``chown`` now accepts names in addition to numeric IDs. +- Update to version 6.0 + - Drop support for Python 2.5. Python 2.6 or later required. + - Installation now requires setuptools. +- Update to version 5.3 + - Allow arbitrary callables to be passed to path.walk ``errors`` parameter. + Enables workaround for issues such as #73 and #56. +- Update to version 5.2 + - #61: path.listdir now decodes filenames from os.listdir when loading + characters from a file. On Python 3, the behavior is unchanged. On Python + 2, the behavior will now mimick that of Python 3, attempting to decode + all filenames and paths using the encoding indicated by + ``sys.getfilesystemencoding()``, and escaping any undecodable characters + using the 'surrogateescape' handler. +- Update to version 5.1 + - #53: Added ``path.in_place`` for editing files in place. +- Update to version 5.0 + - ``path.fnmatch`` now takes an optional parameter ``normcase`` and this + parameter defaults to self.module.normcase (using case normalization most + pertinent to the path object itself). Note that this change means that + any paths using a custom ntpath module on non-Windows systems will have + different fnmatch behavior. + - Issue #50: Methods that accept patterns (``listdir``, ``files``, ``dirs``, + ``walk``, ``walkdirs``, ``walkfiles``, and ``fnmatch``) will now use a + ``normcase`` attribute if it is present on the ``pattern`` parameter. The + path module now provides a ``CaseInsensitivePattern`` wrapper for strings + suitable for creating case-insensitive patterns for those methods. +- Update to version 4.4 + - Issue #44: _hash method would open files in text mode, producing + invalid results on Windows. Now files are opened in binary mode, producing + consistent results. + - Issue #47: Documentation is dramatically improved with Intersphinx links + to the Python os.path functions and documentation for all methods and + properties. +- Update to version 4.3 + - Issue #32: Add ``chdir`` and ``cd`` methods. +- Update to version 4.2 + - ``open()`` now passes all positional and keyword arguments through to the + underlying ``builtins.open`` call. +- Update to version 4.1 + - Native Python 2 and Python 3 support without using 2to3 during the build + process. +- Update to version 4.0 + - Added a ``chunks()`` method to a allow quick iteration over pieces of a + file at a given path. + - Issue #28: Fix missing argument to ``samefile``. + - Initializer no longer enforces `isinstance basestring` for the source + object. Now any object that supplies ``__unicode__`` can be used by a + ``path`` (except None). Clients that depend on a ValueError being raised + for ``int`` and other non-string objects should trap these types + internally. + - Issue #30: ``chown`` no longer requires both uid and gid to be provided + and will not mutate the ownership if nothing is provided. +- Update to version 3.2 + - Issue #22: ``__enter__`` now returns self. +- Update to version 3.1 + - Issue #20: `relpath` now supports a "start" parameter to match the + signature of `os.path.relpath`. +- Update to version 3.0 + - Minimum Python version is now 2.5. +- Update to version 2.6 + - Issue #5: Implemented `path.tempdir`, which returns a path object which is + a temporary directory and context manager for cleaning up the directory. + - Issue #12: One can now construct path objects from a list of strings by + simply using path.joinpath. +- Update to version 2.5 + - Issue #7: Add the ability to do chaining of operations that formerly only + returned None. + - Issue #4: Raise a TypeError when constructed from None. +- Update to version 2.4 + - No upstream changelog + +------------------------------------------------------------------- +Mon Jul 23 10:47:16 UTC 2012 - saschpe@suse.de + +- Initial version + diff --git a/python-path.spec b/python-path.spec new file mode 100644 index 0000000..7a72cbb --- /dev/null +++ b/python-path.spec @@ -0,0 +1,90 @@ +# +# spec file for package python-path +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif +%define modname path +%{?sle15_python_module_pythons} +Name: python-path%{psuffix} +Version: 17.0.0 +Release: 0 +Summary: A module wrapper for os.path +License: MIT +URL: https://github.com/jaraco/path +Source: https://files.pythonhosted.org/packages/source/p/path/%{modname}-%{version}.tar.gz +BuildRequires: %{python_module base >= 3.8} +BuildRequires: %{python_module more-itertools} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools_scm >= 3.4.1} +BuildRequires: %{python_module tomli} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildArch: noarch +# Renaming package +Provides: python-path.py = %{version}-%{release} +Obsoletes: python-path.py < %{version}-%{release} +%if %{with test} +# use a multibuild test flavor so that there is no circular dependency with pytest +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module path >= %{version}} +%endif +%python_subpackages + +%description +The path package implements a path objects as first-class +entities, allowing common operations on files to be invoked +on those path objects directly. + +%prep +%setup -q -n %{modname}-%{version} + +%build +%if !%{with test} +%pyproject_wheel +%endif + +%install +%if !%{with test} +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif + +%check +%if %{with test} +# need to set locale to avoid UnicodeEncodeError +export LANG=en_US.UTF-8 +# test_import_time -> relies on timing that varies in OBS +%pytest -k 'not test_import_time' +%endif + +%if !%{with test} +%files %{python_files} +%license LICENSE +%doc NEWS.rst README.rst +%{python_sitelib}/path +%{python_sitelib}/path-%{version}.dist-info +%endif + +%changelog