Skip to content

Commit b08f9aa

Browse files
authored
DEP: Remove Python 2.6 and older support (#776)
"New" features that we use: * PEP-343: with statements (Python 2.5+) * PEP-389: argparse (Python 2.7+; just in Scripts) * https://bugs.python.org/issue2335 : Set literals * https://bugs.python.org/issue2333 : Dictionary / set comprehensions * ... Python 2.6 had its last security update in 2013 - 9 years ago. I'm sure people have long moved on. The package is also marked as Python 2.7+ and CI only runs for Python 2.7 and 3.6+. For this reason, I will not make a major version bump.
1 parent 316f5e6 commit b08f9aa

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

PyPDF2/pdf.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,7 @@
7676
u_,
7777
)
7878

79-
if version_info < ( 2, 4 ):
80-
from sets import ImmutableSet as frozenset
81-
82-
if version_info < ( 2, 5 ):
83-
from md5 import md5
84-
else:
85-
from hashlib import md5
79+
from hashlib import md5
8680

8781

8882
class PdfFileWriter(object):

0 commit comments

Comments
 (0)