Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch Python 3.11 to stable release in CI #790

Merged
merged 4 commits into from
Dec 3, 2022

Conversation

altendky
Copy link
Contributor

What do these changes do?

Just tidying the now-released CPython 3.11 pyver entry.

Are there changes in behavior for the user?

No.

Related issue number

Adjacent to #781.

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Nov 28, 2022
@altendky altendky mentioned this pull request Nov 28, 2022
1 task
@@ -0,0 +1 @@

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An empty change note is probably not the best idea. Either fill it out or I'll apply a label for the bot to just ignore it. I'm actually not sure what Towncrier would do with an empty fragment...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can certainly remove it, but it is a normal option with towncrier. That way it's all 'in the system' rather than you having to add external tooling to sometimes ignore the check via a GitHub PR label as it sounds like you have. I'd link to the twisted contributing docs but... the link I found is 404.

You don't appear to be configuring custom sections in the changelog.

https://github.com/aio-libs/yarl/blob/68e7d9312ad9eccb695dbc174a4705e9a238c1fa/pyproject.toml

[tool.towncrier]
package = "yarl"
filename = "CHANGES.rst"
directory = "CHANGES/"
title_format = "{version} ({project_date})"
issue_format = "`#{issue} <https://github.com/aio-libs/yarl/issues/{issue}>`_"

So you would be using the defaults where, as I recall, misc has showcontent set to false.

https://towncrier.readthedocs.io/en/stable/configuration.html?highlight=showcontent#custom-fragment-types

showcontent: Whether if the fragment contents should be included in the news file. If omitted, it defaults to true

So, you get just a list of the issue/pr/file numbers as at https://github.com/aio-libs/yarl/blob/68e7d9312ad9eccb695dbc174a4705e9a238c1fa/CHANGES.rst#misc-1. Note that if you follow those, their content isn't empty, just ignored. https://github.com/aio-libs/yarl/pull/647/files#diff-3c671c897bfbc0b283bbb224c8784fda9364a40d0233748d2606c6b78faa0394

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fun, so GitHub let me edit the 'empty' file that actually had 'two lines' and delete one and commit it and it still seems to be the same file unchanged... But, you've got a linter complaining about it so I'll go ahead and delete it since that seems to be process here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not to be pounding on this... but I got the doc link so may as well finalize the references here.

https://docs.twisted.org/en/latest/development/dev-process.html#release-notes-management

misc - Issues which are very minor and not worth summarizing outside of the git changelog. These should be empty (their contents will be ignored)

And the PR fixing the doc link is an example of an empty misc fragment.

https://github.com/twisted/twisted/pull/11777/files

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW I've been considering showing that content at some point. Too many people misuse these fragments and put really useful stuff there. And it's hard to catch for humans during reviews.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's all in your intent in the setup. Nice and configurable.

To make fragments a bit more reviewable, at least in terms of viewing them rendered in case there's any markup errors, I added a step to dump the draft output to the GitHub workflow summary.

https://github.com/Chia-Network/chia-blockchain/pull/13882/files#diff-b1b82537432942b954fa8846c9e80709d0d919428ed1e1692d7c0bc4bc8271ecR112-R114

    - name: Create single version changlog summary
      run: |
        towncrier build --yes --draft >> $GITHUB_STEP_SUMMARY

(not sure what the --yes is doing there...)

Sample output from this at https://github.com/Chia-Network/chia-blockchain/actions/runs/3445535929#summary-9436412167.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@altendky yea, I actually often make the integration with both Sphinx (via by extension @ https://github.com/sphinx-contrib/sphinxcontrib-towncrier — can error out in nitpicky mode) and GH job summary (requires pandoc for RST->md). See:

@codecov
Copy link

codecov bot commented Nov 29, 2022

Codecov Report

Merging #790 (f0690d5) into master (68e7d93) will not change coverage.
The diff coverage is n/a.

❗ Current head f0690d5 differs from pull request most recent head a3e54a2. Consider uploading reports for the commit a3e54a2 to get more accurate results

@@           Coverage Diff           @@
##           master     #790   +/-   ##
=======================================
  Coverage   99.73%   99.73%           
=======================================
  Files           4        4           
  Lines         750      750           
  Branches      212      208    -4     
=======================================
  Hits          748      748           
  Misses          2        2           
Flag Coverage Δ
unit 99.60% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@altendky
Copy link
Contributor Author

Side note, what do the ~ etc do anyways? I didn't see it mentioned at https://github.com/actions/setup-python/tree/b80efd6bc5dcdc82c015d69ecd3e39320d0095e6. To get pre- or full releases, I use the monstrosity at https://github.com/pytest-dev/pytest-twisted/blob/56991132000791cf89283ac5aa033f3469c63e35/.github/workflows/ci.yml#L154-L167 and we have that in a wrapper action we use at work.

@webknjaz webknjaz added bot:chronographer:skip This PR does not need to include a change note enhancement and removed bot:chronographer:provided There is a change note present in this PR labels Nov 29, 2022
@webknjaz
Copy link
Member

webknjaz commented Dec 3, 2022

@altendky

~3.11.0-0 corresponds to 3.11.0-alpha - 3.11.0 — pre-releases up to and including the first stable release of the range. My understanding is that it comes from the nodejs community since all of the official actions are written in JS and they've sorta adopted the corresponding versioning schemes.

The tilda variant has been suggested by the GitHub stuff on the issue tracker of setup-python at some point, among the issues requesting things like 3.11 to behave the same. I've argued that it weird to force such scheme upon Pythonistas because it's foreign to us.
I think that there's a PR making 3.11 turn into "stable 3.11 with a fallback to 3.11-dev". I'm not watching that repo closely at the moment so I can't find the links quickly.

@webknjaz webknjaz changed the title pyver: 3.11, no caveats Switch Python 3.11 to stable release in CI Dec 3, 2022
@webknjaz webknjaz merged commit 874dd38 into aio-libs:master Dec 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:skip This PR does not need to include a change note enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants