From 3f4bad2e41dbad87c65c42c4e720f5e6e4ec054c Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Tue, 21 Jun 2022 14:06:02 +0200 Subject: [PATCH 01/14] Mention org owners in the new triager template (#463) The action can only be performed by organization owners, so they should be mentioned when this issue is opened. --- .github/ISSUE_TEMPLATE/triage_membership.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/triage_membership.md b/.github/ISSUE_TEMPLATE/triage_membership.md index c712c1c..b930554 100644 --- a/.github/ISSUE_TEMPLATE/triage_membership.md +++ b/.github/ISSUE_TEMPLATE/triage_membership.md @@ -13,6 +13,7 @@ More details: https://devguide.python.org/triaging.html#becoming-a-member-of-the --> # Request for Python Triage membership +@python/organization-owners, please add a new triager: @@ -21,3 +22,4 @@ More details: https://devguide.python.org/triaging.html#becoming-a-member-of-the | GitHub username | @bedevere-bot | | bpo username | bedevere | | Additional info | e.g. _"already a bpo triager"_, _"I've made 1 million PRs"_, _"recommended by @miss-islington"_| | + From 8ef33e47723cd64d253186854986b55fb3f28a3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Noord?= <13665637+DanielNoord@users.noreply.github.com> Date: Wed, 13 Jul 2022 03:00:00 +0200 Subject: [PATCH 02/14] Change CLA bot link from ``the-knights-who-say-ni`` to ``ambv/cla-bot`` (#469) * Remove ``the-knights-who-say-ni`` from list of tools in README * Update to new location * Update README.rst * Update README.rst --- README.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 3b6f056..bc087d3 100644 --- a/README.rst +++ b/README.rst @@ -38,8 +38,8 @@ Other core workflow tools pull requests. `python/miss-islington`_ A bot for backporting `GitHub `__ -`python/the-knights-who-say-ni`_ CLA enforcement bot for `GitHub `__ +`ambv/cla-bot`_ CLA enforcement bot for `Łukasz Langa`_ + Python organization projects. `berkerpeksag/cpython-emailer-webhook`_ A webhook to send every `GitHub `__ @@ -51,10 +51,11 @@ Other core workflow tools .. _`python/blurb_it`: https://github.com/python/blurb_it .. _`python/cherry-picker`: https://github.com/python/cherry-picker .. _`python/miss-islington`: https://github.com/python/miss-islington -.. _`python/the-knights-who-say-ni`: https://github.com/python/the-knights-who-say-ni +.. _`ambv/cla-bot`: https://github.com/ambv/cla-bot .. _`berkerpeksag/cpython-emailer-webhook`: https://github.com/berkerpeksag/cpython-emailer-webhook .. _`Brett Cannon`: https://github.com/brettcannon .. _`Berker Peksag`: https://github.com/berkerpeksag +.. _`Łukasz Langa`: https://github.com/ambv .. _`Mariatta`: https://github.com/mariatta From eac97e4cf5a4d73d80beeb779e889f8b93d074c9 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Fri, 15 Jul 2022 00:29:46 +0200 Subject: [PATCH 03/14] Replace `gh-issue-NNNN:` with `gh-NNNN:` in the output (#451) --- blurb/blurb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blurb/blurb.py b/blurb/blurb.py index 5e2d5e1..19bf854 100755 --- a/blurb/blurb.py +++ b/blurb/blurb.py @@ -1113,7 +1113,7 @@ def print(*a, sep=" "): if metadata.get("gh-issue"): issue_number = metadata['gh-issue'] if int(issue_number): - body = "gh-issue-" + issue_number + ": " + body + body = "gh-" + issue_number + ": " + body elif metadata.get("bpo"): issue_number = metadata['bpo'] if int(issue_number): From 02cf2794831585874b3cefecb874b2d4368949d6 Mon Sep 17 00:00:00 2001 From: Oleg Iarygin Date: Sun, 7 Aug 2022 03:24:04 +0300 Subject: [PATCH 04/14] Remove `blurb split`; after 3.2 NEWS is generated from next/*, not vice versa (#440) * Remove processing of the long gone Misc/NEWS file * Return `merge` back as it's used for Windows distributions * Partially revert documentation * Minor formatting issues --- blurb/blurb.py | 391 +------------------------------------------------ 1 file changed, 3 insertions(+), 388 deletions(-) diff --git a/blurb/blurb.py b/blurb/blurb.py index 19bf854..20f11df 100755 --- a/blurb/blurb.py +++ b/blurb/blurb.py @@ -79,7 +79,7 @@ # # Uncomment one of these "section:" lines to specify which section -# this entry should go in in Misc/NEWS. +# this entry should go in in Misc/NEWS.d. # #.. section: Security #.. section: Core and Builtins @@ -93,7 +93,7 @@ #.. section: Tools/Demos #.. section: C API -# Write your Misc/NEWS entry below. It should be a simple ReST paragraph. +# Write your Misc/NEWS.d entry below. It should be a simple ReST paragraph. # Don't start with "- Issue #: " or "- gh-issue-: " or that sort of stuff. ########################################################################### @@ -890,7 +890,7 @@ def find_editor(): @subcommand def add(): """ -Add a blurb (a Misc/NEWS entry) to the current CPython repo. +Add a blurb (a Misc/NEWS.d/next entry) to the current CPython repo. """ editor = find_editor() @@ -1208,391 +1208,6 @@ def export(): # print(f"arg: boolean {boolean} option {option}") -@subcommand -def split(*, released=False): - """ -Split the current Misc/NEWS into a zillion little blurb files. - -Assumes that the newest version section in Misc/NEWS is under -development, and splits those entries into the "next" subdirectory. -If the current version has actually been released, use the ---released flag. - -Also runs "blurb populate" for you. - """ - - # note: populate also does chdir $python_root/Misc for you - populate() - - if not os.path.isfile("NEWS"): - error("You don't have a Misc/NEWS file!") - - def global_sections(): - global sections - return sections - - sections = set(global_sections()) - release_date_marker = "Release date:" - whats_new_marker = "What's New in Python " - - blurbs = Blurbs() - - accumulator = [] - issue_number = "0" - serial_number = 9999 - version = None - release_date = None - section = None - see_also = None - no_changes = None - security = None - blurb_count = 0 - version_count = 0 - - - def flush_blurb(): - nonlocal accumulator - nonlocal serial_number - nonlocal issue_number - nonlocal release_date - nonlocal see_also - nonlocal no_changes - nonlocal blurb_count - nonlocal security - - if accumulator: - if version: - # strip trailing blank lines - while accumulator: - line = accumulator.pop() - if not line.rstrip(): - continue - accumulator.append(line) - break - if see_also: - fields = [] - see_also = see_also.replace(" and ", ",") - for field in see_also.split(","): - field = field.strip() - if not field: - continue - if field.startswith("and "): - field = field[5:].lstrip() - if field.lower().startswith("issue"): - field = field[5:].strip() - if field.startswith("#"): - field = field[1:] - try: - int(field) - field = "gh-issue" + field - except ValueError: - pass - fields.append(field) - see_also = ", ".join(fields) - # print("see_also: ", repr(see_also)) - accumulator.append(f"(See also: {see_also})") - see_also = None - if not accumulator: - return - if not (section or no_changes): - error("No section for line " + str(line_number) + "!") - - body = "\n".join(accumulator) + "\n" - metadata = {} - metadata["gh-issue"] = issue_number - metadata["date"] = str(serial_number) - if section: - metadata["section"] = section - else: - assert no_changes - metadata["nonce"] = nonceify(body) - if security: - # retroactively change section to "Security" - assert section - metadata["original section"] = metadata["section"] - metadata["section"] = "Security" - - if release_date is not None: - assert not len(blurbs) - metadata["release date"] = release_date - release_date = None - if no_changes is not None: - assert not len(blurbs) - metadata["no changes"] = "True" - no_changes = None - blurbs.append((metadata, body)) - blurb_count += 1 - - issue_number = "0" - serial_number -= 1 - accumulator.clear() - - def flush_version(): - global git_add_files - nonlocal released - nonlocal version_count - - flush_blurb() - if version is None: - assert not blurbs, "version should only be None initially, we shouldn't have blurbs yet" - return - assert blurbs, f"No blurbs defined when flushing version {version}!" - output = f"NEWS.d/{version}.rst" - - if released: - # saving merged blurb file for version, e.g. Misc/NEWS.d/3.7.0a1.rst - blurbs.save(output) - git_add_files.append(output) - else: - # saving a million old-school blurb next files - # with serial numbers instead of dates - # e.g. Misc/NEWS.d/next/IDLE/094.gh-issue-25514.882pXa.rst - filenames = blurbs.save_split_next() - git_add_files.extend(filenames) - released = True - blurbs.clear() - version_count += 1 - - with open("NEWS", encoding="utf-8") as file: - for line_number, line in enumerate(file): - line = line.rstrip() - - if line.startswith("\ufeff"): - line = line[1:] - - # clean the slightly dirty data: - # 1. inconsistent names for sections, etc - for old, new in ( - ("C-API", "C API"), - ("Core and builtins", "Core and Builtins"), - ("Tools", "Tools/Demos"), - ("Tools / Demos", "Tools/Demos"), - ("Misc", "Windows"), # only used twice, both were really Windows - ("Mac", "macOS"), - ("Mac OS X", "macOS"), - ("Extension Modules", "Library"), - ("Whats' New in Python 2.7.6?", "What's New in Python 2.7.6?"), - ): - if line == old: - line = new - # 2. unusual indenting - _line = line.lstrip() - if _line.startswith(("- Issue #", "- gh-issue-")): - line = _line - if _line == ".characters() and ignorableWhitespace() methods. Original patch by Sebastian": - line = " " + line - # 3. fix version for What's New - if line.startswith(whats_new_marker): - flush_version() - version = line[len(whats_new_marker):].strip().lower() - for old, new in ( - ("?", ""), - (" alpha ", "a"), - (" beta ", "b"), - (" release candidate ", "rc"), - (" final", ""), - ("3.5a", "3.5.0a"), - ): - version = version.replace(old, new) - section = None - continue - # 3.a. fix specific precious little snowflakes - # who can't be bothered to follow our stifling style conventions - # and like, did their own *thing*, man. - if line.startswith("- Issue #27181 remove statistics.geometric_mean"): - line = line.replace(" remove", ": remove") - elif line.startswith("* bpo-30357: test_thread: setUp()"): - line = line.replace("* bpo-30357", "- bpo-30357") - elif line.startswith("- Issue #25262. Added support for BINBYTES8"): - line = line.replace("#25262.", "#25262:") - elif line.startswith("- Issue #21032. Fixed socket leak if"): - line = line.replace("#21032.", "#21032:") - elif line.startswith("- Issue ##665194: Update "): - line = line.replace("##665194", "#665194") - elif line.startswith("- Issue #13449 sched.scheduler.run()"): - line = line.replace("#13449 sched", "#13449: sched") - elif line.startswith("- Issue #8684 sched.scheduler class"): - line = line.replace("#8684 sched", "#8684: sched") - elif line.startswith(" bpo-29243: Prevent unnecessary rebuilding"): - line = line.replace(" bpo-29243:", "- bpo-29243:") - elif line.startswith(( - "- Issue #11603 (again): Setting", - "- Issue #15801 (again): With string", - )): - line = line.replace(" (again):", ":") - elif line.startswith("- Issue #1665206 (partially): "): - line = line.replace(" (partially):", ":") - elif line.startswith("- Issue #2885 (partial): The"): - line = line.replace(" (partial):", ":") - elif line.startswith("- Issue #2885 (partial): The"): - line = line.replace(" (partial):", ":") - elif line.startswith("- Issue #1797 (partial fix):"): - line = line.replace(" (partial fix):", ":") - elif line.startswith("- Issue #5828 (Invalid behavior of unicode.lower): Fixed bogus logic in"): - line = line.replace(" (Invalid behavior of unicode.lower):", ":") - elif line.startswith("- Issue #4512 (part 2): Promote ``ZipImporter._get_filename()`` to be a public"): - line = line.replace(" (part 2):", ":") - elif line.startswith("- Revert bpo-26293 for zipfile breakage. See also bpo-29094."): - line = "- bpo-26293, bpo-29094: Change resulted because of zipfile breakage." - elif line.startswith("- Revert a37cc3d926ec (Issue #5322)."): - line = "- Issue #5322: Revert a37cc3d926ec." - elif line.startswith("- Patch #1970 by Antoine Pitrou: Speedup unicode whitespace and"): - line = "- Issue #1970: Speedup unicode whitespace and" - elif line.startswith(" linebreak detection"): - line = " linebreak detection. (Patch by Antoine Pitrou.)" - elif line.startswith("- Patch #1182394 from Shane Holloway: speed up HMAC.hexdigest."): - line = "- Issue #1182394: Speed up ``HMAC.hexdigest``. (Patch by Shane Holloway.)" - elif line.startswith("- Variant of patch #697613: don't exit the interpreter on a SystemExit"): - line = "- Issue #697613: Don't exit the interpreter on a SystemExit" - elif line.startswith("- Bugs #1668596/#1720897: distutils now copies data files even if"): - line = "- Issue #1668596, #1720897: distutils now copies data files even if" - elif line.startswith("- Reverted patch #1504333 to sgmllib because it introduced an infinite"): - line = "- Issue #1504333: Reverted change to sgmllib because it introduced an infinite" - elif line.startswith("- PEP 465 and Issue #21176: Add the '@' operator for matrix multiplication."): - line = "- Issue #21176: PEP 465: Add the '@' operator for matrix multiplication." - elif line.startswith("- Issue: #15138: base64.urlsafe_{en,de}code() are now 3-4x faster."): - line = "- Issue #15138: base64.urlsafe_{en,de}code() are now 3-4x faster." - elif line.startswith("- Issue #9516: Issue #9516: avoid errors in sysconfig when MACOSX_DEPLOYMENT_TARGET"): - line = "- Issue #9516 and Issue #9516: avoid errors in sysconfig when MACOSX_DEPLOYMENT_TARGET" - elif line.title().startswith(("- Request #", "- Bug #", "- Patch #", "- Patches #")): - # print(f"FIXING LINE {line_number}: {line!r}") - line = "- Issue #" + line.partition('#')[2] - # print(f"FIXED LINE {line_number}: {line!r}") - # else: - # print(f"NOT FIXING LINE {line_number}: {line!r}") - - - # 4. determine the actual content of the line - - # 4.1 section declaration - if line in sections: - flush_blurb() - section = line - continue - - # 4.2 heading ReST marker - if line.startswith(( - "===", - "---", - "---", - "+++", - "Python News", - "**(For information about older versions, consult the HISTORY file.)**", - )): - continue - - # 4.3 version release date declaration - if line.startswith(release_date_marker) or ( - line.startswith("*") and release_date_marker in line): - while line.startswith("*"): - line = line[1:] - while line.endswith("*"): - line = line[:-1] - release_date = line[len(release_date_marker):].strip() - continue - - # 4.4 no changes declaration - if line.strip() in ( - '- No changes since release candidate 2', - 'No changes from release candidate 2.', - 'There were no code changes between 3.5.3rc1 and 3.5.3 final.', - 'There were no changes between 3.4.6rc1 and 3.4.6 final.', - ): - no_changes = True - if line.startswith("- "): - line = line[2:] - accumulator.append(line) - continue - - # 4.5 start of new blurb - if line.startswith("- "): - flush_blurb() - line = line[2:] - security = line.startswith("[Security]") - if security: - line = line[10:].lstrip() - - if line.startswith("Issue"): - line = line[5:].lstrip() - if line.startswith("s"): - line = line[1:] - line = line.lstrip() - if line.startswith("#"): - line = line[1:].lstrip() - parse_issue = True - elif line.startswith("gh-issue"): - line = line[8:] - parse_issue = True - else: - # print(f"[[{line_number:8} no gh]] {line}") - parse_issue = False - if parse_issue: - # GAAAH - if line == "17500, and https://github.com/python/pythondotorg/issues/945: Remove": - line = "Remove" - issue = "17500" - see_also = "https://github.com/python/pythondotorg/issues/945" - else: - issue, colon, line = line.partition(":") - line = line.lstrip() - issue, comma, see_also = issue.partition(",") - if comma: - see_also = see_also.strip() - # if it's just an integer, add gh-issue to the front - try: - int(see_also) - see_also = "gh-issue-" + see_also - except ValueError: - pass - else: - # - Issue #21529 (CVE-2014-4616) - issue, space_paren, see_also = issue.partition(" (") - if space_paren: - see_also = see_also.rstrip(")") - else: - # - Issue #19544 and Issue #1180: - issue, space_and, see_also = issue.partition(" and ") - if not space_and: - issue, space_and, see_also = issue.partition(" & ") - if space_and: - see_also = see_also.replace("Issue #", "gh-issue-").strip() - else: - # - Issue #5258/#10642: if site.py - issue, slash, see_also = issue.partition("/") - if space_and: - see_also = see_also.replace("#", "gh-").strip() - try: - int(issue) # this will throw if it's not a legal int - except ValueError: - sys.exit(f"Couldn't convert issue number to int on line {line_number}! {issue!r}") - if see_also == "partially": - sys.exit(f"What the hell on line {line_number}! {issue!r}") - - # 4.6.1 continuation of blurb - elif line.startswith(" "): - line = line[2:] - # 4.6.2 continuation of blurb - elif line.startswith(" * "): - line = line[3:] - elif line: - sys.exit(f"Didn't recognize line {line_number}! {line!r}") - # only add blank lines if we have an initial line in the accumulator - if line or accumulator: - accumulator.append(line) - - flush_version() - - assert git_add_files - flush_git_add_files() - git_rm_files.append("NEWS") - flush_git_rm_files() - - print(f"Wrote {blurb_count} news items across {version_count} versions.") - print() - print("Ready for commit.") - - - def main(): global original_dir From 30971033da7e8f95a0c91fac21134fcfff1e7a3d Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Thu, 27 Oct 2022 17:37:39 +0300 Subject: [PATCH 05/14] Update GitHub Actions (#433) --- .github/workflows/tests.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 19f62eb..98f0cf1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,12 +1,6 @@ name: Tests -on: - push: - branches: - - master - pull_request: - branches: - - master +on: [push, pull_request, workflow_dispatch] jobs: build_ubuntu: @@ -17,13 +11,16 @@ jobs: - '3.8' - '3.9' - '3.10' + - '3.11' name: ${{ matrix.python }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} + cache: pip + cache-dependency-path: ".github/workflows/tests.yml" - name: setup run: | python --version From 7e2939a65bd52df060b502bc2fdebd3380029431 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Wed, 23 Nov 2022 20:44:28 +0100 Subject: [PATCH 06/14] Update Python versions in the CI workflow. (#478) Co-authored-by: Alex Waygood --- .github/workflows/tests.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 98f0cf1..cbb8cd2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,19 +6,14 @@ jobs: build_ubuntu: strategy: matrix: - python: - - '3.7' - - '3.8' - - '3.9' - - '3.10' - - '3.11' - name: ${{ matrix.python }} + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12-dev"] + name: ${{ matrix.python-version }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python }} + python-version: ${{ matrix.python-version }} cache: pip cache-dependency-path: ".github/workflows/tests.yml" - name: setup From 1c3dc77f2089aafd4a4f49b33bef7e2035d5157e Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Fri, 30 Dec 2022 13:53:52 +0900 Subject: [PATCH 07/14] Use UTF-8 to open README (#484) --- blurb/blurb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blurb/blurb.py b/blurb/blurb.py index 20f11df..e7e2c2c 100755 --- a/blurb/blurb.py +++ b/blurb/blurb.py @@ -724,7 +724,7 @@ def chdir_to_repo_root(): def test_first_line(filename, test): if not os.path.exists(filename): return False - with open(filename) as file: + with open(filename, encoding="utf-8") as file: lines = file.read().split('\n') if not (lines and test(lines[0])): return False From b3f3021ed18e5deb6a4158245aae19f38a8b3f76 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Wed, 4 Jan 2023 18:47:48 +0300 Subject: [PATCH 08/14] No such thing as "bpo triager" anymore (#487) --- .github/ISSUE_TEMPLATE/triage_membership.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/triage_membership.md b/.github/ISSUE_TEMPLATE/triage_membership.md index b930554..d5dedec 100644 --- a/.github/ISSUE_TEMPLATE/triage_membership.md +++ b/.github/ISSUE_TEMPLATE/triage_membership.md @@ -21,5 +21,5 @@ More details: https://devguide.python.org/triaging.html#becoming-a-member-of-the | --- | -------------------------- | | GitHub username | @bedevere-bot | | bpo username | bedevere | -| Additional info | e.g. _"already a bpo triager"_, _"I've made 1 million PRs"_, _"recommended by @miss-islington"_| | +| Additional info | e.g. _"I've made 1 million PRs"_, _"I like helping review and triage other people's issues and PRs"_, _"recommended by @miss-islington"_| | From 9c5a959eef46d4a3e9c06d55c59eea580cfc6e26 Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Thu, 5 Jan 2023 23:19:58 -0800 Subject: [PATCH 09/14] Fix typo in blurb issue template (#488) --- .github/ISSUE_TEMPLATE/blurb.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/blurb.md b/.github/ISSUE_TEMPLATE/blurb.md index 8305195..c1f5372 100644 --- a/.github/ISSUE_TEMPLATE/blurb.md +++ b/.github/ISSUE_TEMPLATE/blurb.md @@ -6,7 +6,7 @@ about: Feature request or bug related to blurb (command line tool) From 8eb8d104863832a2d15ee24d4aaad27c0fdbd731 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 23 Jan 2023 19:55:07 +0200 Subject: [PATCH 10/14] Update fields for triage membership template (#491) * Update template fields * Remove outdated sentence --- .github/ISSUE_TEMPLATE/triage_membership.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/triage_membership.md b/.github/ISSUE_TEMPLATE/triage_membership.md index d5dedec..68a30d3 100644 --- a/.github/ISSUE_TEMPLATE/triage_membership.md +++ b/.github/ISSUE_TEMPLATE/triage_membership.md @@ -1,14 +1,12 @@ --- name: Python Triage Membership about: Request by a core dev for someone to join the Python Triage team +title: "Request for Python triage membership: name" --- @@ -20,6 +18,5 @@ More details: https://devguide.python.org/triaging.html#becoming-a-member-of-the | | Description | | --- | -------------------------- | | GitHub username | @bedevere-bot | -| bpo username | bedevere | | Additional info | e.g. _"I've made 1 million PRs"_, _"I like helping review and triage other people's issues and PRs"_, _"recommended by @miss-islington"_| | From a3d461f5f9a7d182793bdd5cac538dd0caac4f6d Mon Sep 17 00:00:00 2001 From: Oleg Iarygin Date: Sun, 5 Mar 2023 21:20:15 +0400 Subject: [PATCH 11/14] Loosen README check for CPython forks (#473) * Loosen README check for CPython forks * Update blurb/blurb.py Co-authored-by: Ezio Melotti * Update blurb/blurb.py Co-authored-by: C.A.M. Gerlach --------- Co-authored-by: Ezio Melotti Co-authored-by: C.A.M. Gerlach --- blurb/blurb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blurb/blurb.py b/blurb/blurb.py index e7e2c2c..51f1087 100755 --- a/blurb/blurb.py +++ b/blurb/blurb.py @@ -701,7 +701,7 @@ def run(s): return process.stdout.decode('ascii') -readme_re = re.compile(r"This is Python version [23]\.\d").match +readme_re = re.compile(r"This is \w+ version \d+\.\d+").match def chdir_to_repo_root(): global root From 6cf98b737d75f05034c95e15e18ec16776077544 Mon Sep 17 00:00:00 2001 From: Sam Ken <100836531+samkenxstream@users.noreply.github.com> Date: Thu, 23 Mar 2023 06:59:10 +0800 Subject: [PATCH 12/14] Create SECURITY.md --- SECURITY.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..034e848 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,21 @@ +# Security Policy + +## Supported Versions + +Use this section to tell people about which versions of your project are +currently being supported with security updates. + +| Version | Supported | +| ------- | ------------------ | +| 5.1.x | :white_check_mark: | +| 5.0.x | :x: | +| 4.0.x | :white_check_mark: | +| < 4.0 | :x: | + +## Reporting a Vulnerability + +Use this section to tell people how to report a vulnerability. + +Tell them where to go, how often they can expect to get an update on a +reported vulnerability, what to expect if the vulnerability is accepted or +declined, etc. From 2ab4425d65cfb04df8d936829020d1683d73073a Mon Sep 17 00:00:00 2001 From: Sam Ken <100836531+samkenxstream@users.noreply.github.com> Date: Thu, 23 Mar 2023 06:59:39 +0800 Subject: [PATCH 13/14] Create .github/workflows/deploy.yml --- .github/workflows/deploy.yml | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..7875d92 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,40 @@ +name: deploy +on: + push: + branches: + - deploy-staging + - deploy-production + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set staging variables + run: | + echo "ENVIRONMENT_URL=https://your_service.npm.red" >> $GITHUB_ENV + echo "DEPLOYMENT_CONFIDENCE_URL=${{ secrets.DATADOG_STAGING_DEPLOYMENT_DASHBOARD_URL }}" >> $GITHUB_ENV + if: github.ref == 'refs/heads/deploy-staging' + + - name: Set production variables + run: | + echo "ENVIRONMENT_URL=https://your_service.internal.npmjs.com" >> $GITHUB_ENV + echo "DEPLOYMENT_CONFIDENCE_URL=${{ secrets.DATADOG_PRODUCTION_DEPLOYMENT_DASHBOARD_URL }}" >> $GITHUB_ENV + if: github.ref == 'refs/heads/deploy-production' + + - name: create a deployment + uses: npm/action-deploy@v2 + with: + type: create + token: ${{github.token}} + logs: https://github.slack.com/archives/C02UYAZ5P # npm-deploys channel + environment_url: ${{env.ENVIRONMENT_URL}} + deployment_confidence_url: ${{env.DEPLOYMENT_CONFIDENCE_URL}} + job_status: ${{job.status}} # keep that to track status of the current job, when deployment is completed + slack_token: ${{secrets.NPM_ROBOT_SLACK_TOKEN}} + slack_channel: npm-ops + + # change to actual deployment steps + - name: placeholder for actual deployment + run: sleep 10s From ecf3e9886d663b4490404073b3409118a1921069 Mon Sep 17 00:00:00 2001 From: Sam Ken <100836531+samkenxstream@users.noreply.github.com> Date: Sun, 16 Apr 2023 04:59:15 +0800 Subject: [PATCH 14/14] Create python-publish.yml --- .github/workflows/python-publish.yml | 39 ++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/python-publish.yml diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..bdaab28 --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,39 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Upload Python Package + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }}