[issue32776] asyncio SIGCHLD scalability problems

2019-04-04 Thread twisteroid ambassador


twisteroid ambassador  added the comment:

The child watchers are documented now, see here: 
https://docs.python.org/3/library/asyncio-policy.html#process-watchers

Sounds like FastChildWatcher 
https://docs.python.org/3/library/asyncio-policy.html#asyncio.FastChildWatcher 
is exactly what you need if you stick with the stock event loop.

--
nosy: +twisteroid ambassador

___
Python tracker 

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



[issue36532] Example of logging.formatter with new str.format style

2019-04-04 Thread Fred L. Drake, Jr.


Change by Fred L. Drake, Jr. :


--
nosy: +fdrake

___
Python tracker 

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



[issue32776] asyncio SIGCHLD scalability problems

2019-04-04 Thread Roman Evstifeev


Change by Roman Evstifeev :


--
nosy: +Roman.Evstifeev

___
Python tracker 

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



[issue36532] Example of logging.formatter with new str.format style

2019-04-04 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
pull_requests: +12618
stage:  -> patch review

___
Python tracker 

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



[issue36532] Example of logging.formatter with new str.format style

2019-04-04 Thread spaceman_spiff


Change by spaceman_spiff :


--
type:  -> enhancement

___
Python tracker 

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



[issue36532] Example of logging.formatter with new str.format style

2019-04-04 Thread spaceman_spiff


New submission from spaceman_spiff :

It was not quite clear how to use the logging library with the new str.format 
style so I added an example in the logging cookbook

--
assignee: docs@python
components: Documentation
messages: 339470
nosy: docs@python, spaceman_spiff
priority: normal
severity: normal
status: open
title: Example of logging.formatter with new str.format style
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue30588] Missing documentation for codecs.escape_decode

2019-04-04 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
stage:  -> needs patch

___
Python tracker 

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



[issue30588] Missing documentation for codecs.escape_decode

2019-04-04 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

We can't change it or remove it, it is public by virtue of its name.  We should 
document it.

Removing or renaming it to be _private requires a PendingDeprecationWarning -> 
DeprecationWarning -> removal cycle.  it is well known and used.

https://stackoverflow.com/questions/14820429/how-do-i-decodestring-escape-in-python3/23151714#23151714

--
nosy: +gregory.p.smith, njs
versions: +Python 3.8 -Python 3.3, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue36530] Document codecs decode_encode() and encode_decode() APIs

2019-04-04 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
resolution:  -> duplicate
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

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



[issue36530] Document codecs decode_encode() and encode_decode() APIs

2019-04-04 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
superseder:  -> Missing documentation for codecs.escape_decode

___
Python tracker 

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



[issue36524] identity operator

2019-04-04 Thread Eric V. Smith


Change by Eric V. Smith :


--
nosy: +eric.smith

___
Python tracker 

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



[issue36531] PyType_FromSpec wrong behavior with multiple Py_tp_members

2019-04-04 Thread Eddie Elizondo


Change by Eddie Elizondo :


--
keywords: +patch
pull_requests: +12617
stage:  -> patch review

___
Python tracker 

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



[issue36531] PyType_FromSpec wrong behavior with multiple Py_tp_members

2019-04-04 Thread Eddie Elizondo


New submission from Eddie Elizondo :

If a user accidentally defined more than one Py_tp_members in the spec, 
PyType_FromSpec will ignore all but the last use case. However, the number of 
members count will cause the type to allocate more memory than needed. This 
leads to weird behavior and crashes.

The solution is a one line fix to just restart the count if multiple 
Py_tp_members are defined.

--
messages: 339468
nosy: eelizondo
priority: normal
severity: normal
status: open
title: PyType_FromSpec wrong behavior with multiple Py_tp_members

___
Python tracker 

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



[issue36530] Document codecs decode_encode() and encode_decode() APIs

2019-04-04 Thread Gregory P. Smith


New submission from Gregory P. Smith :

The codecs module has public decode_encode() and encode_decode() functions.  
They have never been documented, but are recommended for some uses such as:

https://stackoverflow.com/questions/14820429/how-do-i-decodestring-escape-in-python3/23151714#23151714

As public APIs, we should document them.

--
assignee: docs@python
components: Documentation
messages: 339467
nosy: docs@python, gregory.p.smith, njs
priority: normal
severity: normal
stage: needs patch
status: open
title: Document codecs decode_encode() and encode_decode() APIs
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue36524] identity operator

2019-04-04 Thread Rocco Santoro


Rocco Santoro  added the comment:

You are right. The documentation, that I know, is clear. Anyway in this case 
"is" and "==" provides the same outcome and this is my remark, that I called 
bug, wrongly. The reason is the nature of print(), as function, that always 
remains always NoneType with only the value None.  Nevertheless, print, as 
method, could be referred to the object. 
This is my goofy remark about the contraddiction between the message of the 
communication by print method and the nature of the communication by print 
function. 
Therefore, the monitor tells you that two things are not equals because they 
are two different ways to say the same message. Thanks a lot for the patience

--

___
Python tracker 

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



[issue9194] winreg:fixupMultiSZ should check that P < Q in the inner loop

2019-04-04 Thread Eryk Sun


Eryk Sun  added the comment:

There's still a potential problem when Reg2Py calls wcslen(str[index]). This 
could be addressed by having fixupMultiSZ take an int array to store the length 
of each string. For example:

static void
fixupMultiSZ(wchar_t **strings, int *lengths, wchar_t *data, int len)
{
wchar_t *P, *Q = data + len;
int i;

for (P = data, i = 0; P < Q && *P; P++, i++) {
strings[i] = P;
lengths[i] = 0;
for (; P < Q && *P; P++) {
lengths[i]++;
}
}
}

We'd have to allocate the lengths array in Reg2Py, like we do for the strings 
array. Also, we can remove the overflow error check prior to 
PyUnicode_FromWideChar. The longest possible length is `retDataSize / 2`, which 
occurs if a single string is stored without any null terminators.

--

___
Python tracker 

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



[issue35866] concurrent.futures deadlock

2019-04-04 Thread cagney


cagney  added the comment:

Here's the children; yes there are somehow 4 children sitting around.  
Hopefully this is enough to figure out where things deadlock.

29970  8752  8752 29970 pts/6 8752 Sl+   1000   1:00  |   |   \_ 
./v3.7.3/bin/python3 cf-deadlock.py
 8752  8975  8752 29970 pts/6 8752 S+1000   0:00  |   |   \_ 
./v3.7.3/bin/python3 cf-deadlock.py
 8752  8976  8752 29970 pts/6 8752 S+1000   0:00  |   |   \_ 
./v3.7.3/bin/python3 cf-deadlock.py
 8752  8977  8752 29970 pts/6 8752 S+1000   0:00  |   |   \_ 
./v3.7.3/bin/python3 cf-deadlock.py
 8752  8978  8752 29970 pts/6 8752 S+1000   0:00  |   |   \_ 
./v3.7.3/bin/python3 cf-deadlock.py

8975

Current thread 0x7f3be65126c0 (most recent call first):
  File "", line 219 in _call_with_frames_removed
  File "", line 1043 in create_module
  File "", line 583 in module_from_spec
  File "", line 670 in _load_unlocked
  File "", line 967 in _find_and_load_unlocked
  File "", line 983 in _find_and_load
  File "/home/python/v3.7.3/lib/python3.7/ctypes/__init__.py", line 7 in 

  File "", line 219 in _call_with_frames_removed
  File "", line 728 in exec_module
  File "", line 677 in _load_unlocked
  File "", line 967 in _find_and_load_unlocked
  File "", line 983 in _find_and_load
  File "cf-deadlock.py", line 17 in f
  File "/home/python/v3.7.3/lib/python3.7/concurrent/futures/process.py", line 
232 in _process_worker
  File "/home/python/v3.7.3/lib/python3.7/multiprocessing/process.py", line 99 
in run
  File "/home/python/v3.7.3/lib/python3.7/multiprocessing/process.py", line 297 
in _bootstrap
  File "/home/python/v3.7.3/lib/python3.7/multiprocessing/popen_fork.py", line 
74 in _launch
  File "/home/python/v3.7.3/lib/python3.7/multiprocessing/popen_fork.py", line 
20 in __init__
  File "/home/python/v3.7.3/lib/python3.7/multiprocessing/context.py", line 277 
in _Popen
  File "/home/python/v3.7.3/lib/python3.7/multiprocessing/process.py", line 112 
in start
  File "/home/python/v3.7.3/lib/python3.7/concurrent/futures/process.py", line 
593 in _adjust_process_count
  File "/home/python/v3.7.3/lib/python3.7/concurrent/futures/process.py", line 
569 in _start_queue_management_thread
  File "/home/python/v3.7.3/lib/python3.7/concurrent/futures/process.py", line 
615 in submit
  File "cf-deadlock.py", line 25 in 

8976

Current thread 0x7f3be65126c0 (most recent call first):
  File "/home/python/v3.7.3/lib/python3.7/multiprocessing/connection.py", line 
379 in _recv
  File "/home/python/v3.7.3/lib/python3.7/multiprocessing/connection.py", line 
407 in _recv_bytes
  File "/home/python/v3.7.3/lib/python3.7/multiprocessing/connection.py", line 
216 in recv_bytes
  File "/home/python/v3.7.3/lib/python3.7/multiprocessing/queues.py", line 94 
in get
  File "/home/python/v3.7.3/lib/python3.7/concurrent/futures/process.py", line 
226 in _process_worker
  File "/home/python/v3.7.3/lib/python3.7/multiprocessing/process.py", line 99 
in run
  File "/home/python/v3.7.3/lib/python3.7/multiprocessing/process.py", line 297 
in _bootstrap
  File "/home/python/v3.7.3/lib/python3.7/multiprocessing/popen_fork.py", line 
74 in _launch
  File "/home/python/v3.7.3/lib/python3.7/multiprocessing/popen_fork.py", line 
20 in __init__
  File "/home/python/v3.7.3/lib/python3.7/multiprocessing/context.py", line 277 
in _Popen
  File "/home/python/v3.7.3/lib/python3.7/multiprocessing/process.py", line 112 
in start
  File "/home/python/v3.7.3/lib/python3.7/concurrent/futures/process.py", line 
593 in _adjust_process_count
  File "/home/python/v3.7.3/lib/python3.7/concurrent/futures/process.py", line 
569 in _start_queue_management_thread
  File "/home/python/v3.7.3/lib/python3.7/concurrent/futures/process.py", line 
615 in submit
  File "cf-deadlock.py", line 25 in 

8977

Current thread 0x7f3be65126c0 (most recent call first):
  File "/home/python/v3.7.3/lib/python3.7/multiprocessing/synchronize.py", line 
95 in __enter__
  File "/home/python/v3.7.3/lib/python3.7/multiprocessing/queues.py", line 93 
in get
  File "/home/python/v3.7.3/lib/python3.7/concurrent/futures/process.py", line 
226 in _process_worker
  File "/home/python/v3.7.3/lib/python3.7/multiprocessing/process.py", line 99 
in run
  File "/home/python/v3.7.3/lib/python3.7/multiprocessing/process.py", line 297 
in _bootstrap
  File "/home/python/v3.7.3/lib/python3.7/multiprocessing/popen_fork.py", line 
74 in _launch
  File "/home/python/v3.7.3/lib/python3.7/multiprocessing/popen_fork.py", line 
20 in __init__
  File "/home/python/v3.7.3/lib/python3.7/multiprocessing/context.py", line 277 
in _Popen
  File "/home/python/v3.7.3/lib/python3.7/multiprocessing/process.py", line 112 
in start
  File "/home/python/v3.7.3/lib/python3.7/concurrent/futures/process.py", line 
593 in _adjust_process_count
  File "/home/python/v3.7.3/lib/python3.7/concurrent/futures/process.py", line 
569 in _start_queue_management_thread
  File 

[issue36529] Python from WindowsStore: can't install package using "-m pip"

2019-04-04 Thread SilentGhost


Change by SilentGhost :


--
components: +Demos and Tools -Installation
nosy: +Marcus.Smith, dstufft, ncoghlan, paul.moore

___
Python tracker 

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



[issue36524] identity operator

2019-04-04 Thread SilentGhost


SilentGhost  added the comment:

Rocco, == is an equality operator, "is" is used for identity testing. If you 
have an example of documentation that states that == is an identity operator, 
do report it and we'd be glad to fix it.

The print function does not change the object, it's the print function itself 
that return None.

--

___
Python tracker 

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



[issue36525] Deprecate instancemethod

2019-04-04 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

Actually, there is a use case, and it's one I've been intermittently trying to 
replicate ever since the functionality vanished in the Python 2 to 3 transition 
(or so I thought).

The use case is taking an existing built-in function (as in a CPython function 
defined in C, and therefore not naturally obeying the descriptor protocol) and 
converting it to the equivalent of an unbound method for assignment to a class.

In Python 2, a trick I'd use to make int-like classes work identically on 
Python 2 and Python 3 was to define it like so:

import types
import sys

class MyInt:
def __index__(self):
return SOMEINTEGER

if sys.version_info[0] == 2:
from future_builtins import hex, oct
MyInt.__hex__ = types.MethodType(hex, None, MyInt)
MyInt.__oct__ = types.MethodType(oct, None, MyInt)
del hex, oct

Essentially it took the built-in methods from future_builtins that used 
__index__ and converted them to unbound methods of MyInt so even people using 
my code with the non-future hex/oct would get the correct behavior (the old hex 
would call __hex__, which was actually the future hex, and would therefore 
delegate to __index__). And it did it at C speed; no additional bytecode was 
executed whether you used the class with old or future hex. That specific use 
case doesn't actually apply to hex/oct anymore (conveniently, it was only 
needed when on the version that supported it), but it's a general purpose tool.

In Python 3, types.MethodType lost the final argument (because now Python level 
code only had functions and bound methods, no in-between concept of unbound 
methods). But this removed some functionality I liked; in particular I'd liked 
the idea of using operator.attrgetter to define rich comparisons and hashing in 
terms of a key method (__key__ has been proposed before for this purpose IIRC) 
implemented in C (to reduce overhead from delegating all of those methods to 
yet another method).

Now that you've pointed out this API to me, I could actually do that. Not 
prettily (since it involves using ctypes to gain access), but it's possible. If 
exposed at the Python layer (or in the case of my testing, manually loaded 
using ctypes), I can implement __key__ on a class with:

class Foo:
# Compare based on attributes x, y and z
__key__ = PyInstanceMethod_New(operator.attrgetter('x', 'y', 'z'))
def __eq__(self, other):
if not isinstance(other, Foo):
return NotImplemented
return self.__key__() == other.__key__()
def __hash__(self):
return hash(self.__key__())

and if I have a Foo instance, instance.__key__() just works (and slightly 
faster than def __key__(self): return self.x, self.y, self.z would), and all 
the random comparison and hashing stuff can be implemented in terms of it (I'd 
likely be writing a C accelerated decorator for use in contexts like 
functools.total_ordering that depended solely on the existence of a __key__, so 
comparisons and hashing and the like could all be implemented without ending up 
back in bytecode, which has some performance advantages for large sorts and 
dedupes, and lets you write otherwise Python level classes that benefit from 
GIL thread safety).

The only way I've been able to mimic this before was wrapping in 
functools.partialmethod, but that's implemented in Python (so no CPython thread 
safety or reduced bytecode advantages) and supports a ton of other features 
that make it *much* slower for this use case. In local microbenchmarks, Foo 
using PyInstanceMethod_New took 227 ns to call foo.__key__(), using the 
"obvious" approach took 238 ns, and using partialmethod took 3.1 us, over 10x 
longer. An in-between approach of:

class Foo:
_getkey = attrgetter('x', 'y', 'z')
def __key__(self): return self._getkey(self)

is okay, taking 317 ns, but adding additional layering, requiring the separate 
caching of the attrgetter, etc.

Yes, it's kind of a fiddly thing; all it really does is make it possible to 
reuse existing built-ins taking a single argument as methods on a class. But 
I'd like to have that option; we've got a ton of built-ins that do fiddly 
things, and it would be nice to reuse them easily.

Point is, rather than deprecating it, I'd kind of like it if we could make it 
accessible via the types module for this sort of use case (without requiring 
ctypes hackery), as types.InstanceMethodType or the like.

--
nosy: +josh.r

___
Python tracker 

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



[issue36524] identity operator

2019-04-04 Thread Rocco Santoro


Rocco Santoro  added the comment:

Thanks you very much for the explanations. I am sorry for bothering you, 
actually my question concerned the use of identity operator. I suggest that 
'=='  means equal not identity. Therefore, it concerns the instance not the 
ontology and makes a comparison between the values not the types. In my modest 
opinion this is a bug. Anyway, you have explain very well the class None and 
the role of print as function in Python. My little remark is that a 
communication act should not change the type of object that shows. Instead it 
transforms the object in Noneclass. This is a peculiar of Python. Warm regards. 
Rocco

--

___
Python tracker 

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



[issue36529] Python from WindowsStore: can't install package using "-m pip"

2019-04-04 Thread Ilya Kazakevich


New submission from Ilya Kazakevich :

No packages could be installed with "-m pip" because of "Access Denied". It 
seems that it tries to install package to "site-packages' instead of 
"local-packages". However, "pip.exe" works. Does it mean "pip.exe" is patched 
somehow, but not python itself? 



c:\>"c:\Program 
Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1008.0_x64__qbz5n2kfra8p0\python"
 -m pip install flask
Collecting flask
  Using cached 
https://files.pythonhosted.org/packages/7f/e7/08578774ed4536d3242b14dacb4696386634607af824ea997202cd0edb4b/Flask-1.0.2-py2.py3-none-any.whl
...
Installing collected packages: flask
Could not install packages due to an EnvironmentError: [WinError 5] Access is 
denied: 'C:\\Program 
Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.7_3.7.1008.0_x64__qbz5n2kfra8p0\\Lib\\site-packages\\flask'
Consider using the `--user` option or check the permissions.




But:

c:\>"c:\Program 
Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.1008.0_x64__qbz5n2kfra8p0\pip"
 install flask
Collecting flask
  Using cached 
https://files.pythonhosted.org/packages/7f/e7/08578774ed4536d3242b14dacb4696386634607af824ea997202cd0edb4b/Flask-1.0.2-py2.py3-none-any.whl
Installing collected packages: flask
  The script flask.exe is installed in 
'C:\Users\SomeUser\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Scripts'
 which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this 
warning, use --no-warn-script-location.
Successfully installed flask-1.0.2

--
components: Installation
messages: 339460
nosy: Ilya Kazakevich
priority: normal
severity: normal
status: open
title: Python from WindowsStore: can't install package using "-m pip"
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue36528] Remove duplicate tests in Lib/tests/re_tests.py

2019-04-04 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
keywords: +patch
pull_requests: +12616
stage:  -> patch review

___
Python tracker 

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



[issue35512] patch.dict resolves in_dict eagerly (should be late resolved)

2019-04-04 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

Confirmed the fix. Thank you very much!

--

___
Python tracker 

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



[issue6721] Locks in the standard library should be sanitized on fork

2019-04-04 Thread A. Jesse Jiryu Davis


Change by A. Jesse Jiryu Davis :


--
nosy:  -emptysquare

___
Python tracker 

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



[issue6721] Locks in the standard library should be sanitized on fork

2019-04-04 Thread cagney


cagney  added the comment:

Below is a backtrace from the deadlock.

It happens because the logging code is trying to acquire two per-logger locks; 
and in an order different to the random order used by the fork() handler.

The code in question has a custom class DebugHandler(logging.Handler).  The 
default logging.Handler.handle() method grabs its lock and calls .emit() vis:

if rv:
self.acquire()
try:
self.emit(record)
finally:
self.release()

the custom .emit() then sends the record to a sub-logger stream vis:

def emit(self, record):
for stream_handler in self.stream_handlers:
stream_handler.emit(record)
if _DEBUG_STREAM:
_DEBUG_STREAM.emit(record)

and one of these emit() functions calls flush() which tries to acquire a 
further lock.

Thread 0x7f976b7fe700 (most recent call first):
  File "/usr/lib64/python3.7/logging/__init__.py", line 854 in acquire
  File "/usr/lib64/python3.7/logging/__init__.py", line 1015 in flush

def flush(self):
"""
Flushes the stream.
"""
self.acquire() <
try:
if self.stream and hasattr(self.stream, "flush"):
self.stream.flush()
finally:
self.release()

  File "/usr/lib64/python3.7/logging/__init__.py", line 1038 in emit

self.flush() <

  File "/home/build/libreswan-web/master/testing/utils/fab/logutil.py", line 
163 in emit

def emit(self, record):
for stream_handler in self.stream_handlers:
stream_handler.emit(record) <---
if _DEBUG_STREAM:
_DEBUG_STREAM.emit(record)

  File "/usr/lib64/python3.7/logging/__init__.py", line 905 in handle

def handle(self, record):
"""
Conditionally emit the specified logging record.

Emission depends on filters which may have been added to the handler.
Wrap the actual emission of the record with acquisition/release of
the I/O thread lock. Returns whether the filter passed the record for
emission.
"""
rv = self.filter(record)
if rv:
self.acquire()
try:
self.emit(record) <---
finally:
self.release()
return rv

  File "/usr/lib64/python3.7/logging/__init__.py", line 1591 in callHandlers

hdlr.handle(record)

  File "/usr/lib64/python3.7/logging/__init__.py", line 1529 in handle

self.callHandlers(record)

  File "/usr/lib64/python3.7/logging/__init__.py", line 1519 in _log

self.handle(record)

  File "/usr/lib64/python3.7/logging/__init__.py", line 1449 in log

self._log(level, msg, args, **kwargs)

  File "/usr/lib64/python3.7/logging/__init__.py", line 1768 in log

self.logger.log(level, msg, *args, **kwargs)

  File "/usr/lib64/python3.7/logging/__init__.py", line 1724 in debug

self.log(DEBUG, msg, *args, **kwargs)

  File "/home/build/libreswan-web/master/testing/utils/fab/shell.py", line 110 
in write

self.logger.debug(self.message, ascii(text))

--

___
Python tracker 

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



[issue36528] Remove duplicate tests in Lib/tests/re_tests.py

2019-04-04 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
components: +Regular Expressions
nosy: +ezio.melotti, mrabarnett

___
Python tracker 

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



[issue36528] Remove duplicate tests in Lib/tests/re_tests.py

2019-04-04 Thread Karthikeyan Singaravelan


New submission from Karthikeyan Singaravelan :

Currently Lib/tests/re_tests.py has duplicate elements in the tests list 
variable. This is a followup on https://github.com/python/cpython/pull/12662 
where there seems to be around 100 elements that are duplicates in the list. 
This seems to have been due to some merge commits made long time ago.

Sample duplicates : 
https://github.com/python/cpython/pull/12662#issuecomment-479852101

--
components: Tests
messages: 339457
nosy: serhiy.storchaka, xtreak
priority: normal
severity: normal
status: open
title: Remove duplicate tests in Lib/tests/re_tests.py
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue36524] identity operator

2019-04-04 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Rocco, please ask questions about Python on python-list or places like 
stackoverflow.com.  1. If python behavior puzzles you, the chance that it is a 
python bug is well less than 1 in 1000.  2. The answer you get will be much 
more visible to others who have similar questions.

Also, when you use the IDLE IDE to execute your python code, IDLE submits your 
code to a running python.exe process and displays the answer received from that 
process.  The answer is nearly always the same as when you submit the same code 
to python yourself.  'IDLE' is for questions about IDLE behavior rather than 
Python behavior.

--
components:  -IDLE

___
Python tracker 

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



[issue34028] Python 3.7.0 wont compile with SSL Support 1.1.0 > alledged missing X509_VERIFY_PARAM_set1_host() support

2019-04-04 Thread David Chin


David Chin  added the comment:

OS: RHEL 6.8

I installed OpenSSL 1.1.1b from source into /usr/local. Because it's RHEL, the 
libs are in /usr/local/lib64 (as set up by default with the OpenSSL "make 
install") which the configure script does not seem to know about.

My workaround: before running configure for Python, set the environment 
variable:

LDFLAGS="-L/usr/local/lib -L/usr/local/lib64 -Wl,-rpath,/usr/local/lib 
-Wl,-rpath,/usr/local/lib64"

Once that is set, configure manages to find the proper libssl:

checking for openssl/ssl.h in /usr/local... yes
checking whether compiling and linking against OpenSSL works... yes
checking for X509_VERIFY_PARAM_set1_host in libssl... yes

--
nosy: +hairygristle

___
Python tracker 

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



[issue6721] Locks in the standard library should be sanitized on fork

2019-04-04 Thread cagney


cagney  added the comment:

> acquiring locks before fork in the thread doing the forking and releasing 
> them afterwards is always the safe thing to do.

It's also an easy way to cause a deadlock:

- register_at_fork() et.al. will cause per-logger locks to be acquired before 
the global lock (this isn't immediately obvious from the code)

If a thread were to grab its logging lock before the global lock then it would 
deadlock.  I'm guessing this isn't allowed - however I didn't see any comments 
to this effect?

Can I suggest documenting this, and also merging the two callbacks so that the 
ordering of these two acquires is made explicit.

- the per-logger locks are acquired in a random order

If a thread were to acquire two per-logger locks in a different order then 
things would deadlock.

--

___
Python tracker 

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



[issue36527] unused parameter warnings in Include/object.h (affecting building third party code)

2019-04-04 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
pull_requests: +12615
stage:  -> patch review

___
Python tracker 

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



[issue34396] Certain methods that heap allocated subtypes inherit suffer a 50-80% performance penalty

2019-04-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

> But what's the use case of making somedict.__getitem__(x) fast? One should 
> just write somedict[x] instead.

Using them in itertools functions. somedict.__getitem__ is faster that lambda: 
somedict[x].

As for map() and filter(), comprehensions are almost as fast as map() and 
filter() with somedict.__getitem__ and are more readable.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue36527] unused parameter warnings in Include/object.h (affecting building third party code)

2019-04-04 Thread Dmitry Marakasov

New submission from Dmitry Marakasov :

Python 3.8 and nightly introduces unused (in some cases) parameters in object.h 
header. This makes compilation of third party code which includes the header 
fail if it's built with -Werror.

Build log excerpt:

---
g++ -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -g 
-fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security 
-UNDEBUG -Wall -Wextra -Werror -fPIC -I/usr/include/yajl 
-I/opt/python/3.8-dev/include/python3.8m -c src/construct_handlers.cc -o 
build/temp.linux-x86_64-3.8/src/construct_handlers.o -std=c++11 
-DJSONSLICER_VERSION="0.1.4" -DUSE_BYTES_INTERNALLY -fno-exceptions -fno-rtti
In file included from /opt/python/3.8-dev/include/python3.8m/pytime.h:6:0,
 from /opt/python/3.8-dev/include/python3.8m/Python.h:85,
 from src/pyobjlist.hh:26,
 from src/jsonslicer.hh:26,
 from src/construct_handlers.hh:26,
 from src/construct_handlers.cc:23:
/opt/python/3.8-dev/include/python3.8m/object.h:441:50: error: unused parameter 
‘op’ [-Werror=unused-parameter]
 static inline void _Py_ForgetReference(PyObject *op)
  ^
/opt/python/3.8-dev/include/python3.8m/object.h:458:43: error: unused parameter 
‘filename’ [-Werror=unused-parameter]
 static inline void _Py_DECREF(const char *filename, int lineno,
   ^
/opt/python/3.8-dev/include/python3.8m/object.h:458:57: error: unused parameter 
‘lineno’ [-Werror=unused-parameter]
 static inline void _Py_DECREF(const char *filename, int lineno,
 ^
---

Full build log:

https://travis-ci.org/AMDmi3/jsonslicer/jobs/515771366

Possible solutions:
- Add (void)param; to silence the warning as it's already done in 
Include/internal/pycore_atomic.h
- Make distutils list python include directory with -isystem instead of -I. 
This way, python include won't generate warnings for third party code.

--
components: Build
messages: 339452
nosy: amdmi3
priority: normal
severity: normal
status: open
title: unused parameter warnings in Include/object.h (affecting building third 
party code)
type: compile error
versions: Python 3.8, Python 3.9

___
Python tracker 

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



[issue35866] concurrent.futures deadlock

2019-04-04 Thread cagney


cagney  added the comment:

More info from adding a faulthandler ...

15  def f():
16  import ctypes
17  
18  for i in range(0,50):
19  sys.stdout.write("\r%d" % i)
20  sys.stdout.flush()
21  signal.alarm(60*2)
22  for j in range(0,1000):
23  with concurrent.futures.ProcessPoolExecutor() as executor:
24  ftr = executor.submit(f)
25  ftr.result()

Thread 0x7f1ce7fff700 (most recent call first):
  File "/home/python/v3.7.3/lib/python3.7/threading.py", line 296 in wait
  File "/home/python/v3.7.3/lib/python3.7/multiprocessing/queues.py", line 224 
in _feed
  File "/home/python/v3.7.3/lib/python3.7/threading.py", line 865 in run
  File "/home/python/v3.7.3/lib/python3.7/threading.py", line 917 in 
_bootstrap_inner
  File "/home/python/v3.7.3/lib/python3.7/threading.py", line 885 in _bootstrap

Thread 0x7f1cec917700 (most recent call first):
  File "/home/python/v3.7.3/lib/python3.7/selectors.py", line 415 in select
  File "/home/python/v3.7.3/lib/python3.7/multiprocessing/connection.py", line 
920 in wait
  File "/home/python/v3.7.3/lib/python3.7/concurrent/futures/process.py", line 
354 in _queue_management_worker
  File "/home/python/v3.7.3/lib/python3.7/threading.py", line 865 in run
  File "/home/python/v3.7.3/lib/python3.7/threading.py", line 917 in 
_bootstrap_inner
  File "/home/python/v3.7.3/lib/python3.7/threading.py", line 885 in _bootstrap

Current thread 0x7f1cfd9486c0 (most recent call first):
  File "/home/python/v3.7.3/lib/python3.7/threading.py", line 296 in wait
  File "/home/python/v3.7.3/lib/python3.7/concurrent/futures/_base.py", line 
427 in result
  File "cf-deadlock.py", line 25 in 

--

___
Python tracker 

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



[issue36526] python crash when loading some .pyc file

2019-04-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Using random binary data instead of a .pyc file is an undefined behavior. .pyc 
file is a cache of the .py file.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue34396] Certain methods that heap allocated subtypes inherit suffer a 50-80% performance penalty

2019-04-04 Thread Stefan Behnel


Change by Stefan Behnel :


--
nosy: +scoder

___
Python tracker 

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



[issue34396] Certain methods that heap allocated subtypes inherit suffer a 50-80% performance penalty

2019-04-04 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

> Amusingly, this is because of an old hack to make directly calling 
> somedict.__getitem__ fast: 
> https://github.com/python/cpython/commit/8f5cdaa784f555149adf5e94fd2e989f99d6b1db

But what's the use case of making somedict.__getitem__(x) fast? One should just 
write somedict[x] instead.

If PEP 580 or PEP 590 is accepted, it should be easy to simply make wrapper 
descriptors such as somedict.__getitem__ faster, removing the need for 
METH_COEXIST.

--
nosy: +jdemeyer

___
Python tracker 

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



[issue36526] python crash when loading some .pyc file

2019-04-04 Thread SilentGhost


Change by SilentGhost :


--
components: +Interpreter Core
nosy: +serhiy.storchaka
type:  -> crash

___
Python tracker 

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



[issue36526] python crash when loading some .pyc file

2019-04-04 Thread Ahmed Soliman


New submission from Ahmed Soliman :

I was fuzzing python pyc and I got this segmentation fault

```
==25016==ERROR: AddressSanitizer: SEGV on unknown address 0x (pc 
0x007d147f bp 0x7ffc6875cfc0 sp 0x7ffc6875c7e0 T0)
==25016==The signal is caused by a WRITE memory access.
==25016==Hint: address points to the zero page.
#0 0x7d147e in _Py_INCREF /home/cpython/./Include/object.h:453:18
#1 0x7d147e in _PyEval_EvalFrameDefault /home/cpython/Python/ceval.c:1186
#2 0x7e38bc in PyEval_EvalFrameEx /home/cpython/Python/ceval.c:625:12
#3 0x7e38bc in _PyEval_EvalCodeWithName /home/cpython/Python/ceval.c:4036
#4 0x7b72d3 in PyEval_EvalCodeEx /home/cpython/Python/ceval.c:4065:12
#5 0x7b72d3 in PyEval_EvalCode /home/cpython/Python/ceval.c:602
#6 0x911643 in run_eval_code_obj /home/cpython/Python/pythonrun.c:1047:9
#7 0x911643 in run_pyc_file /home/cpython/Python/pythonrun.c:1100
#8 0x911643 in PyRun_SimpleFileExFlags /home/cpython/Python/pythonrun.c:420
#9 0x9102cb in PyRun_AnyFileExFlags /home/cpython/Python/pythonrun.c:85:16
#10 0x517df8 in pymain_run_file /home/cpython/Modules/main.c:346:15
#11 0x517df8 in pymain_run_python /home/cpython/Modules/main.c:511
#12 0x517df8 in _Py_RunMain /home/cpython/Modules/main.c:583
#13 0x51901a in pymain_main /home/cpython/Modules/main.c:612:12
#14 0x5193e3 in _Py_UnixMain /home/cpython/Modules/main.c:636:12
#15 0x7fd06244375a in __libc_start_main (/lib64/libc.so.6+0x2375a)
#16 0x437919 in _start (/home/cpython/python+0x437919)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/cpython/./Include/object.h:453:18 in 
_Py_INCREF
==25016==ABORTING
```

Python version Python 3.8.0a3+ (heads/master:cb0748d393, Apr  4 2019, 16:40:18) 
[Clang 8.0.0 (tags/RELEASE_800/final)] on linux

--
files: id:000147,sig:11,src:00,op:arith8,pos:53,val:-23
messages: 339448
nosy: Ahmed Soliman
priority: normal
severity: normal
status: open
title: python crash when loading some .pyc file
versions: Python 3.8
Added file: 
https://bugs.python.org/file48244/id:000147,sig:11,src:00,op:arith8,pos:53,val:-23

___
Python tracker 

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



[issue9194] winreg:fixupMultiSZ should check that P < Q in the inner loop

2019-04-04 Thread Zackery Spytz


Zackery Spytz  added the comment:

I've created a PR for this issue.

--
nosy: +ZackerySpytz, eryksun
versions: +Python 3.7, Python 3.8 -Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue9194] winreg:fixupMultiSZ should check that P < Q in the inner loop

2019-04-04 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
pull_requests: +12614
stage: test needed -> patch review

___
Python tracker 

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



[issue29883] asyncio: Windows Proactor Event Loop UDP Support

2019-04-04 Thread Alex Chandel


Alex Chandel  added the comment:

Could this be merged? UDP and pipes are critical for non-trivial asyncio 
programs on Windows, and this should be merged before the 3.8 feature window 
closes.

--
nosy: +Alex Chandel

___
Python tracker 

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



[issue36525] Deprecate instancemethod

2019-04-04 Thread Jeroen Demeyer


Change by Jeroen Demeyer :


--
keywords: +patch
pull_requests: +12613
stage:  -> patch review

___
Python tracker 

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



[issue36525] Deprecate instancemethod

2019-04-04 Thread Jeroen Demeyer


Change by Jeroen Demeyer :


--
title: Deprecate instance method -> Deprecate instancemethod

___
Python tracker 

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



[issue1587] instancemethod wrapper for PyCFunctions

2019-04-04 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

> I'm tempted to call YAGNI on this.

Indeed. See https://bugs.python.org/issue36525

--
nosy: +jdemeyer

___
Python tracker 

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



[issue36525] Deprecate instance method

2019-04-04 Thread Jeroen Demeyer


New submission from Jeroen Demeyer :

The "instance method" class is not used anywhere and there are no obvious use 
cases. We should just deprecate it to simplify Python.

See discussion at 
https://mail.python.org/pipermail/python-dev/2019-April/156975.html

--
messages: 339444
nosy: christian.heimes, jdemeyer
priority: normal
severity: normal
status: open
title: Deprecate instance method

___
Python tracker 

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



[issue36524] identity operator

2019-04-04 Thread SilentGhost


SilentGhost  added the comment:

You seem to be confused by the fact that print function returns None and 
therefore all the comparisons you're making return False. There is not type vs 
"outcome" difference in your code sample.

--
assignee: terry.reedy -> 
nosy: +SilentGhost -eric.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue36524] identity operator

2019-04-04 Thread Eric V. Smith


Eric V. Smith  added the comment:

I'm not sure what you're asking here. You're comparing the result of the print 
function to a value. Print returns None, so it doesn't compare equal to any of 
the values you're comparing it to.

To see what's happening, try:

>>> print(None) == None
None
True

But really, your problem is probably a misunderstanding of the return value of 
the print function.

--
nosy: +eric.smith

___
Python tracker 

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



[issue36524] identity operator

2019-04-04 Thread Rocco Santoro


New submission from Rocco Santoro :

Hi all

Why the identity operator and '=='  are both applied to the type (see above)? 
Is it not convenient to distinguish them? I mean the identity operator  applied 
to the type and '==' applied to the outcome.
Thanks for the attention
Best regards
Rocco Santoro

Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 23:09:28) [MSC v.1916 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> import math
>>> x = math.log(1000)
>>> y = math.log(10)
>>> print(x/y) == x/y
7.0
False
>>> print(math.log(1000)/math.log(10)) == math.log(1000)/math.log(10)
7.0
False
>>> x = math.sin(32)
>>> y = math.cos(41)
>>> print(y/x) == y/x
-1.7905177807148493
False
>>> x = math.pi
>>> y = math.tau
>>> x/y == print(x/y)
0.5
False
>>> x = 153
>>> y = 245
>>> print(x/y) == x/y
0.6244897959183674
False
>>> print(x+y) == x + y
398
False
>>> print(x*y) == x*y
37485
False
>>> s1 = 'Hello, '
>>> s2 = 'how are you?'
>>> print(s1 + s2) == s1 + s2
Hello, how are you?
False
>>> print(s1 + s2) is s1 + s2
Hello, how are you?
False
>>> type(print(s1 + s2))
Hello, how are you?

>>> type(s1 + s2)

>>> type(print(y/x))
1.6013071895424837

>>> type(x/y)


--
assignee: terry.reedy
components: IDLE
messages: 339441
nosy: roccosan, terry.reedy
priority: normal
severity: normal
status: open
title: identity operator
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue26415] Excessive peak memory consumption by the Python parser

2019-04-04 Thread Inada Naoki


Change by Inada Naoki :


--
nosy: +inada.naoki

___
Python tracker 

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



[issue36347] Renaming the constants for the .flags of PyMemberDef

2019-04-04 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

For that, where did you see the macro was not used? maybe by an external
library.

--

___
Python tracker 

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



[issue36347] Renaming the constants for the .flags of PyMemberDef

2019-04-04 Thread Jeroen Demeyer


Change by Jeroen Demeyer :


--
pull_requests: +12612

___
Python tracker 

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



[issue16954] Add docstrings for ElementTree module

2019-04-04 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
stage: patch review -> needs patch
versions: +Python 3.7, Python 3.8 -Python 3.4

___
Python tracker 

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



[issue36054] Way to detect CPU count inside docker container

2019-04-04 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

>Yes, not only but also support get real memory limit.
>
>look at 
>https://blogs.oracle.com/java-platform-group/java-se-support-for-docker-cpu-and-memory-limits

Yep, but in this case, you have to create an other issue for the memory
limit.

--

___
Python tracker 

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



[issue27682] wsgiref BaseHandler / SimpleHandler can raise additional errors when handling an error

2019-04-04 Thread Petter S


Petter S  added the comment:

The pull request solves this problem, but the discussion over there is really 
slow.

--

___
Python tracker 

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



[issue36521] Consider removing docstrings from co_consts in code objects

2019-04-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I think it is for historical reasons. Currently statements consisting of a 
constant expression are not compiled to a bytecode and do not add a value to 
co_consts. But when this optimization was not yet added, the first element of 
co_consts with a docstring was a docstring. So why add co_doc if the docstring 
is already available?

This can be changed, but this is a breaking change, and what we will got 
instead?

Function's __name__ is set from code object's co_name.

--

___
Python tracker 

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



[issue36522] http/client.py does not print duplicate header values in debug

2019-04-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

3.6 take only security bugs fixes now.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 3.6

___
Python tracker 

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



[issue36522] http/client.py does not print duplicate header values in debug

2019-04-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 6f9cd142a20d0d2a5825a9db376ce0ddf1933694 by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.7':
bpo-36522: Print all values for headers with multiple values. (GH-12681) 
(GH-12682)
https://github.com/python/cpython/commit/6f9cd142a20d0d2a5825a9db376ce0ddf1933694


--

___
Python tracker 

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



[issue36523] missing docs for IOBase writelines

2019-04-04 Thread Marcin Niemira


Change by Marcin Niemira :


--
keywords: +patch
pull_requests: +12611
stage:  -> patch review

___
Python tracker 

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



[issue36523] missing docs for IOBase writelines

2019-04-04 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +martin.panter

___
Python tracker 

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



[issue36523] missing docs for IOBase writelines

2019-04-04 Thread Marcin Niemira


New submission from Marcin Niemira :

Hey,

There is a missing function doc in `io.IOBase`

```python
import os
help(io.IOBase.writelines)
```

produces output like:
```
Help on method_descriptor:

writelines(self, lines, /)
```

I'll be happy to provide PR for this issue.

Cheers,
Marcin

--
assignee: docs@python
components: Documentation
messages: 339434
nosy: Marcin Niemira, docs@python
priority: normal
severity: normal
status: open
title: missing docs for IOBase writelines
versions: Python 3.8

___
Python tracker 

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