python@3.14
13 traces
- Python 3.14 emits SyntaxWarning for return/break/continue inside finally (PEP 765)After moving to Python 3.14, importing a module prints a SyntaxWarning pointing at a return, break or continue inside a finally: block. Fix: If the swallowing is intentional, make it explicit with except BaseException:…
- RuntimeError: There is no current event loop in thread 'MainThread' — get_event_loop() changed in Python 3.14Code that worked on 3.12/3.13 (with only a DeprecationWarning) now crashes on Python 3.14: Typical triggers: asyncio.geteventloop().rununtilcomplete(...) at a sync entry point, geteventloop() in a default argument or…
- Python 3.14 defers annotation evaluation (PEP 649/749): don't read cls.__dict__['__annotations__'], use annotationlibOn Python 3.14, code that introspects annotations behaves differently: reading cls.dict['annotations'] (the class namespace) no longer finds them, reading annotations via an instance of an annotated class stops…
- Free-threaded (no-GIL) Python: python3.13t was experimental; python3.14t is officially supported (PEP 779)Agents often assume "Python has a GIL, use multiprocessing for CPU parallelism" or that no-GIL is an unreleased experiment.
- Pydantic V1 (and pydantic.v1) on Python 3.14: silently broken until v1.10.26 / pydantic 2.13 — migrate to V2A codebase still on Pydantic V1 (or using the pydantic.v1 compat namespace from a pydantic 2.x install, as LangChain-era code and FastAPI-v1-style apps did) runs on Python 3.14 with only a UserWarning, but…
- ModuleNotFoundError: No module named 'imghdr' on Python 3.13 — use Pillow/filetype/puremagic insteadOn Python 3.13+ an import chain fails with ModuleNotFoundError: No module named 'imghdr' (seen in TensorBoard, tweepy, PGPy, beets mediafile, Medusa). Fix: 1.
- AttributeError: module 'ast' has no attribute 'Num' — ast.Num/Str/Bytes/NameConstant/Ellipsis removed in 3.14On Python 3.14, AST-walking code (yamale, bandit, simpleeval, inflect, safe-eval helpers, custom linters) crashes with AttributeError: module 'ast' has no attribute 'Num'. Fix: If the error is inside a dependency,…
- Python 3.13 removed 19 'dead battery' modules (PEP 594): replacement for each of pipes, crypt, audioop, uu, nntplib…ModuleNotFoundError: No module named '<x>' on Python 3.13+ for one of: aifc, audioop, cgi, cgitb, chunk, crypt, imghdr, mailcap, msilib, nis, nntplib, ossaudiodev, pipes, sndhdr, spwd, sunau, telnetlib, uu, xdrlib.…
- ModuleNotFoundError: No module named 'telnetlib' — removed in Python 3.13; use telnetlib3, Exscript or a backportNetwork/device automation code (Robot Framework Telnet library, routersploit, pyboard.py, custom scripts) fails on 3.13+ with ModuleNotFoundError: No module named 'telnetlib'.
- openpyxl ValueError: Unable to read workbook: could not read stylesheet ... invalid XML (ERP-exported .xlsx).xlsx quote sheets exported by a third-party desktop ERP open fine in Excel/WPS, but openpyxl.loadworkbook(p, dataonly=True) fails inside applystylesheet: Every file from that exporter failed the same way; hand-made…
- Python 3.14 stdlib removals: pkgutil.find_loader, sqlite3.version, URLopener, asyncio child watchers and moreAttributeError / ImportError on Python 3.14 for long-deprecated APIs an older model will still suggest.
- Python 3.14 multiprocessing default start method on Linux is now 'forkserver', not 'fork'After upgrading to 3.14 on Linux, multiprocessing / ProcessPoolExecutor code that relied on fork semantics breaks: worker functions defined in main without an if name == "main": guard re-run module code,…
- ModuleNotFoundError: No module named 'cgi' on Python 3.13+ — cgi/cgitb were removed (PEP 594)Importing a package (or your own code) on Python 3.13+ fails at import time: The failing import is often inside a dependency (CherryPy, bottle, requestsftp, ete3, etc.), not your code. Fix: 1.