Sync from SUSE:SLFO:Main python-natsort revision a60ca91bc70d56ad36b3f1cc670372cf

This commit is contained in:
Adrian Schröter 2024-12-13 11:48:18 +01:00
commit a086fdba0d
4 changed files with 488 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -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

BIN
natsort-8.4.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

376
python-natsort.changes Normal file
View File

@ -0,0 +1,376 @@
-------------------------------------------------------------------
Mon Jul 10 16:16:15 UTC 2023 - ecsos <ecsos@opensuse.org>
- Add %{?sle15_python_module_pythons}
- Fix BuildReuquires Versions.
-------------------------------------------------------------------
Sat Jul 8 20:28:50 UTC 2023 - Arun Persaud <arun@gmx.de>
- update to version 8.4.0:
* Changed
+ The changelog now only explictly exists in the repository (issue
#162)
* Fixed
+ Inputs with spaces near adjascent to the extension are now
sorted correctly for os_sorted on Windows (issues #165 and #166)
- changes from version 8.3.1:
* Fixed
+ Broken test found on FreeBSD. This change has no effect outside
fixing tests (issue #161)
- changes from version 8.3.0:
* Added
+ The PRESORT option to the ns enum to attain consistent sort
order in certain corner cases (issue #149)
+ Logic to ensure None and NaN are sorted in a consistent order
(issue #149)
+ Explict Python 3.11 support
* Changed
+ Only convert to str if necessary in os_sorted (@Dobatymo, issues
#157 and #158)
+ Attempt to use new fastnumbers functionality if available
+ Move non-API documentation to the GitHub wiki
* Removed
+ Support for EOL Python 3.6
-------------------------------------------------------------------
Tue Jun 13 08:58:39 UTC 2023 - ecsos <ecsos@opensuse.org>
- Add %{?sle15_python_module_pythons}
-------------------------------------------------------------------
Sat Sep 10 15:30:31 UTC 2022 - Arun Persaud <arun@gmx.de>
- update to version 8.2.0:
* Changed
+ Auto-coerce pathlib.Path objects to str since it is the least
astonishing behavior (@Gilthans, issues #152, #153)
+ Reduce strictness of type hints to avoid over-constraining
client code (issues #154, #155)
-------------------------------------------------------------------
Thu Aug 18 19:35:10 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Clean specfile: remove code coverage check
-------------------------------------------------------------------
Thu Feb 3 20:01:25 UTC 2022 - Arun Persaud <arun@gmx.de>
- specfile:
* update copyright year
- update to version 8.1.0:
* Changed
+ When using ns.PATH, only split off a maximum of two suffixes
from a file name (issues #145, #146).
-------------------------------------------------------------------
Sun Dec 26 08:55:47 UTC 2021 - Fusion Future <qydwhotmail@gmail.com>
- Update to 8.0.2
Major changes:
* Type hints
* Bug where sorting paths fail if one of the paths is '.'.
* Compose unicode characters when using locale to ensure sorting
is correct across all locales.
* Explicit testing for Python 3.10
* Support for Python 3.4 and Python 3.5 has been removed.
-------------------------------------------------------------------
Mon Feb 1 18:02:55 UTC 2021 - Dirk Müller <dmueller@suse.com>
- update to 7.1.1:
- Use GitHub Actions instead of Travis-CI (issue #125)
- No longer pin testing dependencies (issue #126)
- Correct a minor typo
-------------------------------------------------------------------
Tue Jan 19 20:56:40 UTC 2021 - Matej Cepl <mcepl@suse.com>
- Set up alternatives correctly.
-------------------------------------------------------------------
Sat Nov 21 22:21:53 UTC 2020 - Arun Persaud <arun@gmx.de>
- update to version 7.1.0:
* Added
+ os_sorted, os_sort_keygen, and os_sort_key to better support
sorting like the file browser on the current operating system -
this closes the long-standing issue #41
+ Support for Python 3.9 (@swt2c, issue #119)
* Changed
+ MacOS unit tests run on native Python
+ Treate None like NaN internally to avoid TypeError (issue #117)
+ No longer fail tests every time a new Python version is released
(issue #122)
* Fixed
+ Various typos, missing figures, and out-of-date information in
the "How it works"
+ Fix typo in CHANGELOG (@graingert, issue #113)
+ Updated "How it works" to account for Pandas updates (@kuraga,
issue #116)
-------------------------------------------------------------------
Thu May 28 08:42:09 UTC 2020 - Antonio Larrosa <alarrosa@suse.com>
- The hypothesis pytest module used by natsort requires at least
pytest 4.3
-------------------------------------------------------------------
Thu Apr 23 10:45:41 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Drop py2 dependency from py3 only package
-------------------------------------------------------------------
Sun Feb 9 17:17:05 UTC 2020 - Arun Persaud <arun@gmx.de>
* specfile:
* require sortedcontainers for tests
- update to version 7.0.1:
* Bug where that caused incorrect sorting when using locales that
have a "." character as the thousands separator.
-------------------------------------------------------------------
Thu Jan 9 09:39:48 CET 2020 - Matej Cepl <mcepl@suse.com>
- Update to 7.0.0:
- Update testing dependency versions
- Support for Python 2
-------------------------------------------------------------------
Tue Jan 7 08:13:31 CET 2020 - Matej Cepl <mcepl@suse.com>
- Upgrade to the preliminary version 6.2.0+3843c27, which fixes
our testing problems.
- Remove too_slow.patch which is harmful now.
-------------------------------------------------------------------
Sun Dec 22 23:52:46 CET 2019 - Matej Cepl <mcepl@suse.com>
- Exclude failing tests due to gh#SethMMorton/natsort#107
- Add too_slow.patch which switches off suppressing
hypothesis.HealthCheck.too_slow health check
(gh#SethMMorton/natsort#108).
-------------------------------------------------------------------
Sat Nov 16 17:24:43 UTC 2019 - Arun Persaud <arun@gmx.de>
- specfile:
* python3 only
- update to version 6.2.0:
* Added
+ Support for Python 3.8 (@hugovk, issue #104)
* Changed
+ index_natsorted internally now uses tuples for index-element
pairs instead of lists
+ Added a TOC to the README
+ Python 3.4 is no longer included in testing
* Fixed
+ Pin testing dependencies to prevent CI breaking due to
third-party library changes
* Removed
+ Introduction page in documentation
* Removed
+ Support for Python 2
-------------------------------------------------------------------
Sun Nov 10 16:44:50 UTC 2019 - Arun Persaud <arun@gmx.de>
- update to version 6.1.0:
* Added
+ Expose numeric_regex_chooser as a public function for ease in
making key functions
+ Example in the documentation on how to sort numbers with units
+ Automated testing support for macos and Windows (issue #91)
* Changed
+ Update CHANGELOG format to style from
https://keepachangelog.com/ (issue #92)
* Fixed
+ Removed dependency on sudo in TravisCI configuration (@hugovk,
issue #99)
+ Documentation typos (@jdufresne, issue #94) (@cpburnz, issue
#95)
-------------------------------------------------------------------
Sun Feb 10 22:29:18 UTC 2019 - Arun Persaud <arun@gmx.de>
- specfile:
* update copyright year
- update to version 6.0.0:
* Drop support for Python 2.6 and 3.3 (thanks @jdufresne) (issue
#70)
* Remove deprecated APIs (kwargs number_type, signed, exp, as_path,
py3_safe; enums ns.TYPESAFE, ns.DIGIT, ns.VERSION; functions
versorted, index_versorted) (issue #81)
* Remove pipenv as a dependency for building (issue #86)
* Simply Travis-CI configuration (thanks @jdufresne) (issue #88)
* Fix README rendering in PyPI (thanks @altendky) (issue #89)
-------------------------------------------------------------------
Thu Nov 22 21:54:55 UTC 2018 - Arun Persaud <arun@gmx.de>
- specfile:
* added CHANGELOG.rst
- update to version 5.5.0:
* Formally deprecated old or misleading APIs (issue #83)
* Documentation, packaging, and CI cleanup (thanks @jdufresne)
(issues #69, #71-#80)
* Consolidate API documentation into a single page (issue #82)
* Add a CHANGELOG.rst to the top-level of the repository (issue #85)
* Add back support for very old versions of setuptools (issue #84)
-------------------------------------------------------------------
Sun Sep 16 15:39:46 UTC 2018 - Arun Persaud <arun@gmx.de>
- update to version 5.4.1:
* Fix error in a newly added test.
* Changed code format and quality checking infrastructure.
-------------------------------------------------------------------
Sat Sep 8 19:14:08 UTC 2018 - Arun Persaud <arun@gmx.de>
- specfile:
* be more specific in %files section
- update to version 5.4.0:
* Re-expose natsort_key as "public" and remove the associated
DepricationWarning.
* Add better developer documentation.
* Refactor tests.
* Bump allowed fastnumbers version.
-------------------------------------------------------------------
Wed Aug 29 12:22:03 UTC 2018 - tchvatal@suse.com
- Make sure tests pass in python 3.7
-------------------------------------------------------------------
Sun Jul 8 03:47:00 UTC 2018 - arun@gmx.de
- update to version 5.3.3:
* Update docs with a FAQ and quick how-it-works.
* Fix a StopIteration error in the testing code.
* Enable Python 3.7 support in Travis-CI.
-------------------------------------------------------------------
Wed May 23 08:15:47 UTC 2018 - tchvatal@suse.com
- Version set the requires based on setup.py
-------------------------------------------------------------------
Mon May 21 15:55:32 UTC 2018 - arun@gmx.de
- specfile:
* added setuptools as a requirements
-------------------------------------------------------------------
Mon May 21 03:51:36 UTC 2018 - arun@gmx.de
- update to version 5.3.2:
* Fix bug that prevented install on old versions of setuptools.
* Revert layout from src/natsort/ back to natsort/ to make user
testing simpler.
-------------------------------------------------------------------
Tue May 15 05:51:24 UTC 2018 - arun@gmx.de
- update to version 5.3.1:
* No bugfixes or features, just infrastructure and installation
updates.
* Move to defining dependencies with Pipfile.
* Development layout is now src/natsort/ instead of natsort/.
* Add bumpversion infrastructure.
* Extras can be installed by "[]" notation.
-------------------------------------------------------------------
Sat Apr 21 16:37:13 UTC 2018 - arun@gmx.de
- update to version 5.3.0:
* Fix bug in assessing fastnumbers version at import-time.
* Add ability to consider unicode-decimal numbers as numbers.
-------------------------------------------------------------------
Thu Mar 1 23:59:16 UTC 2018 - arun@gmx.de
- specfile:
* update copyright year
- update to version 5.2.0:
* Add ns.NUMAFTER to cause numbers to be placed after non-numbers.
* Add natcmp function (Python 2 only).
-------------------------------------------------------------------
Wed Oct 18 16:44:49 UTC 2017 - toddrme2178@gmail.com
- Implement single-spec version
- Update to version 5.1.0
* See changelog at https://github.com/SethMMorton/natsort/blob/5.1.0/docs/source/changelog.rst
-------------------------------------------------------------------
Tue Feb 3 17:30:17 UTC 2015 - toddrme2178@gmail.com
- Update to 3.5.2
- Enhancement that will convert a 'pathlib.Path' object to a 'str' if
'ns.PATH' is enabled.
- Update to 3.5.1
- Fixed bug that caused list/tuples to fail when using 'ns.LOWECASEFIRST'
or 'ns.IGNORECASE'.
- Refactored modules so that only the public API was in natsort.py and
ns_enum.py.
- Refactored all import statements to be absolute, not relative.
- Update to 3.5.0
- Added the 'alg' argument to the 'natsort' functions. This argument
accepts an enum that is used to indicate the options the user wishes
to use. The 'number_type', 'signed', 'exp', 'as_path', and 'py3_safe'
options are being depreciated and will become (undocumented)
keyword-only options in natsort version 4.0.0.
- The user can now modify how 'natsort' handles the case of non-numeric
characters.
- The user can now instruct 'natsort' to use locale-aware sorting, which
allows 'natsort' to perform true "human sorting".
- The `humansorted` convenience function has been included to make this
easier.
- Updated shell script with locale functionality.
- Update to 3.4.1
- 'natsort' will now use the 'fastnumbers' module if it is installed. This
gives up to an extra 30% boost in speed over the previous performance
enhancements.
- Made documentation point to more 'natsort' resources, and also added a
new example in the examples section.
- Update to 3.4.0
- Fixed a bug that caused user's options to the 'natsort_key' to not be
passed on to recursive calls of 'natsort_key'.
- Added a 'natsort_keygen' function that will generate a wrapped version
of 'natsort_key' that is easier to call. 'natsort_key' is now set to
depreciate at natsort version 4.0.0.
- Added an 'as_path' option to 'natsorted' & co. that will try to treat
input strings as filepaths. This will help yield correct results for
OS-generated inputs like
``['/p/q/o.x', '/p/q (1)/o.x', '/p/q (10)/o.x', '/p/q/o (1).x']``.
- Massive performance enhancements for string input (1.8x-2.0x), at the expense
of reduction in speed for numeric input (~2.0x).
- This is a good compromise because the most common input will be strings,
not numbers, and sorting numbers still only takes 0.6x the time of sorting
strings. If you are sorting only numbers, you would use 'sorted' anyway.
- Added the 'order_by_index' function to help in using the output of
'index_natsorted' and 'index_versorted'.
- Added the 'reverse' option to 'natsorted' & co. to make it's API more
similar to the builtin 'sorted'.
- Added more unit tests.
- Added auxillary test code that helps in profiling and stress-testing.
- Reworked the documentation, moving most of it to PyPI's hosting platform.
- Added support for coveralls.io.
- Entire codebase is now PyFlakes and PEP8 compliant.
- Implement update-alternatives for upcoming python 3 version.
-------------------------------------------------------------------
Sat Jul 12 20:46:36 UTC 2014 - boris@steki.net
- initial packaging of 3.3.0 version

86
python-natsort.spec Normal file
View File

@ -0,0 +1,86 @@
#
# spec file for package python-natsort
#
# 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
# 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/
#
%{?sle15_python_module_pythons}
Name: python-natsort
Version: 8.4.0
Release: 0
Summary: Natural sorting in Python
License: MIT
URL: https://github.com/SethMMorton/natsort
Source: https://files.pythonhosted.org/packages/source/n/natsort/natsort-%{version}.tar.gz
BuildRequires: %{python_module fastnumbers >= 5.0.1}
BuildRequires: %{python_module hypothesis}
BuildRequires: %{python_module pytest >= 4.3}
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: help2man
BuildRequires: python-rpm-macros
Requires: python-setuptools
Requires(post): update-alternatives
Requires(postun):update-alternatives
Recommends: python-PyICU >= 1.0.0
Recommends: python-fastnumbers >= 5.0.1
BuildArch: noarch
%{?sle15_python_module_pythons}
%python_subpackages
%description
Natsort provides a function natsorted that helps sort lists
"naturally" ("naturally" is rather ill-defined, but in general it means
sorting based on meaning and not computer code point).
%prep
%setup -q -n natsort-%{version}
%autopatch -p1
%build
%python_build
%install
%python_install
export PYTHONPATH=%{buildroot}%{python_sitelib}
help2man -o natsort.1 -N %{buildroot}%{_bindir}/natsort
install -Dm0644 natsort.1 %{buildroot}%{_mandir}/man1/natsort.1
%python_clone -a %{buildroot}%{_bindir}/natsort
%python_clone -a %{buildroot}%{_mandir}/man1/natsort.1
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
export LANG=en_US.UTF8
%pytest --hypothesis-profile=slow-tests
%post
%python_install_alternative natsort natsort.1
%postun
%python_uninstall_alternative natsort
%files %{python_files}
%license LICENSE
%doc README.rst CHANGELOG.md
%python_alternative %{_bindir}/natsort
%python_alternative %{_mandir}/man1/natsort.1%{?ext_man}
%{python_sitelib}/natsort
%{python_sitelib}/natsort-%{version}*-info
%changelog