This repository was archived by the owner on Jul 11, 2024. It is now read-only.
forked from py-pdf/pypdf
-
Notifications
You must be signed in to change notification settings - Fork 14
This repository was archived by the owner on Jul 11, 2024. It is now read-only.
SyntaxError: invalid syntax #10
Copy link
Copy link
Open
Description
setup.py documents python 2 and 3 support:
Line 45 in 727d5a0
"Programming Language :: Python :: 2",
Change 8691814 introduces F strings which are a python 3.6+ specific feature
Line 494 in 727d5a0
return NameObject(f"{ss[0]}+{''.join([f'#{c:X}' for c in ss[1].encode()])}")
This breaks support for older python versions, including 3.5.3 (which is the current latest version available for Raspberry Pi's Raspbian).
Python 3.5.3 (default, Sep 27 2018, 17:25:39)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyPDF3 import PdfFileReader
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/root/py/ebook_rename/py35env/lib/python3.5/site-packages/PyPDF3/__init__.py", line 1, in <module>
from .pdf import PdfFileReader, PdfFileWriter
File "/root/py/ebook_rename/py35env/lib/python3.5/site-packages/PyPDF3/pdf.py", line 66, in <module>
from .generic import *
File "/root/py/ebook_rename/py35env/lib/python3.5/site-packages/PyPDF3/generic.py", line 494
return NameObject(f"{ss[0]}+{''.join([f'#{c:X}' for c in ss[1].encode()])}")
^
SyntaxError: invalid syntax
Is this a bug or expected? Readme/setup.py would benefit from a update if the later.
Metadata
Metadata
Assignees
Labels
No labels