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

Fix RemovedInDjango30Warning from Django 2.0+ #27

Closed
adamchainz opened this issue Oct 5, 2018 · 5 comments
Closed

Fix RemovedInDjango30Warning from Django 2.0+ #27

adamchainz opened this issue Oct 5, 2018 · 5 comments

Comments

@adamchainz
Copy link
Contributor

The latest pytest surfaces all deprecation warnings at the end of the test run, so I'm seeing this one hundreds of times on my app.

.../python3.6/site-packages/django/db/models/sql/compiler.py:997: RemovedInDjango30Warning: Remove the context parameter from HashidAutoField.from_db_value(). Support for it will be removed in Django 3.0.
  RemovedInDjango30Warning,

Should be an easy fix with conditional versions of the function for django versions.

@adamchainz
Copy link
Contributor Author

This also implies the logic in runtests.py isn't working: https://github.com/nshafer/django-hashid-field/blob/master/runtests.py#L11

adamchainz added a commit to adamchainz/django-hashid-field that referenced this issue Oct 5, 2018
@nshafer
Copy link
Owner

nshafer commented Oct 5, 2018

How lost we are when our tools break. Thank you for the PR. Released in 2.1.4.

@adamchainz
Copy link
Contributor Author

How philosophical! Thanks very much for the fast turnaround.

@adamchainz
Copy link
Contributor Author

P.S. version 2.1.3 never existed on PyPI: https://pypi.org/project/django-hashid-field/#history 🤔

@nshafer
Copy link
Owner

nshafer commented Oct 5, 2018

That is weird... I'm pretty sure I did a publish since I created the 2.1.3 tag in git, and that happens after a publish as I copy and paste the lines output by python setup.py publish. Perhaps there was an error from twine that I missed or something. Since it was a fix specifically for installing from github instead of pypi, I guess it doesn't matter at all. Still, I'll make sure I check pypi after a publish. Thanks.

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

2 participants