Bug 1718878 Comment 9 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

I'm pulling this off the `good-first-bug` list to earmark this for an onboarding build engineer (Hi! 👋)

As documented in [Python 3.9 for the `collections` module](https://docs.python.org/3.9/library/collections.html#module-collections):

> Deprecated since version 3.3, will be removed in version 3.10: Moved [Collections Abstract Base Classes](https://docs.python.org/3.9/library/collections.abc.html#collections-abstract-base-classes) to the `collections.abc` module. For backwards compatibility, they continue to be visible in this module through Python 3.9.

Python 3.10 is being released in a few weeks, but there's [quite a few places where we are incorrectly still using `collections` instead of `collections.abc`](https://searchfox.org/mozilla-central/search?q=%28import%7Cfrom%29+collections%5Cs&path=&case=false&regexp=true).

What you'll need to do is:
* For each of the [`collections` imports](https://searchfox.org/mozilla-central/search?q=%28import%7Cfrom%29+collections%5Cs&path=&case=false&regexp=true), check if it's importing a [Collection Abstract Base Class](https://docs.python.org/3.9/library/collections.abc.html#collections-abstract-base-classes). If yes, modify it accordingly.
    * For example, `Iterable` should be from `collections.abc`, but `defaultdict` must still be imported from `collections`.
* Don't modify code that's either in the "Third-party code" section on Searchfox, or within `testing/web-platform/tests` (which is also essentially third-party code).
I'm pulling this off the `good-first-bug` list to earmark this for an onboarding build engineer (Hi! 👋)

As documented in [Python 3.9 for the `collections` module](https://docs.python.org/3.9/library/collections.html#module-collections):

> Deprecated since version 3.3, will be removed in version 3.10: Moved [Collections Abstract Base Classes](https://docs.python.org/3.9/library/collections.abc.html#collections-abstract-base-classes) to the `collections.abc` module. For backwards compatibility, they continue to be visible in this module through Python 3.9.

Python 3.10 is being released in a few weeks, but there's [quite a few places where we are incorrectly still using `collections` instead of `collections.abc`](https://searchfox.org/mozilla-central/search?q=%28from+collections%5Cs%29%7C%28import+collections%29&path=&case=false&regexp=true).

What you'll need to do is:
* For each of the [`collections` imports](https://searchfox.org/mozilla-central/search?q=%28from+collections%5Cs%29%7C%28import+collections%29&path=&case=false&regexp=true), check if it's importing a [Collection Abstract Base Class](https://docs.python.org/3.9/library/collections.abc.html#collections-abstract-base-classes). If yes, modify it accordingly.
    * For example, `Iterable` should be from `collections.abc`, but `defaultdict` must still be imported from `collections`.
* Don't modify code that's either in the "Third-party code" section on Searchfox, or within `testing/web-platform/tests` (which is also essentially third-party code).

Back to Bug 1718878 Comment 9