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

refactor: remove python 2 new-style classes as only python 3.5+ is supported now #2836

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kkirsche
Copy link

In Python 2, there were different ways to create classes: the old and new style. gunicorn uses the new-style of class creation, which inherits from object. This difference is described here:

https://docs.python.org/2/reference/datamodel.html#new-style-and-classic-classes
https://www.python.org/download/releases/2.2.3/descrintro/

As gunicorn supports Python 3.5+ at this time, the use of new-style classes can be removed as all classes in Python 3 are new-style classes by default.

@benoitc benoitc added the Code related changes Changes related to code style that are not related to a feature label May 10, 2023
@pajod pajod mentioned this pull request Dec 9, 2023
@pajod
Copy link
Contributor

pajod commented Dec 9, 2023

Updated version, with commits split for different cleanup: master...pajod:gunicorn:patch-py36

No harm in merge conflicts, can always be trivially regenerated thanks to https://pypi.org/project/pyupgrade/

Note: This PR contains zero effective changes now (which is OK & expected, after equivalent #3189 was merged)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code related changes Changes related to code style that are not related to a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants