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

bpo-39234: `enum.auto()` default initial value as 1 #17878

Merged
merged 5 commits into from Jan 6, 2020

Conversation

@YoSTEALTH
Copy link
Contributor

YoSTEALTH commented Jan 6, 2020

Updated as Eric mentioned "By default, the initial value starts at 1"

https://bugs.python.org/issue39234

Automerge-Triggered-By: @ericvsmith

YoSTEALTH added 3 commits Jan 6, 2020
enum in C starts at 0, while `enum.auto()` in Python starts at 1, thus needs to be specified.
@YoSTEALTH

This comment has been minimized.

Copy link
Contributor Author

YoSTEALTH commented Jan 6, 2020

@ethanfurman this should back-port all the way to 3.6 as enum.auto() was first added in 3.6

@@ -55,7 +55,7 @@ helper, :class:`auto`.

.. class:: auto

Instances are replaced with an appropriate value for Enum members.
Instances are replaced with an appropriate value for Enum members. By default, the initial value starts at 1

This comment has been minimized.

Copy link
@ericvsmith

ericvsmith Jan 6, 2020

Member

You're missing the trailing period. Sorry for all of the minor fixes.

This comment has been minimized.

Copy link
@YoSTEALTH

YoSTEALTH Jan 6, 2020

Author Contributor

no worries, added the "."
thanks Eric

@miss-islington

This comment has been minimized.

Copy link

miss-islington commented Jan 6, 2020

@YoSTEALTH: Status check is done, and it's a success .

@miss-islington miss-islington merged commit 24bcefc into python:master Jan 6, 2020
5 checks passed
5 checks passed
Docs
Details
Azure Pipelines PR #20200106.54 succeeded
Details
bedevere/issue-number Issue number 39234 found
Details
bedevere/news "skip news" label found
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@miss-islington

This comment has been minimized.

Copy link

miss-islington commented Jan 6, 2020

Thanks @YoSTEALTH for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7, 3.8.
🐍🍒🤖

@miss-islington

This comment has been minimized.

Copy link

miss-islington commented Jan 6, 2020

Sorry, @YoSTEALTH, I could not cleanly backport this to 3.8 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 24bcefcb74231476b055bb6f0726642abeb10f04 3.8

@miss-islington miss-islington self-assigned this Jan 6, 2020
@miss-islington

This comment has been minimized.

Copy link

miss-islington commented Jan 6, 2020

Sorry @YoSTEALTH, I had trouble checking out the 3.7 backport branch.
Please backport using cherry_picker on command line.
cherry_picker 24bcefcb74231476b055bb6f0726642abeb10f04 3.7

@miss-islington

This comment has been minimized.

Copy link

miss-islington commented Jan 6, 2020

Sorry, @YoSTEALTH, I could not cleanly backport this to 3.6 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 24bcefcb74231476b055bb6f0726642abeb10f04 3.6

ericvsmith added a commit to ericvsmith/cpython that referenced this pull request Jan 7, 2020
…7878)

Updated as Eric mentioned "By default, the initial value starts at 1"

https://bugs.python.org/issue39234

Automerge-Triggered-By: @ericvsmith.
(cherry picked from commit 24bcefc)

Co-authored-by: YoSTEALTH <35307184+YoSTEALTH@users.noreply.github.com>
ericvsmith added a commit that referenced this pull request Jan 7, 2020
Updated as Eric mentioned "By default, the initial value starts at 1"

https://bugs.python.org/issue39234

Automerge-Triggered-By: @ericvsmith.
(cherry picked from commit 24bcefc)

Co-authored-by: YoSTEALTH <35307184+YoSTEALTH@users.noreply.github.com>
ericvsmith added a commit that referenced this pull request Jan 7, 2020
Updated as Eric mentioned "By default, the initial value starts at 1"

https://bugs.python.org/issue39234

Automerge-Triggered-By: @ericvsmith.
(cherry picked from commit 24bcefc)

Co-authored-by: YoSTEALTH <35307184+YoSTEALTH@users.noreply.github.com>
ericvsmith added a commit that referenced this pull request Jan 7, 2020
Updated as Eric mentioned "By default, the initial value starts at 1"

https://bugs.python.org/issue39234

Automerge-Triggered-By: @ericvsmith.
(cherry picked from commit 24bcefc)

Co-authored-by: YoSTEALTH <35307184+YoSTEALTH@users.noreply.github.com>
gousaiyang added a commit to gousaiyang/cpython that referenced this pull request Jan 8, 2020
Updated as Eric mentioned "By default, the initial value starts at 1"


https://bugs.python.org/issue39234



Automerge-Triggered-By: @ericvsmith
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.