[Pulp-list] Pulp 3 Python client

Bin Li (BLOOMBERG/ 120 PARK) bli111 at bloomberg.net
Thu Oct 17 15:06:00 UTC 2019


Yeah, I pulled nightly build and it worked. Thanks a lot.  Do you know if it is required to erase the database when update from previous nightly build? I had some weird 500 errors until I drop all db tables and rerun the migration.

From: dkliban at redhat.com At: 10/16/19 12:29:21To:  Bin Li (BLOOMBERG/ 120 PARK ) 
Cc:  pulp-list at redhat.com
Subject: Re: [Pulp-list] Pulp 3 Python client

I've just confirmed that the latest pulp-rpm-client package on PyPI no longer has this problem. However, this latest package only works with the code on master branch. A new pulp_rpm package should be published to PyPI soon. 

On Tue, Oct 8, 2019 at 4:29 PM Dennis Kliban <dkliban at redhat.com> wrote:

This is a known problem with the OpenAPI schema[0]. Once the PRs for is 5550[1] are merged, a new version of the client will be published to PyPI and this problem will be resolved. I believe that should take place on October 9th[2].

[0] https://pulp.plan.io/issues/5093
[1] https://pulp.plan.io/issues/5550
[2] https://www.redhat.com/archives/pulp-dev/2019-October/msg00031.html
On Tue, Oct 8, 2019 at 2:13 PM Bin Li (BLOOMBERG/ 120 PARK) <bli111 at bloomberg.net> wrote:

I have tried to follow the blog https://pulpproject.org/2018/09/04/generate-pulp-3-python-client-using-swagger-codegen/ and got a syntax error.
  File "/opt/utils/venv/pulp/3.6.5/lib64/python3.6/site-packages/pulp3_client/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

Type is declared twice in the __init__. There is a duplicate key 'type' in attribute_map models/update_record.py.

    attribute_map = {
        'href': '_href',
        'created': '_created',
        'type': '_type',
        'id': 'id',
        'updated_date': 'updated_date',
        'description': 'description',
        'issued_date': 'issued_date',
        'fromstr': 'fromstr',
        'status': 'status',
        'title': 'title',
        'summary': 'summary',
        'version': 'version',
        'type': 'type',
        'severity': 'severity',
        'solution': 'solution',
        'release': 'release',
        'rights': 'rights',
        'pushcount': 'pushcount',
        'pkglist': 'pkglist',
        'references': 'references'
    }

Anyone knows how this can be fixed?

Thanks

_______________________________________________
Pulp-list mailing list
Pulp-list at redhat.com
https://www.redhat.com/mailman/listinfo/pulp-list


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20191017/9c8ee785/attachment.htm>


More information about the Pulp-list mailing list