diff --git a/LICENSE b/LICENSE index be71a4b4..03b2793e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016-2019 Sky UK. https://www.sky.com/ +Copyright (c) 2016-2024 Sky UK. https://www.sky.com/ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/acurl/pyproject.toml b/acurl/pyproject.toml index 861e864e..085d2cec 100644 --- a/acurl/pyproject.toml +++ b/acurl/pyproject.toml @@ -1,2 +1,2 @@ [build-system] -requires = ["setuptools", "wheel", "Cython<3.0"] +requires = ["setuptools", "wheel", "Cython>=3.0.8,<4.0.0"] diff --git a/acurl/setup.cfg b/acurl/setup.cfg index 185cb931..1a59bf8e 100644 --- a/acurl/setup.cfg +++ b/acurl/setup.cfg @@ -8,21 +8,21 @@ classifiers = Intended Audience :: Developers Programming Language :: Python Programming Language :: Python :: 3 - Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 author = Aaron Ecay author_email = aaron.ecay@sky.uk -maintainer = Sky Identity NFT team -maintainer_email = matthew.ellis@sky.uk +maintainer = Sky Digital Identity NFT team +maintainer_email = jordan.brennan@sky.uk license = MIT url = https://github.com/sky-uk/mite/tree/master/acurl -version = 1.0.7 +version = 1.0.8 [options] install_requires = ujson>=4.1.0 - uvloop + uvloop==0.21.0b1 tests_require = pytest [aliases] diff --git a/acurl/src/acurl.pyx b/acurl/src/acurl.pyx index d06db8e5..9e415b89 100644 --- a/acurl/src/acurl.pyx +++ b/acurl/src/acurl.pyx @@ -21,7 +21,7 @@ class AcurlError(Exception): # with the python asyncio library we need to call back into python. So these # functions do take the GIL, as indicated by `with gil` in their signatures. # The performance impact of this is yet tbd. -cdef int handle_socket(CURL *easy, curl_socket_t sock, int action, void *userp, void *socketp) with gil: +cdef int handle_socket(CURL *easy, curl_socket_t sock, int action, void *userp, void *socketp) noexcept with gil: cdef CurlWrapper wrapper = userp if action == CURL_POLL_IN or action == CURL_POLL_INOUT: wrapper.loop.add_reader(sock, wrapper.curl_perform_read, wrapper, sock) @@ -30,10 +30,12 @@ cdef int handle_socket(CURL *easy, curl_socket_t sock, int action, void *userp, if action == CURL_POLL_REMOVE: wrapper.loop.remove_reader(sock) wrapper.loop.remove_writer(sock) + # The following exception is never expected to be hit. Further conversation + # regarding this can be found in the PR: https://github.com/sky-uk/mite/pull/280#discussion_r1723665976 if action != CURL_POLL_IN and action != CURL_POLL_OUT and action != CURL_POLL_INOUT and action != CURL_POLL_REMOVE: raise Exception("oops") -cdef int start_timeout(CURLM *multi, long timeout_ms, void *userp) with gil: +cdef int start_timeout(CURLM *multi, long timeout_ms, void *userp) noexcept with gil: cdef CurlWrapper wrapper = userp cdef int _running cdef double secs diff --git a/acurl/src/session.pyx b/acurl/src/session.pyx index 19a3553e..c3098c44 100644 --- a/acurl/src/session.pyx +++ b/acurl/src/session.pyx @@ -32,7 +32,7 @@ cdef BufferNode* alloc_buffer_node(size_t size, char *data): node.next = NULL return node -cdef size_t header_callback(char *ptr, size_t size, size_t nmemb, void *userdata): +cdef size_t header_callback(char *ptr, size_t size, size_t nmemb, void *userdata) noexcept: cdef _Response response = <_Response>userdata cdef BufferNode* node = alloc_buffer_node(size * nmemb, ptr) if response.header_buffer == NULL: # FIXME: unlikely @@ -42,7 +42,7 @@ cdef size_t header_callback(char *ptr, size_t size, size_t nmemb, void *userdata response.header_buffer_tail = node return node.len -cdef size_t body_callback(char *ptr, size_t size, size_t nmemb, void *userdata): +cdef size_t body_callback(char *ptr, size_t size, size_t nmemb, void *userdata) noexcept: cdef _Response response = <_Response>userdata cdef BufferNode* node = alloc_buffer_node(size * nmemb, ptr) if response.body_buffer == NULL: # FIXME: unlikely diff --git a/setup.cfg b/setup.cfg index f69e9a6a..38826998 100644 --- a/setup.cfg +++ b/setup.cfg @@ -4,14 +4,14 @@ description = A Python Performance Testing Framework long_description = file: README.md long_description_content_type = text/markdown url = https://github.com/sky-uk/mite/ -python_requires = >=3.9 +python_requires = >=3.10 classifiers = License :: OSI Approved :: MIT License Programming Language :: Python Programming Language :: Python :: 3 - Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 Operating System :: POSIX :: Linux # TODO - Update (or remove) the Selenium version when migrating to v4. The version is explicitly defined @@ -26,7 +26,8 @@ install_requires = nanomsg pyzmq selenium<4 - uvloop + setuptools + uvloop==0.21.0b1 websockets setup_requires = pytest-runner packages = find: diff --git a/test-requirements.txt b/test-requirements.txt index 2ede43b4..19999e78 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -14,4 +14,4 @@ pytest-httpbin pytest-httpserver sanic werkzeug==3.0.3 -uvloop==0.19.0 +uvloop==0.21.0b1