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

Fixed #25764 -- Added support for serialization of enum.Enum in migrations. #5672

Closed
wants to merge 1 commit into from

Conversation

andreif
Copy link
Contributor

@andreif andreif commented Nov 16, 2015

@@ -642,6 +642,8 @@ Django can serialize the following:

- ``int``, ``long``, ``float``, ``bool``, ``str``, ``unicode``, ``bytes``, ``None``
- ``list``, ``set``, ``tuple``, ``dict``
- Instance of ``enum.Enum`` (either native for Python 3.4+, or ``Enum`` from enum34_
Copy link
Member

Choose a reason for hiding this comment

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

``enum.Enum`` instances

@timgraham timgraham changed the title Fixed #25764 -- Support serialization of enum.Enum instances. Fixed #25764 -- Added support for serialization of enum.Enum in migrations. Nov 16, 2015
@timgraham
Copy link
Member

Please add a mention in the 1.10 release notes and squash commits using the commit message from the pull request title. Thanks!

@andreif
Copy link
Contributor Author

andreif commented Nov 16, 2015

@timgraham Could you have a look one more time before I squash the commits?

@@ -138,6 +138,7 @@ dependencies:

* bcrypt_
* docutils_
* enum34_ 2.7-3.3
Copy link
Member

Choose a reason for hiding this comment

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

2.7+ below refers to the version of jinja2, we can change this to "(Python 2 only)"

@andreif
Copy link
Contributor Author

andreif commented Nov 19, 2015

@timgraham fixed

@andreif
Copy link
Contributor Author

andreif commented Nov 19, 2015

(removed remaining reference)

@timgraham
Copy link
Member

Some minor edits: http://dpaste.com/3AXZQX0

Upon installing enum34 on Python 2, I noticed the test doesn't pass there.

@timgraham
Copy link
Member

Is it possible to use a similar fix?

if six.PY2:
    # Strip the `u` prefix since we're importing unicode_literals
    value_repr = value_repr[1:]

@andreif
Copy link
Contributor Author

andreif commented Nov 19, 2015

Yeah, trying to apply it. I think I should serialize the enum member value as well, working on it

@andreif
Copy link
Contributor Author

andreif commented Nov 19, 2015

@timgraham it seems that jenkins is hanging, I'll try again

Thanks Tim Graham for the review.
@andreif
Copy link
Contributor Author

andreif commented Nov 19, 2015

@timgraham Jenkins seems randomly hang or fail for Windows

@timgraham
Copy link
Member

It's under a lot of load now. Try to avoid pushing your branch a lot (e.g. pushing a new commit, then immediately pushing a squashed one) since this will trigger two builds.

@andreif
Copy link
Contributor Author

andreif commented Nov 19, 2015

@timgraham Is there a way to trigger tests without pushing?

@timgraham
Copy link
Member

See https://code.djangoproject.com/wiki/Jenkins but there's no need to retrigger just for random failures.

@timgraham
Copy link
Member

merged in 998894e, thanks!

@timgraham timgraham closed this Nov 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants