Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
waahm7 committed Sep 19, 2024
1 parent e94ed91 commit c5ff663
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,10 +403,10 @@ def awscrt_ext():
else:
extra_link_args += ['-Wl,--fatal-warnings']

if sys.version_info >= (3,13):
if sys.version_info >= (3, 13):
define_macros.append(('Py_LIMITED_API', '0x030D0000'))
py_limited_api = True
elif sys.version_info >= (3,11):
elif sys.version_info >= (3, 11):
define_macros.append(('Py_LIMITED_API', '0x030B0000'))
py_limited_api = True

Expand Down
6 changes: 3 additions & 3 deletions source/http_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,10 @@ static void s_on_stream_complete(struct aws_http_stream *native_stream, int erro

/* DECREF python self, we don't need to force it to stay alive any longer. */
PyObject *self = Py_None;
#if PY_VERSION_HEX >= 0x030D0000 /* Check if Python version is 3.13 or higher */
int result_getref = PyWeakref_GetRef(stream->self_proxy, &self);/* strong reference */
#if PY_VERSION_HEX >= 0x030D0000 /* Check if Python version is 3.13 or higher */
int result_getref = PyWeakref_GetRef(stream->self_proxy, &self); /* strong reference */
/* Ignore error, stream is already complete */
(void) result_getref;
(void)result_getref;
#else
/* PyWeakref_GetObject is deprecated since python 3.13 */
self = PyWeakref_GetObject(stream->self_proxy); /* borrowed reference */
Expand Down

0 comments on commit c5ff663

Please sign in to comment.