Skip to content

Commit

Permalink
Remove email announcements; rename ansible-email-announcement.txt → a…
Browse files Browse the repository at this point in the history
…nsible-forum-announcement.md; remove mention of mailing lists from Ansible PyPI page (#613)

* 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.
  • Loading branch information
felixfontein authored Sep 9, 2024
1 parent f44e8c8 commit 9c29a94
Show file tree
Hide file tree
Showing 15 changed files with 42 additions and 63 deletions.
5 changes: 5 additions & 0 deletions changelogs/fragments/613-mailing-list-removal.yml
Original file line number Diff line number Diff line change
@@ -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)."
33 changes: 5 additions & 28 deletions src/antsibull/announcements.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
"[email protected]",
"[email protected]",
"[email protected]",
)
# 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")
Expand All @@ -72,17 +67,17 @@
)


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
"""
return content + "\n" + "-" * len(content)


jinja_env.filters["email_heading"] = email_heading
jinja_env.filters["forum_heading"] = forum_heading


class TemplateVars(TypedDict):
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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.

Expand All @@ -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

Expand All @@ -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.

Expand Down
12 changes: 6 additions & 6 deletions src/antsibull/data/ansible-readme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -71,15 +71,15 @@ Get Involved
============

* Read `Community Information <https://docs.ansible.com/ansible/latest/community>`_ 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 <https://github.com/ansible/community/wiki>`_, an organized community
devoted to a specific technology domain or platform.
* Talk to us before making larger changes
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 <https://docs.ansible.com/ansible/latest/community/communication.html>`_

Coding Guidelines
Expand Down Expand Up @@ -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
2 changes: 0 additions & 2 deletions src/antsibull/python_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_data/announce-7.0.0/announcements.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"is_prerelease": false
},
"outputs": [
"ansible-email-announcement.txt",
"ansible-forum-announcement.md",
"ansible-matrix-announcement.md"
]
}
2 changes: 1 addition & 1 deletion tests/test_data/announce-7.0.0b1/announcements.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"is_prerelease": true
},
"outputs": [
"ansible-email-announcement.txt",
"ansible-forum-announcement.md",
"ansible-matrix-announcement.md"
]
}
2 changes: 1 addition & 1 deletion tests/test_data/announce-7.4.0/announcements.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"is_prerelease": false
},
"outputs": [
"ansible-email-announcement.txt",
"ansible-forum-announcement.md",
"ansible-matrix-announcement.md"
]
}
12 changes: 6 additions & 6 deletions tests/test_data/package-files/7.5.0/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -71,15 +71,15 @@ Get Involved
============

* Read `Community Information <https://docs.ansible.com/ansible/latest/community>`_ 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 <https://github.com/ansible/community/wiki>`_, an organized community
devoted to a specific technology domain or platform.
* Talk to us before making larger changes
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 <https://docs.ansible.com/ansible/latest/community/communication.html>`_

Coding Guidelines
Expand Down Expand Up @@ -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
12 changes: 6 additions & 6 deletions tests/test_data/package-files/8.1.0/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -71,15 +71,15 @@ Get Involved
============

* Read `Community Information <https://docs.ansible.com/ansible/latest/community>`_ 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 <https://github.com/ansible/community/wiki>`_, an organized community
devoted to a specific technology domain or platform.
* Talk to us before making larger changes
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 <https://docs.ansible.com/ansible/latest/community/communication.html>`_

Coding Guidelines
Expand Down Expand Up @@ -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
12 changes: 6 additions & 6 deletions tests/test_data/package-files/force_setup_cfg/8.1.0/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -71,15 +71,15 @@ Get Involved
============

* Read `Community Information <https://docs.ansible.com/ansible/latest/community>`_ 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 <https://github.com/ansible/community/wiki>`_, an organized community
devoted to a specific technology domain or platform.
* Talk to us before making larger changes
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 <https://docs.ansible.com/ansible/latest/community/communication.html>`_

Coding Guidelines
Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9c29a94

Please sign in to comment.