[issue31937] Add the term "dunder" to the glossary

2017-11-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: Recommend closing this and leaving it for StackOverflow. I really don't want to further garbage-up the glossary. -- ___ Python tracker

[issue30339] test_multiprocessing_main_handling: "RuntimeError: Timed out waiting for results" on x86 Windows7 3.x

2017-11-09 Thread STINNER Victor
STINNER Victor added the comment: Yet another similar bug on "x86 Windows7 3.x": http://buildbot.python.org/all/#/builders/58/builds/134 == FAIL: test_ipython_workaround

[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument

2017-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm not well experienced with logging, but if we can change the logging in subprocesses, I think we could change it to not output messages at all. It would be better to save logging messages in subprocesses and check that

[issue31978] make it simpler to round fractions

2017-11-09 Thread Wolfgang Maier
Wolfgang Maier added the comment: > (E.g., if both `a` and `b` are not-too-large integers, `round(a / b)` is > still "safe" in that it will give the same result as if a non-lossy integer > division is used.) Well, it does not take particularly large a

[issue31978] make it simpler to round fractions

2017-11-09 Thread Wolfgang Maier
Wolfgang Maier added the comment: That, of course, wasn't my original suggestion, but since Mark started discussing other possible forms this could take, like round-to-nearest analogs of mod and divmod, I thought maybe it's worth pointing out this

[issue31937] Add the term "dunder" to the glossary

2017-11-09 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: docs@python -> fdrake nosy: +fdrake ___ Python tracker ___

[issue31975] Add a default filter for DeprecationWarning in __main__

2017-11-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: > And I'll repeat: I'm entirely happy with the "revert the change for __main__ > only" compromise, since it covers all the cases I care about. And that's what I'm unhappy with. We should either revert the change for all code, or not revert

[issue31978] make it simpler to round fractions

2017-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Mark said about round(x/y), not round(x/y, 1). Do you propose to add a three argument divide_and_round(x, y, ndigits)? -- ___ Python tracker

[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument

2017-11-09 Thread Vinay Sajip
Vinay Sajip added the comment: > What is the best way to silence logging in subprocesses? Are you referring to the output shown in msg305601? If it's caused by logging statements, the best way would be either to pipe stderr to /dev/null or to change the logging to

[issue31987] Ctypes Packing Bitfields Incorrectly - GCC both Linux and Cygwin

2017-11-09 Thread Berker Peksag
Berker Peksag added the comment: Thank you for your report. I believe this is a duplicate of issue 29753. -- nosy: +berker.peksag resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Ctypes Packing Bitfields Incorrectly - Linux

[issue31893] Issues with kqueue

2017-11-09 Thread STINNER Victor
STINNER Victor added the comment: Same failure on x86-64 El Capitan 2.7/ http://buildbot.python.org/all/#builders/98/builds/17 == FAIL: test_create_event (test.test_kqueue.TestKQueue)

[issue10049] Add a "no-op" (null) context manager to contextlib (Rejected: use contextlib.ExitStack())

2017-11-09 Thread Albert Zeyer
Albert Zeyer added the comment: Note that this indeed seems confusing. I just found this thread by search for a null context manager. Because I found that in TensorFlow they introduced _NullContextmanager in their code and I wondered that this is not provided by the

[issue31893] Issues with kqueue

2017-11-09 Thread STINNER Victor
STINNER Victor added the comment: On also AMD64 FreeBSD 10.x Shared 2.7: http://buildbot.python.org/all/#/builders/97/builds/17 == FAIL: test_create_event (test.test_kqueue.TestKQueue)

[issue30487] DOC: automatically create a venv and install Sphinx when running make

2017-11-09 Thread Caleb Hattingh
Change by Caleb Hattingh : -- keywords: +patch pull_requests: +4303 ___ Python tracker ___

[issue31893] Issues with kqueue

2017-11-09 Thread STINNER Victor
STINNER Victor added the comment: Test fails on x86 Tiger 2.7: http://buildbot.python.org/all/#/builders/59/builds/17 == FAIL: test_create_event (test.test_kqueue.TestKQueue)

[issue31990] Pickling deadlocks in thread with python -m

2017-11-09 Thread Werner Smidt
New submission from Werner Smidt : Hi there I recently stumbled on an interesting behaviour. I won't call it an error, because I think it's a mistake I made. BACKGROUND: I want to spawn threads that handle pickled data. This works really well. However, I would

[issue10049] Add a "no-op" (null) context manager to contextlib (Rejected: use contextlib.ExitStack())

2017-11-09 Thread Hrvoje Nikšić
Hrvoje Nikšić added the comment: For what it's worth, we are still using our own null context manager function in critical code. We tend to avoid contextlib.ExitStack() for two reasons: 1) it is not immediately clear from looking at the code what ExitStack() means. (Unlike

[issue30487] DOC: automatically create a venv and install Sphinx when running make

2017-11-09 Thread Caleb Hattingh
Caleb Hattingh added the comment: No worries. I've made a new PR 4346. The old one was unsalvagable I'm afraid. Too many other people got added to the notifications list as a result of my incorrect rebase. The new one is fine. --

[issue31978] make it simpler to round fractions

2017-11-09 Thread Wolfgang Maier
Wolfgang Maier added the comment: >>> for x in range(1,501): for y in range(1,501): if round(x/y, 1) != float(round(F(x,y), 1)): print(x,y) where F is fractions.Fraction Sorry! --

[issue31893] Issues with kqueue

2017-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, I didn't test on 2.7. The old code contradicted the common comparison behavior. It allowed comparing select.kevent with other objects only for equality as for identity. `kevent == other` always returned False even if `other

[issue31991] Race condition in wait with timeout for multiprocessing.Event

2017-11-09 Thread Thomas Moreau
New submission from Thomas Moreau : If the methods `set` and `clear` of `multiprocessing.Event` are called one after another, while a `multiprocessing.Process` calls `wait`, the `Event` does not match the documented behavior

[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument

2017-11-09 Thread Antoine Pitrou
Change by Antoine Pitrou : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument

2017-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Antoine! -- ___ Python tracker ___

[issue31265] Remove doubly-linked list from C OrderedDict

2017-11-09 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue31989] setattr on a property gives a very unhelpful exception

2017-11-09 Thread R. David Murray
R. David Murray added the comment: This is a duplicate of #27794. -- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> setattr a read-only property; the AttributeError should show the attribute that failed

[issue27794] setattr a read-only property; the AttributeError should show the attribute that failed

2017-11-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +Interpreter Core nosy: +ncoghlan stage: -> needs patch versions: +Python 3.7 ___ Python tracker

[issue31893] Issues with kqueue

2017-11-09 Thread STINNER Victor
STINNER Victor added the comment: kqueue_event_richcompare() returns NotImplemented if other is not an event: if (!kqueue_event_Check(o)) { Py_INCREF(Py_NotImplemented); return Py_NotImplemented; } So I don't understand why tests started to

[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument

2017-11-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 0a2ff23fe6efb1653d655ac19d0a4e1629fd8d95 by Antoine Pitrou in branch 'master': Silence error output in test_concurrent_futures (bpo-21423) (#4347) https://github.com/python/cpython/commit/0a2ff23fe6efb1653d655ac19d0a4e1629fd8d95

[issue31893] Issues with kqueue

2017-11-09 Thread STINNER Victor
STINNER Victor added the comment: I suggest to fix the tests, the code looks good to me. -- ___ Python tracker ___

[issue31927] Fix compiling the socket module on NetBSD 8 and other issues

2017-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d3187158c09cf899e9849f335bdff10594209167 by Serhiy Storchaka in branch 'master': bpo-31927: Fix bugs in socketmodule.c on NetBSD and other issues. (#4235)

[issue27142] Default int value with xmlrpclib / xmlrpc.client

2017-11-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> rejected stage: -> resolved status: pending -> closed ___ Python tracker

[issue28827] f-strings: format spec should not accept unicode escapes

2017-11-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> not a bug stage: -> resolved status: pending -> closed ___ Python tracker

[issue14975] import unicodedata, DLL load failed on Python 2.7.3

2017-11-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> out of date stage: -> resolved status: pending -> closed ___ Python tracker

[issue30213] ZipFile from 'a'ppend-mode file generates invalid zip

2017-11-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> duplicate stage: -> resolved status: pending -> closed ___ Python tracker

[issue30035] [RFC] PyMemberDef.name should be const char *

2017-11-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> out of date stage: -> resolved status: pending -> closed ___ Python tracker

[issue31975] Add a default filter for DeprecationWarning in __main__

2017-11-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Then let the statu quo wins! -- ___ Python tracker ___

[issue31992] Make iteration over dict_items yield namedtuples

2017-11-09 Thread Richard Neumann
New submission from Richard Neumann : Currently, iterating over dict_items will yield plain tuples, where the first item will be the key and the second item will be the respective value. This has some disadvantages when e.g. sorting dict items by value and key: def

[issue28759] access to mkfifo, mknod and hard links is controled by SELinux MAC on Android

2017-11-09 Thread Xavier de Gaye
Change by Xavier de Gaye : -- pull_requests: +4307 ___ Python tracker ___ ___

[issue25849] files, opened in unicode (text): write() returns symbols count, but seek() expect offset in bytes

2017-11-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- status: pending -> closed ___ Python tracker ___

[issue31992] Make iteration over dict_items yield namedtuples

2017-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, no! Tuples is one of the most charming features of Python. Use tuples, folk! -- nosy: +rhettinger, serhiy.storchaka ___ Python tracker

[issue31893] Issues with kqueue

2017-11-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +4306 stage: resolved -> patch review ___ Python tracker ___

[issue31977] threading.Condition can not work with threading.Semaphore

2017-11-09 Thread Antoine Pitrou
Change by Antoine Pitrou : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue31927] Fix compiling the socket module on NetBSD 8 and other issues

2017-11-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +4308 ___ Python tracker ___ ___

[issue31778] ast.literal_eval supports non-literals in Python 3

2017-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- ___ Python tracker ___ ___

[issue30952] [Windows] include Math extension in SQlite

2017-11-09 Thread STINNER Victor
STINNER Victor added the comment: "If you want SQlite because of its performance, recent version starts to do multi-threading, and/or fear to leave other langages a stupid sizeable performance advantage, then you may perhaps don't leave the situation as it is." I'm

[issue29416] Path.mkdir can get into a recursive error loop

2017-11-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: commit review -> resolved status: pending -> closed ___ Python tracker

[issue31893] Issues with kqueue

2017-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Because the default behavior is different in Python 2 and Python 3. In Python 3 this is a TypeError. In Python 2 all objects are comparable by default. -- ___ Python tracker

[issue31975] Add a default filter for DeprecationWarning in __main__

2017-11-09 Thread Guido van Rossum
Guido van Rossum added the comment: > Such a middle ground is just a wishy-washy decision-by-committee compromise. Fine, but since *I* won't tolerate these warnings on for everything, this is the best you can do. If you don't like it, the status quo wins. --

[issue31893] Issues with kqueue

2017-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Fixed by PR 4349 (changeset 15e14538f90cabc87473a489316fdb81af76cfb2). -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue30952] [Windows] include Math extension in SQlite

2017-11-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2017-11-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: As for the C pickler, currently it dumps the whole pickle into an internal buffer before calling write() at the end. You may want to make writing more incremental. See Modules/_pickler.c (especially _Pickler_Write()). -- stage:

[issue31995] Set operations documentation error

2017-11-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +rhettinger, serhiy.storchaka versions: -Python 3.4, Python 3.5 ___ Python tracker

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2017-11-09 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +4309 stage: needs patch -> patch review ___ Python tracker

[issue14124] _pickle.c comment/documentation improvement

2017-11-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> rejected stage: -> resolved status: pending -> closed ___ Python tracker

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2017-11-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue31927] Fix compiling the socket module on NetBSD 8 and other issues

2017-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 596286f8f3c8e53ef010d6298464775dc900a515 by Serhiy Storchaka in branch '3.6': [3.6] bpo-31927: Fix bugs in socketmodule.c on NetBSD and other issues. (GH-4235) (#4352)

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2017-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Would be nice to see benchmarks. And what about C version? -- ___ Python tracker ___

[issue31995] Set operations documentation error

2017-11-09 Thread Alexander Mentis
New submission from Alexander Mentis : Documentation for set/frozenset says |=, &=, -=, ^= operators do not apply to immutable instances of frozenset. This is incorrect. These operators can be used on frozenset; however, they behave differently on frozenset than on set.

[issue31994] json encoder exception could be better

2017-11-09 Thread Jason Hihn
New submission from Jason Hihn : Given this traceback: File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py", line 184, in default raise TypeError(repr(o) + " is not JSON serializable") TypeError: 7.0374198 is not

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2017-11-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Of course, +1 for fixing this. -- ___ Python tracker ___

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2017-11-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: You don't need to add a test for a performance enhancement. -- stage: -> needs patch type: resource usage -> performance versions: -Python 3.4, Python 3.5, Python 3.6, Python 3.8 ___ Python tracker

[issue21322] Pathlib .owner() and .group() methods fail on broken links

2017-11-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> rejected stage: -> resolved status: pending -> closed ___ Python tracker

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2017-11-09 Thread Olivier Grisel
New submission from Olivier Grisel : I noticed that both pickle.Pickler (C version) and pickle._Pickler (Python version) make unnecessary memory copies when dumping large str, bytes and bytearray objects. This is caused by unnecessary concatenation of the opcode and

[issue19907] gettext - Non ascii chars in header

2017-11-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> out of date stage: -> resolved status: pending -> closed ___ Python tracker

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2017-11-09 Thread Antoine Pitrou
Change by Antoine Pitrou : -- stage: needs patch -> patch review ___ Python tracker ___ ___

[issue31927] Fix compiling the socket module on NetBSD 8 and other issues

2017-11-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +4310 ___ Python tracker ___ ___

[issue31992] Make iteration over dict_items yield namedtuples

2017-11-09 Thread Eric V. Smith
Eric V. Smith added the comment: I cannot imagine this ever happening, for performance reasons. You should write your own wrapper around items, if you want this behavior. -- nosy: +eric.smith ___ Python tracker

[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2017-11-09 Thread Neil Schemenauer
Neil Schemenauer added the comment: FYI, this would seem to be an incentive to get my "bitmaps for small GC objects" idea implemented. I.e. https://mail.python.org/pipermail/python-dev/2017-September/149307.html If implemented, the extra size of the PyGC_Head would

[issue31222] datetime.py implementation of .replace inconsistent with C implementation

2017-11-09 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4312 ___ Python tracker ___

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2017-11-09 Thread Olivier Grisel
Olivier Grisel added the comment: More benchmarks with the unix time command: ``` (py37) ogrisel@ici:~/code/cpython$ git checkout master Switched to branch 'master' Your branch is up-to-date with 'origin/master'. (py37) ogrisel@ici:~/code/cpython$ time python

[issue31927] Fix compiling the socket module on NetBSD 8 and other issues

2017-11-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31222] datetime.py implementation of .replace inconsistent with C implementation

2017-11-09 Thread STINNER Victor
STINNER Victor added the comment: New changeset 191e993365ac3206f46132dcf46236471ec54bfa by Victor Stinner (Paul Ganssle) in branch 'master': bpo-31222: Make (datetime|date|time).replace return subclass type in Pure Python (#4176)

[issue31985] Deprecate openfp() in aifc, sunau and wave

2017-11-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- title: Deprecate aifc.openfp -> Deprecate openfp() in aifc, sunau and wave ___ Python tracker

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2017-11-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: But the total runtime is higher? (6 s. vs. 5 s.) Can you post the CPU time? (as measured by `time`, for example) -- ___ Python tracker

[issue31778] ast.literal_eval supports non-literals in Python 3

2017-11-09 Thread Neil Schemenauer
Neil Schemenauer added the comment: Just a comment on what I guess is the intended use of literal_eval(), i.e. taking a potentially untrusted string and turning it into a Python object. Exposing the whole of the Python parser to potential attackers would make me very

[issue31985] Deprecate openfp() in aifc, sunau and wave

2017-11-09 Thread Brian Curtin
Brian Curtin added the comment: Serhiy, where should a common test that covers all three of these go? I'm not seeing an obvious place for it. -- ___ Python tracker

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2017-11-09 Thread Olivier Grisel
Olivier Grisel added the comment: I wrote a script to monitor the memory when dumping 2GB of data with python master (C pickler and Python pickler): ``` (py37) ogrisel@ici:~/code/cpython$ python ~/tmp/large_pickle_dump.py Allocating source data... => peak memory

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2017-11-09 Thread Olivier Grisel
Olivier Grisel added the comment: Note that the time difference is not significant. I rerun the last command I got: ``` (py37) ogrisel@ici:~/code/cpython$ python ~/tmp/large_pickle_dump.py --use-pypickle Allocating source data... => peak memory usage: 2.014 GB

[issue31927] Fix compiling the socket module on NetBSD 8 and other issues

2017-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 1bce4efdb4624561adce62e544dbe20ec2627ae2 by Serhiy Storchaka in branch '2.7': [2.7] bpo-31927: Fix reading arbitrary data when parse a AF_BLUETOOTH address (GH-4235) (GH-4352) (#4355)

[issue30952] [Windows] include Math extension in SQlite

2017-11-09 Thread Big Stone
Big Stone added the comment: Please apologize. I indeed went off-topic. I can understand few person find this request usefull, and over-react to defend it. Sorry again. -- status: pending -> open ___ Python tracker

[issue31996] `setuptools.setup` parameter `py_modules` is undocumented

2017-11-09 Thread Berker Peksag
Berker Peksag added the comment: Thank you for your report, but the correct place to report issues with packaging.p.o is https://github.com/pypa/python-packaging-user-guide -- nosy: +berker.peksag resolution: -> third party stage: -> resolved status: open ->

[issue31996] `setuptools.setup` parameter `py_modules` is undocumented

2017-11-09 Thread Luther Thompson
New submission from Luther Thompson : I wrote my own distribution package with only one module, but the module file was not being installed along with the dist info file. I found by looking up the code for the `six` module that `setup` has a `py_modules` parameter which

[issue31993] pickle.dump allocates unnecessary temporary bytes / str

2017-11-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: So we're saving memory and CPU time. Cool! -- ___ Python tracker ___

[issue31299] Add "ignore_modules" option to TracebackException.format()

2017-11-09 Thread Dmitry Kazakov
Dmitry Kazakov added the comment: I only recently realized that trace.Trace accepts two similar arguments, namely ignoremods and ignoredirs. Should we try to make the API and implementation of the functionality proposed here conform to that of trace.Trace's ignoremods?

[issue31985] Deprecate openfp() in aifc, sunau and wave

2017-11-09 Thread Brian Curtin
Brian Curtin added the comment: I think https://github.com/python/cpython/pull/4344 covers what you're looking for. -- ___ Python tracker

[issue31985] Deprecate openfp() in aifc, sunau and wave

2017-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: audiotests.py. Create class AudioMiscTests and inherit classes AifcMiscTest, SunauMiscTest, WaveMiscTest from it instead of AudioTests. There is more work because there was no base for misc tests, but this will make adding other

[issue10049] Add a "no-op" (null) context manager to contextlib

2017-11-09 Thread Nick Coghlan
Nick Coghlan added the comment: Reverting to "Needs patch", as the currently attached patch is for the "No behaviour" variant that always returns None from __enter__(). (hniksic, would you still be willing to sign the Python CLA? If so, then your patch could be used as

[issue31997] SSL lib does not handle trailing dot (period) in hostname or certificate

2017-11-09 Thread Sam Napolitano
New submission from Sam Napolitano : I recently came across an issue in the ssl library and have a simple fix to address it. When doing hostname verification against an X.509 certificate, a trailing dot (period) in the hostname is matched against the certificate. But

[issue31222] datetime.py implementation of .replace inconsistent with C implementation

2017-11-09 Thread STINNER Victor
STINNER Victor added the comment: New changeset b9a40aca2935d2569191844c88f8b61269e383cb by Victor Stinner (Miss Islington (bot)) in branch '3.6': bpo-31222: Make (datetime|date|time).replace return subclass type in Pure Python (GH-4176) (#4356)

[issue10049] Add a "no-op" (null) context manager to contextlib

2017-11-09 Thread Nick Coghlan
Nick Coghlan added the comment: Reopening this based on several years of additional experience with context managers since I wrote https://bugs.python.org/issue10049#msg119514 when originally closing it. The version I'm now interested in adding is the one from

[issue31975] Add a default filter for DeprecationWarning in __main__

2017-11-09 Thread Nick Coghlan
Nick Coghlan added the comment: Antoine, it's not a wishy-washy compromise, it's a compromise based on the fact that code that has been factored out to a support module is far more likely to have a test suite than code that's directly in __main__. Thus the logic for the

[issue31380] test_undecodable_filename() in Lib/test/test_httpservers.py broken on APFS

2017-11-09 Thread Matt Billenstein
Matt Billenstein added the comment: Reflected on the High Sierra buildbot now: http://buildbot.python.org/all/#/builders/14/builds/162 -- nosy: +mattbillenstein ___ Python tracker

[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument

2017-11-09 Thread Antoine Pitrou
Change by Antoine Pitrou : -- pull_requests: +4304 stage: -> patch review ___ Python tracker ___

[issue21423] concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument

2017-11-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Serhiy, I think I have found a way to deal with the logging output: https://github.com/python/cpython/pull/4347 -- stage: patch review -> ___ Python tracker

[issue28441] Change sys.executable to include executable suffix

2017-11-09 Thread Erik Bray
Change by Erik Bray : -- pull_requests: +4305 ___ Python tracker ___ ___

[issue28117] warning: dereferencing type-punned pointer will break strict-aliasing rules

2017-11-09 Thread Masayuki Yamamoto
Masayuki Yamamoto added the comment: Serhiy, would you open a PR? Your patch looks good to me. I've been looking at the warning on my machine (ubuntu 16.04 x86), it's a bit annoying to me. -- nosy: +masamoto ___ Python

[issue31997] SSL lib does not handle trailing dot (period) in hostname or certificate

2017-11-09 Thread Christian Heimes
Christian Heimes added the comment: In the future Python will no longer use its own hostname verification code. Instead we are going to rely on OpenSSL to verify the hostname for us. A trailing dot also affects SNI. How do OpenSSL's functions SSL_set_tlsext_host_name() and

[issue31997] SSL lib does not handle trailing dot (period) in hostname or certificate

2017-11-09 Thread Christian Heimes
Christian Heimes added the comment: Trailing dots in hostname seem to be protocol specific, e.g. SMTP does not allow them. Unless you find a RFC that mandates support for trailing dots in TLS, I'm against a change in Python's TLS stack. It's too risky to mess up SNI, too.