-
Notifications
You must be signed in to change notification settings - Fork 0
Change labels and transitions attr name, etc #2
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
Conversation
enum instead of int in field value; raise validation error when enum is not found by value or name (and support digit str), etc WARNING: Inconsistent field value atm -- enum for Django 1.8 and int for other versions when model is initialized
.travis.yml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think it would be totally fine to drop django 1.5 and django 1.6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have some projects still running on Django 1.1 😨 Not sure where the border is
I'm not entirely convinced we should worry that much about backward-compatibility -- as long as we version correctly (ie: increment the Major version) and provide a documented upgrade path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would keep the env vars specified as they currently are, just in case there's going to be a 1.9.99
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can always pad another 9 😺
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the DJANGO="Django>=1.8,<1.9"
have any drawbacks? I'd rather have something consistently reliable, instead of a possible time bomb to patch in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's harder to read and exclude. Will the shorter version fail in some cases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A correct statement is that the shorter version it will be incorrect in some edge cases, so it's really a perfectionist issue. I'm fine either way, I don't want this to become a distracting bikeshed
I can't find this in the diff. Can you point me to the right line? |
Just to be clear, the issue is the result of my changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why this include
is needed. Isn't this ocmbo already covered by python
* env
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, annoying thing, but it's needed due to allow_failures
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh i see
different Django versions
I've tried |
We are discussing it internally and looking into dropping support for Django 1.6-1.7 to avoid inconsistency and therefore making major release. What do you think about it? |
Django 1.7 is still officially supported by the Django project, I would advise to continue supporting it until 1.9 is out of beta. I think Django 1.6 can be safely dropped as it's unsupported now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to_python needs to handle the following cases:
value
isNone
value
is a stringvalue
is an enum
ref https://docs.djangoproject.com/en/1.8/howto/custom-model-fields/#converting-values-to-python-objects
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enum.get
does it
It took some work to track it down, but I think I got |
Awesome! |
subclass IntEnum instead of Enum
Looking good :) I would add a Changelog (either its own file or a section in the readme) listing the breaking changes:
|
Change labels and transitions attr name, etc
...use enum instead of int in field value; raise validation error when enum is not found by value or name (and support digit str), etc
WARNING: Inconsistent field value atm -- enum for Django 1.8 and int for other versions when model is initialized