summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2018-11-06 06:42:48 -0800
committerJon Dufresne <jon.dufresne@gmail.com>2018-11-06 06:42:48 -0800
commit595435d8b869d0f832abf3433ca385885f6b6981 (patch)
tree9cb7ee83cb150c251b5e5dcd7e8c00ec6778cdf2
parent7654d0d5adc31d4f5a58cf61ea48e87447a0fe0d (diff)
downloadnatsort-595435d8b869d0f832abf3433ca385885f6b6981.tar.gz
Update URLs to use https:// where available
-rw-r--r--CODE_OF_CONDUCT.md6
-rw-r--r--README.rst32
-rw-r--r--docs/source/examples.rst2
-rw-r--r--docs/source/howitworks.rst20
-rw-r--r--docs/source/intro.rst16
-rw-r--r--docs/source/locale_issues.rst6
-rw-r--r--natsort/ns_enum.py2
7 files changed, 42 insertions, 42 deletions
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index 2d55f88..f122b4f 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -40,7 +40,7 @@ Project maintainers who do not follow or enforce the Code of Conduct in good fai
## Attribution
-This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct.html][version]
-[homepage]: http://contributor-covenant.org
-[version]: http://contributor-covenant.org/version/1/4/
+[homepage]: https://www.contributor-covenant.org/
+[version]: https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
diff --git a/README.rst b/README.rst
index 93897e9..8651128 100644
--- a/README.rst
+++ b/README.rst
@@ -23,11 +23,11 @@ Simple yet flexible natural sorting in Python.
- Source Code: https://github.com/SethMMorton/natsort
- Downloads: https://pypi.org/project/natsort/
- - Documentation: http://natsort.readthedocs.io/
+ - Documentation: https://natsort.readthedocs.io/
- - `Examples and Recipes <http://natsort.readthedocs.io/en/master/examples.html>`_
- - `How Does Natsort Work? <http://natsort.readthedocs.io/en/master/howitworks.html>`_
- - `API <http://natsort.readthedocs.io/en/master/api.html>`_
+ - `Examples and Recipes <https://natsort.readthedocs.io/en/master/examples.html>`_
+ - `How Does Natsort Work? <https://natsort.readthedocs.io/en/master/howitworks.html>`_
+ - `API <https://natsort.readthedocs.io/en/master/api.html>`_
- `FAQ`_
- `Optional Dependencies`_
@@ -66,9 +66,9 @@ Using ``natsorted`` is simple:
``natsorted`` identifies numbers anywhere in a string and sorts them
naturally. Below are some other things you can do with ``natsort``
-(also see the `examples <http://natsort.readthedocs.io/en/master/examples.html>`_
+(also see the `examples <https://natsort.readthedocs.io/en/master/examples.html>`_
for a quick start guide, or the
-`api <http://natsort.readthedocs.io/en/master/api.html>`_ for complete details).
+`api <https://natsort.readthedocs.io/en/master/api.html>`_ for complete details).
**Note**: ``natsorted`` is designed to be a drop-in replacement for the built-in
``sorted`` function. Like ``sorted``, ``natsorted`` `does not sort in-place`.
@@ -104,7 +104,7 @@ This is handled properly by default (as of ``natsort`` version >= 4.0.0):
['version-1.9', 'version-1.10', 'version-1.11', 'version-2.0']
If you need to sort release candidates, please see
-`this useful hack <http://natsort.readthedocs.io/en/master/examples.html#rc-sorting>`_.
+`this useful hack <https://natsort.readthedocs.io/en/master/examples.html#rc-sorting>`_.
Sorting by Real Numbers (i.e. Signed Floats)
++++++++++++++++++++++++++++++++++++++++++++
@@ -150,7 +150,7 @@ This can be achieved with the ``humansorted`` function:
You may find you need to explicitly set the locale to get this to work
(as shown in the example).
-Please see `locale issues <http://natsort.readthedocs.io/en/master/locale_issues.html>`_ and the
+Please see `locale issues <https://natsort.readthedocs.io/en/master/locale_issues.html>`_ and the
`Optional Dependencies`_ section below before using the ``humansorted`` function.
Further Customizing Natsort
@@ -175,7 +175,7 @@ bitwise OR operator (``|``). For example,
True
All of the available customizations can be found in the documentation for
-`the ns enum <http://natsort.readthedocs.io/en/master/ns_class.html>`_.
+`the ns enum <https://natsort.readthedocs.io/en/master/ns_class.html>`_.
You can also add your own custom transformation functions with the ``key`` argument.
These can be used with ``alg`` if you wish.
@@ -248,9 +248,9 @@ Other Useful Things
- recursively descend into lists of lists
- automatic unicode normalization of input data
- - `controlling the case-sensitivity <http://natsort.readthedocs.io/en/master/examples.html#case-sort>`_
- - `sorting file paths correctly <http://natsort.readthedocs.io/en/master/examples.html#path-sort>`_
- - `allow custom sorting keys <http://natsort.readthedocs.io/en/master/examples.html#custom-sort>`_
+ - `controlling the case-sensitivity <https://natsort.readthedocs.io/en/master/examples.html#case-sort>`_
+ - `sorting file paths correctly <https://natsort.readthedocs.io/en/master/examples.html#path-sort>`_
+ - `allow custom sorting keys <https://natsort.readthedocs.io/en/master/examples.html#custom-sort>`_
FAQ
---
@@ -261,7 +261,7 @@ How do I debug ``natsort.natsorted()``?
exactly what is being done with their input using this key - it is highly recommended
to `look at this issue describing how to debug <https://github.com/SethMMorton/natsort/issues/13#issuecomment-50422375>`_
for *how* to debug, and also to review the
- `How Does Natsort Work? <http://natsort.readthedocs.io/en/master/howitworks.html>`_
+ `How Does Natsort Work? <https://natsort.readthedocs.io/en/master/howitworks.html>`_
page for *why* ``natsort`` is doing that to your data.
If you are trying to sort custom classes and running into trouble, please take a look at
@@ -272,7 +272,7 @@ How do I debug ``natsort.natsorted()``?
use the ``natsort`` key as part of your rich comparison operator definition.
How *does* ``natsort`` work?
- If you don't want to read `How Does Natsort Work? <http://natsort.readthedocs.io/en/master/howitworks.html>`_,
+ If you don't want to read `How Does Natsort Work? <https://natsort.readthedocs.io/en/master/howitworks.html>`_,
here is a quick primer.
``natsort`` provides a `key function <https://docs.python.org/3/howto/sorting.html#key-functions>`_
@@ -344,7 +344,7 @@ PyICU
It is recommended that you install `PyICU <https://pypi.org/project/PyICU>`_
if you wish to sort in a locale-dependent manner, see
-http://natsort.readthedocs.io/en/master/locale_issues.html for an explanation why.
+https://natsort.readthedocs.io/en/master/locale_issues.html for an explanation why.
Installation
------------
@@ -406,4 +406,4 @@ Seth M. Morton
History
-------
-Please visit the `changelog <http://natsort.readthedocs.io/en/master/changelog.html>`_.
+Please visit the `changelog <https://natsort.readthedocs.io/en/master/changelog.html>`_.
diff --git a/docs/source/examples.rst b/docs/source/examples.rst
index 29d1aea..db64bd0 100644
--- a/docs/source/examples.rst
+++ b/docs/source/examples.rst
@@ -362,5 +362,5 @@ so you cannot simply pass :func:`natsort_keygen` to a Pandas DataFrame and sort.
This request has been made to the Pandas devs; see
`issue 3942 <https://github.com/pydata/pandas/issues/3942>`_ if you are interested.
If you need to sort a Pandas DataFrame, please check out
-`this answer on StackOverflow <http://stackoverflow.com/a/29582718/1399279>`_
+`this answer on StackOverflow <https://stackoverflow.com/a/29582718/1399279>`_
for ways to do this without the ``key`` argument to ``sort``.
diff --git a/docs/source/howitworks.rst b/docs/source/howitworks.rst
index 2415a91..45c5e61 100644
--- a/docs/source/howitworks.rst
+++ b/docs/source/howitworks.rst
@@ -818,11 +818,11 @@ assumes you at least read the StackOverflow answers.
Looking back at our 'é' example, we can see that the two versions were
constructed with the byte strings ``b'\xc3\xa9'`` and ``b'\x65\xcc\x81'``.
The former representation is actually
-`LATIN SMALL LETTER E WITH ACUTE <http://www.fileformat.info/info/unicode/char/e9/index.htm>`_
+`LATIN SMALL LETTER E WITH ACUTE <https://www.fileformat.info/info/unicode/char/e9/index.htm>`_
and is a single character in the Unicode standard. This is known as the
*compressed form* and corresponds to the 'NFC' normalization scheme.
The latter representation is actually the letter 'e' followed by
-`COMBINING ACUTE ACCENT <http://www.fileformat.info/info/unicode/char/0301/index.htm>`_
+`COMBINING ACUTE ACCENT <https://www.fileformat.info/info/unicode/char/0301/index.htm>`_
and so is two characters in the Unicode standard. This is known as the
*decompressed form* and corresponds to the 'NFD' normalization scheme.
Since the first character in the decompressed form is actually the letter 'e',
@@ -1079,18 +1079,18 @@ what the rest of the world assumes.
to construting the :mod:`natsort` algorithm as opposed to the procedural approach
illustrated in :ref:`TL;DR 1 <tldr1>` and :ref:`TL;DR 2 <tldr2>`.
-.. _ASCII table: http://www.asciitable.com/
+.. _ASCII table: https://www.asciitable.com/
.. _getting sorting right is surprisingly hard: http://www.compciv.org/guides/python/fundamentals/sorting-collections-with-sorted/
.. _This astonished: https://github.com/SethMMorton/natsort/issues/19
-.. _a lot: http://stackoverflow.com/questions/29548742/python-natsort-sort-strings-recursively
-.. _of people: http://stackoverflow.com/questions/24045348/sort-set-of-numbers-in-the-form-xx-yy-in-python
+.. _a lot: https://stackoverflow.com/questions/29548742/python-natsort-sort-strings-recursively
+.. _of people: https://stackoverflow.com/questions/24045348/sort-set-of-numbers-in-the-form-xx-yy-in-python
.. _and some people aren't very nice when they are astonished:
https://github.com/xolox/python-naturalsort/blob/ed3e6b6ffaca3bdea3b76e08acbb8bd2a5fee463/README.rst#why-another-natsort-module
.. _fastnumbers: https://github.com/SethMMorton/fastnumbers
.. _as part of my testing: https://github.com/SethMMorton/natsort/blob/master/test_natsort/slow_splitters.py
-.. _this one for coercion: http://stackoverflow.com/questions/736043/checking-if-a-string-can-be-converted-to-float-in-python
-.. _this one for checking: http://stackoverflow.com/questions/354038/how-do-i-check-if-a-string-is-a-number-float-in-python
-.. _most natural sort solutions for python on Stack Overflow: http://stackoverflow.com/q/4836710/1399279
+.. _this one for coercion: https://stackoverflow.com/questions/736043/checking-if-a-string-can-be-converted-to-float-in-python
+.. _this one for checking: https://stackoverflow.com/questions/354038/how-do-i-check-if-a-string-is-a-number-float
+.. _most natural sort solutions for python on Stack Overflow: https://stackoverflow.com/q/4836710/1399279
.. _80%/20%: https://en.wikipedia.org/wiki/Pareto_principle
.. _The first major special case I encountered was sorting filesystem paths: https://github.com/SethMMorton/natsort/issues/3
.. _The second major special case I encountered was sorting of different types: https://github.com/SethMMorton/natsort/issues/7
@@ -1109,5 +1109,5 @@ what the rest of the world assumes.
.. _natsort.compat.locale.py: https://github.com/SethMMorton/natsort/blob/master/natsort/compat/locale.py
.. _Thousands separator support: https://github.com/SethMMorton/natsort/issues/36
.. _really good: https://hypothesis.readthedocs.io/en/latest/
-.. _testing strategy: http://doc.pytest.org/en/latest/
-.. _check out some official Unicode documentation: http://unicode.org/reports/tr15/
+.. _testing strategy: https://docs.pytest.org/en/latest/
+.. _check out some official Unicode documentation: https://unicode.org/reports/tr15/
diff --git a/docs/source/intro.rst b/docs/source/intro.rst
index fb09294..ff47752 100644
--- a/docs/source/intro.rst
+++ b/docs/source/intro.rst
@@ -8,7 +8,7 @@ Simple yet flexible natural sorting in Python.
- Source Code: https://github.com/SethMMorton/natsort
- Downloads: https://pypi.org/project/natsort/
- - Documentation: http://natsort.readthedocs.io/
+ - Documentation: https://natsort.readthedocs.io/
- Optional Dependencies:
- `fastnumbers <https://pypi.org/project/fastnumbers>`_ >= 2.0.0
@@ -24,10 +24,10 @@ want to sort it naturally.
contained signed floating point numbers in the names. There was a lack of
algorithms out there that could perform a natural sort on `floats` but
plenty for `ints`; check out
-`this StackOverflow question <http://stackoverflow.com/q/4836710/1399279>`_
+`this StackOverflow question <https://stackoverflow.com/q/4836710/1399279>`_
and its answers and links therein,
-`this ActiveState forum <http://code.activestate.com/recipes/285264-natural-string-sorting/>`_,
-and of course `this great article on natural sorting <http://blog.codinghorror.com/sorting-for-humans-natural-sort-order/>`_
+`this ActiveState forum <https://code.activestate.com/recipes/285264-natural-string-sorting/>`_,
+and of course `this great article on natural sorting <https://blog.codinghorror.com/sorting-for-humans-natural-sort-order/>`_
from CodingHorror.com for examples of what I mean.
:mod:`natsort` was created to fill in this gap, but has since expanded to handle
just about any definition of a number, as well as other sorting customizations.
@@ -259,7 +259,7 @@ How do I debug :func:`~natsorted`?
exactly what is being done with their input using this key - it is highly recommended
to `look at this issue describing how to debug <https://github.com/SethMMorton/natsort/issues/13#issuecomment-50422375>`_
for *how* to debug, and also to review the
- `How Does Natsort Work? <http://natsort.readthedocs.io/en/master/howitworks.html>`_
+ `How Does Natsort Work? <https://natsort.readthedocs.io/en/master/howitworks.html>`_
page for *why* :mod:`natsort` is doing that to your data.
If you are trying to sort custom classes and running into trouble, please take a look at
@@ -270,7 +270,7 @@ How do I debug :func:`~natsorted`?
use the :mod:`natsort` key as part of your rich comparison operator definition.
How *does* :mod:`natsort` work?
- If you don't want to read `How Does Natsort Work? <http://natsort.readthedocs.io/en/master/howitworks.html>`_,
+ If you don't want to read `How Does Natsort Work? <https://natsort.readthedocs.io/en/master/howitworks.html>`_,
here is a quick primer.
:mod:`natsort` provides a `key function <https://docs.python.org/3/howto/sorting.html#key-functions>`_
@@ -342,7 +342,7 @@ PyICU
It is recommended that you install `PyICU <https://pypi.org/project/PyICU>`_
if you wish to sort in a locale-dependent manner, see
-http://natsort.readthedocs.io/en/master/locale_issues.html for an explanation why.
+https://natsort.readthedocs.io/en/master/locale_issues.html for an explanation why.
Installation
------------
@@ -394,4 +394,4 @@ makes it easy for you to install the testing dependencies:
$ pipenv run python -m pytest
Note that above I invoked ``python -m pytest`` instead of just ``pytest`` - this is because
-`the former puts the CWD on sys.path <https://docs.pytest.org/en/latest/usage.html#calling-pytest-through-python-m-pytest>`_. \ No newline at end of file
+`the former puts the CWD on sys.path <https://docs.pytest.org/en/latest/usage.html#calling-pytest-through-python-m-pytest>`_.
diff --git a/docs/source/locale_issues.rst b/docs/source/locale_issues.rst
index 48fa676..c78e4c0 100644
--- a/docs/source/locale_issues.rst
+++ b/docs/source/locale_issues.rst
@@ -75,10 +75,10 @@ The `locale <https://docs.python.org/3.5/library/locale.html>`_ Module Is Broken
It's not Python's fault, but the OS... the locale library for BSD-based systems
(of which Mac OS X is one) is broken. See the following links:
- - http://stackoverflow.com/questions/3412933/python-not-sorting-unicode-properly-strcoll-doesnt-help
- - http://bugs.python.org/issue23195
+ - https://stackoverflow.com/questions/3412933/python-not-sorting-unicode-properly-strcoll-doesnt-help
+ - https://bugs.python.org/issue23195
- https://github.com/SethMMorton/natsort/issues/21 (contains instructons on installing)
- - http://stackoverflow.com/questions/33459384/unicode-character-not-in-range-when-calling-locale-strxfrm
+ - https://stackoverflow.com/questions/33459384/unicode-character-not-in-range-when-calling-locale-strxfrm
- https://github.com/SethMMorton/natsort/issues/34
Of course, installing `PyICU <https://pypi.org/project/PyICU>`_ fixes this,
diff --git a/natsort/ns_enum.py b/natsort/ns_enum.py
index be61295..0e98ee6 100644
--- a/natsort/ns_enum.py
+++ b/natsort/ns_enum.py
@@ -130,7 +130,7 @@ class _NSEnum(collections.namedtuple("_NSEnum", enum_field_names)):
default "NFD". This will transform characters such as '⑦' into
'7'. Please see https://stackoverflow.com/a/7934397/1399279,
https://stackoverflow.com/a/7931547/1399279,
- and http://unicode.org/reports/tr15/ for full details into unicode
+ and https://unicode.org/reports/tr15/ for full details into unicode
normalization.
LOCALE, L
Tell `natsort` to be locale-aware when sorting. This includes both