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

Map enum int's into Enums redux #293

Merged
merged 35 commits into from
Oct 16, 2023
Merged

Map enum int's into Enums redux #293

merged 35 commits into from
Oct 16, 2023

Conversation

Gobot1234
Copy link
Collaborator

@Gobot1234 Gobot1234 commented Nov 29, 2021

A continuation of #273 containing a reimplementation of betterproto.Enum (with 3.11+ features) as an open set along with some tests for this.

Closes #291
Closes #157
Closes #169

@Gobot1234 Gobot1234 changed the title Map enum int's into Enum redux Map enum int's into Enums redux Nov 29, 2021
@Gobot1234
Copy link
Collaborator Author

This should be ready to go now

@joetopp
Copy link

joetopp commented Jun 22, 2022

+1 to this, for the sake of resolving issue #157

@Gobot1234
Copy link
Collaborator Author

Not really sure why the install's failing other than it might just be time to drop 3.6?

@Gobot1234
Copy link
Collaborator Author

Actually this is probably just cause poetry dropped 3.6 support

@sataset
Copy link

sataset commented Dec 4, 2022

@danielgtaylor @kalzoo will this ever be merged or implemented from maintainers?

Current implementation makes no sense. Message enum field should have an appropriate type and not just int.

@MicaelJarniac
Copy link
Contributor

Python 3.6 is already at its end of life anyways, and soon 3.7 will be too, so I don't think support for 3.6 should matter that much.

And people using this project, instead of Google's official Python implementation, are likely here because they want newer features, so I don't think most would care for 3.6 anyways.

@Gobot1234 Gobot1234 requested a review from cetanu August 18, 2023 18:25
@dingxiong
Copy link

Is there any reason this PR is not merged?

@Run1e
Copy link

Run1e commented Sep 10, 2023

If it means anything to a (hopefully) future reviewer, I've been using it in prod for a couple months and it's been working flawlessly.

@cetanu
Copy link
Collaborator

cetanu commented Oct 16, 2023

Just saw this in my review queue, reading now

@cetanu cetanu merged commit c82816b into danielgtaylor:master Oct 16, 2023
cetanu pushed a commit that referenced this pull request Oct 16, 2023
Re-implement Enum to be faster along with being an open set

---------
Co-authored-by: ydylla <ydylla@gmail.com>
@Gobot1234 Gobot1234 deleted the enum branch October 16, 2023 08:17
cetanu pushed a commit that referenced this pull request Oct 16, 2023
Re-implement Enum to be faster along with being an open set

---------
Co-authored-by: ydylla <ydylla@gmail.com>
@MicaelJarniac
Copy link
Contributor

MicaelJarniac commented Aug 14, 2024

Do these enums support identity comparison (color is Color.RED)?

Enumeration members are compared by identity
https://docs.python.org/3/howto/enum.html#comparisons

@Gobot1234
Copy link
Collaborator Author

Yes they should

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants