-
Notifications
You must be signed in to change notification settings - Fork 6
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
⬆️ [#2040] Upgrade python to 3.11 and zgw-consumers to 0.28.0 #977
Conversation
568b8fd
to
65a18c1
Compare
c7df082
to
4bad33b
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #977 +/- ##
===========================================
- Coverage 94.77% 94.74% -0.03%
===========================================
Files 861 862 +1
Lines 30310 30265 -45
===========================================
- Hits 28726 28676 -50
- Misses 1584 1589 +5 ☔ View full report in Codecov by Sentry. |
16d2a3c
to
d2c092b
Compare
Depends on upgrading cindy+sandra to Debian 12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At last a newer python!
Removing the operation ID's feels brave, but if ZGW-consumers believes in it then lets go for it.
I put two notes but not blocking.
@@ -1 +1 @@ | |||
3.9 | |||
3.11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Github's 2-way changes diff warns there is no newline here now, not sure if that is something.
class JSONParserClient(APIClient): | ||
""" | ||
Simple layer on top of `ape_pie.APIClient` to attempt to convert the response to | ||
JSON and check that the request is successful (and raise the correct exceptions if not) | ||
""" | ||
|
||
def request( | ||
self, | ||
*args, | ||
**kwargs, | ||
) -> Union[List[Object], Object]: | ||
response = super().request(*args, **kwargs) | ||
try: | ||
response_json = response.json() | ||
except Exception: | ||
response_json = None | ||
|
||
try: | ||
response.raise_for_status() | ||
except requests.HTTPError as exc: | ||
if response.status_code >= 500: | ||
raise | ||
raise ClientError(response_json) from exc | ||
|
||
return response_json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels weird this is not part of either apie_pie or ZGW-consumers but heh.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, I think we'll want this for more projects
d2c092b
to
5073d70
Compare
Mag gemerged worden zodra de conflicts zijn geresolved |
to fix migration crash in combination with zgw-consumers==0.27.0
because zgw-consumers 0.28.0 uses ape-pie as its client, which no longer does OAS fetching/parsing to determine request paths
5073d70
to
cedcd4c
Compare
issue: https://taiga.maykinmedia.nl/project/open-inwoner/issue/2040
This PR upgrades to python3.11 and zgw-consumers to 0.28.0, in this new version of zgw-consumers we no longer do schema parsing to determine request paths, which removes latency that was caused by that
Notes:
get_paginated_results
doesn't work with the new client, created another issue for this -> https://taiga.maykinmedia.nl/project/open-inwoner/task/2060