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

SubfieldBase will be removed in Django 1.10 #43

Closed
drewbrew opened this issue Jun 14, 2016 · 6 comments

Comments

@drewbrew
Copy link

commented Jun 14, 2016

Warnings upon launching a Django 1.9.5 project using semantic_version:

/<snipped>/.venv/lib/python3.5/site-packages/semantic_version/django_fields.py:38: RemovedInDjango110Warning: SubfieldBase has been deprecated. Use Field.from_db_value instead.
  str('SemVerField'), (BaseSemVerField, models.CharField), {})

/<snipped>/.venv/lib/python3.5/site-packages/semantic_version/django_fields.py:41: RemovedInDjango110Warning: SubfieldBase has been deprecated. Use Field.from_db_value instead.
  class VersionField(SemVerField):

/<snipped>/.venv/lib/python3.5/site-packages/semantic_version/django_fields.py:64: RemovedInDjango110Warning: SubfieldBase has been deprecated. Use Field.from_db_value instead.
  class SpecField(SemVerField):

It looks like the solution is to remove __metaclass__ and manually define the to/from Python methods: https://stackoverflow.com/questions/35166085/how-to-deal-with-subfieldbase-has-been-deprecated-use-field-from-db-value-inst

@tony

This comment has been minimized.

Copy link

commented Aug 31, 2016

@rbarrois due to this, python-semanticversion is currently broke for the stable release of django (1.10)

@rbarrois rbarrois closed this in be455e8 Sep 1, 2016

@pghalliday

This comment has been minimized.

Copy link

commented Sep 13, 2016

Just got caught out by this and had to pin my Django version to <1.10 on a new project.
Will there be a release soon?

thanks for library btw :)

@rbarrois

This comment has been minimized.

Copy link
Owner

commented Sep 13, 2016

@pghalliday I plan to release this by the end of the week — too much work until then.

@pghalliday

This comment has been minimized.

Copy link

commented Sep 13, 2016

@rbarrois cool thanks

@rbarrois

This comment has been minimized.

Copy link
Owner

commented Sep 25, 2016

@pghalliday released ;)

@pghalliday

This comment has been minimized.

Copy link

commented Sep 28, 2016

awesome, thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.