Refactor congruence checks based on assert at runtime#932
Merged
itamarst merged 1 commit intoeventlet:masterfrom Mar 13, 2024
Merged
Refactor congruence checks based on assert at runtime#932itamarst merged 1 commit intoeventlet:masterfrom
itamarst merged 1 commit intoeventlet:masterfrom
Conversation
Assert statements are completely eliminated when the python interpreter is ran with the optimization flags [1]. Those checks are not an option and should be executed not matter the execution context. This patch refactor those checks to not rely anymore on the assert statement. This patch is mainly focused on hub checks. Other assert statements are still present, I'll refactor them later. Refactoring this kind of code ensure to not waste time managing issues and debugging bugs related to the optimization features of the interpreter. [1] https://docs.python.org/3/using/cmdline.html#cmdoption-O
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #932 +/- ##
=====================================
- Coverage 56% 56% -1%
=====================================
Files 89 89
Lines 9748 9753 +5
Branches 1812 1817 +5
=====================================
- Hits 5471 5466 -5
- Misses 3905 3909 +4
- Partials 372 378 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
itamarst
approved these changes
Mar 13, 2024
clrpackages
pushed a commit
to clearlinux-pkgs/pypi-eventlet
that referenced
this pull request
Jul 10, 2024
…rsion 0.36.1 0.36.1 ====== * [fix] eventlet.websocket is not always used from eventlet.wsgi, so do not assume eventlet.set_idle exists eventlet/eventlet#949 0.36.0 ====== * [fix] Make sure asyncio hub doesn't use greendns for asyncio DNS APIs eventlet/eventlet#938 * [fix] Make asyncio.to_thread work with the same semantics as normal asyncio eventlet/eventlet#930 * [fix] Refactor congruence checks based on assert at runtime eventlet/eventlet#932 * [tests] Run tests on macOS in CI, and some fixes to get it in reasonable state (#list eventlet/eventlet#934 * [fix] Fix wsgi.server shutdown for in-flight requests eventlet/eventlet#912 * [feature] Add debug convenience helpers - asyncio, threads eventlet/eventlet#925 * [fix] Handle errors better. eventlet/eventlet#923 (NEWS truncated at 15 lines) CVEs fixed in this build: CVE-2023-29483
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
assertstatements are completely eliminated when the python interpreter is ran with the optimization flags [1].Those checks are not an option and should be executed not matter the execution context.
This patch refactor those checks to not rely anymore on the assert statement.
This patch is mainly focused on hub checks. Other assert statements are still present, I'll refactor them later.
Refactoring this kind of code ensure to not waste time managing issues and debugging bugs related to the optimization features of the interpreter.
[1] https://docs.python.org/3/using/cmdline.html#cmdoption-O