Skip to content
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

Acurl use Cython 3.0.8 #280

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft

Acurl use Cython 3.0.8 #280

wants to merge 7 commits into from

Conversation

ryanlinnit-sky
Copy link
Contributor

What is the change?

Add compatibility for Cython version greater than 3.

Does this change require a version increment:

This is only a version increment for acurl, done in the acurl/setup.cfg file. Not mite itself.

  • Major
  • Minor
  • Patch

acurl/src/acurl.pyx Show resolved Hide resolved
@@ -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:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OTOH, this function (and the one below it in this file) really can't raise, and so are valid noexcept candidates with no explanation needed.

setup.cfg Show resolved Hide resolved
acurl/setup.cfg Outdated Show resolved Hide resolved
acurl/pyproject.toml Outdated Show resolved Hide resolved
@ryanlinnit-sky ryanlinnit-sky marked this pull request as ready for review September 5, 2024 12:41
Copy link
Collaborator

@aecay aecay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall the change looks great. just one question (well, a series of them...) about some dependency pinning details.

@@ -26,7 +26,8 @@ install_requires =
nanomsg
pyzmq
selenium<4
uvloop
setuptools
uvloop==0.21.0b1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, do we know why we are pinning to a specific version, especially a beta one? what are the conditions in the future under which we could remove the pin?

@@ -14,4 +14,4 @@ pytest-httpbin
pytest-httpserver
sanic
werkzeug==3.0.3
uvloop==0.19.0
uvloop==0.21.0b1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eek -- the test should not be pinned to a different version than the main code, so it's good to change this (tho no pinning would be ideal).

it's been a while since i looked at this code, but IIRC, the tests install everything from setup.cfg as well as everything from the test-requirements.txt. so given that uvloop is already required by setup.cfg, we could delete it from here and avoid any future iterations of the different-pinning problem. WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was getting errors due to it not the version of uvloop required for Cython 3. (This commit). Which is why I pinned it to version 0.21.0b1. I'll put this PR back in drafts whilst I fix them etc.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahhh, uvloop doesn't have a stable release for cython3 yet. that explains it. do we want to wait for upstream to cut a stable release? that should avoid us needing to do any pinning. if we don't want to wait, we can just stick a comment in explaining the situation, and Someone™ can remove the comment and the pin in the future....

@ryanlinnit-sky ryanlinnit-sky marked this pull request as draft September 19, 2024 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants