Skip to content

Commit

Permalink
Drop support for python 2.7 finally and remove from github actions si…
Browse files Browse the repository at this point in the history
…nce its no longer supported
  • Loading branch information
cbillingham committed Oct 13, 2024
1 parent e4879e7 commit f56f726
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
fail-fast: false
matrix:
version: [
{"python": "2.7", "toxenv": "py27-sdist"},
{"python": "3.9", "toxenv": "py39-sdist"},
{"python": "3.10", "toxenv": "py310-sdist"},
{"python": "3.11", "toxenv": "py311-sdist"},
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Update or convert docstrings in existing Python files.

This Python (2.7+/3.6+) module and script intends to help Python programmers to
This Python (3.9+) module and script intends to help Python programmers to
enhance internal code documentation using docstrings.
It is useful to harmonize or change a project docstring style format.

Expand Down Expand Up @@ -103,6 +103,12 @@ If you would like to contribute, please take a look at the
We use [SemVer][4] for versioning.
For the versions available, see the tags on the repository.

### Python 2.7

We tried really hard to have this package support both Python 2 and 3 for a
long time. We've dropped Python 2 support officially. Its just become
cumbersome to test with. However, the code will probably still work in
Python 2.7+ *I think*. Good luck!

## License

Expand Down
4 changes: 1 addition & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ classifiers =
License :: OSI Approved :: BSD License
Natural Language :: English
Operating System :: OS Independent
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Expand All @@ -31,7 +29,7 @@ classifiers =
package_dir=
=src
packages=find:
python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*
python_requires = >=3.6
install_requires =
six
enum34;python_version<"3.4"
Expand Down
3 changes: 3 additions & 0 deletions src/docconvert/parser/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,9 @@ def __init__(self, generator):
def __iter__(self):
return self

def next(self):
return self.__next__()

def __next__(self):
if self.peeked:
self.peeked = False
Expand Down
1 change: 1 addition & 0 deletions tests/test_module_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ def test_func_after_assign(self):
assert parser.docstrings[2].start == 13
assert parser.docstrings[2].end == 20

@pytest.mark.skipif(sys.version_info < (3,), reason="requires python3")
def test_indentation_error(self):
"""Make sure we handle IndentationError with valid python syntax."""
lines = get_fixture_lines("indent_error.py")
Expand Down
5 changes: 1 addition & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{27,39,310,311,312,313},formatting
envlist = py{39,310,311,312,313},formatting

[testenv]
usedevelop = True
Expand All @@ -8,9 +8,6 @@ deps =
commands =
pytest {posargs}

[testenv:py27-sdist]
usedevelop = False

[testenv:py39-sdist]
usedevelop = False

Expand Down

0 comments on commit f56f726

Please sign in to comment.