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

pip-lock breaks in debug build of Python 3 #23788

Closed
embray opened this issue Sep 6, 2017 · 4 comments
Closed

pip-lock breaks in debug build of Python 3 #23788

embray opened this issue Sep 6, 2017 · 4 comments

Comments

@embray
Copy link
Contributor

embray commented Sep 6, 2017

With SAGE_PYTHON3=yes, I ran

SAGE_DEBUG=yes ./sage -f python3

and now when I try to rebuild Cython on top of that with

SAGE_DEBUG=yes ./sage -f cython

I get

[cython-0.26] gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
[cython-0.26] ****************************************************
[cython-0.26] Unable to find pgen, not compiling formal grammar.
[cython-0.26] Uninstalling Cython-0.26:
[cython-0.26]   Successfully uninstalled Cython-0.26
[cython-0.26] sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/embray/src/sagemath/sage/local/var/lock/pip3.lock' mode='w+' encoding='ANSI_X3.4-1968'>
[cython-0.26] Cannot uninstall requirement Cython, not installed
[cython-0.26] sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/embray/src/sagemath/sage/local/var/lock/pip3.lock' mode='w+' encoding='ANSI_X3.4-1968'>
[cython-0.26] Error installing Cython

Same if I try reinstalling Cython with SAGE_DEBUG=no. Just to be sure I rebuild python3 without debug, and was able to install Cython again with no problem, so it really seems to be something about the specific combination of SAGE_DEBUG=yes and python3.

Component: python3

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

@embray embray added this to the sage-8.1 milestone Sep 6, 2017
@embray
Copy link
Contributor Author

embray commented Sep 6, 2017

comment:1

I think this is some bad combination of hacky code (that I wrote) IIRC in sage-pip-install, pip-lock, and Python 3 with debug flags and hence more chatty with ResourceWarnings.

@embray embray changed the title cython doesn't install in debug build of Python 3 pip-lock breaks in debug build of Python 3 Sep 6, 2017
@embray
Copy link
Contributor Author

embray commented Sep 6, 2017

comment:3

#23397, which rewrote the pip-lock command, appears to fix this. The new sage-flock script doesn't have the resource leak (actually it sort of does but Python doesn't complain about it since that version of the script uses exec, anyways it doesn't matter). So if that gets merged we can close this ticket as fixed.

@fchapoton
Copy link
Contributor

comment:5

can we close this one now that #23397 is on the way ?

@fchapoton fchapoton removed this from the sage-8.1 milestone Nov 4, 2017
@embray
Copy link
Contributor Author

embray commented Nov 6, 2017

comment:6

Yes, thank you for reminding me.

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

2 participants