GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Inline _Py_RestoreSignals() from CPython by befeleme · Pull Request #604 · MagicStack/uvloop

Conversation

@befeleme

@befeleme befeleme commented Apr 30, 2024

Copy link
Copy Markdown
Contributor

private _Py_RestoreSignals() has been moved to CPython internals as of Python 3.13 See: python/cpython#106400 Its implementation has been the same in all supported by uvloop Pythons (3.8+), so the inlining was not conditionalized.

Closes #603

This allows to build uvloop with Python 3.13.0a6.

Unfortunately, one of the tests fails and I can't tell whether it's related to this or it's an incidental breakage coming from some other parts of CPython changes:

=================================== FAILURES ===================================
___________________ Test_AIO_Unix.test_create_unix_server_1 ____________________
Traceback (most recent call last):
  File "/usr/lib64/python3.13/unittest/case.py", line 58, in testPartExecutor
    yield
  File "/usr/lib64/python3.13/unittest/case.py", line 651, in run
    self._callTestMethod(testMethod)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/usr/lib64/python3.13/unittest/case.py", line 606, in _callTestMethod
    if method() is not None:
       ~~~~~~^^
  File "/builddir/build/BUILD/uvloop-0.19.0/_empty/tests/test_unix.py", line 147, in test_create_unix_server_1
    self.loop.run_until_complete(start_server())
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/asyncio/base_events.py", line 721, in run_until_complete
    return future.result()
           ~~~~~~~~~~~~~^^
  File "/builddir/build/BUILD/uvloop-0.19.0/_empty/tests/test_unix.py", line 100, in start_server
    self.assertTrue(os.path.exists(sock_name))
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/unittest/case.py", line 744, in assertTrue
    raise self.failureException(msg)
AssertionError: False is not true

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sylvainmouquet, hroncok, and edgarrmondragon reacted with thumbs up emoji
All reactions
  • 👍 3 reactions
@befeleme
Inline _Py_RestoreSignals() from CPython
118f595
private _Py_RestoreSignals() has been moved to CPython internals as of Python 3.13
See: python/cpython#106400
Its implementation has been the same in all supported by uvloop Pythons
(3.8+), so the inlining was not conditionalized.
@tacaswell

tacaswell commented Jul 3, 2024

Copy link
Copy Markdown

I can confirm that this works with the 3.13 branch of cpython + the cython default branch (if the cython pinning in setup.py is removed).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@edgarrmondragon edgarrmondragon mentioned this pull request Jul 5, 2024
Test with Python 3.13 #610
Merged
fantix
fantix approved these changes Aug 15, 2024
View reviewed changes

@fantix fantix left a comment

Copy link
Copy Markdown
Member

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.

LGTM!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@fantix
Merge branch 'master' into restore-signals
2caba9a
@fantix
fantix merged commit 8511ba1 into MagicStack:master Aug 15, 2024
fantix added a commit that referenced this pull request Aug 15, 2024
@fantix
uvloop 0.20.0
2d35f10
Changes
=======

* Upgrade libuv to v1.48.0 (#600)
  (by @niklasr22 @fantix in 7777852 for #596 #615)

Fixes
=====

* Fix test_create_server_4 with Python 3.12.5 (#614)
  (by @shadchin in 62f9239)

* Use len(os.sched_getaffinity(0)) instead of os.cpu_count() (#591)
  (by @avkarenow in c8531c2 for #591)

* Inline _Py_RestoreSignals() from CPython (#604)
  (by @befeleme in 8511ba1 for #603)
@fantix fantix mentioned this pull request Aug 15, 2024
uvloop 0.20.0 #617
Merged
@befeleme
befeleme deleted the restore-signals branch August 20, 2024 08:05
@notdaniel notdaniel mentioned this pull request Mar 28, 2025
textual-web can't be installed while depending on Python 3.12 (macOS) Textualize/textual-web#31
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@fantix fantix fantix approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

uvloop fails to build with Python 3.13.0a5: error: implicit declaration of function ‘_Py_RestoreSignals’

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@befeleme @tacaswell @fantix
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.