[issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone

2020-05-29 Thread Sylvain Corlay


Sylvain Corlay  added the comment:

Hello,

Is there a means to work around that bug for Python 3.6 ? It seems that the fix 
was only backported to 3.7, and we were not planning on dropping Python 3.6 
support quite yet in our project.

--
nosy: +sylvain.corlay

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



[issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone

2020-05-29 Thread Sylvain Corlay


Sylvain Corlay  added the comment:

Yes, I understand that.

I was wondering if there was a workaround that we could use to not drop 3.6
support right away!

On Fri, May 29, 2020, 19:29 STINNER Victor  wrote:

>
> STINNER Victor  added the comment:
>
> Sadly, 3.6 no longer get bug fixes, only security fixes:
> https://devguide.python.org/#status-of-python-branches
>
> --
>
> ___
> Python tracker 
> <https://bugs.python.org/issue37380>
> ___
>

--

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



[issue10786] unittest.TextTextRunner does not respect redirected stderr

2013-06-28 Thread Sylvain Corlay

Sylvain Corlay added the comment:

Hello, 
It would be great if this modification was also done for Python 2.7. 

A reason is that IPython redirects stderr. When running unit tests in the 
IPython console without specifying the stream argument, the errors are printed 
in the shell. 

See 
http://python.6.x6.nabble.com/How-to-print-stderr-in-qtconsole-td5021001.html

--
nosy: +sylvain.corlay
versions: +Python 2.7 -Python 3.2

___
Python tracker 
<http://bugs.python.org/issue10786>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26955] Implement equivalent to `pip.locations.distutils_scheme` in distutils

2016-06-08 Thread Sylvain Corlay

Sylvain Corlay added the comment:

We use it in the pybind11 project. I am not sure that homebrew does anything 
wrong.

It is just that it is the only case I am aware of where the `install_headers` 
command does not install headers in a subdirectory of 
`sysconfig.get_path('include')`. On the other hand, 
pip.locations.distutil_scheme provides the location used by install_headers.

--

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



[issue27317] Handling data_files: too much is removed in uninstall

2016-06-14 Thread Sylvain Corlay

New submission from Sylvain Corlay:

When specifying an empty list for the list of data_files in a given directory, 
the entire directory is being deleted on uninstall of the wheel, even if it 
contained other resources.

Example:

```
from setuptools import setup

setup(name='remover', data_files=[('share/plugins', [])])
```

The expected behavior is that only the specified list of files is removed, 
(which is empty in that case).

When the list is not empty, the behavior is the one expected. For example

```
from setuptools import setup

setup(name='remover', data_files=[('share/plugins', ['foobar.json'])])
```

will only remove `foobar.json` on uninstall and the `plugins` directory will 
not be removed if it is not empty.

--
components: Distutils
messages: 268551
nosy: dstufft, eric.araujo, sylvain.corlay
priority: normal
severity: normal
status: open
title: Handling data_files: too much is removed in uninstall
type: behavior
versions: Python 3.6

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



[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-08-18 Thread Sylvain Corlay

Sylvain Corlay added the comment:

Any chance to get this in for 3.6?

--

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



[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-08-19 Thread Sylvain Corlay

Sylvain Corlay added the comment:

Thanks Ned. I posted a couple of messages on distutils-sig and got little 
attention.

I think that this feature is very important for detecting whether a compiler 
supports a certain flag like `-std=c++11` and provide a meaningful error when 
needed.

CMake has the same feature, implemented in a similar fashion 
(CHECK_CXX_COMPILER_FLAG).

--

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



[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-02 Thread Sylvain Corlay

New submission from Sylvain Corlay:

I would be very useful to have a `has_flag` method in `distutils.CCompiler` 
similar to `has_function`, allowing to check if the compiler supports certain 
flags.

Cmake has a `CHECK_CXX_COMPILER_FLAG` macro for that purpose, which checks if a 
simple C++ file compiles with the said flag.

--
components: Distutils
messages: 262805
nosy: dstufft, eric.araujo, sylvain.corlay
priority: normal
severity: normal
status: open
title: Add `has_flag` method to `distutils.CCompiler`
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

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



[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-02 Thread Sylvain Corlay

Sylvain Corlay added the comment:

I attached a patch for ccompiler.py adding the new `has_flag` method.

--
keywords: +patch
Added file: http://bugs.python.org/file42358/has_flag.diff

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



[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-03 Thread Sylvain Corlay

Sylvain Corlay added the comment:

New version of the patch using the context manager.

--
Added file: http://bugs.python.org/file42363/has_flag.diff

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



[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-04 Thread Sylvain Corlay

Sylvain Corlay added the comment:

@minrk submitted 
http://bugs.python.org/file40933/0001-cleanup-temporary-files-in-ccompiler.has_function.patch
doing what you describe for `has_function`. 

I don't know much about the process to contribute to cpython. I would be glad 
to open a "PR" incorporating Min's commits too.

--

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



[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-04 Thread Sylvain Corlay

Sylvain Corlay added the comment:

A new version of the patch using `NamedTemporaryFile` instead a the regular 
fdopen.

--
Added file: http://bugs.python.org/file42367/has_flag.diff

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



[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-05 Thread Sylvain Corlay

Sylvain Corlay added the comment:

Are you fine with the new state of the patch?

--

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



[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-21 Thread Sylvain Corlay

Sylvain Corlay added the comment:

Hey, any blocker to getting this in?

--

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



[issue26955] Implement equivalent to `pip.locations.distutils_scheme` in distutils

2016-05-04 Thread Sylvain Corlay

New submission from Sylvain Corlay:

When installing a python package that has `headers`, these headers are usually 
installed under the main python include directory, which can be retrieved with 
`sysconfig.get_path('include')` or directly referred to as 'include' when 
setting the include directories of an extension module. 

However, on some systems like OS X, headers for extension modules are not 
located in under the python include directory 
(/usr/local/Cellar/pythonX/X.Y.Z/Frameworks/Python.framework/Versions/X.Y/include/pythonX.Y)
 but in `/usr/local/include/pythonX.Y`.

Is there a generic way to find the location where  headers are installed in a  
python install?

pip.locations implements `distutils_scheme` which seems to be returning the 
right thing, but it seems to be a bit overkill to require pip. On the other 
side, no path returned by sysconfig corresponds to 
`/usr/local/include/pythonX.Y`

--
messages: 264836
nosy: sylvain.corlay
priority: normal
severity: normal
status: open
title: Implement equivalent to `pip.locations.distutils_scheme` in distutils
type: enhancement
versions: Python 3.6

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



[issue26955] Implement equivalent to `pip.locations.distutils_scheme` in distutils

2016-05-22 Thread Sylvain Corlay

Sylvain Corlay added the comment:

Ned, that is because these packages (lxml, cffi) have header files as 
`package_data`, instead of `headers`. This is why they are being copied into 
site-packages. People willing to include them must either rely on knowledge of 
their location, or a python functions returning if (like numpy's get_include)

Distutils provides a standard way of distributing headers. These are passed to 
the setup function via the `headers` keyword argument, which triggers the 
`install_headers` command.

--

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



[issue27123] Allow `install_headers` command to follow specific directory structure

2016-05-25 Thread Sylvain Corlay

New submission from Sylvain Corlay:

(instead of making a flat copy of the specified list of headers)

Unlike wheel's `data_files`, which allows to specify data files as a list of 
tuples

`[(target_directory, [list of files for target directory])]` 

the `headers` setup keyword argument only let's you specify a list of files 
that will be copied over to a sub-directory of `sysconfig.get_path('include')`.

It would be useful to enable the same feature for headers as we have for data 
files.

--
components: Distutils
messages: 266360
nosy: dstufft, eric.araujo, sylvain.corlay
priority: normal
severity: normal
status: open
title: Allow `install_headers` command to follow specific directory structure
type: enhancement
versions: Python 2.7, Python 3.6

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