Skip to content

Fix importing in Python 3.5.2#90

Merged
Pr0Ger merged 2 commits intoPr0Ger:masterfrom
andersk:deque
Oct 8, 2019
Merged

Fix importing in Python 3.5.2#90
Pr0Ger merged 2 commits intoPr0Ger:masterfrom
andersk:deque

Conversation

@andersk
Copy link
Copy Markdown
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
Copy Markdown

@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
Copy Markdown
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
Copy Markdown

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