[issue24875] pyvenv doesn´t install PIP inside a new venv with --system-site-package
Mathieu Pasquet added the comment: This bug actually makes the --system-site-packages option useless, because it prevents installation of any package inside the virtualenv unless one tries the workaround given by gracinet. -- nosy: +mathieui ___ Python tracker <http://bugs.python.org/issue24875> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23519] using asyncio.iscoroutinefunction() on a functools.partial object
Mathieu Pasquet added the comment: Using functools.partial with coroutines would be mostly out of convenience, in order to avoid having factories in that return parametrized coroutine functions. I guess in such cases it might be better to create a two-lines wrapper around partial() to make it return a coroutine rather than change the stdlib for that. In the attached file is an example of such use, where EventNotifier is a Protocol which receives external events and triggers event handlers based on that, and where the add_event_handler function checks if the handler is a coroutine function. In which case it uses asyncio.async to schedule the handler call; otherwise it uses loop.call_soon. You can close this, I guess. -- Added file: http://bugs.python.org/file38246/example_partial.py ___ Python tracker <http://bugs.python.org/issue23519> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23519] using asyncio.iscoroutinefunction() on a functools.partial object
New submission from Mathieu Pasquet: Using iscoroutinefunction() on an object returned by functools.partial() should return True if the function wrapped was a coroutine function. (a recursive loop like the one in asyncio/events.py get_function_source() may be what needs to be done) -- components: asyncio messages: 236569 nosy: gvanrossum, haypo, mathieui, yselivanov priority: normal severity: normal status: open title: using asyncio.iscoroutinefunction() on a functools.partial object type: enhancement versions: Python 3.4 ___ Python tracker <http://bugs.python.org/issue23519> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22768] Add a way to get the peer certificate of a SSL Transport
Mathieu Pasquet added the comment: >Maybe >transport.get_extra_info('socket').getpeercert(True) >would be okay, no patch needed? Thanks, that indeed works; I don't know why I missed it while reading the source. Maybe the docs could use some clarification, though? (users are not supposed to know that _SelectorTransport is subclassed by _SelectorSslTransport, which thus gets the extra info of both) -- ___ Python tracker <http://bugs.python.org/issue22768> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22768] Add a way to get the peer certificate of a SSL Transport
Mathieu Pasquet added the comment: >I'm not sure that would make a difference. We still have to implement >the proxy SSLSocket, which is no easier than adding the extra info by >hand. Or did I misunderstand you? The difference would be that exposing methods can be more future-proof, as some methods take parameters (like the offender getpeercert(bool), or get_channel_binding() that takes an element of ssl.CHANNEL_BINDING_TYPES, list that may grow in the future) that need to be covered in the properties. But the API of SSLSocket is stable and small so I don't think it really matters. -- ___ Python tracker <http://bugs.python.org/issue22768> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22768] Add a way to get the peer certificate of a SSL Transport
New submission from Mathieu Pasquet: Currently, the only workaround is to use transport._sock.getpeercert(True) on the Transport returned by loop.create_connection(), which is not something to be encouraged. It is useful to get such information, for example to perform a manual certificate check against a previously recorded certificate or hash. I attached a trivial patch adding an extra 'peercert_bin' info, but I do not know if this is the right approach, as other issues of feature disparity might arise when more people try to switch to asyncio. Exposing a proxy SSLSocket object for read-only functions might be more beneficial. -- components: asyncio files: peercert_bin.patch keywords: patch messages: 230281 nosy: gvanrossum, haypo, mathieui, yselivanov priority: normal severity: normal status: open title: Add a way to get the peer certificate of a SSL Transport type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file37076/peercert_bin.patch ___ Python tracker <http://bugs.python.org/issue22768> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17331] Fix str methods for detecting digits with unicode
Mathieu Pasquet added the comment: I understand the reasoning behind the feature, and the will to be unicode-compliant, but I think this might still break a lot of code (though it may never be detected). I understand that isdecimal() is the safe way, because anything that is a decimal (Nd) can be translated to an integer by int() ; however, what is the recommended way to get something that isnumeric() into an int? unicodedata.normalize('NFKD', num) or unicodedata.normalize('NFKC', num)? Maybe str could have a method that does this, or methods performing exclusively on ascii values? Sorry for the noise, I did not find issue 10557 when I searched. -- ___ Python tracker <http://bugs.python.org/issue17331> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17331] Fix str methods for detecting digits with unicode
New submission from Mathieu Pasquet: In py3k, str.isalnum(), str.isdigit(), and str.isdecimal() are broken because they take into account various unicode numbers. A common case is doing something like that: num = -1 while num == -1: num_in = input('Enter a number> ') if num_in.isdigit(): num = int(num_in) # do stuff … If you enter ¹, or any esoteric unicode representation of a number, all the methods referenced above will return True. I believe this is a bug. It also affects the stdlib, e.g. in collection.namedtuple, A = namedtuple('A¹', 'x y') will return an ugly Syntax Error, because the sanity check uses str.isalnum(), which says it’s ok. (n.b.: of course, no sane person should ever want to do the above, but I find it worth mentionning) -- components: Unicode messages: 183291 nosy: ezio.melotti, mathieui priority: normal severity: normal status: open title: Fix str methods for detecting digits with unicode type: behavior versions: Python 3.3 ___ Python tracker <http://bugs.python.org/issue17331> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1410680] Add 'surgical editing' to ConfigParser
Mathieu Pasquet added the comment: What is the state of that feature, as of today? -- nosy: +mathieui ___ Python tracker <http://bugs.python.org/issue1410680> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com