-
Notifications
You must be signed in to change notification settings - Fork 576
Updates for Cython3 #587
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
Merged
Merged
Updates for Cython3 #587
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
83ae19d
Updates for Cython3
alan-brooks 55bab4f
_set_coroutine_debug has args difference in python 3.11
alan-brooks 95a147f
fix tests on python 3.8
alan-brooks ca06a74
fix arg count for wrap()
alan-brooks c11671c
Merge branch 'master' into cython3_update
fantix a73522b
Use Cython 3.0 and fix deprecated test
fantix 932f546
Fix the dunder param issue differently
fantix f63df46
Revert tmp debugging
fantix c48173d
Restore consts.pxi without DEF
fantix 7562c1e
Dorp unused env and only emit linenums in debug
fantix fb95d4e
Partially revert the WIN32 changes
fantix 5b03fdd
Revert noexcept on _get_write_buffer_size()
fantix 8793035
Revert noexcept on _is_reading()
fantix d387089
Revert noexcept because _fatal_error() may raise
fantix 2e57927
Revert some more noexcept
fantix b2f6897
_set_coroutine_debug() doesn't need to be cpdef?
fantix 232cd3f
Merge branch 'master' into cython3_update
fantix File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,33 @@ | ||
DEF UV_STREAM_RECV_BUF_SIZE = 256000 # 250kb | ||
cdef enum: | ||
UV_STREAM_RECV_BUF_SIZE = 256000 # 250kb | ||
|
||
DEF FLOW_CONTROL_HIGH_WATER = 64 # KiB | ||
DEF FLOW_CONTROL_HIGH_WATER_SSL_READ = 256 # KiB | ||
DEF FLOW_CONTROL_HIGH_WATER_SSL_WRITE = 512 # KiB | ||
FLOW_CONTROL_HIGH_WATER = 64 # KiB | ||
FLOW_CONTROL_HIGH_WATER_SSL_READ = 256 # KiB | ||
FLOW_CONTROL_HIGH_WATER_SSL_WRITE = 512 # KiB | ||
|
||
DEF DEFAULT_FREELIST_SIZE = 250 | ||
DEF DNS_PYADDR_TO_SOCKADDR_CACHE_SIZE = 2048 | ||
DEFAULT_FREELIST_SIZE = 250 | ||
DNS_PYADDR_TO_SOCKADDR_CACHE_SIZE = 2048 | ||
|
||
DEF DEBUG_STACK_DEPTH = 10 | ||
DEBUG_STACK_DEPTH = 10 | ||
|
||
|
||
DEF __PROCESS_DEBUG_SLEEP_AFTER_FORK = 1 | ||
__PROCESS_DEBUG_SLEEP_AFTER_FORK = 1 | ||
|
||
|
||
DEF LOG_THRESHOLD_FOR_CONNLOST_WRITES = 5 | ||
LOG_THRESHOLD_FOR_CONNLOST_WRITES = 5 | ||
SSL_READ_MAX_SIZE = 256 * 1024 | ||
|
||
|
||
# Number of seconds to wait for SSL handshake to complete | ||
# The default timeout matches that of Nginx. | ||
DEF SSL_HANDSHAKE_TIMEOUT = 60.0 | ||
# Number of seconds to wait for SSL shutdown to complete | ||
# The default timeout mimics lingering_time | ||
DEF SSL_SHUTDOWN_TIMEOUT = 30.0 | ||
DEF SSL_READ_MAX_SIZE = 256 * 1024 | ||
cdef extern from *: | ||
''' | ||
// Number of seconds to wait for SSL handshake to complete | ||
// The default timeout matches that of Nginx. | ||
#define SSL_HANDSHAKE_TIMEOUT 60.0 | ||
|
||
// Number of seconds to wait for SSL shutdown to complete | ||
// The default timeout mimics lingering_time | ||
#define SSL_SHUTDOWN_TIMEOUT 30.0 | ||
''' | ||
|
||
const float SSL_HANDSHAKE_TIMEOUT | ||
const float SSL_SHUTDOWN_TIMEOUT |
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
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
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
Oops, something went wrong.
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.
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.
Am curious whether it would make sense to make this a Cython
enum
(or if there was some issue seen doing that)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.
Yeah, I think this is a good suggestion - it pretty much generates the same C code.
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.
Thanks Fantix! 🙏
Submitted a PR: #634