Page MenuHomePhabricator

Bug 1769631 - Remove 'U' from 'mode' parameters for various 'open' calls to ensure Python3.11 compatibility r?#build
ClosedPublic

Authored by ahochheiden on May 31 2022, 7:52 AM.
Referenced Files
Unknown Object (File)
Mon, Oct 13, 12:19 PM
Unknown Object (File)
Sun, Oct 12, 6:25 PM
Unknown Object (File)
Jun 15 2025, 2:30 AM
Unknown Object (File)
May 2 2025, 2:06 AM
Unknown Object (File)
Apr 3 2025, 4:46 PM
Unknown Object (File)
Mar 15 2025, 7:51 AM
Unknown Object (File)
Jan 1 2025, 1:37 PM
Unknown Object (File)
Oct 17 2024, 10:22 AM
Subscribers
None

Details

Summary

The 'U' flag represents "universal newline". It has been deprecated
since Python3.3. Since then "universal newline" is the default when a
file is opened in text mode (not bytes). In Python3.11 using the 'U'
flag throws errors. There should be no harm in removing 'U' from 'open'
everywhere it is used, and doing allows the use of Python3.11.

For more reading see: https://docs.python.org/3.11/whatsnew/3.11.html#changes-in-the-python-api

Diff Detail

Event Timeline

phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: secure-revision.
This revision is now accepted and ready to land.Jun 1 2022, 8:53 AM

This revision requires a Testing Policy Project Tag to be set before landing. Please apply one of testing-approved, testing-exception-unchanged, testing-exception-ui, testing-exception-elsewhere, testing-exception-other. Tip: this Firefox add-on makes it easy!