setup-python icon indicating copy to clipboard operation
setup-python copied to clipboard

Offer Python Latest (nightly master trunk build)

Open cooperlees opened this issue 6 years ago • 12 comments

One of the features I love most about TravisCI is the ability to build my projects CI with top of Trunk Python (master branch). This allows me to know about deprecations etc. coming very early and have time to work on the fixes sooner.

Can actions look at supporting building a Trunk version nightly? Here is an example usage with Travis: https://github.com/facebookincubator/ptr/blob/master/.travis.yml#L16

Haven't dug in deep, but would also love to have the ability for this build to be able to fail and not flag CI failure, like the Travis config above does.

Thanks.

cooperlees avatar Oct 23 '19 23:10 cooperlees

cf. https://docs.travis-ci.com/user/languages/python/#nightly-build-support

and https://docs.travis-ci.com/user/languages/python/#development-releases-support

hugovk avatar Nov 05 '19 20:11 hugovk

@madhurig any news?

isidentical avatar Jan 09 '20 14:01 isidentical

I would not call this Python Latest but would instead call it Python Nightly.

cclauss avatar Jan 10 '20 08:01 cclauss

Is this a duplicate of https://github.com/actions/setup-python/issues/20?

It has a workaround to use deadsnakes: https://github.com/actions/setup-python/issues/20#issuecomment-596221879.

hugovk avatar Mar 15 '20 10:03 hugovk

there's now a slightly better workaround using deadsnakes/action

asottile avatar Jun 22 '20 16:06 asottile

This should really be offered "natively" by setup-python.

DeepSpace2 avatar Jul 16 '20 18:07 DeepSpace2

Agreed, having 3.12-alpha available would be a big win. Especially since xapian fails to build and a number of other deprecated features like cgi are removed IIRC in 3.12 and they need testing.

rouilj avatar Oct 10 '22 15:10 rouilj

3.12 has been released yesterday

@kelson42 This is only alpha 6, see https://peps.python.org/pep-0693/ for the full 3.12 release schedule.

pquentin avatar Mar 18 '23 11:03 pquentin

@pquentin ooops. Thx

kelson42 avatar Mar 18 '23 11:03 kelson42

Hello @cooperlees, Thank you for your suggestion regarding nightly builds for Python versions. While we recognize the value of having the latest updates, providing nightly builds directly from the source code on a daily basis would be challenging. We appreciate your understanding and continued support, will keep you informed of any future developments or alternatives, and encourage you to share any future suggestions. Please feel free to reach us in case of any concerns/clarifications needed :)

aparnajyothi-y avatar Mar 13 '25 10:03 aparnajyothi-y

For nightly builds could have the action run git clone https://github.com/python/cpython.git --branch main and then run the required steps to build cpython from source before using it like normal. I do something similar to this locally.

AraHaan avatar Mar 19 '25 14:03 AraHaan

Hello @cooperlees, Please let us know incase of any concerns/clarifications on the above.

aparnajyothi-y avatar Apr 03 '25 13:04 aparnajyothi-y

Thanks for reaching out. Have you considered using something like DeadSnakes on your ubuntu containers?

  • https://github.com/deadsnakes

They provide nightly builds.

cooperlees avatar Apr 03 '25 15:04 cooperlees

Also to consider:

  • astral-sh/setup-uv#124

cclauss avatar Apr 03 '25 16:04 cclauss

Hello Everyone, Thanks for the suggestion. After consideration, we’ve decided not to support this in setup-python as our goal is to provide a stable and predictable experience using officially supported Python versions. Nightly builds are inherently unstable, and would add significant maintenance burden and risk of confusion for users. For advanced needs, we recommend using custom installation steps. Appreciate your feedback!

aparnajyothi-y avatar Jun 18 '25 05:06 aparnajyothi-y

Hello @cooperlees, Please let us know if you need any clarifications or any concerns on the above :)

aparnajyothi-y avatar Jun 24 '25 03:06 aparnajyothi-y

Nightly builds are inherently unstable, and would add significant maintenance burden and risk of confusion for users

I feel people who want to do this are power users generally, and understand the risks. Feel free to flag these options with warning that the python environment for nightly builds is best effort and unsupported. We'd all accept that.

But it seems we'll just have to use own custom/other actions to do this. My goal here was to just make it easier if it was not to much work for setup-python. While my only concern is I'm disappointed, but respect the teams decision.

cooperlees avatar Jun 24 '25 13:06 cooperlees

Hello @cooperlees,Thank you for your understanding, you're absolutely right that power users often recognize and accept the risks associated with using nightly builds. Your suggestion to include a clear disclaimer about their instability and lack of support is a thoughtful one, and we’ll certainly keep it in mind if we revisit this in the future.

For now, in order to uphold the stability guarantees that setup-python aims to provide, we’ll continue to recommend using custom installation steps for nightly or experimental versions. That said, we’re always open to reassessing decisions based on community feedback and evolving ecosystem needs, so please do keep sharing your use cases and suggestions.

Thanks again for the constructive engagement and feel free to reach out if you need any further support.

aparnajyothi-y avatar Jul 09 '25 14:07 aparnajyothi-y

I had been using deadsnakes for nightly builds, but it wasn't always available in a timely way and I couldn't understand their build process. I ended up using pyenv in my own action workflow: https://github.com/nedbat/coveragepy/blob/master/.github/workflows/python-nightly.yml

But it would still be great for a more central implementation that others can rely on.

nedbat avatar Jul 10 '25 10:07 nedbat

Hi @nedbat, Thanks for the input! To maintain the stability guarantees that setup-python aims to provide, we currently recommend using custom installation steps for nightly or experimental versions. That said, we’re always open to revisiting this based on community feedback and evolving needs so please keep the suggestions coming.

We truly appreciate your continued engagement and support. Please feel free to reach out if you need any further support!

aparnajyothi-y avatar Jul 15 '25 13:07 aparnajyothi-y

Just posting to provide some more community feedback that this feature would be useful

hauntsaninja avatar Jul 15 '25 19:07 hauntsaninja