Bug 1769631 - Remove 'U' from 'mode' parameters for various 'open' calls to ensure...
authorahochheiden <ahochheiden@mozilla.com>
Thu, 2 Jun 2022 06:27:44 +0000 (06:27 +0000)
committerMike Hommey <glandium@debian.org>
Tue, 17 Jan 2023 20:33:36 +0000 (20:33 +0000)
commitc7d674896bcc6450f81cb91b83d3cabb5190b9b1
tree5804fc27b959e00c374ad88b6d4266e91ba6d1e0
parent269172fe0ecd462edb5615d961d08b8f740cf07d
Bug 1769631 - Remove 'U' from 'mode' parameters for various 'open' calls to ensure Python3.11 compatibility r=firefox-build-system-reviewers,glandium

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

Differential Revision: https://phabricator.services.mozilla.com/D147721

Gbp-Pq: Topic fixes
Gbp-Pq: Name Bug-1769631-Remove-U-from-mode-parameters-for-variou.patch
dom/base/usecounters.py
python/mozbuild/mozbuild/action/process_define_files.py
python/mozbuild/mozbuild/backend/base.py
python/mozbuild/mozbuild/preprocessor.py
python/mozbuild/mozbuild/util.py
python/mozbuild/mozpack/files.py