Skip to content

Commit a1c31e5

Browse files
committed
Merge branch 'release/4.0.3'
2 parents 6cdcd52 + 64ab026 commit a1c31e5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+978
-567
lines changed

.flake8

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[flake8]
2+
ignore =
3+
# line too long
4+
E501
5+
exclude =
6+
build/
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: python-textile
3+
4+
on: [push]
5+
6+
jobs:
7+
lint_and_test:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.10"]
12+
image_size: ['true', 'false']
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
- name: Python flake8 Lint
20+
uses: py-actions/[email protected]
21+
- name: Install dependencies
22+
run: |
23+
imagesize=''
24+
pip install -U pytest pytest-cov coverage codecov
25+
if [[ ${{ matrix.image_size }} == true ]] ; then imagesize='[imagesize]' ; fi
26+
pip install -e ".${imagesize}"
27+
- name: run tests
28+
run: |
29+
pytest
30+
- name: Codecov
31+
uses: codecov/codecov-action@v4
32+
env:
33+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ develop-eggs
2121
.DS_Store
2222
*.swp
2323
.tox
24+
README.txt

.travis.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

CHANGELOG.textile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
h1. Textile Changelog
22

3+
h2. Version 4.0.3
4+
* Update supported Python versions to 3.8 - 3.12 ("#83":https://github.com/textile/python-textile/issues/83)
5+
* Replace html5lib with nh3 for html sanitization
6+
* General code cleanup
7+
* Bugfixes:
8+
** Wrong HTML output when "bc.." is the very last in the document ("#81":https://github.com/textile/python-textile/issues/81)
9+
* Other:
10+
** Use github actions instead of travis for automated testing
11+
312
h2. Version 4.0.2
413
* Bugfixes:
514
** Support non-http schemas in url refs ("#75":https://github.com/textile/python-textile/pull/75)

CONTRIBUTORS.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ Alex Shiels
77
Jason Samsa
88
Kurt Raschke
99
Dave Brondsema
10-
Dmitry Shachnev
10+
Dmitry Shachnev
11+
Kirill Mavreshko
12+
Brad Schoening

MANIFEST.in

Lines changed: 0 additions & 2 deletions
This file was deleted.

Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
clean:
2+
$(RM) README.txt
3+
$(RM) -r ./dist ./build
4+
5+
generate_pypi_README:
6+
${VIRTUAL_ENV}/bin/pytextile README.textile | sed -e 's/^\t//' > README.txt
7+
8+
build: generate_pypi_README
9+
python -m build
10+
11+
upload_to_test: build
12+
twine check ./dist/*
13+
twine upload --repository test_textile ./dist/*
14+
15+
upload_to_prod: build
16+
twine check ./dist/*
17+
# for now, don't actually upload to prod PyPI, just output the command to do so.
18+
@echo "twine upload --repository textile ./dist/*"

README.textile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
!https://travis-ci.org/textile/python-textile.svg!:https://travis-ci.org/textile/python-textile !https://codecov.io/github/textile/python-textile/coverage.svg!:https://codecov.io/github/textile/python-textile !https://img.shields.io/pypi/pyversions/textile! !https://img.shields.io/pypi/wheel/textile!
1+
!https://github.com/textile/python-textile/actions/workflows/lint_and_test.yml/badge.svg(python-textile)!:https://github.com/textile/python-textile/actions/workflows/lint_and_test.yml !https://codecov.io/github/textile/python-textile/coverage.svg!:https://codecov.io/github/textile/python-textile !https://img.shields.io/pypi/pyversions/textile! !https://img.shields.io/pypi/wheel/textile!
22

33
h1. python-textile
44

5-
python-textile is a Python port of "Textile":http://txstyle.org/, Dean Allen's humane web text generator.
5+
python-textile is a Python port of "Textile":https://textile-lang.com/, Dean Allen's humane web text generator.
66

77
h2. Installation
88

99
@pip install textile@
1010

1111
Dependencies:
12-
* "html5lib":https://pypi.org/project/html5lib/
12+
* "nh3":https://pypi.org/project/nh3/
1313
* "regex":https://pypi.org/project/regex/ (The regex package causes problems with PyPy, and is not installed as a dependency in such environments. If you are upgrading a textile install on PyPy which had regex previously included, you may need to uninstall it.)
1414

1515
Optional dependencies include:
@@ -42,16 +42,16 @@ bc.. import textile
4242

4343
h3. Notes:
4444

45-
* Active development supports Python 3.5 or later.
45+
* Active development supports Python 3.8 or later.
4646

4747
h3. Running Tests
4848

4949
To run the test suite, use pytest. `pytest-cov` is required as well.
5050

5151
When textile is installed locally:
5252

53-
bc.. pytest
53+
bc. pytest
5454

5555
When textile is not installed locally:
5656

57-
bc.. PYTHONPATH=. pytest
57+
bc. PYTHONPATH=. pytest

pyproject.toml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
[build-system]
2+
requires = ["setuptools", "setuptools-scm", "nh3"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "textile"
7+
authors = [
8+
{ name = "Dennis Burke", email = "[email protected]"}
9+
]
10+
description = 'Textile processing for python.'
11+
classifiers = [
12+
'Development Status :: 5 - Production/Stable',
13+
'Environment :: Web Environment',
14+
'Intended Audience :: Developers',
15+
'License :: OSI Approved :: BSD License',
16+
'Operating System :: OS Independent',
17+
'Programming Language :: Python',
18+
'Programming Language :: Python :: 3',
19+
'Programming Language :: Python :: 3 :: Only',
20+
'Programming Language :: Python :: 3.8',
21+
'Programming Language :: Python :: 3.9',
22+
'Programming Language :: Python :: 3.10',
23+
'Programming Language :: Python :: 3.11',
24+
'Programming Language :: Python :: 3.12',
25+
'Topic :: Software Development :: Libraries :: Python Modules',
26+
]
27+
dynamic = ["version",]
28+
dependencies = [
29+
'nh3',
30+
'regex>1.0; implementation_name != "pypy"',
31+
]
32+
requires-python = '>=3.8'
33+
keywords = ['textile', 'text', 'html markup']
34+
# Use the following command to generate a README.txt which is compatible with
35+
# pypi's readme rendering:
36+
# pytextile README.textile | sed -e 's/^\t//' > README.txt
37+
readme = {file = 'README.txt', content-type = 'text/markdown'}
38+
39+
[project.optional-dependencies]
40+
develop = ['pytest', 'pytest-cov']
41+
imagesize = ['Pillow>=3.0.0',]
42+
43+
[project.urls]
44+
Homepage = "https://github.com/textile/python-textile"
45+
Repository = "https://github.com/textile/python-textile.git"
46+
Issues = "https://github.com/textile/python-textile/issues"
47+
48+
[project.scripts]
49+
pytextile = "textile.__main__:main"
50+
51+
[tool.setuptools.dynamic]
52+
version = {attr = "textile.__version__"}

0 commit comments

Comments
 (0)