Skip to content

Commit

Permalink
Fix argparse for python3.10 (#33)
Browse files Browse the repository at this point in the history
* rework

* add support for 3.10
  • Loading branch information
CrossNox authored Jul 18, 2021
1 parent 040e752 commit b3a77cd
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.3.0
current_version = 0.3.1
commit = False
tag = False

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
python-version: [3.5, 3.6, 3.7, 3.8, 3.9, '3.10.0-beta.4']

steps:
- uses: actions/checkout@v2
Expand All @@ -20,4 +20,3 @@ jobs:
run: pip install nox
- name: Run tests session
run: nox --sessions tests --python ${{ matrix.python-version }}

3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## Version 0.3.0
### Version 0.3.1 (2021-07-13)
* Fix argparse for python3.10

### Version 0.3.0 (2021-07-12)
* Add support for mermaid code
Expand Down
14 changes: 13 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,19 @@

@nox.session(
reuse_venv=True,
python=["2.7", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "pypy", "pypy3"],
python=[
"2.7",
"3.4",
"3.5",
"3.6",
"3.7",
"3.8",
"3.9",
"3.10",
"3.10.0-beta.4",
"pypy",
"pypy3",
],
)
def tests(session):
"""Run all tests."""
Expand Down
1 change: 1 addition & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
mock; python_version < '3.3'
pytest
pytest-cov
six
sphinx
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
readme = f.read()


__version__ = "0.3.0"
__version__ = "0.3.1"

install_requires = ["mistune", "docutils"]
test_requirements = ["pygments"]
Expand Down Expand Up @@ -58,6 +58,7 @@
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Text Processing",
],
install_requires=install_requires,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from copy import copy
from unittest import TestCase
import subprocess

import six
from m2r2 import parse_from_file, main, options

if sys.version_info < (3,):
Expand Down Expand Up @@ -58,7 +58,7 @@ def test_no_file(self):
self.assertIn('underscore-emphasis', message)
self.assertIn('anonymous-references', message)
self.assertIn('inline-math', message)
self.assertIn('optional arguments:', message)
six.assertRegex(self, message, r"option(s|al arguments):")

def test_parse_file(self):
output = parse_from_file(test_md)
Expand Down

0 comments on commit b3a77cd

Please sign in to comment.