[issue33989] ms.key_compare is not initialized in all paths of list_sort_impl()

2019-02-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11996

___
Python tracker 

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



[issue33989] ms.key_compare is not initialized in all paths of list_sort_impl()

2019-02-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset ebc793d6acb9650b9f497808e059805892031d74 by Serhiy Storchaka 
(Zackery Spytz) in branch 'master':
bpo-33989: Ensure that ms.key_compare is always initialized in 
list_sort_impl(). (GH-8710)
https://github.com/python/cpython/commit/ebc793d6acb9650b9f497808e059805892031d74


--

___
Python tracker 

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



[issue26787] test_distutils fails when configured --with-lto

2019-02-20 Thread INADA Naoki


INADA Naoki  added the comment:

Fixed in bpo-35257

--
resolution:  -> fixed
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



[issue36062] move index normalization from list_slice() to PyList_GetSlice()

2019-02-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Nice! This is an example of good microoptimization. The performance gain is 
tiny (although measurable), but the cost is virtually zero: it does not 
increase code complexity and does not have side effects.

--
resolution:  -> fixed
stage: patch review -> 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



[issue36062] move index normalization from list_slice() to PyList_GetSlice()

2019-02-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset ef1b88bf57aae93893d55f1b9c9639dbe9cc7786 by Serhiy Storchaka 
(Sergey Fedoseev) in branch 'master':
bpo-36062: Minor speed-up for list slicing and copying. (GH-11967)
https://github.com/python/cpython/commit/ef1b88bf57aae93893d55f1b9c9639dbe9cc7786


--
nosy: +serhiy.storchaka

___
Python tracker 

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



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

2019-02-20 Thread Raymond Hettinger


Change by Raymond Hettinger :


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

___
Python tracker 

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



[issue31904] Python should support VxWorks RTOS

2019-02-20 Thread Peixing Xin


Change by Peixing Xin :


--
pull_requests: +11994

___
Python tracker 

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



[issue35822] _queue _queuemodule.c is missing inside the Setup file

2019-02-20 Thread INADA Naoki


Change by INADA Naoki :


--
resolution:  -> rejected
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



[issue36062] move index normalization from list_slice() to PyList_GetSlice()

2019-02-20 Thread Sergey Fedoseev


Change by Sergey Fedoseev :


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

___
Python tracker 

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



[issue36062] move index normalization from list_slice() to PyList_GetSlice()

2019-02-20 Thread Sergey Fedoseev


New submission from Sergey Fedoseev :

list_slice() is used by PyList_GetSlice(), list_subscript() and for list 
copying. In list_subscript() slice indices are already normalized with 
PySlice_AdjustIndices(), so slice normalization currently performed in 
list_slice() is only needed for PyList_GetSlice(). Moving this normalization 
from list_slice() to PyList_GetSlice() provides minor speed-up for list copying 
and slicing:

$ python -m perf timeit -s "copy = [].copy" "copy()" --duplicate=1000 
--compare-to=../cpython-master/venv/bin/python
/home/sergey/tmp/cpython-master/venv/bin/python: . 26.5 ns 
+- 0.5 ns
/home/sergey/tmp/cpython-dev/venv/bin/python: . 25.7 ns +- 
0.5 ns

Mean +- std dev: [/home/sergey/tmp/cpython-master/venv/bin/python] 26.5 ns +- 
0.5 ns -> [/home/sergey/tmp/cpython-dev/venv/bin/python] 25.7 ns +- 0.5 ns: 
1.03x faster (-3%)

$ python -m perf timeit -s "l = [1]" "l[:]" --duplicate=1000 
--compare-to=../cpython-master/venv/bin/python  
 
/home/sergey/tmp/cpython-master/venv/bin/python: . 71.5 ns 
+- 1.4 ns
/home/sergey/tmp/cpython-dev/venv/bin/python: . 70.2 ns +- 
0.9 ns

Mean +- std dev: [/home/sergey/tmp/cpython-master/venv/bin/python] 71.5 ns +- 
1.4 ns -> [/home/sergey/tmp/cpython-dev/venv/bin/python] 70.2 ns +- 0.9 ns: 
1.02x faster (-2%)

--
messages: 336184
nosy: sir-sigurd
priority: normal
severity: normal
status: open
title: move index normalization from list_slice() to PyList_GetSlice()
type: performance
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



[issue29278] Python 3.6 build fails with parallel make

2019-02-20 Thread INADA Naoki


Change by INADA Naoki :


--
resolution:  -> out of date
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



[issue28328] statistics.geometric_mean has no tests. Defer to 3.7?

2019-02-20 Thread INADA Naoki


Change by INADA Naoki :


--
resolution:  -> fixed
stage: test needed -> 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



[issue36061] zipfile does not handle arcnames with non-ascii characters on Windows

2019-02-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

You can not just add .decode('cp437') to arcname.

1. This will fail if the ZIP archive contains file names encoded with UTF-8. 
They are already unicode and contains non-ascii characters. For decode() they 
will be implicit encoded to str, that will fail.

2. This will fail when targetpath is a 8-bit string containing non-ascii 
characters. Currently this works (maybe incorrectly).

3. While cp437 is the only official encoding in ZIP archives if UTF-8 is not 
used, de facto different encodings (like cp866) are used on localized Windows.

Fixing the problem without introducing other problems and breaking existing 
working code is hard. One possible solution is using Python 3.

I suggest to close this issue as "won't fix".

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue35813] shared memory construct to avoid need for serialization between processes

2019-02-20 Thread Davin Potts


Davin Potts  added the comment:

The simpler API is now implemented in GH-11816 as discussed previously.  
Notably:
> * We go with this simpler API:  SharedMemory(name=None, create=False, size=0)
> * 'size' is ignored when create=False
> * create=True acts like O_CREX and create=False only attaches to existing 
> shared memory blocks

As part of this change, the PosixSharedMemory and WindowsNamedSharedMemory 
classes are no more; they have been consolidated into the SharedMemory class 
with a single, simpler, consistent-across-platforms API.

On the SharedMemory class, 'size' is now stored by the __init__ and does not 
use fstat() as part of its property.

Also, SharedMemoryManager (and its close friends) has been relocated to the 
multiprocessing.managers submodule, matching the organization @Giampaolo 
outlined previously:
multiprocessing.managers.SharedMemoryManager
multiprocessing.managers._SharedMemoryTracker
multiprocessing.managers.SharedMemoryServer  (not documented)
multiprocessing.shared_memory.SharedMemory
multiprocessing.shared_memory.SharedList 
multiprocessing.shared_memory.WindowsNamedSharedMemory  (REMOVED)
multiprocessing.shared_memory.PosixSharedMemory  (REMOVED)

I believe this addresses all of the significant discussion topics in a way that 
brings together all of the excellent points being made.  Apologies if I have 
missed something -- I did not think so but I will go back through all of the 
discussions tomorrow to double-check.

--

___
Python tracker 

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



[issue36059] Update docs for OrderedDict to reflect that regular dicts are ordered

2019-02-20 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +inada.naoki

___
Python tracker 

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



[issue36059] Update docs for OrderedDict to reflect that regular dicts are ordered

2019-02-20 Thread Raymond Hettinger


Change by Raymond Hettinger :


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

___
Python tracker 

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



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

2019-02-20 Thread Eryk Sun


Eryk Sun  added the comment:

In Windows, the error for a path reparse (e.g. symlink or junction) that can't 
be resolved is ERROR_CANT_RESOLVE_FILENAME. Another common error is 
ERROR_INVALID_REPARSE_DATA. This can occur if the reparse data is malformed or 
if the target device is invalid for the reparse type. For example, a junction 
is restricted to [bind-]mounting local volumes, so it's invalid if it targets a 
remote device.

Windows errors to ignore should be added to _IGNORED_WINERRORS in 
Lib/pathlib.py. For example:

_IGNORED_WINERRORS = (
# ...
1921, # ERROR_CANT_RESOLVE_FILENAME - similar to POSIX ELOOP
4392, # ERROR_INVALID_REPARSE_DATA  - also for disallowed device targets
)

--
nosy: +eryksun

___
Python tracker 

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



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

2019-02-20 Thread Carlos Damázio

Carlos Damázio  added the comment:

Hey, Andrew. I'd like to work on the issue, if anyone else hasn't done it yet.

--
nosy: +Carlos Damázio

___
Python tracker 

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



[issue35995] logging.handlers.SMTPHandler

2019-02-20 Thread lidayan


lidayan <840286...@qq.com> added the comment:

1. When specify the secure flag to the SMTPHandler, means start TLS connection. 
2. if SMTP Server not support plaintext mode, but firstly in plaintext mode it 
is a error

--

___
Python tracker 

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



[issue35995] logging.handlers.SMTPHandler

2019-02-20 Thread lidayan

lidayan <840286...@qq.com> added the comment:

And I have changed the code, please help to review, thanks

> 在 2019年2月21日,10:08,李大炎 <840286...@qq.com> 写道:
> 
> OK, I got it. 
> 
> 
>> 在 2019年2月14日,16:46,Stéphane Wirtel  写道:
>> 
>> 
>> Stéphane Wirtel  added the comment:
>> 
>> You have a timeout, maybe you have an issue with your SMTP server. But in 
>> this case, it's not an issue with Python.
>> 
>> --
>> nosy: +matrixise
>> resolution:  -> rejected
>> stage:  -> resolved
>> status: open -> closed
>> 
>> ___
>> Python tracker 
>> 
>> ___
>> 
>

--

___
Python tracker 

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



[issue20687] Change in expectedFailure breaks testtools

2019-02-20 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Larry suggested closing this as wontfix 5 years ago.  Since testtools added 
code for this test and there hasn't been any other changes since, I'll close 
per his suggestion.

--
nosy: +cheryl.sabella
resolution:  -> wont fix
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



[issue33065] IDLE debugger: failure stepping through module loading

2019-02-20 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

A StackOverflow use got the same _ModuleLock message.
https://stackoverflow.com/questions/54785596/debugger-in-python-freezes-over-own-built-modules

--

___
Python tracker 

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



[issue31136] raw strings cannot end with a backslash character r'\'

2019-02-20 Thread Graham Wideman


Graham Wideman  added the comment:

Demonstration:
print("x" + r' \' ' + "x")   produces
x \' x
Where is this behavior _ever_ useful? 
Or if there is some use case for this, how frequent is it compared to the 
frequency of users expecting either that backslash does nothing special, or 
that it would behave like an escape, and not appear in the output? 

I'm not here to suggest there's some easy fix for this. I just don't want this 
issue closing as "not a bug" and fail to register that this design is flawed.

--

___
Python tracker 

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



[issue31136] raw strings cannot end with a backslash character r'\'

2019-02-20 Thread Graham Wideman


Graham Wideman  added the comment:

Let us be clear here that this is NOT a case where the backslash escapes the 
subsequent quote. If it WAS such a case, then the sequence \' would leave only 
the quote in the output string. But it doesn't; it leaves the complete 
2-character \' in the output string.
So essentially this is a case of the character sequence \' being given a 
special status that causes that character pair to have a special meaning in 
preference to the meaning of the individual characters.
So this IS a bug -- it may be "as designed", but that produces the bug in the 
name of this feature, "raw string", which is patently misleading and in 
violation of the principle of least surprise. This is a feature (as the FAQ 
explains) provided explicitly for developers of regular expression parsers. So 
at best, these r-strings should be called "regex-oriented" string literals, 
which can be used elsewhere, at risk of knowing this gotcha.

--
nosy: +gwideman

___
Python tracker 

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



[issue36061] zipfile does not handle arcnames with non-ascii characters on Windows

2019-02-20 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue35995] logging.handlers.SMTPHandler

2019-02-20 Thread lidayan

lidayan <840286...@qq.com> added the comment:

OK, I got it. 

> 在 2019年2月14日,16:46,Stéphane Wirtel  写道:
> 
> 
> Stéphane Wirtel  added the comment:
> 
> You have a timeout, maybe you have an issue with your SMTP server. But in 
> this case, it's not an issue with Python.
> 
> --
> nosy: +matrixise
> resolution:  -> rejected
> stage:  -> resolved
> status: open -> closed
> 
> ___
> Python tracker 
> 
> ___
>

--
title: use SSL encrypted socket on logging.handlers.SMTPHandler -> 
logging.handlers.SMTPHandler

___
Python tracker 

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



[issue36061] zipfile does not handle arcnames with non-ascii characters on Windows

2019-02-20 Thread Shane Lee


New submission from Shane Lee :

Python 2.7.15 (probably affects newer versions as well)

Given an archive with any number of files inside that have non-ascii characters 
in their filename `zipfile` will crash when extracting them to the file system.

```
Traceback (most recent call last):
  File "c:\dev\salt\salt\modules\archive.py", line 1081, in unzip
zfile.extract(target, dest, password)
  File "c:\python27\lib\zipfile.py", line 1028, in extract
return self._extract_member(member, path, pwd)
  File "c:\python27\lib\zipfile.py", line 1069, in _extract_member
targetpath = os.path.join(targetpath, arcname)
  File "c:\python27\lib\ntpath.py", line 85, in join
result_path = result_path + p_path
UnicodeDecodeError: 'ascii' codec can't decode byte 0x82 in position 3: ordinal 
not in range(128)
```

--
components: Windows
files: test.zip
messages: 336172
nosy: Shane Lee, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: zipfile does not handle arcnames with non-ascii characters on Windows
type: behavior
versions: Python 2.7
Added file: https://bugs.python.org/file48159/test.zip

___
Python tracker 

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



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

2019-02-20 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

@RadicalZephyr, are you interested in making a GitHub pull request with the 
recommended the documentation change?

--
nosy: +cheryl.sabella
versions: +Python 3.7, Python 3.8 -Python 2.7, 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



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

2019-02-20 Thread py.user


py.user  added the comment:

@Cheryl Sabella, I guess Manjusaka has done it already and this looks fine.

--

___
Python tracker 

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



[issue22707] Idle: changed options should take effect immediately

2019-02-20 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Turning extensions into features #27099 fixed many (all?) unnecessary delays 
but a few things should be checked, and the help texts reviewed.

--
versions: +Python 3.8 -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



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

2019-02-20 Thread Emmanuel Arias


Change by Emmanuel Arias :


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

___
Python tracker 

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



[issue22629] Idle: update htest.py and htests

2019-02-20 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

As far as I can tell, the entire diff in @htest-34-2.diff was pushed.  My 
comment about 'up to first line of grep' was correct alphabetically but 
confusing because files with a '# htest #' section were not completely 
alphabetical in the file.  I need to review current code in light of this issue 
and a couple of others.

--
versions: +Python 3.8 -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue1054041] Python doesn't exit with proper resultcode on SIGINT

2019-02-20 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
pull_requests: +11989

___
Python tracker 

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



[issue22705] Idle extension configuration: add option-help option

2019-02-20 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

#27099 (converting built-in extensions to features) made this less important.  
But it is still relevant to actual extensions.  There is a dummy extension, 
zzdummy, for testing.

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

___
Python tracker 

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



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

2019-02-20 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Emmanuel, feel free to review the PR and make suggestions.

--

___
Python tracker 

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



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

2019-02-20 Thread Raymond Hettinger


New submission from Raymond Hettinger :

Am working on a PR for this now.

Prior to regular dicts becoming ordered, the was no expectation for ChainMap() 
to have any particular order.  Now that such an expectation might exist, I need 
to document what ChainMap() does and perhaps why it does it.

--
assignee: rhettinger
components: Documentation
messages: 336165
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Document how collections.ChainMap() determines iteration order
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



[issue22706] Idle extension configuration and key bindings

2019-02-20 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

#27099 (converting built-in extensions to features) made this less important.  
But it is still relevant to actual extensions.  There is a dummy extension, 
zzdummy, for testing.

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

___
Python tracker 

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



[issue36059] Update docs for OrderedDict to reflect that regular dicts are ordered

2019-02-20 Thread Raymond Hettinger


New submission from Raymond Hettinger :

Am working on a PR for this now.  The goals are to clarify the distinction 
between OrderedDict and regular dict, to remove outdated examples that no 
longer are the best way to solve a problem, and to move, and to add examples 
where OrderedDict will continue to be relevant.

--
assignee: rhettinger
components: Documentation
messages: 336163
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Update docs for OrderedDict to reflect that regular dicts are ordered
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



[issue22704] Review extension enable options

2019-02-20 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

#27099 converted extensions to features always enabled for when they apply to.

--
resolution:  -> out of date
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



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

2019-02-20 Thread Emmanuel Arias


Emmanuel Arias  added the comment:

> Sorry, I've already assigned this to myself.

Ah!! sorry sorry!

--

___
Python tracker 

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



[issue14929] IDLE crashes on *Edit / Find in files ...* command

2019-02-20 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Opened #36058 for followup.

--
resolution:  -> fixed
stage: test needed -> resolved
status: open -> closed
superseder:  -> Improve file decoding before re.search
versions:  -Python 3.5

___
Python tracker 

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



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

2019-02-20 Thread Raymond Hettinger


Change by Raymond Hettinger :


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

___
Python tracker 

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



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

2019-02-20 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> I will take it :-)

Sorry, I've already assigned this to myself.

--

___
Python tracker 

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



[issue36058] Improve file decoding before re.search

2019-02-20 Thread Terry J. Reedy


New submission from Terry J. Reedy :

Spin-off from #14929, which fixed crash.  From msg161754:
"The default extension is .py. The default encoding for .py files is utf-8. I 
think that is the default for what Idle writes. So I think this should be the 
default encoding (explicitly given) at least for .py files.
>From msg161755: (but not sure about this)
"Also, perhaps dialog box could have encodings field. People should be able to 
grep python code for any legal identifier, and this means proper decoding 
according to the encoding they actually use."

--
assignee: terry.reedy
components: IDLE
messages: 336158
nosy: terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: Improve file decoding before re.search
type: enhancement
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



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

2019-02-20 Thread Emmanuel Arias


Change by Emmanuel Arias :


--
components: +Documentation

___
Python tracker 

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



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

2019-02-20 Thread Emmanuel Arias


Emmanuel Arias  added the comment:

Hi!

I will take it :-)

--
nosy: +eamanu

___
Python tracker 

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



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

2019-02-20 Thread Raymond Hettinger


New submission from Raymond Hettinger :

When dicts became ordered, counters became ordered as well.  Update the docs 
and tests to reflect that fact.

--
assignee: rhettinger
components: Tests
messages: 336156
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Add docs and tests for ordering in Counter.  [no behavior change]
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



[issue13659] Add a help() viewer for IDLE's Shell.

2019-02-20 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

#1529353 added squeezer, making this alternative unnecessary.  Once squeezed, 
output can be opened in a text viewer.

--
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed
superseder:  -> Squeezer - squeeze large output in IDLE's shell

___
Python tracker 

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



[issue18823] Idle: use pipes instead of sockets to talk with user subprocess

2019-02-20 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

#34313 reports problems with multiprocessing when using at least some versions 
of tkinter on some versions of macOS.

--
versions: +Python 3.8 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue31982] 8.3. collections — Container datatypes

2019-02-20 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
resolution:  -> fixed
stage: patch review -> 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



[issue31982] 8.3. collections — Container datatypes

2019-02-20 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 14baf06febb9194dd76f694ec359ce94708ed861 by Raymond Hettinger 
(Miss Islington (bot)) in branch '3.7':
bpo-31982: Improve sequence of presentation in ChainMap docs (GH-11960) 
(GH-11961)
https://github.com/python/cpython/commit/14baf06febb9194dd76f694ec359ce94708ed861


--

___
Python tracker 

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



[issue31982] 8.3. collections — Container datatypes

2019-02-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11987

___
Python tracker 

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



[issue31982] 8.3. collections — Container datatypes

2019-02-20 Thread miss-islington


miss-islington  added the comment:


New changeset 9b0c681e2d7e708a07e34d9c08e4424bdd4f5ebc by Miss Islington (bot) 
(Raymond Hettinger) in branch 'master':
bpo-31982: Improve sequence of presentation in ChainMap docs (GH-11960)
https://github.com/python/cpython/commit/9b0c681e2d7e708a07e34d9c08e4424bdd4f5ebc


--
nosy: +miss-islington

___
Python tracker 

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



[issue31982] 8.3. collections — Container datatypes

2019-02-20 Thread Raymond Hettinger


Change by Raymond Hettinger :


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

___
Python tracker 

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



[issue36046] support dropping privileges when running subprocesses

2019-02-20 Thread Alexey Izbyshev


Change by Alexey Izbyshev :


--
nosy: +izbyshev

___
Python tracker 

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



[issue36056] importlib does not support pathlib

2019-02-20 Thread Berker Peksag


Change by Berker Peksag :


--
resolution:  -> not a bug
type:  -> enhancement

___
Python tracker 

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



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

2019-02-20 Thread Brett Cannon


Brett Cannon  added the comment:

And I don't know what a good solution would be. :) I.e. should some other 
exception be raised? Should it be ignored? I just don't know personally.

--

___
Python tracker 

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



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

2019-02-20 Thread Brett Cannon


Brett Cannon  added the comment:

I consider this an enhancement since you do have a loop in your symlinks and so 
having it not exactly work isn't totally shocking. But that doesn't mean that 
if someone can come up with a reasonable solution to fixing this annoyance it 
woudn't be accepted or appreciated!

--
nosy: +brett.cannon
type: behavior -> enhancement

___
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-02-20 Thread Keir Lawson


Keir Lawson  added the comment:

I believe this is related to this ticket: https://bugs.python.org/issue26692

Looking at Java's implementation it seems like they are checking if cgroups are 
enabled via /proc/self/cgroup and then if it is parsing the cgroup information 
out of the filesystem.

--

___
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-02-20 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

ok, I didn't see your test with openjdk:10, sorry

--

___
Python tracker 

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



[issue29757] The loop in utility `socket.create_connection()` swallows previous errors

2019-02-20 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue36029] Use consistent case for HTTP header fields

2019-02-20 Thread Brett Cannon


Brett Cannon  added the comment:

As stated on the PR, changing the code isn't going to be worth it, but updating 
the docs would be nice.

--

___
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-02-20 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

so, I have also tested with the last docker image of golang.

> docker run --rm --cpus 1  -it golang /bin/bash

here is the code of golang:

package main

import "fmt"
import "runtime"

func main() {
cores := runtime.NumCPU()
fmt.Printf("This machine has %d CPU cores.\n", cores)
}

Here is the output
> ./demo 
This machine has 4 CPU cores.

When I try with grep on /proc/cpuinfo
I get this result

> grep processor /proc/cpuinfo  -c
4


I will test with openjdk because it's related to Java and see if I can get the 
result of 1

--

___
Python tracker 

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



[issue3991] urllib.request.urlopen does not handle non-ASCII characters

2019-02-20 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue35840] Control flow inconsistency on closed asyncio stream

2019-02-20 Thread Emmanuel Arias


Emmanuel Arias  added the comment:

I think that this issue is just for Windows right?

I add Windows to required a Windows' dev.

--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue36049] No __repr__() for queue.PriorityQueue and queue.LifoQueue

2019-02-20 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Hi @rhettinger and @serhiy

Really sorry, I did not see that I have re-opened the issue.

--

___
Python tracker 

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



[issue36056] importlib does not support pathlib

2019-02-20 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

I close this issue, it's not a bug.

--
nosy: +matrixise
status: open -> closed

___
Python tracker 

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



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

2019-02-20 Thread Sergey Fedoseev


Sergey Fedoseev  added the comment:

Here's benchmarks for PyTuple_FromArray() PR:

$ python -m perf timeit -s "l = [None]*0; tuple_ = tuple" "tuple_(l)" 
--duplicate=100 --compare-to=../cpython-master/venv/bin/python  
/home/sergey/tmp/cpython-master/venv/bin/python: . 50.5 ns 
+- 1.0 ns
/home/sergey/tmp/cpython-dev/venv/bin/python: . 45.6 ns +- 
1.2 ns
Mean +- std dev: [/home/sergey/tmp/cpython-master/venv/bin/python] 50.5 ns +- 
1.0 ns -> [/home/sergey/tmp/cpython-dev/venv/bin/python] 45.6 ns +- 1.2 ns: 
1.11x faster (-10%)

$ python -m perf timeit -s "l = [None]*1; tuple_ = tuple" "tuple_(l)" 
--duplicate=100 --compare-to=../cpython-master/venv/bin/python
/home/sergey/tmp/cpython-master/venv/bin/python: . 61.8 ns 
+- 1.1 ns
/home/sergey/tmp/cpython-dev/venv/bin/python: . 54.8 ns +- 
0.8 ns
Mean +- std dev: [/home/sergey/tmp/cpython-master/venv/bin/python] 61.8 ns +- 
1.1 ns -> [/home/sergey/tmp/cpython-dev/venv/bin/python] 54.8 ns +- 0.8 ns: 
1.13x faster (-11%)

$ python -m perf timeit -s "l = [None]*5; tuple_ = tuple" "tuple_(l)" 
--duplicate=100 --compare-to=../cpython-master/venv/bin/python
/home/sergey/tmp/cpython-master/venv/bin/python: . 68.2 ns 
+- 1.3 ns
/home/sergey/tmp/cpython-dev/venv/bin/python: . 61.8 ns +- 
1.5 ns
Mean +- std dev: [/home/sergey/tmp/cpython-master/venv/bin/python] 68.2 ns +- 
1.3 ns -> [/home/sergey/tmp/cpython-dev/venv/bin/python] 61.8 ns +- 1.5 ns: 
1.10x faster (-9%)

$ python -m perf timeit -s "l = [None]*10; tuple_ = tuple" "tuple_(l)" 
--duplicate=100 --compare-to=../cpython-master/venv/bin/python
/home/sergey/tmp/cpython-master/venv/bin/python: . 88.1 ns 
+- 2.3 ns
/home/sergey/tmp/cpython-dev/venv/bin/python: . 78.9 ns +- 
3.1 ns
Mean +- std dev: [/home/sergey/tmp/cpython-master/venv/bin/python] 88.1 ns +- 
2.3 ns -> [/home/sergey/tmp/cpython-dev/venv/bin/python] 78.9 ns +- 3.1 ns: 
1.12x faster (-10%)

$ python -m perf timeit -s "l = [None]*100; tuple_ = tuple" "tuple_(l)" 
--duplicate=100 --compare-to=../cpython-master/venv/bin/python
/home/sergey/tmp/cpython-master/venv/bin/python: . 477 ns 
+- 7 ns
/home/sergey/tmp/cpython-dev/venv/bin/python: . 452 ns +- 6 
ns
Mean +- std dev: [/home/sergey/tmp/cpython-master/venv/bin/python] 477 ns +- 7 
ns -> [/home/sergey/tmp/cpython-dev/venv/bin/python] 452 ns +- 6 ns: 1.05x 
faster (-5%)

--

___
Python tracker 

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



[issue36056] importlib does not support pathlib

2019-02-20 Thread Dylan Lloyd


Dylan Lloyd  added the comment:

Whoops, yes, that of course makes sense. My mistake. Thanks!

--
resolution: not a bug -> 
status: closed -> open
type: enhancement -> 

___
Python tracker 

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



[issue3991] urllib.request.urlopen does not handle non-ASCII characters

2019-02-20 Thread Diego Rojas


Change by Diego Rojas :


--
components: +Extension Modules -Library (Lib), Unicode
type: enhancement -> behavior
versions: +Python 3.4, Python 3.5, Python 3.6, Python 3.8

___
Python tracker 

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



[issue36020] HAVE_SNPRINTF and MSVC std::snprintf support

2019-02-20 Thread Steve Dower


Steve Dower  added the comment:

Start by just deleting the definitions in pyerrors.h, and see where the build 
fails. Then either switch those to use PyOS_snprintf (best), or add the #ifndef 
checks in the source files (not header files) that need them.

Be aware that we shouldn't backport the deletion from the headers to 3.7. 
Backporting the code changes to use the PyOS_* functions is fine though.

--

___
Python tracker 

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



[issue36056] importlib does not support pathlib

2019-02-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I concur with Berker. Since the argument of importlib.import_module() is not a 
path, pathlib.Path is not valid here.

It is uncommon in Python to check the type of arguments explicitly. 
pathlib.Path is not more special than list or tkinter.Button.

--
nosy: +serhiy.storchaka
status: open -> closed

___
Python tracker 

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



[issue36056] importlib does not support pathlib

2019-02-20 Thread Berker Peksag


Change by Berker Peksag :


--
nosy: +remi.lapeyre
status: pending -> open

___
Python tracker 

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



[issue36056] importlib does not support pathlib

2019-02-20 Thread Berker Peksag


Berker Peksag  added the comment:

Thanks for the report, but importlib.import_module() doesn't accept a path of a 
Python module:

https://docs.python.org/3/library/importlib.html#importlib.import_module

So, the correct way to use the API is:

import importlib
importlib.import_module('poc')

Whether we should explicitly reject passing a file path to import_module() is 
up to the importlib maintainers.

--
nosy: +berker.peksag, brett.cannon -remi.lapeyre
resolution:  -> not a bug
stage:  -> resolved
status: open -> pending
type:  -> enhancement
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



[issue36056] importlib does not support pathlib

2019-02-20 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

This is also present in 3.7 and 3.8. I would look at it and propose a patch 
tomorrow.

--
nosy: +remi.lapeyre
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



[issue36056] importlib does not support pathlib

2019-02-20 Thread Dylan Lloyd

New submission from Dylan Lloyd :

```
❯ python -c 'import pathlib; import importlib; 
importlib.import_module(pathlib.Path("poc.py"))'
Traceback (most recent call last):
  File "", line 1, in 
  File "~/.conda/envs/py3.6/lib/python3.6/importlib/__init__.py", line 117, in 
import_module
if name.startswith('.'):
AttributeError: 'PosixPath' object has no attribute 'startswith'
```

--
components: Library (Lib)
messages: 336136
nosy: majuscule
priority: normal
severity: normal
status: open
title: importlib does not support pathlib
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



[issue36046] support dropping privileges when running subprocesses

2019-02-20 Thread SilentGhost


Change by SilentGhost :


--
nosy: +giampaolo.rodola

___
Python tracker 

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



[issue36055] Division using math.pow and math.log approximation fails

2019-02-20 Thread Mark Dickinson


Mark Dickinson  added the comment:

This isn't a bug: floating-point arithmetic is by its nature approximate, and 
two sequences of operations that would mathematically give the same result need 
not give the same result with floating-point.

I'd recommend a read of this portion of the tutorial, which goes into some of 
the issues involved: https://docs.python.org/3/tutorial/floatingpoint.html

Having said that, you'll get slightly better accuracy in general (one can't 
make specific guarantees, since everything's dependent on the platform's math 
library) if you use `math.sqrt(x)` instead of `math.pow(x, 0.5)`, and 
`math.log2(y)` instead of `math.log(y, 2)`.

--
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



[issue35828] test_multiprocessing_fork - crashes in PyDict_GetItem - segmentation error

2019-02-20 Thread Michael Felt


Michael Felt  added the comment:

Also - this looks like a core dump was 'seen', but later removed.

Warning -- files was modified by test_multiprocessing_forkserver
  Before: []
  After:  ['core']

What can I change so that ot does not cleanup the core file?

--

___
Python tracker 

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



[issue36055] Division using math.pow and math.log approximation fails

2019-02-20 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +mark.dickinson, rhettinger

___
Python tracker 

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



[issue35828] test_multiprocessing_fork - crashes in PyDict_GetItem - segmentation error

2019-02-20 Thread Michael Felt


Michael Felt  added the comment:

Another message that surprises me is:
Warning -- multiprocessing.process._dangling was modified by 
test_multiprocessing_spawn
  Before: <_weakrefset.WeakSet object at 0x3076e810>
  After:  <_weakrefset.WeakSet object at 0x3076e390>

Normally speaking the address 0x3000 and higher should be "out of bounds" 
aka a SEGV - unless special actions are taken to open a memory region above 
0x2fff - for default AIX memory model.

Just calling malloc(), afaik, does not do automatically create a new memory 
section (0x000-0x0fff is reserved for kernel CODE, 
0x1000-0x1fff is reserved for application CODE, and 
0x2000-0x2fff is .data,.bss, "empty aka not-active", .stack).
The area between .end_bss and .stack is the area that sbrk() provides memory 
from (for calls to malloc(), e.g.)

In short, is there something I do not know understand about Python object 
pointers that 0x3000+ values are actually living in 0x2000-0x2fff 
space?

--

___
Python tracker 

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



[issue36055] Division using math.pow and math.log approximation fails

2019-02-20 Thread Marcelo Marotta


New submission from Marcelo Marotta :

Steps to reproduce the error

>>> import math
>>> 1/math.log(math.pow(30,0.5),2) == 2/math.log(30,2)
True
>>> 1/math.log(math.pow(9,0.5),2) == 2/math.log(9,2)
True
>>> 1/math.log(math.pow(15,0.5),2) == 2/math.log(15,2)
True
>>> 1/math.log(math.pow(8,0.5),2) == 2/math.log(8,2)
False
>>> 2/math.log(8,2)
0.
>>> 1/math.log(math.pow(8,0.5),2) 
0.6665

I reproduced the error in Python :
Python 3.5.3
and
Python 2.7.13

--
components: Library (Lib)
messages: 336132
nosy: Marcelo Marotta
priority: normal
severity: normal
status: open
title: Division using math.pow and math.log approximation fails
type: behavior

___
Python tracker 

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



[issue35828] test_multiprocessing_fork - crashes in PyDict_GetItem - segmentation error

2019-02-20 Thread Michael Felt


Michael Felt  added the comment:

I am still trying to get further with this, but I won't get far enough without 
some help on how to best dig deeper.

For one, it should be leaving a core dump, but it never seems to leave the core 
dump in the working directory. I know it is doing core dump because the "errpt" 
system tells me it is.

Further, anyone who can help me better understand messages such as:
Warning -- Dangling processes: {, }

All I can figure out is that the "parent" process has children that "die". Is 
there anything useful in the SpawnProcess name info?

--

___
Python tracker 

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



[issue36027] Support negative exponents in pow() where a modulus is specified.

2019-02-20 Thread Berry Schoenmakers


Berry Schoenmakers  added the comment:

In pure Python this seems to be the better option to compute inverses:

def modinv(a, m):  # assuming m > 0
b = m
s, s1 = 1, 0
while b:
a, (q, b) = b, divmod(a, b)
s, s1 = s1, s - q * s1
if a != 1:
raise ValueError('inverse does not exist')
return s if s >= 0 else s + m

Binary xgcd algorithms coded in pure Python run much slower.

--

___
Python tracker 

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



[issue36012] Investigate slow writes to class variables

2019-02-20 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
resolution:  -> fixed
stage: patch review -> 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



[issue34464] There are inconsitencies in the treatment of True, False, None, and __debug__ keywords in the docs

2019-02-20 Thread R. David Murray


Change by R. David Murray :


--
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



[issue36012] Investigate slow writes to class variables

2019-02-20 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset d8b9e1fc2e45d2bc3f4a9737c375f2adb8a8c7de by Raymond Hettinger 
(Stefan Behnel) in branch 'master':
bpo-36012: Avoid linear slot search for non-dunder methods (GH-11907)
https://github.com/python/cpython/commit/d8b9e1fc2e45d2bc3f4a9737c375f2adb8a8c7de


--

___
Python tracker 

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



[issue36049] No __repr__() for queue.PriorityQueue and queue.LifoQueue

2019-02-20 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> It has not yet been decided whether to expose the content
> of the queue in its repr at all. There is no public API for 
> accessing the content of the queue without removing items 
> from the queue, and I think it is intentional.

I agree with Serhiy.

Let's close this feature request.  It doesn't make sense for queues and is at 
odds with their design and intended uses.

There are a number of places where making a less opaque repr is helpful, but 
iterators and queues have a temporal aspect where this doesn't make sense.

--

___
Python tracker 

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



[issue36048] Deprecate implicit truncating when convert Python numbers to C integers: use __index__, not __int__

2019-02-20 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

> I am not sure what to with the int constructor. Should it try __index__ 
> before __int__? Or just make __index__ without __int__ setting the nb_int 
> slot as was proposed by Nick in issue33039?

Shouldn't it try only __int__ since this will default to __index__ once #33039 
is closed?

--
nosy: +remi.lapeyre

___
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-02-20 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

I would like to work on this issue.

--
nosy: +matrixise

___
Python tracker 

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



[issue36049] No __repr__() for queue.PriorityQueue and queue.LifoQueue

2019-02-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

If you treat the "queue" attribute as a part the public API, just use 
repr(q.queue) instead of repr(q).

--
resolution:  -> rejected
stage: patch review -> 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



[issue36052] Assignment operator allows to assign to __debug__

2019-02-20 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Thank you Pablo, if I see you at PyCon, maybe we could drink a good beer ;-)

--

___
Python tracker 

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



[issue36042] Setting __init_subclass__ and __class_getitem__ methods are in runtime doesnt make them class method.

2019-02-20 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:

I totally agree with Serhiy

--

___
Python tracker 

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



[issue36049] No __repr__() for queue.PriorityQueue and queue.LifoQueue

2019-02-20 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Hi @rhettinger

Thank you for the review of this issue.

--
resolution: rejected -> 
stage: resolved -> patch review
status: closed -> open

___
Python tracker 

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



[issue36042] Setting __init_subclass__ and __class_getitem__ methods are in runtime doesnt make them class method.

2019-02-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I don't like complicating the code and adding a performance penalty to support 
such uncommon case.

The documentation for __class_getitem__ precisely describes the current 
behavior: "when defined in the class body, this method is implicitly a class 
method". Nothing should be changed here.

The documentation for __init_subclass__ could be rewritten in similar words.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue36039] Replace append loops with list comprehensions

2019-02-20 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I concur with all the other -1 comments and will mark this a closed.

FWIW, we generally discourage sweeping across the library with minor rewrites.  
Guido articulated a principle of "holistic refactoring" where we make code 
improvements while working on the module as a whole.  This helps makes sure 
that code changes are made in the context of a thorough understanding of what 
the module is trying to do.  This also helps us reduce maintenance-induced-bugs 
where minor code adjustments create new bugs that weren't there before.

Thank you for taking a look at the source and please continue to do so. If you 
find a specific case that is problematic, feel free to post that one particular 
case.  That said, a better use of time is to take one of the many open tracker 
issues, research it, and propose a fix.

--
nosy: +rhettinger
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



[issue36052] Assignment operator allows to assign to __debug__

2019-02-20 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

When I started working on this I did not notice the extra comments here.
 
I will close my PR so Stéphane can do the PR.

--
nosy: +pablogsal

___
Python tracker 

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



[issue36052] Assignment operator allows to assign to __debug__

2019-02-20 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


--
pull_requests: +11985

___
Python tracker 

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



[issue35956] Sort documentation could be improved for complex sorting

2019-02-20 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
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



[issue36049] No __repr__() for queue.PriorityQueue and queue.LifoQueue

2019-02-20 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

[Zahash Z] (Zahash Z)]
> If you look at the queue.PriorityQueue class, there is 
> self.queue = [ ].

We really don't want to expose the internals here.  They are subject to change 
and access to them is guarded by locks.

> It has not yet been decided whether to expose the content
> of the queue in its repr at all. There is no public API for 
> accessing the content of the queue without removing items 
> from the queue, and I think it is intentional.

I agree with Serhiy.

Let's close this feature request.  It doesn't make sense for queues and is at 
odds with their design and intended uses.

--
resolution:  -> rejected
stage: patch review -> 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



  1   2   >