Skip to content

Conversation

Carreau
Copy link
Member

@Carreau Carreau commented Oct 8, 2025

No description provided.

@Carreau
Copy link
Member Author

Carreau commented Oct 8, 2025

@minrk I see you recently removed and readded Python 3.8, would you be or to drop 3.8, and bump version number of 6.0 ?

@Carreau
Copy link
Member Author

Carreau commented Oct 8, 2025

And I don't know what to do with the fialures, asyncio.set_event_loop_policy is anyway deprecated and will be removed in 3.16.

@minrk
Copy link
Member

minrk commented Oct 8, 2025

That was to get a security fix out without changing supported Python versions, fine to drop 3.8 and 3.9 now.

@Carreau
Copy link
Member Author

Carreau commented Oct 8, 2025

Am I crazy? Mypy complains about (simplified):

import sys

def unreach() -> str:
    if sys.platform == "darwin":
        return "OSX"
    elif sys.platform == "win32":
        return "windows"
    # ok if in an else black
    return "other" # foo.py:10: error: Statement is unreachable  [unreachable]

But if I put an else, ruff complains for unnecessary else...

@minrk
Copy link
Member

minrk commented Oct 8, 2025

Blarg, yeah, mypy's obviously wrong. I don't have a lot of patience for incorrect type checkers, so liberally ignoring their failures is okay with me.

For ruff, I think it's because there's a return you don't need elif you can use plain if:

if a:
    return a
if b: # don't need elif because of return a
    return b
ruff check --fix

would resolve that, I think

@minrk
Copy link
Member

minrk commented Oct 8, 2025

For the event loop policy, we could consider just removing it. pyzmq now works with proactor if tornado is available (via an additional thread), so if we require tornado 6.1, all should be okay (if less efficient than selector).

We could also just ignore the deprecation warning. The code will still work (i.e. it will do nothing) after policies are removed, because they are protected by a check for an ImportError.

I'm still incredibly frustrated that asyncio folks decided proactor was ready to be the default when it still lacks basic functionality of all other loops that needs to be worked around with threads.

@Carreau
Copy link
Member Author

Carreau commented Oct 8, 2025

Rhaa mypy bug seem to be known.

@minrk
Copy link
Member

minrk commented Oct 8, 2025

my inclination: suppress the deprecation warning for now, then we can propose a new way to do it without policies (I think an init_ioloop that instantiates a loop directly will work) in its own PR.

@minrk minrk changed the title start to test on 3.14 and 3.14-free-threaded require python 3.10, start to test on 3.14 and 3.14-free-threaded Oct 8, 2025
@Carreau
Copy link
Member Author

Carreau commented Oct 8, 2025

I think I'll be in favor of ignoring the warnings only python 3.14, and revisit for 3.15

This starts testing on 3.14 and and 3.14t as 3.14
introduce some eventloop policy deprecation we are
not ready to deal with, we ignore warnings only on
Python 3.14

Some tornado tests are failing on all windows platform,
we skip those.
This include updating some repo, renaming some hooks,
and run them to fix the corresponding files.
@Carreau
Copy link
Member Author

Carreau commented Oct 11, 2025

All passing, and please don't squash I properly cleaned-up each commit.

@Carreau
Copy link
Member Author

Carreau commented Oct 11, 2025

Current version is 5.8.1, once this is merged, I suggest we bump version, and release soon. I'll suggest 2 new possible version numbers in two separate comments. Please upvote your peference.

@Carreau
Copy link
Member Author

Carreau commented Oct 11, 2025

5.9, nothing specific but did drop 3.10 (and 3.9) and there was no release since 3.9 drops.

@Carreau
Copy link
Member Author

Carreau commented Oct 11, 2025

6.0, this will let us do some cleanups in particular this deprecation warning:

else:
    deprecation(
        "Jupyter is migrating its paths to use standard platformdirs\n"
        "given by the platformdirs library.  To remove this warning and\n"
        "see the appropriate new directories, set the environment variable\n"
        "`JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`.\n"
        "The use of platformdirs will be the default in `jupyter_core` v6"
    )

EDIT: version published Nov 9 2022

@Carreau
Copy link
Member Author

Carreau commented Oct 11, 2025

We can also do 5.9, and do 6.0 in a month or so with all the cleanup we want.

@Carreau Carreau merged commit 924cb3b into jupyter:main Oct 13, 2025
34 checks passed
@minrk minrk deleted the 314ft branch October 13, 2025 21:31
@minrk
Copy link
Member

minrk commented Oct 13, 2025

I think we can do 5.9 with these changes, I don't have a problem with dropping Python versions on minor releases, the tooling handles that well enough.

I haven't pulled the trigger on completing the platformdirs change because I think it's not complete enough - #309 I don't think we should start the deprecation clock until we have had migration in place for quite some time, which we still don't. At this point, I agree with @ivanov that we should remove the deprecation warning and stop telling people the default is going to change.

@minrk
Copy link
Member

minrk commented Oct 13, 2025

#447 removes the deprecation warning

@Carreau
Copy link
Member Author

Carreau commented Oct 14, 2025

Thanks !

@minrk
Copy link
Member

minrk commented Oct 15, 2025

with warnings.catch_warnings():
warnings.filterwarnings(
"ignore",
DeprecationWarning,
Copy link
Contributor

@Darshan808 Darshan808 Oct 16, 2025

Choose a reason for hiding this comment

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

Suggested change
DeprecationWarning,
category=DeprecationWarning,

This is causing TypeError in downstream package jupyterlab_server when testing on Python 3.14 on Windows.
CC: @Carreau

Copy link
Contributor

Choose a reason for hiding this comment

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

Opened #449

@Carreau
Copy link
Member Author

Carreau commented Oct 16, 2025

5.9 is already out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants