[issue33961] Inconsistency in exceptions for dataclasses.dataclass documentation

2019-02-21 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue36073] sqlite crashes with converters mutating cursor

2019-02-21 Thread SilentGhost
Change by SilentGhost : -- nosy: +ghaering versions: +Python 3.7, Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue32657] Mutable Objects in SMTP send_message Signature

2019-02-21 Thread Inada Naoki
Change by Inada Naoki : -- versions: +Python 3.8 -Python 3.6, Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue32657] Mutable Objects in SMTP send_message Signature

2019-02-21 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue36073] sqlite crashes with converters mutating cursor

2019-02-21 Thread Sergey Fedoseev
Change by Sergey Fedoseev : -- keywords: +patch pull_requests: +12008 stage: -> patch review ___ Python tracker ___ ___

[issue36073] sqlite crashes with converters mutating cursor

2019-02-21 Thread Sergey Fedoseev
New submission from Sergey Fedoseev : It's somewhat similar to bpo-10811, but for converter function: In [197]: import sqlite3 as sqlite ...: con = sqlite.connect(':memory:', detect_types=sqlite.PARSE_COLNAMES) ...: cur = con.cursor() ...: sqlite.converters['CURSOR_INIT'] =

[issue20582] socket.getnameinfo() does not document flags

2019-02-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You can use the special role :manpage: for referring man pages. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue36069] asyncio: create_connection cannot handle IPv6 link-local addresses anymore (linux)

2019-02-21 Thread twisteroid ambassador
twisteroid ambassador added the comment: Duplicate of issue35545, I believe. -- nosy: +twisteroid ambassador ___ Python tracker ___

[issue36072] str.translate() behaves differently for ASCII-only and other strings

2019-02-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You are using a mapping that returns different values for the same key. You should not expect a stable result for it. I do not think this needs a special mentioning in the documentation. Garbage in -- garbage out. -- nosy: +serhiy.storchaka

[issue36072] str.translate() behaves differently for ASCII-only and other strings

2019-02-21 Thread Sergey Fedoseev
Change by Sergey Fedoseev : -- title: str.translate() behave differently for ASCII-only and other strings -> str.translate() behaves differently for ASCII-only and other strings ___ Python tracker

[issue36072] str.translate() behave differently for ASCII-only and other strings

2019-02-21 Thread Sergey Fedoseev
New submission from Sergey Fedoseev : In [186]: from itertools import cycle In [187]: class ContainerLike: ...: def __init__(self): ...: self.chars = cycle('12') ...: def __getitem__(self, key): ...: return next(self.chars) ...: In [188]:

[issue36070] Enclosing scope not visible from within list comprehension

2019-02-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue3692. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> improper scope in list comprehension, when used in class declaration

[issue29871] Enable optimized locks on Windows

2019-02-21 Thread Paulie Pena
Change by Paulie Pena : -- nosy: +paulie4 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36071] Add support for Windows ARM32 in ctypes/libffi

2019-02-21 Thread Paul Monson
Change by Paul Monson : -- components: Windows, ctypes nosy: Paul Monson, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Add support for Windows ARM32 in ctypes/libffi versions: Python 3.8 ___

[issue36070] Enclosing scope not visible from within list comprehension

2019-02-21 Thread Eric V. Smith
Eric V. Smith added the comment: I suspect Nathan is seeing this problem at class scope. This is a well known issue: >>> class C: ... from random import random ... out = [random() for ind in range(3)] ... Traceback (most recent call last): File "", line 1, in File "", line 3, in C

[issue35662] Windows #define _PY_EMULATED_WIN_CV 0 bug

2019-02-21 Thread Steve Dower
Steve Dower added the comment: The regular test suite ought to be enough - see devguide.python.org for the info. It was definitely failing in multiprocessing last time I tried this. You could also just push changes and start a PR, as that will run the tests automatically. --

[issue28235] In xml.etree.ElementTree docs there is no parser argument in fromstring()

2019-02-21 Thread Cheryl Sabella
Cheryl Sabella added the comment: Thank you @py.user for reporting this issue and for the original patch and thank you @Manjusaka for the PR! This was my first merge! Woot! :-) -- resolution: -> fixed stage: patch review -> resolved status: open -> closed

[issue28235] In xml.etree.ElementTree docs there is no parser argument in fromstring()

2019-02-21 Thread miss-islington
miss-islington added the comment: New changeset b046f1badaaffb7e526b937fa2192c449b9076ed by Miss Islington (bot) in branch '3.7': bpo-28235: Fix xml.etree.ElementTree.fromstring docs (GH-11903) https://github.com/python/cpython/commit/b046f1badaaffb7e526b937fa2192c449b9076ed --

[issue28235] In xml.etree.ElementTree docs there is no parser argument in fromstring()

2019-02-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +12007 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28235] In xml.etree.ElementTree docs there is no parser argument in fromstring()

2019-02-21 Thread Cheryl Sabella
Cheryl Sabella added the comment: New changeset e5458bdb6af81f9b98acecd8819c60016d3f1441 by Cheryl Sabella (Manjusaka) in branch 'master': bpo-28235: Fix xml.etree.ElementTree.fromstring docs (GH-11903) https://github.com/python/cpython/commit/e5458bdb6af81f9b98acecd8819c60016d3f1441

[issue36067] subprocess terminate() "invalid handle" error when process is gone

2019-02-21 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Interesting. Because both errors/conditions are mapped to ERROR_INVALID_HANDLE we need the creation time. I can work on a patch for that. Potentially I can also include OSX, Linux and BSD* implementations for methods involving os.kill(pid). That would be

[issue36046] support dropping privileges when running subprocesses

2019-02-21 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> gregory.p.smith nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list

[issue36070] Enclosing scope not visible from within list comprehension

2019-02-21 Thread Zachary Ware
Zachary Ware added the comment: Can you attach a test file that shows the failure? -- nosy: +zach.ware ___ Python tracker ___ ___

[issue35651] PEP 257 (active) references PEP 258 (rejected) as if it were active

2019-02-21 Thread Mihai Capotă
Change by Mihai Capotă : -- nosy: +mihaic ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36070] Enclosing scope not visible from within list comprehension

2019-02-21 Thread Nathan Woods
New submission from Nathan Woods : The following code works in an interactive shell or in a batch file, but not when executed as part of a unittest suite or pdb: from random import random out = [random() for ind in range(3)] It can be made to work using pdb interact, but this doesn't help

[issue35904] Add statistics.fmean(seq)

2019-02-21 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue35904] Add statistics.fmean(seq)

2019-02-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 47d9987247bcc45983a6d51fd1ae46d5d356d0f8 by Raymond Hettinger in branch 'master': bpo-35904: Add statistics.fmean() (GH-11892) https://github.com/python/cpython/commit/47d9987247bcc45983a6d51fd1ae46d5d356d0f8 --

[issue22865] Document how to make pty.spawn not copy data

2019-02-21 Thread Martin Panter
Martin Panter added the comment: I'm not sure it is wise for the Python documentation to suggest inserting null bytes in general. This seems more like an application-specific hack. There is nothing in Python that handles these null bytes specially, and I expect they will be seen if the

[issue22239] asyncio: nested event loop

2019-02-21 Thread Jesús Cea Avión
Change by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34785] pty.spawn -- auto-termination after child process is dead (a zombie)

2019-02-21 Thread Martin Panter
Martin Panter added the comment: Suggest closing this assuming it is a duplicate, unless Jarry can give more information. -- resolution: -> duplicate status: open -> pending superseder: -> pty.spawn hangs on FreeBSD 9.3, 10.x ___ Python tracker

[issue35662] Windows #define _PY_EMULATED_WIN_CV 0 bug

2019-02-21 Thread Jeff Robbins
Jeff Robbins added the comment: Steve, sorry to be dense, but I'm unfortunately ignorant as to what tests I ought to be running. The only test I have right now is much too complicated, and I'd rather be running some official regression test that reveals the problem without my app code, if

[issue33944] Deprecate and remove pth files

2019-02-21 Thread Steve Dower
Change by Steve Dower : -- nosy: +steve.dower ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35867] NameError is not caught at Task execution

2019-02-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I do not think this is a bug. Any exception that is raised inside a task will be in the .exception() method when the task is finished. Here you are running the task without waiting for finalization. For example, if you change: async def

[issue29871] Enable optimized locks on Windows

2019-02-21 Thread Steve Dower
Steve Dower added the comment: > I assume you meant #35662 Yes indeed. I am apparently massively dyslexic when it comes to copying issue numbers into the bpo comment field :) Meanwhile, over on #35662, Jeff has a fix for at least one of the regressions. -- versions: +Python 3.8

[issue35662] Windows #define _PY_EMULATED_WIN_CV 0 bug

2019-02-21 Thread Steve Dower
Steve Dower added the comment: > reveals an expectation that Py_END_ALLOW_THREADS won't change the results of > GetLastError() Fantastic work, Jeff! That's almost certainly the major problem there - Py_END_ALLOW_THREADS can totally change the error code, and we haven't ever done a full

[issue36067] subprocess terminate() "invalid handle" error when process is gone

2019-02-21 Thread Eryk Sun
Eryk Sun added the comment: The subprocess Handle object is never finalized explicitly, so the Process handle should always be valid as long as we have a reference to the Popen instance. We can call TerminateProcess as many times as we want, and the handle will still be valid. If it's

[issue35899] '_is_sunder' function in 'enum' module fails on empty string

2019-02-21 Thread Ethan Furman
Ethan Furman added the comment: The changes to `_is_sunder` and `_is_dunder` look good, but there is a problem with the underlying assumptions of what Enum should be doing: - nameless members are not to be allowed - non-alphanumeric characters are not supported In other words, while

[issue36068] Make _tuplegetter objects serializable

2019-02-21 Thread Joe Jevnik
Joe Jevnik added the comment: Thank you for reviewing this so quickly! -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36068] Make _tuplegetter objects serializable

2019-02-21 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue36068] Make _tuplegetter objects serializable

2019-02-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for noticing this. We really should have stuck with the original plan of subclassing property(). -- assignee: -> rhettinger ___ Python tracker

[issue36068] Make _tuplegetter objects serializable

2019-02-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset f36f89257b30e0bf88e8aaff6da14a9a96f57b9e by Raymond Hettinger (Joe Jevnik) in branch 'master': bpo-36068: Make _tuplegetter objects serializable (GH-11981) https://github.com/python/cpython/commit/f36f89257b30e0bf88e8aaff6da14a9a96f57b9e

[issue22865] Document how to make pty.spawn not copy data

2019-02-21 Thread Cheryl Sabella
Cheryl Sabella added the comment: Thanks @RadicalZephyr! @martin.panter, please review the PR when you get a chance. Thank you! -- ___ Python tracker ___

[issue35662] Windows #define _PY_EMULATED_WIN_CV 0 bug

2019-02-21 Thread Jeff Robbins
Jeff Robbins added the comment: Steve, I did some more digging into why the native condition variable approach might be causing problems on Windows. Testing my fix revealed that there is at least one place in Modules\overlapped.c that either a) waits too long to call GetLastError(), or

[issue36069] asyncio: create_connection cannot handle IPv6 link-local addresses anymore (linux)

2019-02-21 Thread Leonardo Mörlein
Leonardo Mörlein added the comment: It seems to be a regression, as my python 3.6 version is not affected: lemoer@orange ~> python3.6 --version Python 3.6.8 My python 3.7 version is affected: lemoer@orange ~> python3.7 --version Python 3.7.2 --

[issue36069] asyncio: create_connection cannot handle IPv6 link-local addresses anymore (linux)

2019-02-21 Thread Leonardo Mörlein
Leonardo Mörlein added the comment: The generated error is: OSError: [Errno 22] Invalid argument -- ___ Python tracker ___ ___

[issue36069] asyncio: create_connection cannot handle IPv6 link-local addresses anymore (linux)

2019-02-21 Thread Leonardo Mörlein
New submission from Leonardo Mörlein : The tuple (host, port) is ("fe80::5054:01ff:fe04:3402%node4_client", 22) in https://github.com/python/cpython/blob/master/Lib/asyncio/base_events.py#L918. The substring "node4_client" identifies the interface, which is needed for link local connections.

[issue36068] Make _tuplegetter objects serializable

2019-02-21 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35840] Control flow inconsistency on closed asyncio stream

2019-02-21 Thread Marc Schlaich
Marc Schlaich added the comment: No, I'm seeing the same issue on MacOS. Attached modified example. -- Added file: https://bugs.python.org/file48160/tcp_test.py ___ Python tracker

[issue36068] Make _tuplegetter objects serializable

2019-02-21 Thread Joe Jevnik
Change by Joe Jevnik : -- keywords: +patch pull_requests: +12006 stage: -> patch review ___ Python tracker ___ ___

[issue35810] Object Initialization does not incref Heap-allocated Types

2019-02-21 Thread Neil Schemenauer
Neil Schemenauer added the comment: Sorry, morning coffee didn't kick in yet I guess. ;-) My actual wish is to make all types heap allocated and eliminate the statically allocated ones. So, Py_TPFLAGS_HEAPTYPE would be set on all types in that world. That is a gigantic task, affecting

[issue36068] Make _tuplegetter objects serializable

2019-02-21 Thread Joe Jevnik
New submission from Joe Jevnik : The new _tuplegetter objects for accessing fields of a namedtuple are no longer serializable with pickle. Cloudpickle, a library which provides extensions to pickle to facilitate distributed computing in Python, depended on being able to pickle the members of

[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2019-02-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Related failure: https://buildbot.python.org/all/#/builders/141/builds/1233 -- Ran 56 tests in 25.105s OK (skipped=1) Re-running test 'test_normalization' in verbose mode

[issue36060] Document how collections.ChainMap() determines iteration order

2019-02-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 86f093f71a594dcaf21b67ba13dda72863e9bde9 by Raymond Hettinger in branch 'master': bpo-36060: Document how collections.ChainMap() determines iteration order (GH-11969)

[issue36060] Document how collections.ChainMap() determines iteration order

2019-02-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +12002 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35812] Don't log an exception from the main coroutine in asyncio.run()

2019-02-21 Thread Andrew Svetlov
Andrew Svetlov added the comment: Nevermind. Actually, I used a backport `asyncio.run()` to Python 3.6. I saw the problem because of the difference between `asyncio.all_task()` and `asyncio.Task.all_task()`. The former return only active tasks but the later returns done tasks also.

[issue35812] Don't log an exception from the main coroutine in asyncio.run()

2019-02-21 Thread Andrew Svetlov
Change by Andrew Svetlov : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35810] Object Initialization does not incref Heap-allocated Types

2019-02-21 Thread Neil Schemenauer
Neil Schemenauer added the comment: Hello Eddie, Thank you for putting what looks to be significant effort into this PR. It would be great if we can get this fixed. There is a real issue about breaking 3rd party extensions. So, we want to proceed with care. I wonder, if we are going to

[issue22865] Document how to make pty.spawn not copy data

2019-02-21 Thread Geoff Shannon
Geoff Shannon added the comment: It is submitted @cheryl.sabella. Thanks for reviving this, I had totally lost track of it. -- ___ Python tracker ___

[issue22865] Document how to make pty.spawn not copy data

2019-02-21 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +12004 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36060] Document how collections.ChainMap() determines iteration order

2019-02-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 7121a6eeb7941f36fb9e7eae28ec24ecfa533e81 by Raymond Hettinger (Miss Islington (bot)) in branch '3.7': bpo-36060: Document how collections.ChainMap() determines iteration order (GH-11969) (GH-11978)

[issue36067] subprocess terminate() "invalid handle" error when process is gone

2019-02-21 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: On POSIX there is that risk, yes. As for Windows, the termination is based on the process handle instead of the PID, but I am not sure if that makes a difference. The risk of reusing the PID/handle is not related to this issue though. The solution I

[issue35995] logging.handlers.SMTPHandler

2019-02-21 Thread Vinay Sajip
Vinay Sajip added the comment: The existing implementation supports doing an SSL handshake using STARTTLS, which provides encryption for the actual email traffic. You are asking, it seems, to support a server that only listens on an already encrypted connection, and doesn't use STARTTLS.

[issue36057] Add docs and tests for ordering in Counter. [no behavior change]

2019-02-21 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue36067] subprocess terminate() "invalid handle" error when process is gone

2019-02-21 Thread STINNER Victor
STINNER Victor added the comment: > _winapi.TerminateProcess(self._handle, 1) > OSError: [WinError 6] The handle is invalid Silently ignoring that would be dangerous. There is a risk that the handle is reused by another process and so that you terminate an unrelated process, no? --

[issue36057] Add docs and tests for ordering in Counter. [no behavior change]

2019-02-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 407c7343266eb3e5a2f5c1f4913082c84f8dd8a0 by Raymond Hettinger in branch 'master': bpo-36057 Update docs and tests for ordering in collections.Counter [no behavior change] (#11962)

[issue36057] Add docs and tests for ordering in Counter. [no behavior change]

2019-02-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +12003 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36060] Document how collections.ChainMap() determines iteration order

2019-02-21 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue36043] FileCookieJar constructor don't accept PathLike

2019-02-21 Thread Alexander Kapshuna
Alexander Kapshuna added the comment: Oh sorry, I just thought that everybody has forgotten about this part of library. Nevermind my patch then, your work is certainly better, matrixise. -- ___ Python tracker

[issue36067] subprocess terminate() "invalid handle" error when process is gone

2019-02-21 Thread STINNER Victor
STINNER Victor added the comment: I'm not sure of the purpose of this issue. It's expected to get an error if you try to send a signal to process which is already terminated. vstinner@apu$ python3 Python 3.7.2 (default, Jan 16 2019, 19:49:22) >>> import subprocess >>>

[issue33039] int() and math.trunc don't accept objects that only define __index__

2019-02-21 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Yes it is. Thanks for finding that @Serhiy. Since nobody objected to the change on the mailing list and people seem to agree in issue 20092: [R. David Murray] To summarize for anyone like me who didn't follow that issue: __index__ means the object can

[issue30782] Allow limiting the number of concurrent tasks in asyncio.as_completed

2019-02-21 Thread twisteroid ambassador
twisteroid ambassador added the comment: I feel like once you lay out all the requirements: taking futures from an (async) generator, limiting the number of concurrent tasks, getting completed tasks to one consumer "as completed", and an implicit requirement that back pressure from the

[issue36067] subprocess terminate() "invalid handle" error when process is gone

2019-02-21 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I think this is somewhat similar to issue14252. The problem I see is that we should either raise ProcessLookupError or ignore the error (better). This concept of suppressing errors if process is gone is currently already established in 2 places:

[issue36065] Add unified C API for accessing bytes and bytearray

2019-02-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If you need to support only bytes and bytearray, but not other bytes-like object, this is a too special case. It is easy to write your own macros or functions that wrap existing C API. Other option -- duplicate the code and replace PyBytes_ with

[issue36065] Add unified C API for accessing bytes and bytearray

2019-02-21 Thread Ori Avtalion
Ori Avtalion added the comment: My use-case is modifying existing code that supports bytes to also support bytearray. https://github.com/mongodb/mongo-python-driver/blob/9902d239b4e557c2a657e8c8110f7751864cec95/bson/_cbsonmodule.c#L1112 The buffer protocol, which I didn't know of, feels

[issue36067] subprocess terminate() "invalid handle" error when process is gone

2019-02-21 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' : Happened in psutil: https://ci.appveyor.com/project/giampaolo/psutil/builds/22546914/job/rlp112gffyf2o30i == ERROR: psutil.tests.test_process.TestProcess.test_halfway_terminated_process

[issue36030] add internal API function to create tuple without items array initialization

2019-02-21 Thread STINNER Victor
STINNER Victor added the comment: I reviewed PR 11954: I asked to rework the PR to only add _PyTuple_FromArray() and the "unrelated" micro-optimization. So it would be easier to see code simplification and the micro-optimization. If the micro-optimization doesn't make the code more complex

[issue36030] add internal API function to create tuple without items array initialization

2019-02-21 Thread STINNER Victor
STINNER Victor added the comment: > Once I had wrote a similar patch that adds PyTuple_FromArray, but never > published it because I did not found enough use cases for this function. > Although I considered using it only for removing some code duplication, but > Sergey shown that it can be

[issue36030] add internal API function to create tuple without items array initialization

2019-02-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Once I had wrote a similar patch that adds PyTuple_FromArray, but never published it because I did not found enough use cases for this function. Although I considered using it only for removing some code duplication, but Sergey shown that it can be used

[issue36066] Add `empty` block to `for` and `while` loops.

2019-02-21 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Slightly similar proposal in the past : https://mail.python.org/pipermail/python-ideas/2016-March/038897.html -- ___ Python tracker

[issue36065] Add unified C API for accessing bytes and bytearray

2019-02-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The unified C API already exists. It is called the buffer protocol. https://docs.python.org/3/c-api/buffer.html#buffer-related-functions -- ___ Python tracker

[issue36066] Add `empty` block to `for` and `while` loops.

2019-02-21 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: This issue should be discussed on python-ideas https://mail.python.org/mailman/listinfo/python-ideas -- nosy: +matrixise ___ Python tracker

[issue36065] Add unified C API for accessing bytes and bytearray

2019-02-21 Thread Ronald Oussoren
Ronald Oussoren added the comment: What is your use case for this? Is that something that can use the buffer API instead of these low-level APIs? -- nosy: +ronaldoussoren ___ Python tracker

[issue36066] Add `empty` block to `for` and `while` loops.

2019-02-21 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: yep and there was no followup. maybe we could close this issue. -- ___ Python tracker ___ ___

[issue36066] Add `empty` block to `for` and `while` loops.

2019-02-21 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I would recommend posting this on python-ideas to get some feedback. This introduces new control flow and breaks some old assumptions as in third case empty block is executed and there might be code that depends upon current for-else behavior

[issue36066] Add `empty` block to `for` and `while` loops.

2019-02-21 Thread WloHu
New submission from WloHu : ### Description Adding `empty` block to loops will extend them to form for-empty-else and while-empty-else. The idea is that `empty` block will execute when loop iteration wasn't performed because iterated element was empty. The idea is taken from Django

[issue36065] Add unified C API for accessing bytes and bytearray

2019-02-21 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36065] Add unified C API for accessing bytes and bytearray

2019-02-21 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: I remove 2.7 because this branch is in bugfix mode, no new features. -- nosy: +matrixise, serhiy.storchaka, vstinner versions: -Python 2.7 ___ Python tracker

[issue36065] Add unified C API for accessing bytes and bytearray

2019-02-21 Thread STINNER Victor
STINNER Victor added the comment: Stéphane: Please don't add me to the nosy list of bugs. -- ___ Python tracker ___ ___

[issue36065] Add unified C API for accessing bytes and bytearray

2019-02-21 Thread Ori Avtalion
New submission from Ori Avtalion : It would be useful to have a shared API for consuming bytes and bytearrays. At present, I need to write very similar code twice. Some existing codebases only support bytes (perhaps forgetting bytearrays exist). Adding support for bytearray would be trivial

[issue36064] docs: urllib.request.Request not accepting iterables data type

2019-02-21 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Thank you @xtreak for adding Martin and Senthil. -- ___ Python tracker ___ ___ Python-bugs-list

[issue36064] docs: urllib.request.Request not accepting iterables data type

2019-02-21 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Stéphane, I don't know much about urllib to review this. The reason I said it's better document this is that there was an extended discussion on issue25439 along with a PR about type checking breaking some behavior and ambiguity in what is allowed

[issue20582] socket.getnameinfo() does not document flags

2019-02-21 Thread Emmanuel Arias
Change by Emmanuel Arias : -- keywords: +patch pull_requests: +12001 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue36064] docs: urllib.request.Request not accepting iterables data type

2019-02-21 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: @xtreak I have just pushed a PR, if you think it's an issue related to the documentation, you can ignore my PR and in this case I will close it. now, it's not related to the doc, could you review it and give me your feedback? Thank you, --

[issue36064] docs: urllib.request.Request not accepting iterables data type

2019-02-21 Thread Stéphane Wirtel
Change by Stéphane Wirtel : -- keywords: +patch pull_requests: +12000 stage: -> patch review ___ Python tracker ___ ___

[issue36064] docs: urllib.request.Request not accepting iterables data type

2019-02-21 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: @xtreak ok because it's not related to the documentation, I have a fix for this issue but I am not sure about the title for this PR but what do you suggest? "Fix the encoding in _send_output when sending an iterable object via urllib.request.Request" ?

[issue36064] docs: urllib.request.Request not accepting iterables data type

2019-02-21 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: ok, I confirm this issue, now, with httpbin.org I get the same issue. and it's just when we try to send the stream to the server. -- ___ Python tracker

[issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a)

2019-02-21 Thread STINNER Victor
STINNER Victor added the comment: After my change: commit 3ef6344ee53f59ee86831ec36ed2c6f93a56229d Author: Victor Stinner Date: Tue Feb 19 18:06:03 2019 +0100 bpo-36037: Fix test_ssl for strict OpenSSL policy (GH-11940) Two tests are still failing on the Debian buildbot worker:

[issue36035] pathlib.Path().rglob() breaks with broken symlinks

2019-02-21 Thread Emmanuel Arias
Emmanuel Arias added the comment: Hello! I make the PR: https://github.com/python/cpython/pull/11964 But I need help to test it :-( Any could help me please? -- nosy: +eamanu ___ Python tracker

[issue36064] docs: urllib.request.Request not accepting iterables data type

2019-02-21 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I guess key should be bytes instead of a dict with string key. Maybe the docs could be improved about the case where key in case of dict should be bytes. >>> from urllib.request import urlopen, Request >>> r = Request("http://httpbin.org/post;,

[issue36064] docs: urllib.request.Request not accepting iterables data type

2019-02-21 Thread Lye
Lye added the comment: And I tested in both : Centos 6.10 4.14.77-70.59.amzn1.x86_64 -- ___ Python tracker ___ ___

  1   2   >