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)
commit3028d0c53b941d56696e98c819a7da4941f8eaa0
treeb63bacb6938fb7294e1f0116f6aca8728a6db023
parenteb950454c871e5488d3e65236a84979b9ea8cd93
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