Autogenerated pulp rpm bindings raise an error on import
The generated bindings raise an error on import:
In : from pulpcore.client.pulp_rpm.api_client import ApiClient Traceback (most recent call last): File "/home/florian/.local/pipx/venvs/ipython/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3296, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-1-a1b46871c401>", line 1, in <module> from pulpcore.client.pulp_rpm.api_client import ApiClient File "/home/florian/.local/share/virtualenvs/5ead1a20df1bd8b/lib/python3.7/site-packages/pulpcore/client/pulp_rpm/__init__.py", line 20, in <module> from pulpcore.client.pulp_rpm.api.content_advisories_api import ContentAdvisoriesApi File "/home/florian/.local/share/virtualenvs/5ead1a20df1bd8b/lib/python3.7/site-packages/pulpcore/client/pulp_rpm/api/__init__.py", line 6, in <module> from pulpcore.client.pulp_rpm.api.content_advisories_api import ContentAdvisoriesApi File "/home/florian/.local/share/virtualenvs/5ead1a20df1bd8b/lib/python3.7/site-packages/pulpcore/client/pulp_rpm/api/content_advisories_api.py", line 20, in <module> from pulpcore.client.pulp_rpm.api_client import ApiClient File "/home/florian/.local/share/virtualenvs/5ead1a20df1bd8b/lib/python3.7/site-packages/pulpcore/client/pulp_rpm/api_client.py", line 26, in <module> import pulpcore.client.pulp_rpm.models File "/home/florian/.local/share/virtualenvs/5ead1a20df1bd8b/lib/python3.7/site-packages/pulpcore/client/pulp_rpm/models/__init__.py", line 28, in <module> from pulpcore.client.pulp_rpm.models.update_record import UpdateRecord File "/home/florian/.local/share/virtualenvs/5ead1a20df1bd8b/lib/python3.7/site-packages/pulpcore/client/pulp_rpm/models/update_record.py", line 79 def __init__(self, href=None, created=None, type=None, id=None, updated_date=None, description=None, issued_date=None, fromstr=None, status=None, title=None, summary=None, version=None, type=None, severity=None, solution=None, release=None, rights=None, pushcount=None, pkglist=None, references=None): # noqa: E501 ^ SyntaxError: duplicate argument 'type' in function definition
This is most likely due to _type and type getting mangled into the same name
#1 Updated by email@example.com over 2 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to firstname.lastname@example.org
- Sprint set to Sprint 55
The reporter's guess about the name mangling is correct. There is already an upstream issue open. I will investigate how we can mitigate this problem until it is fixed in openapi-generator.
#5 Updated by email@example.com about 2 years ago
- Status changed from ASSIGNED to NEW
- Assignee deleted (
I am putting this back in new because I am still working on another patch for openapi-generator. This is going to require a patch to openapi-generator.
#8 Updated by firstname.lastname@example.org about 2 years ago
I opened a PR upstream with openapi-generator.
Please register to edit this issue