deadsnakes / issues

Issues for https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa
86 stars 6 forks source link

Issue with Python 3.13-dev builds (`math.__file__` raises `AttributeError`) #287

Closed neutrinoceros closed 5 months ago

neutrinoceros commented 5 months ago

description

The following code raises an exception with Python 3.13-dev

import math
math.__file__
Traceback (most recent call last):
  File "/home/runner/work/reprod_deadsnakes_3.13b1_math_dunder_file/reprod_deadsnakes_3.13b1_math_dunder_file/test.py", line 3, in <module>
    math.__file__
AttributeError: module 'math' has no attribute '__file__'. Did you mean: '__name__'?

No exception is raised when using actions/setup-python@v5 with python-version: 3.13.0-beta.1, so I conclude this is likely a bug specific to deadsnakes.

reprod repo example failed job

os information

lsb_release -a

 No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:    22.04
Codename:   jammy

uname -a

Linux fv-az1040-730 6.5.0-1021-azure #22~22.04.1-Ubuntu SMP Tue Apr 30 16:08:18 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
asottile commented 5 months ago

python can be compiled in many ways, some of them result in math being a "builtin" module (part of the interpreter itself, "free" to import) whereas sometimes it is a separate module (through lib-dynload). in deadsnakes it is the former

neutrinoceros commented 5 months ago

Thanks for the lightning fast response Anthony 😄