Virtual-environments: PyPy3 runs CPython 2 instead

Created on 10 Jan 2020  路  4Comments  路  Source: actions/virtual-environments

Describe the bug

On macOS, python was PyPy3 for pypy3, but since 9th Jan it's now CPython 2.

Area for Triage:

Python

Question, Bug, or Feature?:

Bug

Virtual environments affected

  • [x] macOS 10.15
  • [ ] Ubuntu 16.04 LTS
  • [ ] Ubuntu 18.04 LTS
  • [ ] Windows Server 2016 R2
  • [ ] Windows Server 2019

Config

Part of .github/workflows/test.yml:

    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v1
      with:
        python-version: ${{ matrix.python-version }}

    - name: Build system information
      run: |
        python .github/workflows/system-info.py

.github/workflows/system-info.py:

"""
Print out some handy system info like Travis CI does.

This sort of info is missing from GitHub Actions.

Requested here:
https://github.com/actions/virtual-environments/issues/79
"""
import os
import platform
import sys

print("Build system information")
print()

print("sys.version\t\t", sys.version.split("\n"))
print("os.name\t\t\t", os.name)
print("sys.platform\t\t", sys.platform)
print("platform.system()\t", platform.system())
print("platform.machine()\t", platform.machine())
print("platform.platform()\t", platform.platform())
print("platform.version()\t", platform.version())
print("platform.uname()\t", platform.uname())
if sys.platform == "darwin":
    print("platform.mac_ver()\t", platform.mac_ver())

Expected result

When:

  • matrix-os is "macOS-latest"
  • matrix.python-version is "pypy3"

Runs with PyPy3, as it did two days ago.

https://github.com/python-pillow/Pillow/runs/379447500

Actual result

When:

  • matrix-os is "macOS-latest"
  • matrix.python-version is "pypy3"

Runs with CPython 2, since yesterday, and fails.

Works as expected on Linux/PyPy3, Linux/CPython and macOS/CPython.

https://github.com/python-pillow/Pillow/runs/380647169

More info

Here's a diff of the logs of the [last passing build (PyPy3)] build](https://github.com/python-pillow/Pillow/runs/379447500) and first failing build (CPython 2):

image

Also

On macOS/PyPy3, python is CPython 2.7.17 and python3 is CPython 3.7.6.

On Linux/PyPy3, Linux/CPython, macOS/CPython, both python and python3 pointing to the same, correct version.

https://github.com/hugovk/Pillow/runs/383338343 shows output of:

    - name: Build system information
      run: |
        python --version
        python .github/workflows/system-info.py
        python3 --version
        python3 .github/workflows/system-info.py

Cause?

This update coincides with the problem:

The CPython 3.7.6 version matches with its diff:


Downstream issue: https://github.com/python-pillow/Pillow/issues/4350
Replaces: https://github.com/actions/setup-python/issues/54

Python bug

Most helpful comment

Hi @hugovk,
We have confirmed that it is an issue on our side. Thank you for the report!
PyPy 3.x is available via pypy and pypy3 but links to python and python3 are broken.
As a temporary solution, you can invoke PyPy as pypy or pypy3.
We are working on a fix now.

All 4 comments

Hi @hugovk,
We have confirmed that it is an issue on our side. Thank you for the report!
PyPy 3.x is available via pypy and pypy3 but links to python and python3 are broken.
As a temporary solution, you can invoke PyPy as pypy or pypy3.
We are working on a fix now.

microsoft/azure-pipelines-image-generation#1460 (comment):

We have a fix but it will be deployed with next image-rollout (Approximately, at the middle of this week).

Now macOS/PyPy3 passes and our DIY "Build system information" looks good, 3.6.9 + PyPy 7.3.0:

Run python .github/workflows/system-info.py
Build system information

sys.version      ['3.6.9 (1608da62bfc7, Dec 23 2019, 10:50:17)', '[PyPy 7.3.0 with GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.11.45.5)]']
os.name          posix
sys.platform         darwin
platform.system()    Darwin
platform.machine()   x86_64
platform.platform()  Darwin-19.2.0-x86_64-i386-64bit
platform.version()   Darwin Kernel Version 19.2.0: Sat Nov  9 03:47:04 PST 2019; root:xnu-6153.61.1~20/RELEASE_X86_64
platform.uname()     uname_result(system='Darwin', node='Mac-1333.local', release='19.2.0', version='Darwin Kernel Version 19.2.0: Sat Nov  9 03:47:04 PST 2019; root:xnu-6153.61.1~20/RELEASE_X86_64', machine='x86_64', processor='i386')
platform.mac_ver()   ('10.15.2', ('', '', ''), 'x86_64')

https://github.com/python-pillow/Pillow/runs/392723770

Thanks!

@hugovk thanks for the update!
Closed.

Was this page helpful?
0 / 5 - 0 ratings