Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): pin back urllib3 and types-requests #14672

Merged
merged 4 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements/lint.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ types-passlib
types-python-slugify
types-pytz
types-redis
types-requests
types-requests==2.31.0.6 # See https://github.com/pypi/warehouse/issues/14671
types-setuptools
types-stripe
6 changes: 3 additions & 3 deletions requirements/lint.txt
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,9 @@ types-redis==4.6.0.7 \
--hash=sha256:05b1bf92879b25df20433fa1af07784a0d7928c616dc2ebf9087618db77ccbd0 \
--hash=sha256:28c4153ddb5c9d4f10def44a2454673c361d2d5fc3cd867cf3bb1520f3f59a38
# via -r requirements/lint.in
types-requests==2.31.0.2 \
--hash=sha256:56d181c85b5925cbc59f4489a57e72a8b2166f18273fd8ba7b6fe0c0b986f12a \
--hash=sha256:6aa3f7faf0ea52d728bb18c0a0d1522d9bfd8c72d26ff6f61bfc3d06a411cf40
types-requests==2.31.0.6 \
--hash=sha256:a2db9cb228a81da8348b49ad6db3f5519452dd20a9c1e1a868c83c5fe88fd1a9 \
--hash=sha256:cd74ce3b53c461f1228a9b783929ac73a666658f223e28ed29753771477b3bd0
# via -r requirements/lint.in
types-s3transfer==0.7.0 \
--hash=sha256:aca0f2486d0a3a5037cd5b8f3e20a4522a29579a8dd183281ff0aa1c4e2c8aa7 \
Expand Down
2 changes: 1 addition & 1 deletion requirements/main.in
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ structlog
transaction
trove-classifiers
ua-parser
urllib3
urllib3<2 # See https://github.com/pypi/warehouse/issues/14671
webauthn>=1.0.0,<2.0.0
whitenoise
WTForms[email]>=2.0.0
Expand Down
5 changes: 4 additions & 1 deletion warehouse/accounts/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,10 @@ def get_email_breach_count(self, email: str) -> int | None:
resp.raise_for_status()
except requests.RequestException as exc:
# 404 is expected if the email has **not** been breached
if exc.response.status_code == http.HTTPStatus.NOT_FOUND:
if (
exc.response is not None
and exc.response.status_code == http.HTTPStatus.NOT_FOUND
):
return 0
logger.warning("Error contacting HaveIBeenPwned: %r", exc)
return -1
Expand Down
Loading