d9676debb9
Correctly handle passwords with utf-8 characters
2023-06-01 14:00:03 +02:00
14fba8bcb7
Fix ValueError: Cannot set verify_mode to CERT_NONE when check_hostname is enabled
2023-05-30 16:29:25 +02:00
b0629f6b90
connection: Allow disabling retry on 400 HTTP status code
...
We probably want the retry on by default to retry on running services,
but in some cases such as osc diff it only adds delays while handling
a quite expected errror state.
2023-04-28 14:53:29 +02:00
e25dc2d24f
Retry on receiving the following HTTP status codes: 400, 500, 502, 503, 504
...
Retrying 400 mitigates a problem with retrieving data from OBS API while the
server runs a service.
2023-04-26 10:29:34 +02:00
da822b3cfc
connection: Set Content-Type of POST requests without data to 'application/x-www-form-urlencoded'
2023-03-17 11:53:50 +01:00
05d381ad79
connection: Retry all, not just default allowed methods
2023-02-09 13:11:23 +01:00
2f6b50ec2b
connection: Wait between retries
2023-02-09 09:32:25 +01:00
efa2c09e2e
connection: Fix traceback on loading an invalid cookiejar file
...
Ignore the error and overwrite the cookiejar file with new content
after we get a new cookie from server.
2023-02-02 11:01:06 +01:00
18f4d88231
connection: Save cookiejar only when there's a Set-Cookie header in the response
2023-02-02 10:54:59 +01:00
080ffc1655
connection: Mute the "Converted retries value" debug message
2023-02-01 09:45:12 +01:00
Enno Gotthold
7335a84235
mypy: Add types to methods
...
This is a bulk add of typing that also includes the
formatting with darker.
2022-12-07 13:01:23 +01:00
77beee1d4a
Mute consequent InsecureRequestWarning warnings
2022-10-13 12:58:15 +02:00
b511be20ff
Always import at the toplevel
2022-09-12 13:45:19 +02:00
6d891d7488
Remove superfluous parens
2022-09-12 13:45:19 +02:00
7de13ea597
Pass apiurl to all auth handlers
...
Fixes TransientCredentialsManager check when working with multiple apiurls
2022-09-08 10:51:01 +02:00
157d4b79f8
Inject no-op print() into http.client when http debugging is off
...
This solves a crash that occasionaly occurs - osc tries to use a function that is not there
2022-09-08 10:32:34 +02:00
2496b3e987
Properly handle missing ssh-keygen and ssh-add
2022-09-07 10:09:20 +02:00
bbb2746657
Support ssh-agent forwarding
2022-09-07 10:07:01 +02:00
3d8efe2d15
ssh auth: Avoid password prompt when using TransientCredentialsManager
2022-09-06 12:49:47 +02:00
6a1e8053ac
Merge pull request #1128 from dmach/http-accept
...
Send HTTP header Accept: application/xml
2022-09-05 13:59:48 +02:00
c2d0b05ede
Send HTTP header Accept: application/xml
...
Rails sends a html response if the header is not set
https://github.com/openSUSE/open-build-service/pull/13019
2022-09-05 13:32:57 +02:00
5a9909370d
Fix connection to work on python 3.6
...
Use ssl.CertificateError instead of ssl.SSLCertVerificationError.
2022-08-30 11:41:09 +02:00
a4a984ee14
Lock cookiejar to prevent unnecessary signature auth
...
This usually happens when a user runs multiple osc instances
from the command-line in parallel.
2022-08-25 15:39:26 +02:00
4848b0f42a
Move __version__ from osc.core to osc
...
Fixes issues with circular module deps during tests
that caused that osc.core wasn't available
2022-08-24 09:53:26 +02:00
9cc4a5594f
Fix resource warnings (unclosed files)
2022-08-24 08:43:09 +02:00
Frank Schreiner
6c7ad021c8
reset "file current position" on errors
...
If an error occurs while sending a file to the API (e.g. 401), the io handle
is reused and the current postion is at the end of the file. This results in an
empty value.
This patch takes care that the current file postion gets resetted
if a retransmission is required.
2022-08-18 12:06:06 +00:00
feb53212dd
Modernize code with pyupgrade
...
pyupgrade --keep-percent-format --py36-plus `find -name '*.py'`
2022-07-28 19:14:12 +02:00
93bc0e4731
Switch http_request() to urllib3
...
Use connection pools for better performance.
Replace M2Crypto with cryptography and urllib3's ssl context.
2022-07-27 11:15:21 +02:00