Hello community,
here is the log from the commit of package python-python-slugify for
openSUSE:Leap:15.2 checked in at 2020-03-02 13:21:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-python-slugify (Old)
and /work/SRC/openSUSE:Leap:15.2/.python-python-slugify.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-python-slugify"
Mon Mar 2 13:21:39 2020 rev:5 rq:777050 version:3.0.3
Changes:
--------
---
/work/SRC/openSUSE:Leap:15.2/python-python-slugify/python-python-slugify.changes
2020-01-15 15:52:25.815563062 +0100
+++
/work/SRC/openSUSE:Leap:15.2/.python-python-slugify.new.26092/python-python-slugify.changes
2020-03-02 13:21:40.406197476 +0100
@@ -1,0 +2,26 @@
+Mon Aug 26 11:27:46 UTC 2019 - Antonio Larrosa <[email protected]>
+
+- Update to 3.0.3:
+ * Add Options to readme
+ * Add more unit tests
+
+-------------------------------------------------------------------
+Sat May 25 08:55:08 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 3.0.2:
+ * Add official support of Py 3.7
+
+-------------------------------------------------------------------
+Tue Mar 26 04:29:33 UTC 2019 - John Vandenberg <[email protected]>
+
+- Use PyPI sdist
+- Switch from requiring python-Unidecode to requiring
+ python-text-unidecode >= 1.2
+- Update to v3.0.1
+ * add test to manifest
+- from v3.0.0
+ * Upgrade Unidecode to 1.2
+ * Promote text-unidecode as the primary decoding package
+ * Add Unidecode as an optional extra
+
+-------------------------------------------------------------------
Old:
----
python-slugify-2.0.1.tar.gz
New:
----
python-slugify-3.0.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-python-slugify.spec ++++++
--- /var/tmp/diff_new_pack.svbIuk/_old 2020-03-02 13:21:40.758198176 +0100
+++ /var/tmp/diff_new_pack.svbIuk/_new 2020-03-02 13:21:40.762198183 +0100
@@ -18,28 +18,30 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-python-slugify
-Version: 2.0.1
+Version: 3.0.3
Release: 0
Summary: Slugify application that handles Unicode
License: MIT
Group: Development/Languages/Python
Url: https://github.com/un33k/python-slugify
-Source:
https://github.com/un33k/python-slugify/archive/%{version}.tar.gz#/python-slugify-%{version}.tar.gz
-BuildRequires: %{python_module Unidecode >= 0.04.16}
+Source:
https://files.pythonhosted.org/packages/source/p/python-slugify/python-slugify-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module text-unidecode >= 1.2}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Conflicts: python-awesome-slugify
-Requires: python-Unidecode >= 0.04.16
+Requires: python-text-unidecode >= 1.2
+Suggests: python-Unidecode >= 1.0.23
BuildArch: noarch
%python_subpackages
%description
-A Python Slugify application that handles Unicode
+A Python Slugify application that handles Unicode.
%prep
%setup -q -n python-slugify-%{version}
+sed -i 's/==/>=/' setup.py
%build
%python_build
++++++ python-slugify-2.0.1.tar.gz -> python-slugify-3.0.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-slugify-2.0.1/.gitignore
new/python-slugify-3.0.3/.gitignore
--- old/python-slugify-2.0.1/.gitignore 2019-01-04 00:03:36.000000000 +0100
+++ new/python-slugify-3.0.3/.gitignore 1970-01-01 01:00:00.000000000 +0100
@@ -1,62 +0,0 @@
-# JebBrains IDE
-.idea/
-
-# Byte-compiled / optimized / DLL files
-__pycache__/
-*.py[cod]
-
-# C extensions
-*.so
-
-# Distribution / packaging
-.Python
-env/
-build/
-develop-eggs/
-dist/
-downloads/
-eggs/
-.eggs/
-lib/
-lib64/
-parts/
-sdist/
-var/
-*.egg-info/
-.installed.cfg
-*.egg
-
-# PyInstaller
-# Usually these files are written by a python script from a template
-# before PyInstaller builds the exe, so as to inject date/other infos into it.
-*.manifest
-*.spec
-
-# Installer logs
-pip-log.txt
-pip-delete-this-directory.txt
-
-# Unit test / coverage reports
-htmlcov/
-.tox/
-.coverage
-.coverage.*
-.cache
-nosetests.xml
-coverage.xml
-*,cover
-
-# Translations
-*.mo
-*.pot
-
-# Django stuff:
-*.log
-
-# Sphinx documentation
-docs/_build/
-
-# PyBuilder
-target/
-
-*.*DS_Store
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-slugify-2.0.1/.travis.yml
new/python-slugify-3.0.3/.travis.yml
--- old/python-slugify-2.0.1/.travis.yml 2019-01-04 00:03:36.000000000
+0100
+++ new/python-slugify-3.0.3/.travis.yml 1970-01-01 01:00:00.000000000
+0100
@@ -1,25 +0,0 @@
-sudo: false
-language: python
-
-python:
- - "2.7"
- - "3.4"
- - "3.5"
- - "3.6"
- - pypy
-
-install:
- - pip install pip -U
- - pip install -e .
- - pip install pycodestyle
- - pip install coveralls
- - pip install https://github.com/un33k/pyflakes/tarball/master
-
-before_script:
- - "bash pycodestyle.sh"
- - if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then pyflakes -x W slugify; fi
-
-script: coverage run --source=slugify test.py
-
-after_success:
- coveralls
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-slugify-2.0.1/.vscode/settings.json
new/python-slugify-3.0.3/.vscode/settings.json
--- old/python-slugify-2.0.1/.vscode/settings.json 2019-01-04
00:03:36.000000000 +0100
+++ new/python-slugify-3.0.3/.vscode/settings.json 1970-01-01
01:00:00.000000000 +0100
@@ -1,5 +0,0 @@
-{
- "python.linting.pylintEnabled": false,
- "restructuredtext.confPath": "",
- "python.pythonPath": "/usr/local/opt/python/bin/python3.6"
-}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-slugify-2.0.1/CHANGELOG.md
new/python-slugify-3.0.3/CHANGELOG.md
--- old/python-slugify-2.0.1/CHANGELOG.md 2019-01-04 00:03:36.000000000
+0100
+++ new/python-slugify-3.0.3/CHANGELOG.md 2019-07-28 05:02:18.000000000
+0200
@@ -1,3 +1,18 @@
+## 3.0.3
+ - Add Options to readme
+ - Add more unit tests
+
+## 3.0.2
+ - Add official support of Py 3.7
+
+## 3.0.1
+ - Add test.py to manifest
+
+## 3.0.0
+ - Upgrade Unidecode
+ - Promote text-unidecode as the primary decoding package
+ - Add Unidecode as an optional extra. "pip install python-slugify[unidecode]"
+
## 2.0.1
- Add replacements option e.g. [['|', 'or'], ['%', 'percent'], ['-', '_']]
(@andriyor)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-slugify-2.0.1/MANIFEST.in
new/python-slugify-3.0.3/MANIFEST.in
--- old/python-slugify-2.0.1/MANIFEST.in 2019-01-04 00:03:36.000000000
+0100
+++ new/python-slugify-3.0.3/MANIFEST.in 2019-07-28 05:02:18.000000000
+0200
@@ -1,3 +1,4 @@
include CHANGELOG.md
include LICENSE
include README.md
+include test.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-slugify-2.0.1/PKG-INFO
new/python-slugify-3.0.3/PKG-INFO
--- old/python-slugify-2.0.1/PKG-INFO 1970-01-01 01:00:00.000000000 +0100
+++ new/python-slugify-3.0.3/PKG-INFO 2019-07-28 05:02:27.000000000 +0200
@@ -0,0 +1,26 @@
+Metadata-Version: 2.1
+Name: python-slugify
+Version: 3.0.3
+Summary: A Python Slugify application that handles Unicode
+Home-page: https://github.com/un33k/python-slugify
+Author: Val Neekman
+Author-email: [email protected]
+License: MIT
+Description: A Python Slugify application that handles Unicode
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Intended Audience :: Developers
+Classifier: Topic :: Software Development :: Build Tools
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.2
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Provides-Extra: unidecode
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-slugify-2.0.1/README.md
new/python-slugify-3.0.3/README.md
--- old/python-slugify-2.0.1/README.md 2019-01-04 00:03:36.000000000 +0100
+++ new/python-slugify-3.0.3/README.md 2019-07-28 05:02:18.000000000 +0200
@@ -15,94 +15,120 @@
Notice
====================
-By default, this modules installs and uses
[Unidecode](https://github.com/avian2/unidecode) *(GPL)* for its decoding
needs. However if you wish to use
[text-unidecode](https://github.com/kmike/text-unidecode) *(GPL & Perl
Artistic)* instead, please ensure it is installed prior to `python-slugify`
installation.
-
-In cases where both `Unidecode` and `text-unidecode` are installed,
`Unidecode` is used as the default decoding module.
+This module, by default installs and uses
[text-unidecode](https://github.com/kmike/text-unidecode) *(GPL & Perl
Artistic)* for its decoding needs.
+However, there is an alternative decoding package called
[Unidecode](https://github.com/avian2/unidecode) *(GPL)*. It can be installed
as `python-slugify[unidecode]` for those who prefer it.
How to install
====================
-
- 1. easy_install python-slugify
- 2. pip install python-slugify
- 3. git clone http://github.com/un33k/python-slugify
- a. cd python-slugify
- b. python setup.py install
- 4. wget https://github.com/un33k/python-slugify/zipball/master
- a. unzip the downloaded file
- b. cd python-slugify-*
- c. python setup.py install
-
+ easy_install python-slugify |OR| easy_install python-slugify[unidecode]
+ -- OR --
+ pip install python-slugify |OR| pip install python-slugify[unidecode]
+
+Options
+===================
+```python
+def slugify(
+ text,
+ entities=True,
+ decimal=True,
+ hexadecimal=True,
+ max_length=0,
+ word_boundary=False,
+ separator='-',
+ save_order=False,
+ stopwords=(),
+ regex_pattern=None,
+ lowercase=True,
+ replacements=()
+ ):
+ """
+ Make a slug from the given text.
+ :param text (str): initial text
+ :param entities (bool): converts html entities to unicode (foo & bar ->
foo-bar)
+ :param decimal (bool): converts html decimal to unicode (Ž -> Ž -> z)
+ :param hexadecimal (bool): converts html hexadecimal to unicode (Ž ->
Ž -> z)
+ :param max_length (int): output string length
+ :param word_boundary (bool): truncates to end of full words (length may be
shorter than max_length)
+ :param save_order (bool): if parameter is True and max_length > 0 return
whole words in the initial order
+ :param separator (str): separator between words
+ :param stopwords (iterable): words to discount
+ :param regex_pattern (str): regex pattern for allowed characters
+ :param lowercase (bool): activate case sensitivity by setting it to False
+ :param replacements (iterable): list of replacement rules e.g. [['|', 'or'],
['%', 'percent']]
+ :return (str): slugify text
+ """
+```
How to use
====================
- ```python
- from slugify import slugify
+```python
+from slugify import slugify
- txt = "This is a test ---"
- r = slugify(txt)
- self.assertEqual(r, "this-is-a-test")
-
- txt = '影師嗎'
- r = slugify(txt)
- self.assertEqual(r, "ying-shi-ma")
-
- txt = 'C\'est déjà l\'été.'
- r = slugify(txt)
- self.assertEqual(r, "c-est-deja-l-ete")
-
- txt = 'Nín hǎo. Wǒ shì zhōng guó rén'
- r = slugify(txt)
- self.assertEqual(r, "nin-hao-wo-shi-zhong-guo-ren")
-
- txt = 'Компьютер'
- r = slugify(txt)
- self.assertEqual(r, "kompiuter")
-
- txt = 'jaja---lol-méméméoo--a'
- r = slugify(txt, max_length=9)
- self.assertEqual(r, "jaja-lol")
-
- txt = 'jaja---lol-méméméoo--a'
- r = slugify(txt, max_length=15, word_boundary=True)
- self.assertEqual(r, "jaja-lol-a")
-
- txt = 'jaja---lol-méméméoo--a'
- r = slugify(txt, max_length=20, word_boundary=True, separator=".")
- self.assertEqual(r, "jaja.lol.mememeoo.a")
-
- txt = 'one two three four five'
- r = slugify(txt, max_length=13, word_boundary=True, save_order=True)
- self.assertEqual(r, "one-two-three")
-
- txt = 'the quick brown fox jumps over the lazy dog'
- r = slugify(txt, stopwords=['the'])
- self.assertEqual(r, 'quick-brown-fox-jumps-over-lazy-dog')
-
- txt = 'the quick brown fox jumps over the lazy dog in a hurry'
- r = slugify(txt, stopwords=['the', 'in', 'a', 'hurry'])
- self.assertEqual(r, 'quick-brown-fox-jumps-over-lazy-dog')
-
- txt = 'thIs Has a stopword Stopword'
- r = slugify(txt, stopwords=['Stopword'], lowercase=False)
- self.assertEqual(r, 'thIs-Has-a-stopword')
-
- txt = "___This is a test___"
- regex_pattern = r'[^-a-z0-9_]+'
- r = slugify(txt, regex_pattern=regex_pattern)
- self.assertEqual(r, "___this-is-a-test___")
-
- txt = "___This is a test___"
- regex_pattern = r'[^-a-z0-9_]+'
- r = slugify(txt, separator='_', regex_pattern=regex_pattern)
- self.assertNotEqual(r, "_this_is_a_test_")
-
- txt = '10 | 20 %'
- r = slugify(txt, replacements=[['|', 'or'], ['%', 'percent']])
- self.assertEqual(r, "10-or-20-percent")
+txt = "This is a test ---"
+r = slugify(txt)
+self.assertEqual(r, "this-is-a-test")
+
+txt = '影師嗎'
+r = slugify(txt)
+self.assertEqual(r, "ying-shi-ma")
+
+txt = 'C\'est déjà l\'été.'
+r = slugify(txt)
+self.assertEqual(r, "c-est-deja-l-ete")
+
+txt = 'Nín hǎo. Wǒ shì zhōng guó rén'
+r = slugify(txt)
+self.assertEqual(r, "nin-hao-wo-shi-zhong-guo-ren")
+
+txt = 'Компьютер'
+r = slugify(txt)
+self.assertEqual(r, "kompiuter")
+
+txt = 'jaja---lol-méméméoo--a'
+r = slugify(txt, max_length=9)
+self.assertEqual(r, "jaja-lol")
+
+txt = 'jaja---lol-méméméoo--a'
+r = slugify(txt, max_length=15, word_boundary=True)
+self.assertEqual(r, "jaja-lol-a")
+
+txt = 'jaja---lol-méméméoo--a'
+r = slugify(txt, max_length=20, word_boundary=True, separator=".")
+self.assertEqual(r, "jaja.lol.mememeoo.a")
+
+txt = 'one two three four five'
+r = slugify(txt, max_length=13, word_boundary=True, save_order=True)
+self.assertEqual(r, "one-two-three")
+
+txt = 'the quick brown fox jumps over the lazy dog'
+r = slugify(txt, stopwords=['the'])
+self.assertEqual(r, 'quick-brown-fox-jumps-over-lazy-dog')
+
+txt = 'the quick brown fox jumps over the lazy dog in a hurry'
+r = slugify(txt, stopwords=['the', 'in', 'a', 'hurry'])
+self.assertEqual(r, 'quick-brown-fox-jumps-over-lazy-dog')
+
+txt = 'thIs Has a stopword Stopword'
+r = slugify(txt, stopwords=['Stopword'], lowercase=False)
+self.assertEqual(r, 'thIs-Has-a-stopword')
+
+txt = "___This is a test___"
+regex_pattern = r'[^-a-z0-9_]+'
+r = slugify(txt, regex_pattern=regex_pattern)
+self.assertEqual(r, "___this-is-a-test___")
+
+txt = "___This is a test___"
+regex_pattern = r'[^-a-z0-9_]+'
+r = slugify(txt, separator='_', regex_pattern=regex_pattern)
+self.assertNotEqual(r, "_this_is_a_test_")
+
+txt = '10 | 20 %'
+r = slugify(txt, replacements=[['|', 'or'], ['%', 'percent']])
+self.assertEqual(r, "10-or-20-percent")
- ```
+```
For more examples, have a look at the [test.py](test.py) file.
@@ -145,4 +171,4 @@
Sponsors
====================
-[](https://github.com/surgeforward)
+[Surge](https://github.com/surgeforward)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-slugify-2.0.1/pycodestyle.sh
new/python-slugify-3.0.3/pycodestyle.sh
--- old/python-slugify-2.0.1/pycodestyle.sh 2019-01-04 00:03:36.000000000
+0100
+++ new/python-slugify-3.0.3/pycodestyle.sh 1970-01-01 01:00:00.000000000
+0100
@@ -1,13 +0,0 @@
-#!/bin/bash
-
-# Ignoring autogenerated files
-# -- Migration directories
-# Ignoring error codes
-# -- E128 continuation line under-indented for visual indent
-# -- E261 at least two spaces before inline comment
-# -- E225 missing whitespace around operator
-# -- E501 line too long
-# Ignoring warning codes
-# -- W605 invalid escape sequence '\d'
-
-pycodestyle --ignore=E128,E261,E225,E501,W605 slugify test.py setup.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-slugify-2.0.1/python_slugify.egg-info/PKG-INFO
new/python-slugify-3.0.3/python_slugify.egg-info/PKG-INFO
--- old/python-slugify-2.0.1/python_slugify.egg-info/PKG-INFO 1970-01-01
01:00:00.000000000 +0100
+++ new/python-slugify-3.0.3/python_slugify.egg-info/PKG-INFO 2019-07-28
05:02:27.000000000 +0200
@@ -0,0 +1,26 @@
+Metadata-Version: 2.1
+Name: python-slugify
+Version: 3.0.3
+Summary: A Python Slugify application that handles Unicode
+Home-page: https://github.com/un33k/python-slugify
+Author: Val Neekman
+Author-email: [email protected]
+License: MIT
+Description: A Python Slugify application that handles Unicode
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Intended Audience :: Developers
+Classifier: Topic :: Software Development :: Build Tools
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.2
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Provides-Extra: unidecode
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-slugify-2.0.1/python_slugify.egg-info/SOURCES.txt
new/python-slugify-3.0.3/python_slugify.egg-info/SOURCES.txt
--- old/python-slugify-2.0.1/python_slugify.egg-info/SOURCES.txt
1970-01-01 01:00:00.000000000 +0100
+++ new/python-slugify-3.0.3/python_slugify.egg-info/SOURCES.txt
2019-07-28 05:02:27.000000000 +0200
@@ -0,0 +1,15 @@
+CHANGELOG.md
+LICENSE
+MANIFEST.in
+README.md
+setup.cfg
+setup.py
+test.py
+python_slugify.egg-info/PKG-INFO
+python_slugify.egg-info/SOURCES.txt
+python_slugify.egg-info/dependency_links.txt
+python_slugify.egg-info/entry_points.txt
+python_slugify.egg-info/requires.txt
+python_slugify.egg-info/top_level.txt
+slugify/__init__.py
+slugify/slugify.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-slugify-2.0.1/python_slugify.egg-info/dependency_links.txt
new/python-slugify-3.0.3/python_slugify.egg-info/dependency_links.txt
--- old/python-slugify-2.0.1/python_slugify.egg-info/dependency_links.txt
1970-01-01 01:00:00.000000000 +0100
+++ new/python-slugify-3.0.3/python_slugify.egg-info/dependency_links.txt
2019-07-28 05:02:27.000000000 +0200
@@ -0,0 +1 @@
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-slugify-2.0.1/python_slugify.egg-info/entry_points.txt
new/python-slugify-3.0.3/python_slugify.egg-info/entry_points.txt
--- old/python-slugify-2.0.1/python_slugify.egg-info/entry_points.txt
1970-01-01 01:00:00.000000000 +0100
+++ new/python-slugify-3.0.3/python_slugify.egg-info/entry_points.txt
2019-07-28 05:02:27.000000000 +0200
@@ -0,0 +1,3 @@
+[console_scripts]
+slugify = slugify.slugify:main
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-slugify-2.0.1/python_slugify.egg-info/requires.txt
new/python-slugify-3.0.3/python_slugify.egg-info/requires.txt
--- old/python-slugify-2.0.1/python_slugify.egg-info/requires.txt
1970-01-01 01:00:00.000000000 +0100
+++ new/python-slugify-3.0.3/python_slugify.egg-info/requires.txt
2019-07-28 05:02:27.000000000 +0200
@@ -0,0 +1,4 @@
+text-unidecode==1.2
+
+[unidecode]
+Unidecode==1.0.23
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-slugify-2.0.1/python_slugify.egg-info/top_level.txt
new/python-slugify-3.0.3/python_slugify.egg-info/top_level.txt
--- old/python-slugify-2.0.1/python_slugify.egg-info/top_level.txt
1970-01-01 01:00:00.000000000 +0100
+++ new/python-slugify-3.0.3/python_slugify.egg-info/top_level.txt
2019-07-28 05:02:27.000000000 +0200
@@ -0,0 +1 @@
+slugify
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-slugify-2.0.1/requirements.txt
new/python-slugify-3.0.3/requirements.txt
--- old/python-slugify-2.0.1/requirements.txt 2019-01-04 00:03:36.000000000
+0100
+++ new/python-slugify-3.0.3/requirements.txt 1970-01-01 01:00:00.000000000
+0100
@@ -1 +0,0 @@
-Unidecode>=0.04.16
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-slugify-2.0.1/requirements_alt.txt
new/python-slugify-3.0.3/requirements_alt.txt
--- old/python-slugify-2.0.1/requirements_alt.txt 2019-01-04
00:03:36.000000000 +0100
+++ new/python-slugify-3.0.3/requirements_alt.txt 1970-01-01
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-text-unidecode>=1.2
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-slugify-2.0.1/setup.cfg
new/python-slugify-3.0.3/setup.cfg
--- old/python-slugify-2.0.1/setup.cfg 2019-01-04 00:03:36.000000000 +0100
+++ new/python-slugify-3.0.3/setup.cfg 2019-07-28 05:02:27.000000000 +0200
@@ -1,2 +1,7 @@
[bdist_wheel]
-universal=1
+universal = 1
+
+[egg_info]
+tag_build =
+tag_date = 0
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-slugify-2.0.1/setup.py
new/python-slugify-3.0.3/setup.py
--- old/python-slugify-2.0.1/setup.py 2019-01-04 00:03:36.000000000 +0100
+++ new/python-slugify-3.0.3/setup.py 2019-07-28 05:02:18.000000000 +0200
@@ -7,12 +7,6 @@
import sys
import codecs
-install_requires = []
-try:
- import text_unidecode
-except ImportError:
- install_requires.append('Unidecode>=0.04.16')
-
name = 'python-slugify'
package = 'slugify'
description = 'A Python Slugify application that handles Unicode'
@@ -20,6 +14,8 @@
author = 'Val Neekman'
author_email = '[email protected]'
license = 'MIT'
+install_requires = ['text-unidecode==1.2']
+extras_require = {'unidecode': ['Unidecode==1.0.23']}
classifiers = [
'Development Status :: 5 - Production/Stable',
@@ -36,6 +32,7 @@
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
+ 'Programming Language :: Python :: 3.7',
]
@@ -70,6 +67,7 @@
author_email=author_email,
packages=find_packages(exclude=EXCLUDE_FROM_PACKAGES),
install_requires=install_requires,
+ extras_require=extras_require,
classifiers=classifiers,
entry_points={'console_scripts': ['slugify=slugify.slugify:main']},
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-slugify-2.0.1/slugify/__init__.py
new/python-slugify-3.0.3/slugify/__init__.py
--- old/python-slugify-2.0.1/slugify/__init__.py 2019-01-04
00:03:36.000000000 +0100
+++ new/python-slugify-3.0.3/slugify/__init__.py 2019-07-28
05:02:18.000000000 +0200
@@ -3,4 +3,4 @@
__author__ = 'Val Neekman @ Neekware Inc. [@vneekman]'
__description__ = 'A Python slugify application that also handles Unicode'
-__version__ = '2.0.1'
+__version__ = '3.0.3'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-slugify-2.0.1/slugify/slugify.py
new/python-slugify-3.0.3/slugify/slugify.py
--- old/python-slugify-2.0.1/slugify/slugify.py 2019-01-04 00:03:36.000000000
+0100
+++ new/python-slugify-3.0.3/slugify/slugify.py 2019-07-28 05:02:18.000000000
+0200
@@ -14,9 +14,9 @@
unichr = chr
try:
- import unidecode
-except ImportError:
import text_unidecode as unidecode
+except ImportError:
+ import unidecode
__all__ = ['slugify', 'smart_truncate']
@@ -80,11 +80,11 @@
"""
Make a slug from the given text.
:param text (str): initial text
- :param entities (bool):
- :param decimal (bool):
- :param hexadecimal (bool):
+ :param entities (bool): converts html entities to unicode
+ :param decimal (bool): converts html decimal to unicode
+ :param hexadecimal (bool): converts html hexadecimal to unicode
:param max_length (int): output string length
- :param word_boundary (bool):
+ :param word_boundary (bool): truncates to complete word even if length
ends up shorter than max_length
:param save_order (bool): if parameter is True and max_length > 0 return
whole words in the initial order
:param separator (str): separator between words
:param stopwords (iterable): words to discount
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-slugify-2.0.1/test.py
new/python-slugify-3.0.3/test.py
--- old/python-slugify-2.0.1/test.py 2019-01-04 00:03:36.000000000 +0100
+++ new/python-slugify-3.0.3/test.py 2019-07-28 05:02:18.000000000 +0200
@@ -142,11 +142,36 @@
r = slugify(txt, stopwords=['the'], separator=' ')
self.assertEqual(r, 'quick brown fox jumps over lazy dog')
- def test_html_entities(self):
+ def test_html_entities_on(self):
txt = 'foo & bar'
r = slugify(txt)
self.assertEqual(r, 'foo-bar')
+ def test_html_entities_off(self):
+ txt = 'foo & bar'
+ r = slugify(txt, entities=False)
+ self.assertEqual(r, 'foo-amp-bar')
+
+ def test_html_decimal_on(self):
+ txt = 'Ž'
+ r = slugify(txt, decimal=True)
+ self.assertEqual(r, 'z')
+
+ def test_html_decimal_off(self):
+ txt = 'Ž'
+ r = slugify(txt, entities=False, decimal=False)
+ self.assertEqual(r, '381')
+
+ def test_html_hexadecimal_on(self):
+ txt = 'Ž'
+ r = slugify(txt, hexadecimal=True)
+ self.assertEqual(r, 'z')
+
+ def test_html_hexadecimal_off(self):
+ txt = 'Ž'
+ r = slugify(txt, hexadecimal=False)
+ self.assertEqual(r, 'x17d')
+
def test_starts_with_number(self):
txt = '10 amazing secrets'
r = slugify(txt)