[issue41207] distutils.command.build_ext raises FileNotFoundError

2020-07-07 Thread STINNER Victor


STINNER Victor  added the comment:

I close the issue since it's fixed. I also reset the priority.

--
priority: release blocker -> 
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41207] distutils.command.build_ext raises FileNotFoundError

2020-07-07 Thread miss-islington


miss-islington  added the comment:


New changeset 2c82628e9aa2af4b662e92e227618859675dd726 by Miss Islington (bot) 
in branch '3.9':
bpo-41207 In distutils.spawn, rewrite FileNotFound (GH-21359)
https://github.com/python/cpython/commit/2c82628e9aa2af4b662e92e227618859675dd726


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41207] distutils.command.build_ext raises FileNotFoundError

2020-07-07 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20517
pull_request: https://github.com/python/cpython/pull/21373

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41207] distutils.command.build_ext raises FileNotFoundError

2020-07-07 Thread miss-islington


miss-islington  added the comment:


New changeset 6ae2780be0667a8dc52c4fb583171ec86067d700 by Jason R. Coombs in 
branch 'master':
bpo-41207 In distutils.spawn, rewrite FileNotFound (GH-21359)
https://github.com/python/cpython/commit/6ae2780be0667a8dc52c4fb583171ec86067d700


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41207] distutils.command.build_ext raises FileNotFoundError

2020-07-06 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
keywords: +patch
pull_requests: +20504
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/21359

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41207] distutils.command.build_ext raises FileNotFoundError

2020-07-06 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

I learned the magical incantation to port commits from pypa/distutils to 
CPython:

```
cpython bugfix/41207-rewrite-filenotfound $ git -C ~/p/pypa/distutils 
format-patch HEAD~2 --stdout | git am --directory Lib   
 
Applying: Add test for spawn when exe is missing. Ref pypa/distutils#3.
Applying: Replace OSError with DistutilsExecError. Fixes pypa/distutils#3 and 
pypa/setuptools#2228 and bpo-41207.
```

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41207] distutils.command.build_ext raises FileNotFoundError

2020-07-06 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

Sure. I'll submit patches.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41207] distutils.command.build_ext raises FileNotFoundError

2020-07-06 Thread STINNER Victor


STINNER Victor  added the comment:

> Programs trapping CompileError but not FileNotFoundError will crash where 
> once they had error handling.

Do you mean mean that spawn() of distutils.spawn should catch FileNotFoundError 
and raise a CompilerError instead?

It seems like before my commit 1ec63b62035e73111e204a0e03b83503e1c58f2e, any 
OSError was catched and replaced with DistutilsExecError, not only 
FileNotFoundError.

Do you want to propose a fix?

--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41207] distutils.command.build_ext raises FileNotFoundError

2020-07-06 Thread Łukasz Langa

Łukasz Langa  added the comment:

Good catch! The unification change is 3.10 only but I'm totally fine accepting 
the _compile fix in Python 3.9.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41207] distutils.command.build_ext raises FileNotFoundError

2020-07-05 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

CPython should also consider [this 
change](https://github.com/pypa/distutils/commit/d9ba43436d), which unifies the 
`DEBUG` handling, consolidates the exception trapping, and uses 
`subprocess.check_call` to re-use exit code checking.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41207] distutils.command.build_ext raises FileNotFoundError

2020-07-05 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

In 
[pypa/distutils@7aa5abeafc](https://github.com/pypa/distutils/commit/7aa5abeafc1e0b1b351c4c8ac7eb14c310366a46),
 I've pushed a fix (with a repro test in the parent commit). I recommend this 
fix be applied to CPython 3.9.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41207] distutils.command.build_ext raises FileNotFoundError

2020-07-03 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
versions: +Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41207] distutils.command.build_ext raises FileNotFoundError

2020-07-03 Thread Jason R. Coombs


New submission from Jason R. Coombs :

In [pypa/setuptools#2228](https://github.com/pypa/setuptools/issues/2228), by 
adopting the distutils codebase from a late release of CPython, Setuptools 
stumbled onto an API-breaking change in distutils rooted at issue39763.

Details are in the Setuptools investigation, but to summarize:

- distutils.ccompiler.CCompiler.compile declares "raises CompileError on 
failure" and calls `self._compile`, implemented by subclasses.
- In at least `distutils.unixcompiler.UnixCCompiler._compile`, 
`distutils.spawn.spawn` is called (through CCompiler.spawn).
- Since GH-18743, `distutils.spawn.spawn` calls `subprocess.Popen` which raises 
FileNotFoundError when the target executable doesn't exist.
- Programs trapping CompileError but not FileNotFoundError will crash where 
once they had error handling.

Setuptools discovered this behavior in the 48.0 release when it incorporated 
these distutils changes into a vendored release of Setuptools, but the failures 
exhibited will apply to all builds (including pyyaml) on Python 3.9.

--
assignee: lukasz.langa
components: Distutils
keywords: 3.9regression
messages: 372973
nosy: dstufft, eric.araujo, jaraco, lukasz.langa
priority: release blocker
severity: normal
status: open
title: distutils.command.build_ext raises FileNotFoundError
type: crash
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com