summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVal Neekman <val@neekware.com>2021-04-30 15:33:34 -0400
committerVal Neekman <val@neekware.com>2021-04-30 15:33:34 -0400
commit319559cb43f239ac0d3bc7b975a78059bf4a1086 (patch)
tree8b8b97b04aac4e65e2cf0e86afa95ea301f60023
parent3cc1069d37431efd366a0894067aa4c3293dca3e (diff)
downloadpython-slugify-support3.9.tar.gz
Add support for 3.9, drop support for 2.7,3.55.0.0support3.9
-rw-r--r--.python-version3
-rw-r--r--.travis.yml11
-rw-r--r--CHANGELOG.md148
-rw-r--r--README.md60
-rw-r--r--dev.requirements.txt2
-rwxr-xr-xsetup.py5
-rw-r--r--slugify/__init__.py2
-rw-r--r--slugify/__main__.py2
-rw-r--r--tox.ini2
9 files changed, 109 insertions, 126 deletions
diff --git a/.python-version b/.python-version
index 0d88666..a8733ab 100644
--- a/.python-version
+++ b/.python-version
@@ -2,7 +2,4 @@
3.8.8
3.7.10
3.6.13
-3.5.10
-2.7.18
-pypy-5.7.1
pypy3.7-7.3.3
diff --git a/.travis.yml b/.travis.yml
index 3c917db..2f8b3ce 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,28 +2,21 @@ language: python
dist: xenial
python:
- - "2.7"
- - "3.5"
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- - "pypy"
- "pypy3"
install:
- pip install pip -U
- pip install -e .
- pip install pycodestyle
- # Avoid cryptography compilation problems with pypy and 2.7
- - pip install coveralls 'cryptography<=3.0;python_version=="2.7"'
- - pip install https://github.com/un33k/pyflakes/tarball/master
+ - pip install coveralls
before_script:
- "bash format.sh"
- - if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then pyflakes -x W slugify; fi
script: coverage run --source=slugify test.py
-after_success:
- coveralls
+after_success: coveralls
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a3bf922..82ae711 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,186 +1,194 @@
+## 5.0.0
+
+- Add support for Py 3.9 - added tox (@jon-betts - Thx)
+- Drop support for python 2.7, 3.5 & friends
+
## 4.0.1
- - Add support for Py 3.8
+
+- Add support for Py 3.8
+- Last version with `official` python 2.7 and <= 3.5 support
## 4.0.0
- - Drop support from 2.6, & < 3.4.5
+
+- Drop support from 2.6, & < 3.4.5
## 3.0.6
- - Fixed encoding in special.py
+
+- Fixed encoding in special.py
## 3.0.5
- - Add test for pre-translation (e.g German Umlaut)
- - Add special char supports (optional Use)
+
+- Add test for pre-translation (e.g German Umlaut)
+- Add special char supports (optional Use)
## 3.0.4
- - Now supporting text-unidecode>=1.3
- - Now supporting Unidecode>=1.1.1
+
+- Now supporting text-unidecode>=1.3
+- Now supporting Unidecode>=1.1.1
## 3.0.3
- - Remove unicode chars from file
+
+- Remove unicode chars from file
## 3.0.2
- - Add official support of Py 3.7
+
+- Add official support of Py 3.7
## 3.0.1
- - Add test.py to manifest
+
+- 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]"
+
+- 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)
+
+- Add replacements option e.g. [['|', 'or'], ['%', 'percent'], ['-', '_']] (@andriyor)
## 2.0.0
- - Fix alternative dependency installation
+
+- Fix alternative dependency installation
## 1.2.6
- - Add support for case sensitive slugs (@s-m-e)
+
+- Add support for case sensitive slugs (@s-m-e)
## 1.2.5
- - Add support for using text-unidecode (@bolkedebruin)
- - Switch to pycodestyle instead of pep8
+
+- Add support for using text-unidecode (@bolkedebruin)
+- Switch to pycodestyle instead of pep8
## 1.2.4
- - Remove build artifacts during packaging
- - Simplify the setup.py file (@reece)
+
+- Remove build artifacts during packaging
+- Simplify the setup.py file (@reece)
## 1.2.3
- - Republish - possible corrupt 1.2.2 build
+
+- Republish - possible corrupt 1.2.2 build
## 1.2.2
- - Add `regex_pattern` option. (@vrbaskiz)
- - Add Python 3.6 support
+
+- Add `regex_pattern` option. (@vrbaskiz)
+- Add Python 3.6 support
## 1.2.1
- - Including certain files (e.g. license.md) in sdists via MANIFEST.in (@proinsias)
- - Relax licensing by moving from BSD to MIT
- - Add Python 3.5 support
- - Add more tests
+
+- Including certain files (e.g. license.md) in sdists via MANIFEST.in (@proinsias)
+- Relax licensing by moving from BSD to MIT
+- Add Python 3.5 support
+- Add more tests
## 1.2.0
Backward incompatible change: (@fabiocaccamo)
- - In version < 1.2.0 all single quotes ( ' ) were removed, and
- moving forward, >= 1.2.0, they will be replaced with ( - ).
- Example:
- < 1.2.0 -- ('C\'est déjà l\'été.' -> "cest-deja-lete")
- >= 1.2.0 -- ('C\'est déjà l\'été.' -> "c-est-deja-l-ete")
+- In version < 1.2.0 all single quotes ( ' ) were removed, and
+ moving forward, >= 1.2.0, they will be replaced with ( - ).
+ Example:
+ < 1.2.0 -- ('C\'est déjà l\'été.' -> "cest-deja-lete")
+ > = 1.2.0 -- ('C\'est déjà l\'été.' -> "c-est-deja-l-ete")
## 1.1.4
Bugfix:
- - Add more test cases, dropped `official` support for python 3.2
-
+- Add more test cases, dropped `official` support for python 3.2
## 1.1.3
Bugfix:
- - Handle unichar in python 3.x
-
+- Handle unichar in python 3.x
## 1.1.2
Enhancement:
- - Ability to remove `stopwords` from string
-
+- Ability to remove `stopwords` from string
## 1.0.2
Enhancement:
- - A new PyPI release
-
+- A new PyPI release
## 1.0.1
Enhancement:
- - Promoting to production grade
-
+- Promoting to production grade
## 0.1.1
Enhancement:
- - Added option to save word order
- - Removed 2to3 dependency
- - Added more tests
-
+- Added option to save word order
+- Removed 2to3 dependency
+- Added more tests
## 0.1.0
Enhancement:
- - Added more test
- - Added test for python 3.4
-
+- Added more test
+- Added test for python 3.4
## 0.0.9
Enhancement:
- - Enable console_scripts
-
+- Enable console_scripts
## 0.0.8
Enhancement:
- - Move logic out of __init__.py
- - Added console_scripts (@ekamil)
- - Updated pep8.sh
- - Added pypy support
-
+- Move logic out of **init**.py
+- Added console_scripts (@ekamil)
+- Updated pep8.sh
+- Added pypy support
## 0.0.7
Enhancement:
- - Handle encoding in setup file
- - Update ReadME, ChangeLog, License files
-
+- Handle encoding in setup file
+- Update ReadME, ChangeLog, License files
## 0.0.6
Enhancement:
- - Update for smart_truncate
-
+- Update for smart_truncate
## 0.0.5
Features:
- - Added Python 3.2 and 3.3 support (work by: arthurdarcet@github)
-
+- Added Python 3.2 and 3.3 support (work by: arthurdarcet@github)
## 0.0.4
Features:
- - Added option to choose non-dash separators (request by: danilodimoia@github)
-
+- Added option to choose non-dash separators (request by: danilodimoia@github)
## 0.0.3
Features:
- - Added the ability to truncate slugs (request by: juanriaza@github)
-
+- Added the ability to truncate slugs (request by: juanriaza@github)
## 0.0.2
Enhancement:
- - Incremental update
-
+- Incremental update
## 0.0.1
- - Initial version
+- Initial version
diff --git a/README.md b/README.md
index 0e0195f..2305794 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,4 @@
-Python Slugify
-====================
+# Python Slugify
**A Python slugify application that handles unicode**.
@@ -7,26 +6,29 @@ Python Slugify
[![version-image]][version-link]
[![coverage-image]][coverage-link]
-Overview
-====================
+# Overview
**Best attempt** to create slugs from unicode strings while keeping it **DRY**.
-Notice
-====================
+# Notice
-This module, by default installs and uses [text-unidecode](https://github.com/kmike/text-unidecode) *(GPL & Perl Artistic)* for its decoding needs.
+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.
+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.
+
+### Python Versions & `Official` Support
+
+- Python `2.7` <-> python-slugify `< 5.0.0`
+- Python `3.6+` <-> python-slugify `>= 5.0.0`
+
+# How to install
-How to install
-====================
easy_install python-slugify |OR| easy_install python-slugify[unidecode]
-- OR --
pip install python-slugify |OR| pip install python-slugify[unidecode]
-Options
-===================
+# Options
+
```python
def slugify(
text,
@@ -60,8 +62,7 @@ def slugify(
"""
```
-How to use
-====================
+# How to use
```python
from slugify import slugify
@@ -133,12 +134,10 @@ r = slugify(txt, replacements=[['Ü', 'UE'], ['ü', 'ue']])
self.assertEqual(r, "ueber-ueber-german-umlaut")
```
-
-For more examples, have a look at the [test.py](test.py) file.
+For more examples, have a look at the [test.py](test.py) file.
-Command Line Options
-====================
+# Command Line Options
With the package, a command line tool called `slugify` is also installed.
@@ -150,6 +149,7 @@ The command can take its input directly on the command line or from STDIN (when
$ echo "Taking input from STDIN" | slugify --stdin
taking-input-from-stdin
```
+
```
$ slugify taking input from the command line
taking-input-from-the-command-line
@@ -162,9 +162,7 @@ $ slugify --stopwords the in a hurry -- the quick brown fox jumps over the lazy
quick-brown-fox-jumps-over-lazy-dog
```
-
-Running the tests
-====================
+# Running the tests
To run the tests against all environments:
@@ -174,21 +172,16 @@ To run the tests against the current environment:
python test.py
+# Contribution
-Contribution
-====================
-
-Please read the ([wiki](https://github.com/un33k/python-slugify/wiki/Python-Slugify-Wiki)) page prior to raising any PRs.
+Please read the ([wiki](https://github.com/un33k/python-slugify/wiki/Python-Slugify-Wiki)) page prior to raising any PRs.
-
-License
-====================
+# License
Released under a ([MIT](LICENSE)) license.
+# Version
-Version
-====================
X.Y.Z Version
`MAJOR` version -- when you make incompatible API changes,
@@ -197,18 +190,13 @@ X.Y.Z Version
[status-image]: https://travis-ci.org/un33k/python-slugify.svg?branch=master
[status-link]: https://travis-ci.org/un33k/python-slugify
-
[version-image]: https://img.shields.io/pypi/v/python-slugify.svg
[version-link]: https://pypi.python.org/pypi/python-slugify
-
[coverage-image]: https://coveralls.io/repos/un33k/python-slugify/badge.svg
[coverage-link]: https://coveralls.io/r/un33k/python-slugify
-
[download-image]: https://img.shields.io/pypi/dm/python-slugify.svg
[download-link]: https://pypi.python.org/pypi/python-slugify
-
-Sponsors
-====================
+# Sponsors
[Neekware Inc.](http://neekware.com)
diff --git a/dev.requirements.txt b/dev.requirements.txt
index f87605e..cbc5494 100644
--- a/dev.requirements.txt
+++ b/dev.requirements.txt
@@ -1 +1 @@
-pycodestyle==2.5.0 \ No newline at end of file
+pycodestyle==2.7.0 \ No newline at end of file
diff --git a/setup.py b/setup.py
index 038a85f..07a660c 100755
--- a/setup.py
+++ b/setup.py
@@ -24,10 +24,7 @@ classifiers = [
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
- 'Programming Language :: Python :: 2',
- 'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
@@ -67,7 +64,7 @@ setup(
packages=find_packages(exclude=EXCLUDE_FROM_PACKAGES),
install_requires=install_requires,
extras_require=extras_require,
- python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
+ python_requires='!=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*',
classifiers=classifiers,
entry_points={'console_scripts': ['slugify=slugify.__main__:main']},
)
diff --git a/slugify/__init__.py b/slugify/__init__.py
index d69e2ed..3a11fd2 100644
--- a/slugify/__init__.py
+++ b/slugify/__init__.py
@@ -4,4 +4,4 @@ from .slugify import *
__author__ = 'Val Neekman @ Neekware Inc. [@vneekman]'
__description__ = 'A Python slugify application that also handles Unicode'
-__version__ = '4.0.1'
+__version__ = '5.0.0'
diff --git a/slugify/__main__.py b/slugify/__main__.py
index a11989b..f815206 100644
--- a/slugify/__main__.py
+++ b/slugify/__main__.py
@@ -6,7 +6,7 @@ from .slugify import slugify, DEFAULT_SEPARATOR
def parse_args(argv):
- parser = argparse.ArgumentParser(description="Sluggify string")
+ parser = argparse.ArgumentParser(description="Slug string")
input_group = parser.add_argument_group(description="Input")
input_group.add_argument("input_string", nargs='*',
diff --git a/tox.ini b/tox.ini
index d189cbd..c200c2a 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
[tox]
-envlist = py{39,38,37,36,35,27},pypy,pypy3
+envlist = py{39,38,37,36,35},pypy3
[testenv]
deps=