The last use of importing the whole __builtin__ module was removed in
bug 1264831... 7 years ago.
Now that it actually doesn't work anymore with recent releases of
cpython, we might as well kill it for good.
Differential Revision: https://phabricator.services.mozilla.com/D182140
In python 3.11 (maybe also 3.10, I haven't tested that version ; 3.9 was
definitely different), by the time the context manager comes back in our
assertRaisesFromLine, the traceback is not available anymore (or yet,
I'm not entirely sure which way it does) to inspect and check the line
numbers we want to check.
And while assertRaises exposes the thrown exception in its `exception`
attribute, it also resets the traceback associated with it, so we can't
find it there either.
So instead, we implement our own context manager for
assertRaisesFromLine such that we can access that traceback.
Differential Revision: https://phabricator.services.mozilla.com/D181425
Python 3.10 added some more arguments to the CodeTypes constructor. It
also changed co_lnotab to co_linetables.
We were using co_lnotab to simulate a function with a def at a specific
line and a raise at a specific other line. I'm not sure how I ended up
with this particular requirement (this may have been related to python 2
still being used back then), but as of now, it doesn't seem we need the
def to be at a specific location, so we can avoid needing to generate
a co_linetables/co_lnotab, relying instead on the raise expression being
on the co_firstlineno+1 in the thrower function.
As for the extra arguments, it turns out python 3.8 also introduced a
CodeType.replace method that can be used to derive a CodeType object
from another, which is certainly simpler than calling its construtor
with the right set of arguments.
Differential Revision: https://phabricator.services.mozilla.com/D181424
distutils is no longer available in Python 3.12, which means we cannot
require it on bootstrap, otherwise we cannot bootstrap from Py 3.12.
We already require setuptools as part of mach's requirements, so it's
fine to depend on setuptools elsewhere.
Original Revision: https://phabricator.services.mozilla.com/D190537
Differential Revision: https://phabricator.services.mozilla.com/D200113
prewarming the AVDs was done for CI, where AVDs are used only once in
each task using them, and the cost of first use is high. Prewarming
reduces that overhead.
However, the ARM AVD is not used on CI (anymore?), so we don't need
them prewarmed. This unblocks the situation wrt the failure to run
the emulator on CI, while not addressing the underlying issues, so that
CoT keys can be rotated without waiting for the full situation to be
resolved.
Differential Revision: https://phabricator.services.mozilla.com/D195820
This moves the creation of both rlbox.wasm.c and rlbox.wasm.h to
pre-compile, which allows static-analysis to create both files (but more
importantly the .h) without also compiling rlbox.wasm.c, which takes
forever.
Differential Revision: https://phabricator.services.mozilla.com/D180173
If `use_sysroot` is false (see libwebrtc/build/config/sysroot.gni. true if
Google's server has sysroot image), webrtc will causes build error since
`rtc_use_pipewire` is false. But since `rtc_use_x11_extensions` is true,
we should include some dirs/files in source files.
So I add more MOZ_X11 condition for `rtc_use_x11_extensions`.
Differential Revision: https://phabricator.services.mozilla.com/D176752
When an element is re-translated, the textContent is currently dropped.
To avoid that, make it an explicit part of the message.
This requires changing the l10n message ID.
Ideally, the message ID wouldn't change, but that is not possible until
the content can be preserved as a feature, i.e.
https://github.com/projectfluent/fluent.js/issues/169
Differential Revision: https://phabricator.services.mozilla.com/D179323
When an element is re-translated, the textContent is currently dropped.
To avoid that, make it an explicit part of the message.
This requires changing the l10n message ID.
Ideally, the message ID wouldn't change, but that is not possible until
the content can be preserved as a feature, i.e.
https://github.com/projectfluent/fluent.js/issues/169
Differential Revision: https://phabricator.services.mozilla.com/D179323
We have less constraints on the minimum supported clang-cl version, and
it would unlock C++17 inline variables (which had a bug on Windows
targets in clang up-to 8.x).
Differential Revision: https://phabricator.services.mozilla.com/D179037
Its implementation in python3 is just wrapping pprint.pprint, and
there's only one use.
The python2 implementation is obviously dead code.
Differential Revision: https://phabricator.services.mozilla.com/D179179
As this is the only string in `services/`, let's simplify by moving it under `toolkit/` and removing `services/sync/locales/` as empty.
On advice from markh, the ON_NEW_DEVICE_ID notification is delayed during device registration & updates until the update has been written to storage.
Differential Revision: https://phabricator.services.mozilla.com/D178805
The l10n migration shows a diff for `addon-downloading-and-verifying`,
`addon-confirm-install-message`, and `addon-confirm-install-unsigned-message`
due to the en-US source having `1` rather than `one` variants.
For `addon-confirm-install-some-unsigned-message`,
the en-US source has a single-variant plural selector for localization to new languages.
In addition to moving strings from `browser.properties` to the new `addonNotifications.ftl`,
there's some shuffling of strings to & from `browser.ftl` as well.
The intent is to collect the more rarely used strings out of files loaded during startup,
especially as many of the notification strings need to be formatted in a sync context.
For the most part, string keys are left roughly the same as they were in .properties.
With some guidance, some rationalisation might make sense as a part of this for the
rather wide selection of prefixes in this set:
- `addon-`
- `site-permission-install-`
- `webext-`
- `xpinstall-`
The `addon-install-started` and `addon-install-failed` notifications appear to need sync l10n formatting,
as using async format calls before their `PopupNotifications.show()` leads to test failures in
`toolkit/mozapps/extensions/test/xpinstall/browser_doorhanger_installs.js`.
Differential Revision: https://phabricator.services.mozilla.com/D178235
This changes the arguments of `ExtensionData.formatPermissionStrings()`.
The second `bundle` arg is dropped, and a `localization` option is added.
Call sites in m-c are updated, but this will also need a matching update for Thunderbird.
A few Thunderbird test cases will also need to be updated,
as they currently point to a non-existing localization file paths
"messenger/addons.ftl" and "messenger/addonPermissions.ftl".
As discussed at the addon workweek,
the Fluent l10n keys for extension permissions match the pattern:
webext-perms-description-{name}
where `{name}` is the permission's sanitized name.
A fluent-lint exception is added for the capitalization of these generated names.
To allow for message updates and subsequent l10n identifier updates,
a `PERMISSION_L10N_ID_OVERRIDES` map is provided.
Because Fluent localization keys are not enumerable
and attempting to format a missing key is an error,
the `PERMISSIONS_WITH_MESSAGE` set must be kept in sync with message updates.
Differential Revision: https://phabricator.services.mozilla.com/D158663