diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2019-03-01 11:30:14 -0800 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2019-03-01 12:30:14 -0700 |
commit | bd9f33fc3201e15b86b3e4333d65f1a085d1f012 (patch) | |
tree | abe471f49249e3277e8a81e50e04762d31401170 /numpy/lib/utils.py | |
parent | a72f061ede7cf2058829668a4f5d110dec265f1c (diff) | |
download | numpy-bd9f33fc3201e15b86b3e4333d65f1a085d1f012.tar.gz |
BUG: Fixes to numpy.distutils.Configuration.get_version (#13056)
* BUG: Use subprocess.check_output to avoid leaking file handles
This emitted a ResourceWarning as previously written, as the streams never got closed.
This change also detects errors in `svnversion` and `hg`, rather than ignoring the error code and hoping stdout contains a revision anyway.
* BUG: Fix distutils.get_version on python 3
Previously, this would throw `TypeError: cannot use a string pattern on a bytes-like object`, which would then be silenced and never seen.
The previous commit stopped silencing this error, so now everything is visibly broken rather than silently broken
Changing the strings to raw strings fixes the problem
* BUG: Don't use `close_fds`, which fails on windows
This argument was introduced along with subprocess in f5afa7836d56640f25ff3fbd2c59b8dcf016e26f to replace `popen4`, and probably wasn't necessary in the first place.
Diffstat (limited to 'numpy/lib/utils.py')
0 files changed, 0 insertions, 0 deletions