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

Remove support for Python < 3.6 #320

Closed
7 tasks done
anoadragon453 opened this issue Nov 18, 2020 · 3 comments
Closed
7 tasks done

Remove support for Python < 3.6 #320

anoadragon453 opened this issue Nov 18, 2020 · 3 comments

Comments

@anoadragon453
Copy link
Member

anoadragon453 commented Nov 18, 2020

EDIT: Top comment hijacked by @callahad to track remaining work.

  • Remove support for Python < 3.6
  • Update CI to only test on 3.6+
  • Update setup.py to state a minimum Python version of 3.6 (example from Sygnal)
  • Update pyproject.toml to state a target Python version for Black (example from Synapse)
  • Remove all mention and use of six, as we no longer support Python 2
  • Remove all # -*- coding: utf-8 -*- lines from files; Python 3 is UTF-8 by default
  • Run pyupgrade on Sydent with arguments --py36-plus --keep-percent-format

Original Comment:

Sydent supports Python 3 as of a few months ago. However, it also still supports Python 2, which is now end of life. In order for Sydent to take advantage of newer Python features, support for Python 2 will eventually need to be dropped.

Some questions:

  1. Do we need to announce deprecation? If so, how long should the transition period be?
  2. Would removing Python 2 support negatively impact a significant population?
  3. What does removing Python 2 support look like?

I bring this up as I'd like to start using some new language features, and only just realised that our official stance on Python 2 support was still in flux :)

@clokep
Copy link
Member

clokep commented Nov 20, 2020

We talked about this a bit today, some answers inline:

Do we need to announce deprecation? If so, how long should the transition period be?

I don't think so, I think the next release can drop Python 2 support. It might be worth doing a point release with any bugfixes, if there are any.

Would removing Python 2 support negatively impact a significant population?

It does not seem that anyone is still using Python 2 with sydent.

What does removing Python 2 support look like?

To start with, just updating setup.py with python_requires and classifiers to state this is Python 3 only. We can eventually clean-up any use of six / Python 2 compatible code but that isn't a requirement.

@richvdh
Copy link
Member

richvdh commented Apr 14, 2021

plan is to announce in the v2.3.0 release that it will be the last to support python 2 or python 3.5

@richvdh
Copy link
Member

richvdh commented Apr 15, 2021

This is now done. Next steps are to remove python2 and python 3.5 from CI, and update setup.py to require python 3.6.

@richvdh richvdh changed the title Deprecate support for Python 2 Remove support for Python < 3.5 Apr 15, 2021
@callahad callahad changed the title Remove support for Python < 3.5 Remove support for Python < 3.6 May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants