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 — asyncio.events.BaseDefaultEventLoopPolicy gone from Python 3.14 without prior deprecation · Issue #131148 · python/cpython

asyncio.events.BaseDefaultEventLoopPolicy gone from Python 3.14 without prior deprecation #131148

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
asyncio.events.BaseDefaultEventLoopPolicy gone from Python 3.14 without prior deprecation#131148
Copy link
Labels
3.14bugs and security fixesbugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-asynciotype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@hroncok
hroncok
opened on Mar 12, 2025
Issue body actions

Bug report

Bug description:

from asyncio.events import BaseDefaultEventLoopPolicy

This is from https://github.com/MagicStack/uvloop/blob/7bb12a174884b2ec8b3162a08564e5fb8a5c6b39/uvloop/__init__.py#L6 cc @fantix

On Python 3.13, this works.
On Python 3.14 since #128216 this no longer works and raises ImportError. As far as I know, the class was not deprecated in 3.13 or 3.12.

>>> from asyncio.events import BaseDefaultEventLoopPolicy
Traceback (most recent call last):
  File "<python-input-0>", line 1, in <module>
    from asyncio.events import BaseDefaultEventLoopPolicy
ImportError: cannot import name 'BaseDefaultEventLoopPolicy' from 'asyncio.events' (/usr/lib64/python3.14/asyncio/events.py)

The commit message of #128216 does not mention any API removals at all. It has no NEWS either, so I assume this removal was accidental.

CPython versions tested on:

3.14, CPython main branch

Operating systems tested on:

Linux

Activity

  1. hroncok
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Mar 12, 2025
  2. hroncok
    added a commit that references this issue on Mar 12, 2025

    Workaround missing BaseDefaultEventLoopPolicy in Python 3.14

    9e6c20a
  3. picnixz commented on Mar 12, 2025

    @picnixz
    picnixz
    on Mar 12, 2025
    Member
    More actions

    I'm not sure this was meant to actually be publicly exposed. Policies were deprecated since 3.12 and asyncio.events.BaseDefaultEventLoopPolicy has probably not been intended to be public (I can't find it documented anywhere). cc @kumaraditya303

    Note that it's not really gone, just that it has been now named as really "private" (but maybe it should have been kept half-public?)

  4. picnixz
    added
    topic-asyncio
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    3.14bugs and security fixesbugs and security fixes
    on Mar 12, 2025
  5. github-project-automation
    added this to asyncioon Mar 12, 2025
  6. github-project-automation
    moved this to Todo in asyncioon Mar 12, 2025
  7. hroncok commented on Mar 12, 2025

    @hroncok
    hroncok
    on Mar 12, 2025
    ContributorAuthor
    More actions

    As a workaround, from asyncio.events import _BaseDefaultEventLoopPolicy currently works, indeed.

    I realize this was probably never meant to be a public API. It just kinda was.

  8. kumaraditya303 commented on Mar 12, 2025

    @kumaraditya303
    kumaraditya303
    on Mar 12, 2025
    Contributor
    More actions

    BaseDefaultEventLoopPolicy is an undocumented and private class of a private submodule of asyncio. Only the stuff exposed from toplevel asyncio and that is documented is considered public.

    uvloop should change its code to not use private class and instead use abstract policy class.

  9. picnixz commented on Mar 12, 2025

    @picnixz
    picnixz
    on Mar 12, 2025
    Member
    More actions

    I realize this was probably never meant to bea public API. It just kinda was.

    Yes, it's something we had a lot in Sphinx where we named private objects with public names and didn't document them / export them, making them implicitly private, but not everyone assumes this kind of convention, which then makes refactoring usually breaking.

    As for whether the lack of a changelog entry, it has been added afterwards (#128269 and #128290)

  10. kumaraditya303 commented on Mar 28, 2025

    @kumaraditya303
    kumaraditya303
    on Mar 28, 2025
    Contributor
    More actions

    Closing as it is wont-fix

  11. kumaraditya303
    closed this as not plannedon Mar 28, 2025
  12. github-project-automation
    moved this from Todo to Done in asyncioon Mar 28, 2025
  13. musicinmybrain
    added 2 commits that reference this issue on Jun 27, 2025

    Fix test_loop_auto for Python 3.14

    6a02026

    Fix test_loop_auto for Python 3.14

    d522a10
  14. fantix
    added 2 commits that reference this issue on Sep 14, 2025

    Workaround missing BaseDefaultEventLoopPolicy in Python 3.14

    74e109e

    CPython 3.14-3.16 compat

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.14bugs and security fixesbugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-asynciotype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    • asyncio
      Status
      Done
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    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.