Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix importing in Python 3.5.2 #90

Merged
merged 2 commits into from
Oct 8, 2019
Merged

Fix importing in Python 3.5.2 #90

merged 2 commits into from
Oct 8, 2019

Conversation

andersk
Copy link
Contributor

@andersk andersk commented Oct 4, 2019

On Ubuntu 16.04, which has Python 3.5.2, apns2.client failed to import, because typing.Deque was not added until Python 3.5.4, and Optional[Type[JSONEncoder]] threw an error until Python 3.5.3 (python/typing#266).

Fixes #88.

On Ubuntu 16.04, which has Python 3.5.2, `apns2.client` failed to
import, because `typing.Deque` was not added until Python 3.5.4.

Fixes Pr0Ger#88.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
On Ubuntu 16.04, which has Python 3.5.2, this raised `TypeError:
descriptor '__subclasses__' of 'type' object needs an
argument` (python/typing#266).

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
@andersk andersk changed the title Don’t import typing.Deque at runtime (for Python < 3.5.4) Fix importing in Python 3.5.2 Oct 4, 2019
@danpalmer
Copy link

@Pr0Ger do you have a timeline on this fix being merged and released on PyPI? We're running Debian which has 3.5.3, I can imagine this is impacting a fair number of people.

@Pr0Ger Pr0Ger merged commit a3c5b48 into Pr0Ger:master Oct 8, 2019
@Pr0Ger
Copy link
Owner

Pr0Ger commented Oct 8, 2019

@andersk Thanks for contribution!

@danpalmer From my experience most people nowadays deploy their apps via docker images instead of relying on python from their host system. Anyway, 0.7.1 version is available now on PyPI

@danpalmer
Copy link

danpalmer commented Oct 8, 2019 via email

andersk added a commit to andersk/zulip that referenced this pull request Oct 8, 2019
My PR Pr0Ger/PyAPNs2#90 fixing Python 3.5.2
support was merged.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
andersk added a commit to andersk/zulip that referenced this pull request Oct 8, 2019
My PR Pr0Ger/PyAPNs2#90 fixing Python 3.5.2
support was merged.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
timabbott pushed a commit to zulip/zulip that referenced this pull request Oct 9, 2019
My PR Pr0Ger/PyAPNs2#90 fixing Python 3.5.2
support was merged.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
evo42 pushed a commit to evo42/zulip that referenced this pull request Oct 30, 2019
My PR Pr0Ger/PyAPNs2#90 fixing Python 3.5.2
support was merged.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
YashRE42 pushed a commit to YashRE42/zulip that referenced this pull request Dec 12, 2019
My PR Pr0Ger/PyAPNs2#90 fixing Python 3.5.2
support was merged.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ImportError: cannot import name 'Deque' in Python < 3.5.4
3 participants