-
Notifications
You must be signed in to change notification settings - Fork 37
Enum failed to initialize in PyPy #506
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
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Comments
airbender-1
added a commit
to airbender-1/proto-plus-python
that referenced
this issue
Nov 28, 2024
When removing the _pb_options name from the enum attributes, enums initialization in PyPy should not raise exception. Refs: googleapis#506
Thanks @airbender-1 for the detailed error report and fix! I was able to reproduce the issue in #523
|
parthea
added a commit
that referenced
this issue
Jan 22, 2025
* fix: enums initialization in PyPy When removing the _pb_options name from the enum attributes, enums initialization in PyPy should not raise exception. Refs: #506 * test: add presubmit for PyPy * Add unit (pypy3.10, python) as a required check --------- Co-authored-by: Anthonios Partheniou <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Thanks for stopping by to let us know something could be better!
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Is this a client library issue or a product issue? We will only be able to assist with issues that pertain to the behaviors of this library. If the issue you're experiencing is due to the behavior of the product itself, please visit the Support page to reach the most relevant engineers.
If the support paths suggested above still do not result in a resolution, please provide the following details.
Environment details
Steps to reproduce
source .venv-pypy3/bin/activate
Expected:
No failures
Actual:
TypeError: 'set' object does not support item deletion
Error is raised from .venv-pypy3/lib/pypy3.10/site-packages/proto/enums.py, see in code:
Call Stack:
Possible solution:
I think this could be fixed by checking for type of
attrs._member_names
to be a set, like so (tested on my machine).Original:
Fixed:
see PR #507
Reproduce with proto-plus only in PyPy
I also managed to reproduce the same issue with the simplified code without any dependency on google aiplatform like so.
test_script.py
Run with PyPy:
Throws the same error:
The text was updated successfully, but these errors were encountered: