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

Drop Python 2 support. #6277

Closed
wants to merge 21 commits into from
Closed

Drop Python 2 support. #6277

wants to merge 21 commits into from

Conversation

auvipy
Copy link
Member

@auvipy auvipy commented Oct 24, 2018

Fixes #6230

@rpkilby
Copy link
Member

rpkilby commented Oct 24, 2018

  • Update docs index.md and release-notes.md
  • Update readme
  • Replace six compat with Python 3 equivalent

@carltongibson carltongibson added this to the 3.10 Release milestone Oct 24, 2018
Copy link
Collaborator

@carltongibson carltongibson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @auvipy. I think we're good to go given the ticket: we'll drop Py2 for 3.10.

Are you happy to make a good first pass at the code changes with this? (Or we can pull these changes into a bigger PR...?)

Thanks for making the start. It's 💃🏼

@auvipy auvipy changed the title [WIP] Dropped Python 2 support Dropped Python 2 support from matrix Oct 25, 2018
@carltongibson
Copy link
Collaborator

But we don’t run stable branches. We can’t merge this until we’re sure there won’t be more 3.9.x releases.

@carltongibson
Copy link
Collaborator

carltongibson commented Oct 25, 2018

Can you pull them into one branch/PR please. (Separate commits for each stage are fine.)

@carltongibson carltongibson changed the title Dropped Python 2 support from matrix Drop Python 2 support. Oct 25, 2018
@auvipy
Copy link
Member Author

auvipy commented Oct 25, 2018

OK I will put all changes in this branch

rest_framework/fields.py Outdated Show resolved Hide resolved
@auvipy
Copy link
Member Author

auvipy commented Mar 4, 2019

seems like I accidentally removed some working code in generic relations tests

tests/test_permissions.py Outdated Show resolved Hide resolved
tests/test_utils.py Outdated Show resolved Hide resolved
@auvipy
Copy link
Member Author

auvipy commented Mar 31, 2019

how to fix this?
============================= ERRORS ====================================
______ ERROR collecting tests/generic_relations/test_generic_relations.py ______
tests/generic_relations/test_generic_relations.py:11: in
class Tag(models.Model):
.tox/venvs/py34-django111/lib/python3.4/site-packages/django/db/models/base.py:319: in new
new_class._meta.apps.register_model(new_class._meta.app_label, new_class)
.tox/venvs/py34-django111/lib/python3.4/site-packages/django/apps/registry.py:224: in register_model
(model_name, app_label, app_models[model_name], model))
E RuntimeError: Conflicting 'tag' models in application 'generic_relations': <class 'tests.generic_relations.models.Tag'> and <class 'tests.generic_relations.test_generic_relations.Tag'>.

@auvipy
Copy link
Member Author

auvipy commented Mar 31, 2019

what is the alternative of from django.utils.six.moves import reload_module?

@auvipy
Copy link
Member Author

auvipy commented Mar 31, 2019

well, should we move the six import clean up to another PR? or the six compats should be kept for few more versions?

@carltongibson
Copy link
Collaborator

Closing in favour of #6615. Thanks for the input @auvipy

@auvipy auvipy deleted the py2 branch November 19, 2022 11:50
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.

Drop Django 1.11 support
3 participants