Skip to content

ci: azure: add pypy3 #4874

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

Merged
merged 2 commits into from
Mar 4, 2019
Merged

ci: azure: add pypy3 #4874

merged 2 commits into from
Mar 4, 2019

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Mar 1, 2019

No description provided.

@blueyed
Copy link
Contributor Author

blueyed commented Mar 2, 2019

Apparently it fails to install pip already: https://pytest-dev.visualstudio.com/pytest/_build/results?buildId=266&view=logs&jobId=fac34862-14df-5a01-cb3c-3a8c1839a642&taskId=f57acd34-2f9e-55ef-4fee-0f870d3891ff&lineStart=28&lineEnd=29&colStart=1&colEnd=1

##[section]Starting: Install pip
==============================================================================
Task         : PowerShell
Description  : Run a PowerShell script on Windows, macOS, or Linux.
Version      : 2.140.2
Author       : Microsoft Corporation
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkID=613736)
==============================================================================
Generating script.
##[command]"C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'D:\a\_temp\3eeac108-bcdc-4c67-bd36-a97fdb8f5bc9.ps1'"
RPython traceback:
  File "pypy_interpreter.c", line 42299, in BuiltinCode1_fastcall_1
  File "pypy_module_posix.c", line 4913, in get_terminal_size
Traceback (most recent call last):
  File "get-pip.py", line 21361, in <module>
    main()
  File "get-pip.py", line 197, in main
    bootstrap(tmpdir=tmpdir)
  File "get-pip.py", line 175, in bootstrap
    sys.exit(pip._internal.main(args))
  File "C:\Users\VSSADM~1\AppData\Local\Temp\tmppq60f89p\pip.zip\pip\_internal\__init__.py", line 64, in main
  File "C:\Users\VSSADM~1\AppData\Local\Temp\tmppq60f89p\pip.zip\pip\_internal\cli\main_parser.py", line 66, in parse_command
  File "C:\Users\VSSADM~1\AppData\Local\Temp\tmppq60f89p\pip.zip\pip\_internal\cli\main_parser.py", line 34, in create_main_parser
  File "C:\Users\VSSADM~1\AppData\Local\Temp\tmppq60f89p\pip.zip\pip\_internal\cli\parser.py", line 26, in __init__
  File "C:\Users\VSSADM~1\AppData\Local\Temp\tmppq60f89p\pip.zip\pip\_internal\utils\compat.py", line 232, in get_terminal_size
  File "C:\ProgramData\Chocolatey\lib\pypy3\tools\pypy3-v6.0.0-win32\lib-python\3\shutil.py", line 1078, in get_terminal_size
    size = os.get_terminal_size(sys.__stdout__.fileno())
SystemError: unexpected internal exception (please report a bug): <WindowsError object at 0x760ac28>; internal traceback was dumped to stderr
##[error]PowerShell exited with code '1'.
##[section]Finishing: Install pip

@blueyed
Copy link
Contributor Author

blueyed commented Mar 2, 2019

So pypy was killed after 60 minutes, but then still failed to install codecov via pip: https://pytest-dev.visualstudio.com/pytest/_build/results?buildId=268
/cc @nicoddemus

@blueyed
Copy link
Contributor Author

blueyed commented Mar 2, 2019

For reference, with just python it results in the following error when trying to pip-install codecov:

C:/ProgramData/Chocolatey/lib/mingw/tools/install/mingw64/opt/bin/python.exe: No module named pip

@nicoddemus
Copy link
Member

For reference, with just python it results in the following error when trying to pip-install codecov:

Oh right, good catch.

What's the state of this PR now? I see we are running only testing/acceptance_test.py, I understand this was just to test things?

@blueyed
Copy link
Contributor Author

blueyed commented Mar 2, 2019

I understand this was just to test things?

Yes.

Will clean it up, so that it can be merged (in case we enable coverage for pypy at some point).

The codecov run looks a bit strange:

      _____          _
     / ____|        | |
    | |     ___   __| | ___  ___ _____   __
    | |    / _ \ / _  |/ _ \/ __/ _ \ \ / /
    | |___| (_) | (_| |  __/ (_| (_) \ V /
     \_____\___/ \____|\___|\___\___/ \_/
                                    v2.0.15

==&gt;‌ Detecting CI provider‌
  -> Got branch from git/hg
  -> Got sha from git/hg
The filename, directory name, or volume label syntax is incorrect.
==&gt;‌ Preparing upload‌
    Error running `cd 'D:\a\1\s' && git ls-files`: None
XX&gt;‌ Skip processing gcov‌
==&gt;‌ Collecting reports‌
XX&gt;‌ Searching for reports disabled‌
    Targeting specific files
    ‌+‌ coverage.xml bytes=19256‌
==&gt;‌ Uploading‌
    .url https://codecov.io
    .query commit=df9acdbac52b0be609a1068e61ac9aa3d89eabc3&branch=HEAD&token=<secret>&name=pypy&package=py2.0.15
    Pinging Codecov...
    Uploading to S3...
    https:&#x2F;&#x2F;codecov.io&#x2F;github&#x2F;pytest-dev&#x2F;pytest&#x2F;commit&#x2F;8eafb8087d6ac8cf7f195b2e32b9d204b0f87855‌
##[section]Finishing: Upload coverage

(via https://pytest-dev.visualstudio.com/pytest/_build/results?buildId=278&view=logs&jobId=1bd17601-56ff-561f-0e27-b49aa3635f91&taskId=1d64dff2-6857-5152-5d53-64fbcd24962e&lineStart=41&lineEnd=67&colStart=1&colEnd=1)

And it appears to not collect coverage correctly also:

Prepare to upload coverage information
CODECOV_TOKEN defined
DEPRECATION: A future version of pip will drop support for Python 2.7.
Collecting codecov
  Downloading https://files.pythonhosted.org/packages/8b/28/4c1950a61c3c5786f0f34d643d0d28ec832433c9a7c0bd157690d4eb1d5f/codecov-2.0.15-py2.py3-none-any.whl
Collecting coverage (from codecov)
Collecting requests>=2.7.9 (from codecov)
  Using cached https://files.pythonhosted.org/packages/7d/e3/20f3d364d6c8e5d2353c72a67778eb189176f08e873c9900e10c0287b84b/requests-2.21.0-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests>=2.7.9->codecov)
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting idna<2.9,>=2.5 (from requests>=2.7.9->codecov)
  Using cached https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl
Collecting urllib3<1.25,>=1.21.1 (from requests>=2.7.9->codecov)
  Using cached https://files.pythonhosted.org/packages/62/00/ee1d7de624db8ba7090d1226aebefab96a2c71cd5cfa7629d6ad3f61b79e/urllib3-1.24.1-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests>=2.7.9->codecov)
  Using cached https://files.pythonhosted.org/packages/9f/e0/accfc1b56b57e9750eba272e24c4dddeac86852c2bebd1236674d7887e8a/certifi-2018.11.29-py2.py3-none-any.whl
Installing collected packages: coverage, chardet, idna, urllib3, certifi, requests, codecov
  The scripts coverage-2.7.exe, coverage.exe and coverage2.exe are installed in 'C:\ProgramData\Chocolatey\lib\python.pypy\tools\pypy2-v6.0.0-win32\bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  The script chardetect.exe is installed in 'C:\ProgramData\Chocolatey\lib\python.pypy\tools\pypy2-v6.0.0-win32\bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  The script codecov.exe is installed in 'C:\ProgramData\Chocolatey\lib\python.pypy\tools\pypy2-v6.0.0-win32\bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed certifi-2018.11.29 chardet-3.0.4 codecov-2.0.15 coverage-4.5.2 idna-2.8 requests-2.21.0 urllib3-1.24.1
Name                         Stmts   Miss Branch BrPart  Cover   Missing
------------------------------------------------------------------------
testing\acceptance_test.py     467     45     44      5    89%   23, 235-251, 704-766, 869, 881, 936-951, 22->23, 371->exit, 806->810, 865->869, 877->881

Regarding the followin: can we fix PATH?

The scripts coverage-2.7.exe, coverage.exe and coverage2.exe are installed in 'C:\ProgramData\Chocolatey\lib\python.pypy\tools\pypy2-v6.0.0-win32\bin' which is not on PATH.

Maybe there is also an option with "choco" to do so?

@nicoddemus
Copy link
Member

Regarding the followin: can we fix PATH?

We can use:

script: |
   set PATH=...
   call scripts\coverage-upload.bat

Or so, but I wonder if we can use %PYTHON% -m coverage instead?

@blueyed
Copy link
Contributor Author

blueyed commented Mar 3, 2019

Yes, using %PYTHON% -m, but if e.g. choco could adjust the path itself, that might simplify more of it.
It is OK like this though.

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

LGTM, just need to bring back the other envs

blueyed added a commit to blueyed/pytest that referenced this pull request Mar 3, 2019
@codecov
Copy link

codecov bot commented Mar 3, 2019

Codecov Report

Merging #4874 into master will decrease coverage by 27.8%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #4874       +/-   ##
===========================================
- Coverage   94.48%   66.67%   -27.81%     
===========================================
  Files         113       56       -57     
  Lines       25173    11402    -13771     
  Branches     2499     2071      -428     
===========================================
- Hits        23784     7602    -16182     
- Misses       1059     3136     +2077     
- Partials      330      664      +334
Impacted Files Coverage Δ
src/_pytest/assertion/util.py 20.07% <0%> (-73.23%) ⬇️
src/_pytest/assertion/truncate.py 24.52% <0%> (-67.93%) ⬇️
src/_pytest/pastebin.py 25% <0%> (-65.63%) ⬇️
src/_pytest/setuponly.py 34% <0%> (-62%) ⬇️
src/_pytest/recwarn.py 37.39% <0%> (-60.98%) ⬇️
src/_pytest/resultlog.py 27.14% <0%> (-60%) ⬇️
src/_pytest/python_api.py 37.65% <0%> (-59.84%) ⬇️
src/_pytest/stepwise.py 40.38% <0%> (-55.77%) ⬇️
src/_pytest/logging.py 50.33% <0%> (-44.64%) ⬇️
src/_pytest/unittest.py 44.97% <0%> (-42.33%) ⬇️
... and 96 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 54c70bc...2e871f3. Read the comment docs.

@blueyed
Copy link
Contributor Author

blueyed commented Mar 3, 2019

Well, coverage looks wrong (previous comment) - pushed a test via py34.

blueyed added 2 commits March 4, 2019 17:46
While this is not used currently, it is still good for having it covered
(it failed when running coverage with all jobs unconditionally).
@blueyed blueyed merged commit ddb16a1 into pytest-dev:master Mar 4, 2019
@blueyed blueyed deleted the pypy3-azure branch March 4, 2019 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants