#670 Old copr-cli version (1.6.5) in PyPI breaks the build
Closed 5 years ago by msuchy. Opened 5 years ago by szpak.

In my RPM package's CI/CD build on Travis I use pip install copr-cli (it's Ubuntu) to install copr-cli and perform a release process. The build some time ago started to fail with:

Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/copr/client/responses.py", line 349, in __getattr__
    return self.data[item]
KeyError: 'old_status'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.6.3/bin/copr-cli", line 11, in <module>
    sys.exit(main())
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/copr_cli/main.py", line 1108, in main
    getattr(commands, arg.func)(arg)
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/copr_cli/main.py", line 584, in action_get_package
    print(simplejson.dumps(result.package, indent=4, sort_keys=True, for_json=True))
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/copr/client/responses.py", line 61, in __getattr__
    request_kwargs=self.request_kwargs)
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/copr/client/parsers.py", line 180, in parse
    return PackageWrapper(client=client, ownername=ownername, projectname=projectname, **data['package'])
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/copr/client/responses.py", line 342, in __init__
    id=self.id, old_status=self.old_status,
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/copr/client/responses.py", line 351, in __getattr__
    raise AttributeError()
AttributeError

I suspect it is related to the old version version of copr-cli (1.6.5 - November 2017) available in PyPI (as opposed 1.74-1).

I wonder why the never versions are not available with pip install?
What's the best way to get the never/current version of copr-cli on Ubunty?


It really deserves update on PyPI, @msuchy, will you take a look?

Metadata Update from @praiskup:
- Issue tagged with: bug

5 years ago

New version uploaded.

Metadata Update from @msuchy:
- Issue status updated to: Closed (was: Open)

5 years ago

Thanks @msuchy. I looks better at the PyPI. However, in logs I see:

$ pip install copr-cli simplejson
Collecting copr-cli
  Downloading https://files.pythonhosted.org/packages/bf/83/5a6ec9a9fb0a1be7be9f51237303dc418d674b565bbf7e9a1c92e400f136/copr-cli-1.78.tar.gz
...
Successfully built copr-cli simplejson copr munch
Installing collected packages: marshmallow, idna, chardet, certifi, urllib3, requests, requests-toolbelt, munch, copr, simplejson, MarkupSafe, jinja2, copr-cli
Successfully installed MarkupSafe-1.1.1 certifi-2019.3.9 chardet-3.0.4 copr-0.0.0
copr-cli-0.0.0 idna-2.8 jinja2-2.10.1 marshmallow-2.19.2 munch-2.3.2 requests-2.21.0 requests-toolbelt-0.9.1 simplejson-3.16.0 urllib3-1.24.2

copr-0.0.0 copr-cli-0.0.0 looks strange. Is there everything ok with their metadata?

For the previous version the summary contained copr-1.83 copr-cli-1.65.

One more question. I wanted to slightly edit my comment, but I don't see any "edit" button. In reference to https://pagure.io/pagure/issue/95 it should be possible. Do you know what could be a reason?

One more question. I wanted to slightly edit my comment, but I don't see
any "edit" button. In reference to https://pagure.io/pagure/issue/95 it
should be possible. Do you know what could be a reason?

Dunno, it works for me.

I see this:

Installing collected packages: marshmallow, idna, urllib3, chardet, certifi, requests, requests-toolbelt, six, munch, copr
Successfully installed certifi-2019.3.9 chardet-3.0.4 copr-0.0.0 idna-2.8 marshmallow-2.19.2 munch-2.3.2 requests-2.21.0 requests-toolbelt-0.9.1 six-1.12.0 urllib3-1.24.2

So confirmed, + the issue #674.

Metadata Update from @praiskup:
- Issue tagged with: PyPI

5 years ago

Login to comment on this ticket.

Metadata
Attachments 2