Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4051bf6

Browse files
committed
only support pythons that are not EOL (https://endoflife.date/python)
Even debian oldstable has python 3.9. For internet-facing libraries itis not responsible to expect contributor to install insecure pythonversions in order to test them. Reducing the number of python versionswill make maintainance and testing easier.
1 parent1e14175 commit4051bf6

File tree

9 files changed

+8
-69
lines changed

9 files changed

+8
-69
lines changed

‎.appveyor.yml

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

‎.github/workflows/python-tox.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ jobs:
1212
os:[ubuntu-latest, windows-latest]
1313
deps:[base, optional]
1414
include:
15-
-python:"pypy-2.7"
16-
os:ubuntu-latest
17-
deps:base
1815
-python:"pypy-3.10"
1916
os:ubuntu-latest
2017
deps:base

‎README.rst

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ or:
2929
3030
By default, the ``document`` will be an ``xml.etree`` element instance.
3131
Whenever possible, html5lib chooses the accelerated ``ElementTree``
32-
implementation (i.e. ``xml.etree.cElementTree`` on Python 2.x).
32+
implementation.
3333

3434
Two other tree types are supported: ``xml.dom.minidom`` and
3535
``lxml.etree``. To use an alternative format, specify the name of
@@ -41,18 +41,6 @@ a treebuilder:
4141
withopen("mydocument.html","rb")as f:
4242
lxml_etree_document= html5lib.parse(f,treebuilder="lxml")
4343
44-
When using with ``urllib2`` (Python 2), the charset from HTTP should be
45-
pass into html5lib as follows:
46-
47-
..code-block::python
48-
49-
from contextlibimport closing
50-
from urllib2import urlopen
51-
import html5lib
52-
53-
with closing(urlopen("http://example.com/"))as f:
54-
document= html5lib.parse(f,transport_encoding=f.info().getparam("charset"))
55-
5644
When using with ``urllib.request`` (Python 3), the charset from HTTP
5745
should be pass into html5lib as follows:
5846

@@ -90,7 +78,7 @@ More documentation is available at https://html5lib.readthedocs.io/.
9078
Installation
9179
------------
9280

93-
html5lib works on CPython2.7+, CPython 3.5+ and PyPy. To install:
81+
html5lib works on CPython3.8+ and PyPy. To install:
9482

9583
..code-block::bash
9684

‎html5lib/_trie/_base.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11

2-
try:
3-
fromcollections.abcimportMapping
4-
exceptImportError:# Python 2.7
5-
fromcollections.abcimportMapping
2+
fromcollections.abcimportMapping
63

74

85
classTrie(Mapping):

‎html5lib/html5parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ def processSpaceCharacters(self, token):
427427
defprocessStartTag(self,token):
428428
# Note the caching is done here rather than BoundMethodDispatcher as doing it there
429429
# requires a circular reference to the Phase, and this ends up with a significant
430-
# (CPython2.7,3.8) GC cost when parsing many short inputs
430+
# (CPython 3.8) GC cost when parsing many short inputs
431431
name=token["name"]
432432
# In Py2, using `in` is quicker in general than try/except KeyError
433433
# In Py3, `in` is quicker when there are few cache hits (typically short inputs)
@@ -454,7 +454,7 @@ def startTagHtml(self, token):
454454
defprocessEndTag(self,token):
455455
# Note the caching is done here rather than BoundMethodDispatcher as doing it there
456456
# requires a circular reference to the Phase, and this ends up with a significant
457-
# (CPython2.7,3.8) GC cost when parsing many short inputs
457+
# (CPython 3.8) GC cost when parsing many short inputs
458458
name=token["name"]
459459
# In Py2, using `in` is quicker in general than try/except KeyError
460460
# In Py3, `in` is quicker when there are few cache hits (typically short inputs)

‎html5lib/treebuilders/dom.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11

22

3-
try:
4-
fromcollections.abcimportMutableMapping
5-
exceptImportError:# Python 2.7
6-
fromcollections.abcimportMutableMapping
3+
fromcollections.abcimportMutableMapping
74
fromxml.domimportminidom,Node
85
importweakref
96

‎setup.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,7 @@ def default_environment():
6363
'Operating System :: OS Independent',
6464
'Programming Language :: Python',
6565
'Programming Language :: Python :: 2',
66-
'Programming Language :: Python :: 2.7',
6766
'Programming Language :: Python :: 3',
68-
'Programming Language :: Python :: 3.5',
69-
'Programming Language :: Python :: 3.6',
70-
'Programming Language :: Python :: 3.7',
7167
'Programming Language :: Python :: 3.8',
7268
'Programming Language :: Python :: 3.9',
7369
'Programming Language :: Python :: 3.10',
@@ -109,7 +105,7 @@ def default_environment():
109105
'six>=1.9',
110106
'webencodings>=0.5.1',
111107
],
112-
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
108+
python_requires=">=3.8",
113109
extras_require={
114110
# A conditional extra will only install these items when the extra is
115111
# requested and the condition matches.

‎tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py{27,35,36,37,38,39,310,311,py,py3}-{base,optional,oldest}
2+
envlist = py{38,39,310,311,py,py3}-{base,optional,oldest}
33

44
[testenv]
55
deps =

‎toxver.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
$ toxver.py pypy-3.8 base
1313
TOXENV=pypy3-base
1414
15-
$ toxver.py 2.7 oldest
16-
TOXENV=py27-oldest
17-
1815
$ toxver.py ~3.12.0-0 optional
1916
TOXENV=py312-optional
2017
@@ -31,10 +28,6 @@ def main(argv):
3128

3229
deps=argv[2]
3330

34-
ifargv[1].startswith("pypy-2"):
35-
print("TOXENV=pypy-"+deps)
36-
return0
37-
3831
ifargv[1].startswith("pypy-3"):
3932
print("TOXENV=pypy3-"+deps)
4033
return0

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp