From 9c29a947fc9a6c0350692e09034803fa8195d1f6 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Mon, 9 Sep 2024 14:41:32 +0200 Subject: [PATCH] =?UTF-8?q?Remove=20email=20announcements;=20rename=20ansi?= =?UTF-8?q?ble-email-announcement.txt=20=E2=86=92=20ansible-forum-announce?= =?UTF-8?q?ment.md;=20remove=20mention=20of=20mailing=20lists=20from=20Ans?= =?UTF-8?q?ible=20PyPI=20page=20(#613)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Stop trying to send mails to mailing list. * Rename ansible-email-announcement.txt to ansible-forum-announcement.md. * Remove mention of mailing list from Ansible's README, make sure to mention the forum instead. --- .../fragments/613-mailing-list-removal.yml | 5 +++ src/antsibull/announcements.py | 33 +++---------------- ...ement.j2 => ansible-forum-announcement.j2} | 10 +++--- src/antsibull/data/ansible-readme.rst | 12 +++---- src/antsibull/python_metadata.py | 2 -- .../announce-7.0.0/announcements.json | 2 +- ...ment.txt => ansible-forum-announcement.md} | 0 .../announce-7.0.0b1/announcements.json | 2 +- ...ment.txt => ansible-forum-announcement.md} | 0 .../announce-7.4.0/announcements.json | 2 +- ...ment.txt => ansible-forum-announcement.md} | 0 .../test_data/package-files/7.5.0/README.rst | 12 +++---- .../test_data/package-files/8.1.0/README.rst | 12 +++---- .../force_setup_cfg/8.1.0/README.rst | 12 +++---- .../force_setup_cfg/8.1.0/setup.cfg | 1 - 15 files changed, 42 insertions(+), 63 deletions(-) create mode 100644 changelogs/fragments/613-mailing-list-removal.yml rename src/antsibull/data/{ansible-email-announcement.j2 => ansible-forum-announcement.j2} (95%) rename tests/test_data/announce-7.0.0/{ansible-email-announcement.txt => ansible-forum-announcement.md} (100%) rename tests/test_data/announce-7.0.0b1/{ansible-email-announcement.txt => ansible-forum-announcement.md} (100%) rename tests/test_data/announce-7.4.0/{ansible-email-announcement.txt => ansible-forum-announcement.md} (100%) diff --git a/changelogs/fragments/613-mailing-list-removal.yml b/changelogs/fragments/613-mailing-list-removal.yml new file mode 100644 index 00000000..356ed2ca --- /dev/null +++ b/changelogs/fragments/613-mailing-list-removal.yml @@ -0,0 +1,5 @@ +removed_features: + - "The ``announcements --send`` command no longer attempts to send mails to the mailing lists, which have been sunset + (https://github.com/ansible-community/antsibull/pull/613)." +minor_changes: + - "Remove the mention of mailing lists from the Ansible README (https://github.com/ansible-community/antsibull/pull/613)." diff --git a/src/antsibull/announcements.py b/src/antsibull/announcements.py index a3e426ac..7093831d 100644 --- a/src/antsibull/announcements.py +++ b/src/antsibull/announcements.py @@ -44,16 +44,11 @@ from _typeshed import StrOrBytesPath ANNOUNCEMENTS = { - "ansible-email-announcement.txt": "ansible-email-announcement.j2", + "ansible-forum-announcement.md": "ansible-forum-announcement.j2", "ansible-matrix-announcement.md": "ansible-matrix-announcement.j2", } SUBJECT = "Release announcement: Ansible community package {version}" SUBJECT_PRE_RELEASE = SUBJECT + " (Pre-Release)" -MAIL_RECIPIENTS = ( - "ansible-devel@googlegroups.com", - "ansible-project@googlegroups.com", - "ansible-announce@googlegroups.com", -) # pylint: disable-next=line-too-long # https://meta.discourse.org/t/create-a-link-to-start-a-new-topic-with-pre-filled-information/28074 # noqa FORUM_TAGS = ("release", "distro-packaging", "release-management") @@ -72,9 +67,9 @@ ) -def email_heading(content): +def forum_heading(content): """ - Given a string, convert it into an email heading + Given a string, convert it into an forum heading Args: content: filter content @@ -82,7 +77,7 @@ def email_heading(content): return content + "\n" + "-" * len(content) -jinja_env.filters["email_heading"] = email_heading +jinja_env.filters["forum_heading"] = forum_heading class TemplateVars(TypedDict): @@ -298,30 +293,13 @@ def forum_announcement_webbrowser( Open a pre-filled Ansible Forum post in a browser """ subject = get_subject(info) - body = get_body(directory, "ansible-email-announcement.txt") + body = get_body(directory, "ansible-forum-announcement.md") params_dict = FORUM_PARAMS | {"title": subject, "body": body} params = "?" + urlencode(params_dict, quote_via=url_quote) url = urljoin(ANSIBLE_FORUM_URL, "new-topic") + params webbrowser.open(url) -def email_announcement_webbrowser( - directory: Path, - info: AnnouncementsInfo, - ctx: SendCtx, # pylint: disable=unused-argument -) -> None: - """ - Construct a pre-filled mailto link with the appropriate subject, body, - and recipients and open it an a browser - """ - subject = get_subject(info) - body = get_body(directory, "ansible-email-announcement.txt") - params_dict: dict[str, str] = {"subject": subject, "body": body} - params = "?" + urlencode(params_dict, quote_via=url_quote) - url = "mailto:" + ",".join(MAIL_RECIPIENTS) + params - webbrowser.open(url) - - def matrix_announcement( directory: Path, info: AnnouncementsInfo, # pylint: disable=unused-argument @@ -356,7 +334,6 @@ def matrix_announcement( ACTIONS: dict[str, Callable[[Path, AnnouncementsInfo, SendCtx], None]] = { "forum": forum_announcement_webbrowser, - "email": email_announcement_webbrowser, "matrix": matrix_announcement, } diff --git a/src/antsibull/data/ansible-email-announcement.j2 b/src/antsibull/data/ansible-forum-announcement.j2 similarity index 95% rename from src/antsibull/data/ansible-email-announcement.j2 rename to src/antsibull/data/ansible-forum-announcement.j2 index 99d32c05..f044e0e2 100644 --- a/src/antsibull/data/ansible-email-announcement.j2 +++ b/src/antsibull/data/ansible-forum-announcement.j2 @@ -12,7 +12,7 @@ We're happy to announce the release of the Ansible {{ version }} package{% if is Ansible {{ version }} depends on ansible-core {{ core_version }} and includes a curated set of Ansible collections that provide a vast number of modules, plugins, and roles.{% if is_major_release and is_prerelease %} This is a pre-release of Ansible {{ major_version }}.{% elif is_major_release %} This is the first stable release of Ansible {{ major_version }}.{% elif is_prerelease %} This is a pre-release of Ansible.{% endif %} -{{ "How to get it" | email_heading }} +{{ "How to get it" | forum_heading }} This {% if is_prerelease %}pre-{% endif %}release is available on PyPI and can be installed with pip: @@ -39,7 +39,7 @@ SHA256: {{ release_wheel.sha256sum }} -{{ "Some important details" | email_heading }} +{{ "Some important details" | forum_heading }} ansible-core is a separate package on which ansible depends. `pip install ansible` installs `ansible-core`, but it can also be installed independently of the ansible package. @@ -61,7 +61,7 @@ The changelog for ansible-core {{ core_major_version }} installed by this releas https://github.com/ansible/ansible/blob/v{{ core_major_version }}/changelogs/CHANGELOG-v{{ core_major_version }}.rst -{{ ("What's the schedule for new Ansible releases after " ~ version ~ "?") | email_heading }} +{{ ("What's the schedule for new Ansible releases after " ~ version ~ "?") | forum_heading }} The next release roadmap can be found at @@ -83,13 +83,13 @@ Register here to join the Ansible Forum: https://forum.ansible.com -{{ "Porting Help" | email_heading }} +{{ "Porting Help" | forum_heading }} A unified porting guide for collections that have opted in is available here: https://docs.ansible.com/ansible/devel/porting_guides/porting_guide_{{ major_version }}.html -{{ ("Getting collection updates from Ansible " ~ major_version ~ " with older releases of ansible-core") | email_heading }} +{{ ("Getting collection updates from Ansible " ~ major_version ~ " with older releases of ansible-core") | forum_heading }} Ansible {{ major_version }} depends on ansible-core {{ core_major_version }}. Depending on your needs, you can get collection updates as they ship in the Ansible “batteries included” package while continuing to use older versions of ansible-core. diff --git a/src/antsibull/data/ansible-readme.rst b/src/antsibull/data/ansible-readme.rst index b2a32bd3..d912ec8c 100644 --- a/src/antsibull/data/ansible-readme.rst +++ b/src/antsibull/data/ansible-readme.rst @@ -3,7 +3,7 @@ SPDX-License-Identifier: GPL-3.0-or-later SPDX-FileCopyrightText: Ansible Project, 2020 -|PyPI version| |Docs badge| |Chat badge| |Code Of Conduct| |Mailing Lists| |License| +|PyPI version| |Docs badge| |Chat badge| |Code Of Conduct| |Forum| |License| ******* Ansible @@ -71,7 +71,7 @@ Get Involved ============ * Read `Community Information `_ for ways to contribute to - and interact with the project, including mailing list information and how + and interact with the project, including forum information and how to submit bug reports and code to Ansible or Ansible collections. * Join a `Working Group `_, an organized community devoted to a specific technology domain or platform. @@ -79,7 +79,7 @@ Get Involved to avoid duplicate efforts. This not only helps everyone know what is going on, but it also helps save time and effort if we decide some changes are needed. -* For a list of email lists, Matrix and IRC channels, and Working Groups, see the +* For a reference to the Forum, a list of Matrix and IRC channels, and Working Groups, see the `Communication page `_ Coding Guidelines @@ -135,9 +135,9 @@ for the full license text. .. |Code Of Conduct| image:: https://img.shields.io/badge/code%20of%20conduct-Ansible-silver.svg :target: https://docs.ansible.com/ansible/latest/community/code_of_conduct.html :alt: Ansible Code of Conduct -.. |Mailing Lists| image:: https://img.shields.io/badge/mailing%20lists-Ansible-orange.svg - :target: https://docs.ansible.com/ansible/latest/community/communication.html#mailing-list-information - :alt: Ansible mailing lists +.. |Forum| image:: https://img.shields.io/badge/forum-Ansible-orange.svg + :target: https://forum.ansible.com/ + :alt: Ansible Forum .. |License| image:: https://img.shields.io/badge/license-GPL%20v3.0-brightgreen.svg :target: COPYING :alt: Repository License diff --git a/src/antsibull/python_metadata.py b/src/antsibull/python_metadata.py index d4368d9a..6a11cf06 100644 --- a/src/antsibull/python_metadata.py +++ b/src/antsibull/python_metadata.py @@ -83,8 +83,6 @@ def _i_iter_lines(self) -> Iterator[str]: "Code of Conduct": DOCSITE_COMMUNITY_URL + "/code_of_conduct.html", "Documentation": DOCSITE_BASE_URL, "Forum": ANSIBLE_FORUM_URL, - "Mailing lists": DOCSITE_COMMUNITY_URL - + "/communication.html#mailing-list-information", } ) diff --git a/tests/test_data/announce-7.0.0/announcements.json b/tests/test_data/announce-7.0.0/announcements.json index c5c72eb7..abbb1d61 100644 --- a/tests/test_data/announce-7.0.0/announcements.json +++ b/tests/test_data/announce-7.0.0/announcements.json @@ -45,7 +45,7 @@ "is_prerelease": false }, "outputs": [ - "ansible-email-announcement.txt", + "ansible-forum-announcement.md", "ansible-matrix-announcement.md" ] } \ No newline at end of file diff --git a/tests/test_data/announce-7.0.0/ansible-email-announcement.txt b/tests/test_data/announce-7.0.0/ansible-forum-announcement.md similarity index 100% rename from tests/test_data/announce-7.0.0/ansible-email-announcement.txt rename to tests/test_data/announce-7.0.0/ansible-forum-announcement.md diff --git a/tests/test_data/announce-7.0.0b1/announcements.json b/tests/test_data/announce-7.0.0b1/announcements.json index cc85f33f..09b1f06d 100644 --- a/tests/test_data/announce-7.0.0b1/announcements.json +++ b/tests/test_data/announce-7.0.0b1/announcements.json @@ -45,7 +45,7 @@ "is_prerelease": true }, "outputs": [ - "ansible-email-announcement.txt", + "ansible-forum-announcement.md", "ansible-matrix-announcement.md" ] } \ No newline at end of file diff --git a/tests/test_data/announce-7.0.0b1/ansible-email-announcement.txt b/tests/test_data/announce-7.0.0b1/ansible-forum-announcement.md similarity index 100% rename from tests/test_data/announce-7.0.0b1/ansible-email-announcement.txt rename to tests/test_data/announce-7.0.0b1/ansible-forum-announcement.md diff --git a/tests/test_data/announce-7.4.0/announcements.json b/tests/test_data/announce-7.4.0/announcements.json index 8a36ff4c..dad2c224 100644 --- a/tests/test_data/announce-7.4.0/announcements.json +++ b/tests/test_data/announce-7.4.0/announcements.json @@ -45,7 +45,7 @@ "is_prerelease": false }, "outputs": [ - "ansible-email-announcement.txt", + "ansible-forum-announcement.md", "ansible-matrix-announcement.md" ] } \ No newline at end of file diff --git a/tests/test_data/announce-7.4.0/ansible-email-announcement.txt b/tests/test_data/announce-7.4.0/ansible-forum-announcement.md similarity index 100% rename from tests/test_data/announce-7.4.0/ansible-email-announcement.txt rename to tests/test_data/announce-7.4.0/ansible-forum-announcement.md diff --git a/tests/test_data/package-files/7.5.0/README.rst b/tests/test_data/package-files/7.5.0/README.rst index b2a32bd3..d912ec8c 100644 --- a/tests/test_data/package-files/7.5.0/README.rst +++ b/tests/test_data/package-files/7.5.0/README.rst @@ -3,7 +3,7 @@ SPDX-License-Identifier: GPL-3.0-or-later SPDX-FileCopyrightText: Ansible Project, 2020 -|PyPI version| |Docs badge| |Chat badge| |Code Of Conduct| |Mailing Lists| |License| +|PyPI version| |Docs badge| |Chat badge| |Code Of Conduct| |Forum| |License| ******* Ansible @@ -71,7 +71,7 @@ Get Involved ============ * Read `Community Information `_ for ways to contribute to - and interact with the project, including mailing list information and how + and interact with the project, including forum information and how to submit bug reports and code to Ansible or Ansible collections. * Join a `Working Group `_, an organized community devoted to a specific technology domain or platform. @@ -79,7 +79,7 @@ Get Involved to avoid duplicate efforts. This not only helps everyone know what is going on, but it also helps save time and effort if we decide some changes are needed. -* For a list of email lists, Matrix and IRC channels, and Working Groups, see the +* For a reference to the Forum, a list of Matrix and IRC channels, and Working Groups, see the `Communication page `_ Coding Guidelines @@ -135,9 +135,9 @@ for the full license text. .. |Code Of Conduct| image:: https://img.shields.io/badge/code%20of%20conduct-Ansible-silver.svg :target: https://docs.ansible.com/ansible/latest/community/code_of_conduct.html :alt: Ansible Code of Conduct -.. |Mailing Lists| image:: https://img.shields.io/badge/mailing%20lists-Ansible-orange.svg - :target: https://docs.ansible.com/ansible/latest/community/communication.html#mailing-list-information - :alt: Ansible mailing lists +.. |Forum| image:: https://img.shields.io/badge/forum-Ansible-orange.svg + :target: https://forum.ansible.com/ + :alt: Ansible Forum .. |License| image:: https://img.shields.io/badge/license-GPL%20v3.0-brightgreen.svg :target: COPYING :alt: Repository License diff --git a/tests/test_data/package-files/8.1.0/README.rst b/tests/test_data/package-files/8.1.0/README.rst index b2a32bd3..d912ec8c 100644 --- a/tests/test_data/package-files/8.1.0/README.rst +++ b/tests/test_data/package-files/8.1.0/README.rst @@ -3,7 +3,7 @@ SPDX-License-Identifier: GPL-3.0-or-later SPDX-FileCopyrightText: Ansible Project, 2020 -|PyPI version| |Docs badge| |Chat badge| |Code Of Conduct| |Mailing Lists| |License| +|PyPI version| |Docs badge| |Chat badge| |Code Of Conduct| |Forum| |License| ******* Ansible @@ -71,7 +71,7 @@ Get Involved ============ * Read `Community Information `_ for ways to contribute to - and interact with the project, including mailing list information and how + and interact with the project, including forum information and how to submit bug reports and code to Ansible or Ansible collections. * Join a `Working Group `_, an organized community devoted to a specific technology domain or platform. @@ -79,7 +79,7 @@ Get Involved to avoid duplicate efforts. This not only helps everyone know what is going on, but it also helps save time and effort if we decide some changes are needed. -* For a list of email lists, Matrix and IRC channels, and Working Groups, see the +* For a reference to the Forum, a list of Matrix and IRC channels, and Working Groups, see the `Communication page `_ Coding Guidelines @@ -135,9 +135,9 @@ for the full license text. .. |Code Of Conduct| image:: https://img.shields.io/badge/code%20of%20conduct-Ansible-silver.svg :target: https://docs.ansible.com/ansible/latest/community/code_of_conduct.html :alt: Ansible Code of Conduct -.. |Mailing Lists| image:: https://img.shields.io/badge/mailing%20lists-Ansible-orange.svg - :target: https://docs.ansible.com/ansible/latest/community/communication.html#mailing-list-information - :alt: Ansible mailing lists +.. |Forum| image:: https://img.shields.io/badge/forum-Ansible-orange.svg + :target: https://forum.ansible.com/ + :alt: Ansible Forum .. |License| image:: https://img.shields.io/badge/license-GPL%20v3.0-brightgreen.svg :target: COPYING :alt: Repository License diff --git a/tests/test_data/package-files/force_setup_cfg/8.1.0/README.rst b/tests/test_data/package-files/force_setup_cfg/8.1.0/README.rst index b2a32bd3..d912ec8c 100644 --- a/tests/test_data/package-files/force_setup_cfg/8.1.0/README.rst +++ b/tests/test_data/package-files/force_setup_cfg/8.1.0/README.rst @@ -3,7 +3,7 @@ SPDX-License-Identifier: GPL-3.0-or-later SPDX-FileCopyrightText: Ansible Project, 2020 -|PyPI version| |Docs badge| |Chat badge| |Code Of Conduct| |Mailing Lists| |License| +|PyPI version| |Docs badge| |Chat badge| |Code Of Conduct| |Forum| |License| ******* Ansible @@ -71,7 +71,7 @@ Get Involved ============ * Read `Community Information `_ for ways to contribute to - and interact with the project, including mailing list information and how + and interact with the project, including forum information and how to submit bug reports and code to Ansible or Ansible collections. * Join a `Working Group `_, an organized community devoted to a specific technology domain or platform. @@ -79,7 +79,7 @@ Get Involved to avoid duplicate efforts. This not only helps everyone know what is going on, but it also helps save time and effort if we decide some changes are needed. -* For a list of email lists, Matrix and IRC channels, and Working Groups, see the +* For a reference to the Forum, a list of Matrix and IRC channels, and Working Groups, see the `Communication page `_ Coding Guidelines @@ -135,9 +135,9 @@ for the full license text. .. |Code Of Conduct| image:: https://img.shields.io/badge/code%20of%20conduct-Ansible-silver.svg :target: https://docs.ansible.com/ansible/latest/community/code_of_conduct.html :alt: Ansible Code of Conduct -.. |Mailing Lists| image:: https://img.shields.io/badge/mailing%20lists-Ansible-orange.svg - :target: https://docs.ansible.com/ansible/latest/community/communication.html#mailing-list-information - :alt: Ansible mailing lists +.. |Forum| image:: https://img.shields.io/badge/forum-Ansible-orange.svg + :target: https://forum.ansible.com/ + :alt: Ansible Forum .. |License| image:: https://img.shields.io/badge/license-GPL%20v3.0-brightgreen.svg :target: COPYING :alt: Repository License diff --git a/tests/test_data/package-files/force_setup_cfg/8.1.0/setup.cfg b/tests/test_data/package-files/force_setup_cfg/8.1.0/setup.cfg index d1d2348d..5fa90223 100644 --- a/tests/test_data/package-files/force_setup_cfg/8.1.0/setup.cfg +++ b/tests/test_data/package-files/force_setup_cfg/8.1.0/setup.cfg @@ -28,7 +28,6 @@ project_urls = Code of Conduct = https://docs.ansible.com/ansible/latest/community/code_of_conduct.html Documentation = https://docs.ansible.com/ansible Forum = https://forum.ansible.com - Mailing lists = https://docs.ansible.com/ansible/latest/community/communication.html#mailing-list-information [options] zip_safe = False