Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

OrderedDict typing breaks compatibility with Python 3.6 #5398

Closed
guhur opened this issue Sep 6, 2021 · 1 comment · Fixed by #5400
Closed

OrderedDict typing breaks compatibility with Python 3.6 #5398

guhur opened this issue Sep 6, 2021 · 1 comment · Fixed by #5400
Labels

Comments

@guhur
Copy link

guhur commented Sep 6, 2021

The typing of OrderedDict is introduced in Python 3.7.2 and is not back-ported to 3.6.
I tested with latest versions of typing ( typing_extensions. I am using Python 3.6.12.

A recent update from July is introducing a typing checking of OrderedDict:
https://github.com/allenai/allennlp/blob/ca656fc6bac7be66e566e8f1ba3131f3aa3d7729/allennlp/nn/parallel/ddp_accelerator.py

As a consequence, allennlp is not compatible anymore with 3.6, which is contradictory with your README.

At first sights, it seems to affect allennlp==2.7.0, but not 2.6.0.

Previously, the typing of OrderedDict was managed with quotes: https://github.com/allenai/allennlp/blob/f877fdc30d18178b88c335fbd92722fb77c42d93/allennlp/modules/vision/grid_embedder.py

@guhur guhur added the bug label Sep 6, 2021
@epwalsh
Copy link
Member

epwalsh commented Sep 7, 2021

Thanks for bringing this up @guhur!

Even though it seems like it would be an easy fix to maintain support for 3.6, we're only committed to officially supporting the 2 latest stable versions of Python, so I think we will just update the setup.py to require Python 3.7 or higher... unless there is a compelling reason to keep support for 3.6.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants