Skip to content

Incompatibility with Python 3.14 #1043

Closed

Description

@ilovelinux

Tested with httpcore==1.0.9

Python 3.14.0rc3 (main, Sep 18 2025, 19:47:22) [Clang 20.1.4 ] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import httpcore
Traceback (most recent call last):
  File "<python-input-0>", line 1, in <module>
    import httpcore
  File "/lib/python3.14/site-packages/httpcore/__init__.py", line 140, in <module>
    setattr(__locals[__name], "__module__", "httpcore")  # noqa
    ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'typing.Union' object has no attribute '__module__' and no __dict__ for setting new attributes. Did you mean: '__reduce__'?
>>> 

Activity

  1. cclauss commented on Oct 7, 2025

    @cclauss
    Contributor
  2. GalaxySnail commented on Oct 8, 2025

    @GalaxySnail
  3. ilovelinux commented on Oct 8, 2025

    @ilovelinux
    Author

    Apparently my environment was using an older version of httpcore (1.0.7).

    In fact this issue has already been fixed with #1005, released in v1.0.8.

    I can confirm it works with Python 3.14rc3.

    Duplicate of #995

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions