Skip to content

PyPy's resolvedPyPyVersion has a trailing newline #609

Description

@kurtmckee

Description:
While working on #606 I discovered that PyPy's resolvedPyPyVersion contains a trailing newline, which causes the pythonVersion (passed to cacheDependencies) to look like 7.3.11\n-3.9.16.

Action version:
I'm running code against the main branch. The bug only exists on Ubuntu and macOS runners. The Windows runner does not have the trailing newline.

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
PyPy 7.3.11 with Python 3.9.16

Repro steps:
You can see the issue in the output of the "Installed versions" output group. I've created a repo to demonstrate the issue with a simple workflow:

https://github.com/kurtmckee/demonstrate-pypy-newlines/actions/runs/4151696169/jobs/7182162044

Expected behavior:
I expect that the resolvedPyPyVersion variable will not have a trailing newline.

Actual behavior:
resolvedPyPyVersion has a trailing newline, and this can be seen in the "Installed versions" output group's text:

On Ubuntu and macOS:

  Successfully set up PyPy 7.3.11
   with Python (3.9.16)

On Windows:

  Successfully set up PyPy 7.3.11 with Python (3.9.16)

Activity

  1. kurtmckee commented on Feb 11, 2023

    @kurtmckee
    ContributorAuthor

    I'm working to resolve this now and will open a PR shortly.

  2. added a commit that references this issue on Feb 11, 2023
    738a968
  3. e-korolevskii commented on Feb 13, 2023

    @e-korolevskii
    Contributor

    Hello @kurtmckee! Thank you for reporting this!
    We will investigate the issue and get back to you as soon as we have updates.

  4. kurtmckee commented on Feb 13, 2023

    @kurtmckee
    ContributorAuthor

    Thanks @e-korolevskii! I think I've fixed this in PR #610. Please take a look when you have an opportunity. 😀

  5. added a commit that references this issue on Feb 20, 2023
    869e769
  6. dmitry-shibanov commented on Feb 20, 2023

    @dmitry-shibanov
    Contributor

    Hello @kurtmckee. We've merged your pull request. Could you please try to use setup-python as actions/setup-python@main to confirm that everything works as expected? Later we'll prepare the release and update the major tag.

  7. kurtmckee commented on Feb 20, 2023

    @kurtmckee
    ContributorAuthor

    Will do! I'll report back shortly.

  8. kurtmckee commented on Feb 20, 2023

    @kurtmckee
    ContributorAuthor

    I've tested this against actions/setup-python@main and the bug is indeed fixed. Thank you all very much for the quick review and merge!

    Before

    [link]

      Successfully set up PyPy 7.3.11
       with Python (3.9.16)
    

    After

    [link]

      Successfully set up PyPy 7.3.11 with Python (3.9.16)
    
  9. dmitry-shibanov commented on Feb 20, 2023

    @dmitry-shibanov
    Contributor

    Hello @kurtmckee. Thank you for your response. For now I'll reopen the until the new version is released.

  10. kurtmckee commented on Sep 15, 2023

    @kurtmckee
    ContributorAuthor

    The fix was released in v4.6.0. Closing.

  11. added a commit that references this issue on Oct 7, 2025
    9f526eb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions