[issue36128] ResourceReader for FileLoader inconsistently handles path separators

2019-11-11 Thread Marcin Kasperski


Marcin Kasperski  added the comment:

Hmm, I noticed this but accidentally and tried to port 
https://github.com/pypa/setuptools/issues/1635 to new api. Well:

>>> import multiprocessing
>>> import sys
>>> reader = 
>>> sys.modules['multiprocessing'].__spec__.loader.get_resource_reader('multiprocessing')
>>> reader.open_resource('../../../../etc/passwd')
<_io.FileIO name='/usr/lib/python3.7/multiprocessing/../../../../etc/passwd' 
mode='rb' closefd=True>

I suppose this is the case which deserve some thought (originally I faced it 
when some webapp used pkg_resources to provide static files and used resource 
api as a way to validate urls impacted by external input).

Tested on python 3.7.3, on Ubuntu 19.04.

--
nosy: +Mekk

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



[issue20891] PyGILState_Ensure on non-Python thread causes fatal error

2017-11-27 Thread Marcin Kasperski

Marcin Kasperski  added the comment:

Is this fix released? I can't find it in the changelog…

(I faced this bug on 3.5.2, released a couple of months after this bug was 
closed…)

--
nosy: +Mekk

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



[issue6454] Add "example" keyword argument to optparse constructor

2009-11-19 Thread Marcin Kasperski

Marcin Kasperski  added the comment:

I found this bug while looking for suggestions how to add examples to
the optparse help call, but I feel there is a better and more general
solution - just provide some minimal formatting for description: treat
empty line as paragraph separator. Then I would be able to add example
or anything else to the description formatting it as necessary

--
nosy: +Mekk

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