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

consider dropping formal Python 3.6 support for OmegaConf 2.2 #791

Open
Jasha10 opened this issue Sep 29, 2021 · 5 comments
Open

consider dropping formal Python 3.6 support for OmegaConf 2.2 #791

Jasha10 opened this issue Sep 29, 2021 · 5 comments
Milestone

Comments

@Jasha10
Copy link
Collaborator

Jasha10 commented Sep 29, 2021

Python 3.6 eol is coming in a couple of months: https://endoflife.date/python

Originally posted by @omry in #749 (comment)

@Jasha10 Jasha10 added this to the OmegaConf 2.2 milestone Sep 29, 2021
@Jasha10
Copy link
Collaborator Author

Jasha10 commented Nov 15, 2021

EOL is Dec 23rd, 2021

@pixelb
Copy link
Collaborator

pixelb commented Nov 15, 2021

The main thing to consider here is usage on popular systems.
python 3.6 is in use by RHEL 8 (centos 8) at least, so I don't think we should deprecate immediately.
We should consider this though if it becomes awkward to support 3.6

@Jasha10
Copy link
Collaborator Author

Jasha10 commented Nov 16, 2021

Sounds good.
For the record, there is currently at least one edge-case where python3.6 compatibility is imperfect: pickling optional types fails on python3.6, so some OmegaConf objects cannot be pickled in python3.6 if their metadata contains an optional type:

$ python3.6
...
>>> import pickle
>>> from typing import Optional
>>> pickle.dumps(Optional[int])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
_pickle.PicklingError: Can't pickle typing.Union[int, NoneType]: it's not the same object as typing.Union

This comes up in particular with OmegaConf containers that have an optional element_type, e.g. containers typed as Dict[str, Optional[int]]. The current approach is for OmegaConf to preempt such a python3.6 pickling error and raise an OmegaConfBaseException instead.

@omry
Copy link
Owner

omry commented Oct 27, 2022

I think we should feel comfortable dropping 3.6.
People that need to continue using it can stick to older version of OmegaConf/Hydra.

@Jasha10
Copy link
Collaborator Author

Jasha10 commented Dec 26, 2022

python-attrs (which is a core dependency of omegaconf) has deprecated support for python3.6. This which is causing Hydra CI failure

DeprecationWarning: Running attrs on Python 3.6 is deprecated & we intend to drop support soon. If that's a problem for you, please let us know why & we MAY re-evaluate: <https://github.com/python-attrs/attrs/pull/993>

As a first step, I'll remove the python3.6 classifier from the Hydra setup.py file and will disable the py3.6 CI job.

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

No branches or pull requests

3 participants