You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Undocumented behavior change in pickle: PicklingError raised earlier for local objects in Python 3.14 #139806
pickle has changed from raising an AttributeError to PicklingError for functions containing locals in their reduced path. This change is not reflected in the what's new in 3.14 for pickle.
The Python implementation already raised PicklingError in this example. #122311 unified and improved pickle errors. You can find it in the full changelog, but I think that this change is not significant to be added in What's New.
Considering it's part of the full changelog, I also believe it's fine not to document it in What's New. As a user, I would actually expect PicklingError instead of AttributeError. However, we could add it in "Porting to Python 3.14" as it appears users were catching those exceptions. The docs say are quite vague though, saying that we can many different exception types during unpickling but not during pickling (omission? deliberate?)
Activity
StanFromIreland commentedon Oct 8, 2025
Seems like a result of b2a8c38, cc @serhiy-storchaka
serhiy-storchaka commentedon Oct 8, 2025
The Python implementation already raised PicklingError in this example. #122311 unified and improved pickle errors. You can find it in the full changelog, but I think that this change is not significant to be added in What's New.
picnixz commentedon Oct 9, 2025
Considering it's part of the full changelog, I also believe it's fine not to document it in What's New. As a user, I would actually expect PicklingError instead of AttributeError. However, we could add it in "Porting to Python 3.14" as it appears users were catching those exceptions. The docs say are quite vague though, saying that we can many different exception types during unpickling but not during pickling (omission? deliberate?)
gh-139806: Mention pickle error changes in What's New in 3.14 (GH-154020
[3.15] gh-139806: Mention pickle error changes in What's New in 3.14 (G…
[3.14] gh-139806: Mention pickle error changes in What's New in 3.14 (G…
Fix test_gather_object assertion for Python 3.14 PicklingError (#192811)
Fix test_gather_object assertion for Python 3.14 PicklingError (pytor…
Fix test_gather_object assertion for Python 3.14 PicklingError (pytor…