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

New Python versions for CI #2514

Merged
merged 3 commits into from
Mar 9, 2023
Merged

New Python versions for CI #2514

merged 3 commits into from
Mar 9, 2023

Conversation

A5rocks
Copy link
Contributor

@A5rocks A5rocks commented Dec 29, 2022

Python 3.12 released, PyPy 3.9 released.

Questions:

  • PyPy 3.7 is no longer in the support window for PyPy. Should it be removed?

@codecov
Copy link

codecov bot commented Dec 29, 2022

Codecov Report

Merging #2514 (580bb0f) into master (1b50186) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2514   +/-   ##
=======================================
  Coverage   92.45%   92.45%           
=======================================
  Files         118      118           
  Lines       16351    16351           
  Branches     3156     3156           
=======================================
  Hits        15118    15118           
  Misses       1104     1104           
  Partials      129      129           

@A5rocks A5rocks marked this pull request as draft December 29, 2022 02:53
@A5rocks
Copy link
Contributor Author

A5rocks commented Dec 29, 2022

3.12 segfault is cause:

import sys

def test_reproduction():
    sys.unraisablehook = sys.__unraisablehook__

    def finalizer(j):
        raise Exception("h")

    sys.set_asyncgen_hooks(finalizer=finalizer)

    async def agen_fn():
        yield

    agen = agen_fn()
    anext(agen)

test_reproduction(**{})

I will raise an issue upstream (and maybe fix it myself)

YES. EVERY BIT OF THAT IS NECESSARY. From **{} to sys.unraisablehook = sys.__unraisablehook__. Wow am I frustrated at this.

There's another GC thing but that's minor.

@A5rocks
Copy link
Contributor Author

A5rocks commented Jan 10, 2023

The segfault was fixed in python/cpython#100613

Waiting on 3.12a4 for next look. That will be ... today.

@A5rocks
Copy link
Contributor Author

A5rocks commented Jan 11, 2023

GC is different.

import weakref
import trio
import gc

async def f():
    async with trio.open_nursery() as nursery:
        nursery.cancel_scope.cancel()

    h = weakref.ref(nursery)
    del nursery
    await trio.lowlevel.checkpoint()
    print(h(), gc.get_referrers(h()) if h() is not None else [])

trio.run(f)

Under 3.10 this prints

None []

Under 3.12a3+ this prints

<trio.Nursery object at 0x7f3f5585d4f0> [NurseryManager(strict_exception_groups=False), <cell at 0x7f3f5585d540: Nursery object at 0x7f3f5585d4f0>, <frame at 0x7f3f55e220c0, file '/workspaces/trio/trio/_core/_run.py', line 1005, code _nested_child_finished>]

I will try minimizing this more.

Bisected to python/cpython@1e197e6

Rough idea of CPython issue I should file: "Should shim frames keep strong references?"

Copy link
Contributor

@richardsheridan richardsheridan left a comment

Choose a reason for hiding this comment

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

Some requests:

  • rebase on master!
  • remove pypy nightlies, including in ci.sh
  • add pypy-3.9-dev
  • add (unsupported) pypy-3.7 to continue-on-error (we should remove entirely when cpython drops 3.7 support)

@richardsheridan
Copy link
Contributor

I thing it's great you're fixing bugs off of this but I don't think that's any reason to keep the PR as draft forever!

@A5rocks A5rocks marked this pull request as ready for review March 9, 2023 05:02
@A5rocks
Copy link
Contributor Author

A5rocks commented Mar 9, 2023

remove pypy nightlies, including in ci.sh

See #2536 maybe? (that'll have to be updated after this is merged)

add pypy-3.9-dev

See also that PR :P

add (unsupported) pypy-3.7 to continue-on-error (we should remove entirely when cpython drops 3.7 support)

Hmm... I think requiring stable PyPy 3.7 to pass while we support Python 3.7 should be fine. I removed PyPy 3.7 nightly (again, above PR) because PyPy 3.7 is no longer supported as you mention.


I hope that is all? (I added a merge commit instead of a rebase cause... idk, this should be squash merged instead of merged with commit anyways)

Copy link
Contributor

@richardsheridan richardsheridan left a comment

Choose a reason for hiding this comment

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

I was wondering the relationship between these two PRs!

@richardsheridan richardsheridan merged commit c6a075d into master Mar 9, 2023
@A5rocks A5rocks deleted the actions/python-312 branch March 9, 2023 12:43
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