Project

Profile

Help

Issue #5093

closed

Autogenerated pulp rpm bindings raise an error on import

Added by apollo13 over 5 years ago. Updated over 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
API Bindings
Sprint:
Sprint 60
Quarter:

Description

The generated bindings raise an error on import:


In [1]: 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


Related issues

Related to Pulp - Task #5454: rename _type to pulp_typeCLOSED - CURRENTRELEASEfao89

Actions

Also available in: Atom PDF