question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Python 3.5 compatibility broken

See original GitHub issue

I’m not sure if this was done on purpose or not, but 5cdd5c4ba5cba5fc41508c2866ebcb37e46c6140 included changes that are not compatible with Python 3.5:

builtins.SyntaxError: invalid syntax (client.py, line 53)

I believe the comma at the end of **kwargs is invalid.

Code Version

6.4.0

Expected Behavior

6.4.0 should either work on Python 3.5 or not install on Python 3.5.

Current Behavior

Trying to use pysaml2 on Python 3.5 errors.

Possible Solution

  • Use python_requires in setup.py / setup.cfg to state that pysaml2 does not support Python 3.5.
  • Fix the syntax error so Python 3.5 can use pysaml2.

Steps to Reproduce

Using Python 3.5:

>>> from saml2.client import Saml2Client
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/clokep/.pyenv/versions/synapse-3.5/lib/python3.5/site-packages/saml2/client.py", line 53
    **kwargs,
            ^
SyntaxError: invalid syntax

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
clokepcommented, Dec 8, 2020

Thanks for responding! It would be nice to update the python_requires for setuptools to understand this and error when trying to install pysaml2 (instead of getting a runtime error when trying to use it).

0reactions
clokepcommented, Dec 8, 2020

Thank you for the quick fix!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Compatibility broken with Python 3.5 #6496 - GitHub
When Python is only on version 3.5 meson can not be invoked anymore. Culprit are these two commits. 875ef35 compilers: Rework the CompilerArgs ......
Read more >
Ask Question - Stack Overflow
For some reason I need to run that code in a python 3.5 environment. Supposedly, the two versions should be backward compatible.
Read more >
Broken Python 3.5 compatibility with Release 0.8.3 - exif - GitLab
The 0.8.3 patch release has removed compatibility with Python 3.5 (which isn't quite EOL yet) because of its use of f-strings (which are......
Read more >
PEP 606 – Python Compatibility Version
Any incompatible change can break an unknown number of Python projects. ... This change is backward compatible up to Python 3.4.
Read more >
What's New In Python 3.5 — Python 3.11.1 documentation
This article explains the new features in Python 3.5, compared to 3.4. ... Coroutine functions are intended to be run inside a compatible...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found