Skip to content

Merge latest master#1

Open
pombredanne wants to merge 482 commits into
pombredanne:masterfrom
python-bugzilla:master
Open

Merge latest master#1
pombredanne wants to merge 482 commits into
pombredanne:masterfrom
python-bugzilla:master

Conversation

@pombredanne

Copy link
Copy Markdown
Owner

No description provided.

crobinso and others added 30 commits January 9, 2019 17:58
Otherwise a bugzilla.redhat.com entry will try to match against
partner-bugzilla.redhat.com, which are two separate instances
This makes manual pycodestyle calls pick up our project config
Don't force it on users who are running the tool manually
This makes manual pylint calls pick up our project config
Add a note that "bugzilla login" will eventually stop working with
tokens, and users must begin using API keys instead.
As per the [Bugzilla Attachment API][bzapi] the `is_private` keyword can
be included to make an attachment private.

This commit adds that support to the attachment verb.

It has been tested against Bugzilla v5.0.6

[bzapi]:
https://bugzilla.readthedocs.io/en/stable/api/core/v1/attachment.html#create-attachment
  /home/crobinso/src/python-bugzilla/bugzilla/base.py:271: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Fixes: #104

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Like plain 'partner-bugzilla.redhat.com'

Fixes: #109

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Introduce --ignore-obsolete. When used (e.g., with attach --get-all),
obsolete attachments are ignored and not downloaded.

Signed-off-by: Čestmír Kalina <ckalina@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This change introduces a new feature for the command line client
and the Bugzilla python API.

In the python API, it changes the interactive_login method
to receive a new flag: "use_api_key" that, in case is defined will
ask the user to provide an API key instead of regular username/password.

In case the API_KEY provide works correctly, it will also
update the ~/config/python-bugzilla/bugzillarc file (or ~/.bugzillarc).

In the bugzilla-cli side, it will add a new parameter to the login
command: "--api-key". Use key will trigger the usage of this new python API.

Default behaviors were not change, neither in bugzilla-cli or the python
API.

Resolves: #82
* Make the help text more explicit
* Add it to the man page

Signed-off-by: Cole Robinson <crobinso@redhat.com>
crobinso and others added 28 commits November 12, 2020 13:01
XMLRPC sends it in the POST payload. This makes it less likely that
the API key will leak into error messages:

https://bugzilla.redhat.com/show_bug.cgi?id=1896791

Signed-off-by: Cole Robinson <crobinso@redhat.com>
On PRs, these jobs fail by default unless I explicitly trigger it
with `/packit build`, which is mildly annoying.

It's not really important for us to test RPM build + install on
the occasional PR, so just do it at commit time.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Via the params dictionary this can leak into requests errors, depending
on the way it fails.

Perform a straight string replacement on the exception string and
re-raise the exception

https://bugzilla.redhat.com/show_bug.cgi?id=1896791

Signed-off-by: Cole Robinson <crobinso@redhat.com>
We don't need this after dropping python2 support

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Problem: In queries where the number of bugs are too large,
usually we get a timeout
Solution: bugzilla API provides a limit option in queries.
This commit adds this option to the build_query method
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
redhat-rpm-config brp-mangle-shebangs added in 2018 will do
/usr/bin/env python3 -> /usr/bin/python3 automatically for us

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Internall RH hosts staging versions of bugzilla at URLs that
don't match bugzilla.redhat.com, so loosen the restriction

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Replace with bugzilla.stage.redhat.com, the new URL

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Bugzilla dropped cookie auth support in 4.4 version, released in
1. I think that's long enough to drop support here.

If anyone still needs this feature, they can continue to use old
python-bugzilla versions

Signed-off-by: Cole Robinson <crobinso@redhat.com>
REST backend relies on session to set the params, but XMLRPC does
it in the backend. Switch it so session hands a param dictionary off
to the backend.

This will help with upcoming changes that make param values more
conditional, and a possible future where bugzilla doesn't accept
auth via URL params

Signed-off-by: Cole Robinson <crobinso@redhat.com>
See https://bugzilla.redhat.com/show_bug.cgi?id=1833585

bugzilla.redhat.com has added support for non-standard
'Authorization: Bearer $APIKEY' header for authenticating.
Other auth methods may eventually be removed. So let's start using
this for bugzilla.redhat.com

One caveat is that we need to stop sending token/apikey values
as query parameters when this header is used

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This is wired deep into the backend layer, but it really should just
be done after a successful login() call.

Move the tokencache.set_value() call to Bugzilla.login() and adjust
everything to match.

Fill in some more descriptive interactive_login text while we are here

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Error code changed so we need to relax our string check

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
@crobinso crobinso deleted the branch pombredanne:master January 27, 2022 16:23
@crobinso crobinso deleted the master branch January 27, 2022 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.