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

tox.ini: Add tests for python2 #29367

Closed
mkoeppe opened this issue Mar 19, 2020 · 23 comments
Closed

tox.ini: Add tests for python2 #29367

mkoeppe opened this issue Mar 19, 2020 · 23 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 19, 2020

These tests can be run by adding -python2 to the tox environment,
such as

    tox -e local-homebrew-macos-standard-python2
    tox -e docker-ubuntu-bionic-standard-python2

Additionally, now local environments (introduced in #29104 for homebrew) respect the environment variable EXTRA_CONFIGURE_ARGS that was already available for docker environments.

CC: @jhpalmieri @dimpase @mwageringel

Component: porting

Author: Matthias Koeppe

Branch/Commit: a33b72a

Reviewer: Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/29367

@mkoeppe mkoeppe added this to the sage-9.1 milestone Mar 19, 2020
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 21, 2020

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 21, 2020

Last 10 new commits:

14a3dabtox.ini [local]: Disable testsuites for some packages
2553b5atox.ini [local]: Disable linbox testsuite
2f79c76tox.ini: Move homebrew environment settings to script .homebrew-build-env
77d5c11build/pkgs/ntl/distros/homebrew.txt: Remove ntl
4ec80e2Remove use of homebrew packages flint, arb
54c803bbuild/pkgs/patch/distros/homebrew.txt: New
2ce6e6cbuild/pkgs/boost*/distros/homebrew.txt: New
467160c.gitignore: Add prefix
dfce7d4tox.ini [local]: Pass MAKE environment variable, do not default to 'make -j12', change default target to 'build', add doc
a33b72atox.ini: Add configuration factor 'python2'; [local] respect EXTRA_CONFIGURE_ARGS

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 21, 2020

Author: Matthias Koeppe

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 21, 2020

Dependencies: #29104

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 21, 2020

Commit: a33b72a

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 21, 2020

comment:3

Branch is on top of #29104.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 22, 2020

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 22, 2020

comment:5

On debian-jessie-standard-python2 (https://github.com/mkoeppe/sage/runs/525632981):

  [pynac-0.7.26]   checking for a version of Python >= '2.1.0'... sys:1: RuntimeWarning: not adding directory '' to sys.path since it's not owned by a trusted user.
  [pynac-0.7.26]   Untrusted users could put files in this directory which might then be imported by your Python code. As a general precaution from similar exploits, you should not execute Python code from this directory
  [pynac-0.7.26]   yes
  [pynac-0.7.26]   checking for the distutils Python package... no
  [pynac-0.7.26]   configure: error: cannot import Python module "distutils".

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 22, 2020

comment:6

Same on debian-buster-standard-python2

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 22, 2020

comment:7

And on debian-bullseye-standard-python2 both pynac and pip fail

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 22, 2020

comment:8

The pynac error is caused by the warning sys:1: RuntimeWarning: not adding directory '' to sys.path since it's not owned by a trusted user.,
which is considered an error by pynac's configure.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 22, 2020

comment:9

This might be output because we run as root?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 22, 2020

comment:10

caused by build/pkgs/python2/patches/sys_path_security-issue_16202.patch, of course.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 22, 2020

comment:11

Not a good idea that we output that warning even in noninteractive invocations of PYTHON (python -c)

@jhpalmieri
Copy link
Member

comment:12

Maybe it's finally time to get rid of that patch.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 22, 2020

comment:13

I agree - I have created #29394 for this.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 24, 2020

Changed dependencies from #29104 to #29104, #29394

@dimpase
Copy link
Member

dimpase commented Mar 24, 2020

Reviewer: Dima Pasechnik

@dimpase
Copy link
Member

dimpase commented Mar 24, 2020

comment:15

ok

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 24, 2020

comment:16

Thanks!

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 29, 2020

Changed dependencies from #29104, #29394 to none

@vbraun
Copy link
Member

vbraun commented Apr 5, 2020

Changed branch from u/mkoeppe/tox_ini__add_tests_for_python2 to a33b72a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants