[issue24828] Segfault when using store-context AST node in a load context

2018-09-22 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Reproducible on latest 2.7 branch as well. Stack trace as below : 

Program received signal SIGSEGV, Segmentation fault.
dict_set_item_by_hash_or_entry (
op={'code': , 'ast': , '__builtins__': , '__file__': 
'../backups/bpo24828.py', 'm': , id='foo', col_offset=0, 
lineno=1) at remote 0x1005c2790>, col_offset=0) at remote 0x1005c27d0>]) at 
remote 0x1005c2810>, '__package__': None, '__name__': '__main__', '__doc__': 
None}, key=, hash=,
value=, ep=) at Objects/dictobject.c:792
792 Py_INCREF(value);
(gdb) bt
#0  dict_set_item_by_hash_or_entry (op={'code': , 
'ast': , '__builtins__': , '__file__': '../backups/bpo24828.py', 'm': 
, 
id='foo', col_offset=0, lineno=1) at remote 0x1005c2790>, col_offset=0) at 
remote 0x1005c27d0>]) at remote 0x1005c2810>, '__package__': None, '__name__': 
'__main__', '__doc__': None}, key=, hash=, 
value=, ep=) at Objects/dictobject.c:792
#1  PyDict_SetItem (op={'code': , 'ast': , '__builtins__': , 
'__file__': '../backups/bpo24828.py', 'm': , id='foo', col_offset=0, 
lineno=1) at remote 0x1005c2790>, col_offset=0) at remote 0x1005c27d0>]) at 
remote 0x1005c2810>, '__package__': None, '__name__': '__main__', '__doc__': 
None}, key='foo', value=0x0) at Objects/dictobject.c:848
#2  0x0001000ab62e in PyEval_EvalFrameEx (f=, 
throwflag=) at Python/ceval.c:2186
#3  0x0001000a735a in PyEval_EvalCodeEx (co=, 
globals=, locals=, args=0x0, argcount=, kws=, kwcount=, defs=0x0, 
defcount=, closure=) at Python/ceval.c:3604
#4  0x0001000a6cb6 in PyEval_EvalCode (co=0x100293168, globals='foo', 
locals=0x0) at Python/ceval.c:669
#5  0x0001000a302a in builtin_eval (self={'code': , 'ast': , '__builtins__': , '__file__': '../backups/bpo24828.py', 'm': 
, 
id='foo', col_offset=0, lineno=1) at remote 0x1005c2790>, col_offset=0) at 
remote 0x1005c27d0>]) at remote 0x1005c2810>, '__package__': None, '__name__': 
'__main__', '__doc__': None}, args=) at Python/bltinmodule.c:679
#6  0x0001000ae8a7 in call_function (oparg=, 
pp_stack=) at Python/ceval.c:4372
#7  PyEval_EvalFrameEx (f=Frame 0x1002d4bc0, for file ../backups/bpo24828.py, 
line 7, in  (), throwflag=) at Python/ceval.c:3009
#8  0x0001000a735a in PyEval_EvalCodeEx (co=, 
globals=, locals=, args=0x0, argcount=, kws=, kwcount=, defs=0x0, 
defcount=, closure=) at Python/ceval.c:3604
#9  0x0001000a6cb6 in PyEval_EvalCode (co=0x100293168, globals='foo', 
locals=0x0) at Python/ceval.c:669
#10 0x0001000d4de4 in run_mod (mod=, filename=, globals={'code': , 'ast': , '__builtins__': , '__file__': 
'../backups/bpo24828.py', 'm': , id='foo', col_offset=0, 
lineno=1) at remote 0x1005c2790>, col_offset=0) at remote 0x1005c27d0>]) at 
remote 0x1005c2810>, '__package__': None, '__name__': '__main__', '__doc__': 
None}, locals={'code': , 'ast': , '__builtins__': , '__file__': 
'../backups/bpo24828.py', 'm': , id='foo', col_offset=0, 
lineno=1) at remote 0x1005c2790>, col_offset=0) at remote 0x1005c27d0>]) at 
remote 0x1005c2810>, '__package__': None, '__name__': '__main__', '__doc__': 
None}, flags=, arena=) at Python/pythonrun.c:1385
#11 PyRun_FileExFlags (fp=, filename=, 
start=, globals={'code': , 'ast': 
, '__builtins__': , 
'__file__': '../backups/bpo24828.py', 'm': , id='foo', col_offset=0, 
lineno=1) at remote 0x1005c2790>, col_offset=0) at remote 0x1005c27d0>]) at 
remote 0x1005c2810>, '__package__': None, '__name__': '__main__', '__doc__': 
None}, locals={'code': , 'ast': , '__builtins__': , '__file__': 
'../backups/bpo24828.py', 'm': , id='foo', col_offset=0, 
lineno=1) at remote 0x1005c2790>, col_offset=0) at remote 0x1005c27d0>]) at 
remote 0x1005c2810>, '__package__': None, '__name__': '__main__', '__doc__': 
None}, closeit=1, flags=) at Python/pythonrun.c:1371
#12 0x0001000d491a in PyRun_SimpleFileExFlags (fp=0x7fff71bec070, 
filename=0xc6079cb3d3de86bb , closeit=8, flags=0x7fff5fbffa70) at Python/pythonrun.c:957
#13 0x0001000ea8f2 in Py_Main (argc=, argv=) 
at Modules/main.c:645
#14 0x7fff8b5055c9 in start () from /usr/lib/system/libdyld.dylib
#15 0x7fff8b5055c9 in start () from /usr/lib/system/libdyld.dylib
#16 0x in ?? ()


Adding Benjamin since he is the 2.7 release manager and it's something specific 
to 2.7.


Thanks

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue34537] test_gdb fails with LC_ALL=C

2018-09-22 Thread STINNER Victor


STINNER Victor  added the comment:

Thank you Elvis for the fix!

--

___
Python tracker 

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



[issue25952] code_context not available in exec()

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue34751] Hash collisions for tuples

2018-09-22 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

> I don't know that primes are important here, but neither do I know that 
> they're _not_ important here.

Hashes are effectively computed modulo 2**N. "Primes" are meaningless in that 
setting (except for the prime 2 which does have a meaning). For example, 
103 is prime but 103 + 2**64 is not. But these represent the same 
number modulo 2**64. Also, multiplication by any odd number is a permutation 
modulo 2**N, so every odd number is invertible.

--

___
Python tracker 

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



[issue24834] pydoc should display the expression for a builtin argument default, not its result

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue24174] Python crash on exit

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue24997] mock.call_args compares as equal and not equal

2018-09-22 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Seems to have been implemented with ce913877e42b7fa03434c2e765ace891e0f5c4dc . 
https://bugs.python.org/issue25195 

$ git checkout ce913877e42b7fa03434c2e765ace891e0f5c4dc~1 Lib/unittest/mock.py
$ ./python.exe ../backups/bpo24997.py
1  True
2  True

$ git checkout ce913877e42b7fa03434c2e765ace891e0f5c4dc Lib/unittest/mock.py
$ ./python.exe ../backups/bpo24997.py
1  True
2  False

Thanks

--

___
Python tracker 

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



[issue34751] Hash collisions for tuples

2018-09-22 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

> Which was your original suggestion.  Which you appear to be opposed to now?  
> I'm unclear about why, if so.

I'm not strictly opposed to that. It's just that I have less confidence in the 
current ad-hoc hash compared to something following the DJBX33A scheme.

--

___
Python tracker 

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



[issue24307] pip error on windows whose current user name contains non-ascii characters

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue34561] Replace list sorting merge_collapse()?

2018-09-22 Thread Vincent Jugé

Vincent Jugé  added the comment:

I see... Indeed, my only goal when adapting Shivers Sort was to maintain some 
invariant that would make the analysis easy, while mimicking the arguments 
developed by Buss & Knop for their analysis of (plain) Shivers Sort. It is, 
however, sure that the n(H+4) upper bound I get should be refined when H is 
small, which more or less amounts to tackling the 3-run case you mention.

I am reasonably convinced that the current version of Adaptive Shivers Sort 
could be adapted to take this problem into account, while keeping its overall 
simple stricture and complexity analysis.

If this first step turns out to be feasible, I will also look at the latest 
version of runstack.py to investigate other possible improvements on Adaptive 
Shivers Sort.

--

___
Python tracker 

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



[issue34750] locals().update doesn't work in Enum body, even though direct assignment to locals() does

2018-09-22 Thread Antony Lee


Antony Lee  added the comment:

> I agree though that adding an update method would be nice though and can be 
> done in just a few lines of code.

Again, this can be done just be inheriting the methods from MutableMapping.

In fact even now one can just write

class E(Enum): MutableMapping.update(locals(), {"a": 1})

and this will do the "right" thing but that's hardly an obvious way to do it...

--

___
Python tracker 

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



[issue34751] Hash collisions for tuples

2018-09-22 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

> I'm not aware of any research papers about picking multipliers in this 
> context, but would love to see one.

The only real condition that I can think of is that the order should be large: 
we do not want MULTIPLIER**n = 1 (mod 2**N) for a small number n.

Other than that, we could pick the multiplier to guarantee no hash collisions 
on some chosen subset of inputs. A bit like your product(range(100), repeat=4) 
example but then for more inputs.

If you agree with this approach, I could try to find a good multiplier this way.

--

___
Python tracker 

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



[issue34709] Suggestion: make getuser.getpass() also look at SUDO_USER environment variable

2018-09-22 Thread Amos S


Change by Amos S :


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

___
Python tracker 

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



[issue32892] Remove specific constant AST types in favor of ast.Constant

2018-09-22 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

thautwarm, ast.Constant is not new. You can use it since 3.8. What is new in 
this issue -- ast.parse() will produce ast.Constant instead of ast.Num, 
ast.Str, etc.

--

___
Python tracker 

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



[issue22490] Using realpath for __PYVENV_LAUNCHER__ makes Homebrew installs fragile

2018-09-22 Thread Vinay Sajip


Vinay Sajip  added the comment:

As I said in msg284106, it seems that the __PYVENV_LAUNCHER__ should be removed 
from the stub launcher and then tests should confirm that framework builds 
aren't adversely affected. Unfortunately, I can't do this testing as I don't 
have a Mac, and have been hoping that one of the Mac platform experts (or 
indeed anyone who can build and test framework builds) can look at this.

--

___
Python tracker 

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



[issue33346] Syntax error with async generator inside dictionary comprehension

2018-09-22 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

What is the status of this issue?

Similar change to the Grammar was just merged in issue32117. Both issue32117 
and this issue extend already implemented PEPs (PEP 448 and PEP 525 
correspondingly) to the corner case missed in the original PEP.

Pablo, Yury, could you please start a discussion about this on the Pythod-Dev 
mailing list?

--

___
Python tracker 

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



[issue34769] _asyncgen_finalizer_hook running in wrong thread

2018-09-22 Thread twisteroid ambassador


New submission from twisteroid ambassador :

When testing my happy eyeballs library, I occasionally run into issues with 
async generators seemingly not finalizing. After setting loop.set_debug(True), 
I have been seeing log entries like these:


Exception ignored in: 
Traceback (most recent call last):
  File "/opt/Python3.7.0/lib/python3.7/asyncio/base_events.py", line 466, in 
_asyncgen_finalizer_hook
self.create_task(agen.aclose())
  File "/opt/Python3.7.0/lib/python3.7/asyncio/base_events.py", line 386, in 
create_task
task = tasks.Task(coro, loop=self)
  File "/opt/Python3.7.0/lib/python3.7/asyncio/base_events.py", line 674, in 
call_soon
self._check_thread()
  File "/opt/Python3.7.0/lib/python3.7/asyncio/base_events.py", line 712, in 
_check_thread
"Non-thread-safe operation invoked on an event loop other "
RuntimeError: Non-thread-safe operation invoked on an event loop other than the 
current one
ERRORasyncio Task was destroyed but it is pending!
source_traceback: Object created at (most recent call last):
  File "/opt/Python3.7.0/lib/python3.7/threading.py", line 885, in _bootstrap
self._bootstrap_inner()
  File "/opt/Python3.7.0/lib/python3.7/threading.py", line 917, in 
_bootstrap_inner
self.run()
  File "/opt/Python3.7.0/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
  File "/opt/Python3.7.0/lib/python3.7/concurrent/futures/thread.py", line 80, 
in _worker
work_item.run()
  File "/opt/Python3.7.0/lib/python3.7/concurrent/futures/thread.py", line 57, 
in run
result = self.fn(*self.args, **self.kwargs)
  File "/opt/Python3.7.0/lib/python3.7/asyncio/base_events.py", line 746, in 
_getaddrinfo_debug
msg.append(f'type={type!r}')
  File "/opt/Python3.7.0/lib/python3.7/enum.py", line 572, in __repr__
self.__class__.__name__, self._name_, self._value_)
  File "/opt/Python3.7.0/lib/python3.7/asyncio/base_events.py", line 466, in 
_asyncgen_finalizer_hook
self.create_task(agen.aclose())
  File "/opt/Python3.7.0/lib/python3.7/asyncio/base_events.py", line 386, in 
create_task
task = tasks.Task(coro, loop=self)
task: ()> created 
at /opt/Python3.7.0/lib/python3.7/asyncio/base_events.py:386>



This is a typical instance. Usually several instances like this occur at once.

I'll try to reproduce these errors in a simple program. Meanwhile, here are 
some details about the actual program, which may or may not be related to the 
errors:

* I have several nested async generators (async for item in asyncgen: yield 
do_something(item); ), and when the errors appear, the above error messages and 
stack traces repeat several times, with the object names mentioned in 
"Exception ignored in: ..." being each of the nested async generators. Other 
parts of the error messages, including the stack traces, are exactly the same.

* I never used threads or loop.run_in_executor() explicitly in the program. 
However, the innermost async generator calls loop.getaddrinfo(), and that is 
implemented by running a Python function, socket.getaddrinfo(), with 
loop.run_in_executor(), so the program implicitly uses threads. 
(socket.getaddrinfo() is a Python function that calls a C function, 
_socket.getaddrinfo().)

* The outermost async generator is not iterated using `async for`. Instead, it 
is iterated by calling its `__aiter__` method, saving the returned async 
iterator object, and then awaiting on the `__anext__` method of the async 
iterator repeatedly. Of course, all of these are done in the same event loop.


Environment: Python 3.7.0 compiled from source, on Debian stretch.

--
components: asyncio
messages: 326090
nosy: asvetlov, twisteroid ambassador, yselivanov
priority: normal
severity: normal
status: open
title: _asyncgen_finalizer_hook running in wrong thread
type: behavior
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



[issue31506] Improve the error message logic for object_new & object_init

2018-09-22 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I think this change should be reverted.

--

___
Python tracker 

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



[issue30576] http.server should support HTTP compression (gzip)

2018-09-22 Thread Pierre Quentel


Pierre Quentel  added the comment:

I have released the module as httpcompressionserver on PyPI : 
https://pypi.org/project/httpcompressionserver/

--

___
Python tracker 

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



[issue34709] Suggestion: make getuser.getpass() also look at SUDO_USER environment variable

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue33346] Syntax error with async generator inside dictionary comprehension

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue23584] test_doctest lineendings fails in verbose mode

2018-09-22 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks for the patch. It seems this was fixed with 
09a08de363cbe18a87392e1c2ebf0ac1f414592c (3.x) and 
c747e5564f0315357a3e7d2f580c6d1c8a3b4ab8 (2.7) by applying the code suggested 
in the patch. Can this be closed?

Thanks

--
nosy: +xtreak

___
Python tracker 

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



[issue23097] unittest can unnecessarily modify sys.path (and with the wrong case)

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue24063] Support Mageia and Arch Linux in the platform module

2018-09-22 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Just to add some more context the function platform.linux_distribution() was 
removed in Python 3 with 8b94b41ab7b12f745dea744e8940631318816935. Refer 
https://bugs.python.org/issue28167 for more discussion. 
https://pypi.org/project/distro/ is the recommended package for this. I am not 
sure if this can be added to Python 2 though.

Thanks

--
nosy: +xtreak

___
Python tracker 

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



[issue1180267] expanding platform module and making it work as it should

2018-09-22 Thread Mark Lawrence


Change by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue1180267] expanding platform module and making it work as it should

2018-09-22 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Can this be closed as since platform.linx_distribution() was removed with 
https://bugs.python.org/issue28167 and distro is the recommended package which 
can be frequently updated.

Thanks

--
nosy: +xtreak

___
Python tracker 

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



[issue23706] pathlib.Path.write_text should include a newline argument

2018-09-22 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

It seems a similar API was suggested in the initial stages at 
https://bugs.python.org/issue20218#msg209017 . But looking at the reference 
library in the comment https://github.com/jaraco/path.py I think it's more 
about converting newlines in the given text with respect to the platform 
instead of adding one at the end.

Thanks

--
nosy: +xtreak

___
Python tracker 

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



[issue24341] Test suite emits many DeprecationWarnings about sys.exc_clear() when -3 is enabled

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue21465] sqlite3 Row can return duplicate keys when using adapters

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue13822] is(upper/lower/title) are not exactly correct

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue21465] sqlite3 Row can return duplicate keys when using adapters

2018-09-22 Thread Mark Lawrence


Change by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue34476] asyncio.sleep(0) not documented

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue16360] argparse: comma in metavar causes assertion failure when formatting long usage message

2018-09-22 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks @paul.j3 for the PR. The PR in the linked issue was merged and I cannot 
reproduce the original assertion error in the latest 2.7 branch with the script.

$ ./python.exe
Python 2.7.15+ (remotes/upstream/2.7:10be1d3f80, Sep 22 2018, 22:10:28)
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
$ ./python.exe ../backups/bpo16360.py
usage: bpo16360.py [-h] [-w TIME] [-r N] [-j TIME] [-W TIME]
   [-y COUNT|max|avg] [-o FILE] [-c CHANNEL[=LABEL],...]
   FILE [FILE ...]
bpo16360.py: error: too few arguments


Thanks

--
nosy: +xtreak

___
Python tracker 

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



[issue30773] async generator receives wrong value when shared between coroutines

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue32181] runaway Tasks with Task.cancel() ignored.

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue31973] Incomplete DeprecationWarning for async/await keywords

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



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

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue34770] pyshellext.cpp: Possible null pointer dereference

2018-09-22 Thread Zackery Spytz


New submission from Zackery Spytz :

The GlobalLock() call in UpdateDropDescription() is not checked for failure.

--
messages: 326098
nosy: ZackerySpytz
priority: normal
severity: normal
status: open
title: pyshellext.cpp: Possible null pointer dereference
type: behavior
versions: Python 3.6, 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



[issue34770] pyshellext.cpp: Possible null pointer dereference

2018-09-22 Thread Zackery Spytz


Change by Zackery Spytz :


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

___
Python tracker 

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



[issue22490] Using realpath for __PYVENV_LAUNCHER__ makes Homebrew installs fragile

2018-09-22 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +8905
stage:  -> patch review

___
Python tracker 

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



[issue22490] Using realpath for __PYVENV_LAUNCHER__ makes Homebrew installs fragile

2018-09-22 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

I went naively through the codebase and removed every reference to 
PYVENV_LAUNCHER and submitted as PR 9498. Does the CI runner at 
https://python.visualstudio.com/cpython/_build/results?buildId=31019&view=logs 
use a framework build such that it's an adequate test of the change?

--

___
Python tracker 

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



[issue32897] test_gdb failed on Fedora 27

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue34736] Confusing base64.b64decode output

2018-09-22 Thread Tal Einat


Change by Tal Einat :


--
nosy: +ned.deily

___
Python tracker 

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



[issue32644] unittest.mock.call len() error

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue34609] Idle Unitest

2018-09-22 Thread Tal Einat


Change by Tal Einat :


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



[issue33083] math.factorial accepts non-integral Decimal instances

2018-09-22 Thread Tal Einat


Change by Tal Einat :


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



[issue1529353] Squeezer - squeeze large output in IDLE's shell

2018-09-22 Thread Tal Einat


Tal Einat  added the comment:

The PR is ready for another review.

ISTM it should be good to go, after have addressing all of the significant 
issues brought up in the discussion here.

--

___
Python tracker 

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



[issue31521] segfault in PyBytes_AsString

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue31218] del expects __delitem__ if __setitem__ is defined

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue34472] zipfile: does not include optional descriptor signature

2018-09-22 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 6ec298114855b648a1f5fc4188ea3686a9d77fb3 by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-34472: Add data descriptor signature to zipfile (GH-8871) (ПР-9407)
https://github.com/python/cpython/commit/6ec298114855b648a1f5fc4188ea3686a9d77fb3


--

___
Python tracker 

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



[issue34369] kqueue.control() documentation and implementation mismatch

2018-09-22 Thread Tal Einat


Change by Tal Einat :


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

___
Python tracker 

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



[issue29164] make test always fail at 218/405 ( AssertionError: ', ' not found in '1234.5' )

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue29081] time.strptime() return wrong result

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue34609] Importing the certain modules while debugging raises an exception

2018-09-22 Thread Tal Einat


Change by Tal Einat :


--
title: Idle Unitest -> Importing the certain modules while debugging raises an 
exception

___
Python tracker 

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



[issue34609] Importing certain modules while debugging raises an exception

2018-09-22 Thread Tal Einat


Change by Tal Einat :


--
title: Importing the certain modules while debugging raises an exception -> 
Importing certain modules while debugging raises an exception

___
Python tracker 

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



[issue34771] test_ctypes failing on Linux SPARC64

2018-09-22 Thread Frank Schaefer


New submission from Frank Schaefer :

Python 3.6.6 on Linux 4.16.18 SPARC64 fails test_ctypes.  Specifically, it 
appears to be due to the _testfunc_large_struct_update_value() or 
_testfunc_reg_struct_update_value():

0:00:44 load avg: 46.24 [137/407/1] test_ctypes failed -- running: test_socket 
(44 sec), test_subprocess (35 sec), test_venv (43 sec), test_normalization (43 
sec), test_signal (43 sec), test_multiprocessing_spawn (43 sec), 
test_concurrent_futures (43 sec), test_email (34 sec), test_cmd_line_script (43 
sec), test_tools (43 sec), test_pickletools (34 sec), test_zipfile (30 sec), 
test_multiprocessing_fork (33 sec), test_pyclbr (31 sec), test_math (42 sec), 
test_calendar (35 sec), test_datetime (33 sec), test_distutils (30 sec)
test test_ctypes failed -- Traceback (most recent call last):
  File "/usr/src/dist/new/Python-3.6.6/Lib/ctypes/test/test_structures.py", 
line 416, in test_pass_by_value
self.assertEqual(s.first, 0xdeadbeef)
AssertionError: 195948557 != 3735928559

Obviously, the "0xbadf00d" field setting is propagating back up through 
something that's supposed to be passed-by-value, and the test case quite 
rightly picks up on it.  I suspect this bug exists in 2.7.15 as well (2.7 just 
doesn't have the testcase to catch it).
 
This is built with gcc-8.2.0, glibc-2.27, kernel 4.16.18, CFLAGS="-O1 -mcpu=v9 
-mtune=v9".  (FYI I had to turn down optimization to resolve another test 
failure, hence the "-O1".)

I'm guessing SPARC64 calling conventions are still passing certain large values 
by reference, and libffi isn't dealing with this?  I'm still investigating.  
I've tried it with and without --with-system-libffi, with no difference (my 
system libffi is 3.2.1).

--
components: ctypes
messages: 326102
nosy: kelledin-3
priority: normal
severity: normal
status: open
title: test_ctypes failing on Linux SPARC64
type: behavior
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



[issue29143] Logger should ignore propagate property for disabled handlers.

2018-09-22 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Can you please attach a script that has a relevant sample logging configuration 
along with the output you are expecting?

Thanks

--
nosy: +xtreak

___
Python tracker 

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



[issue12294] multiprocessing.Pool: Need a way to find out if work are finished.

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue27709] difflib.HtmlDiff produces different output from difflib.ndiff

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue34472] zipfile: does not include optional descriptor signature

2018-09-22 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 44989bc2696320cf55ae6f329aaf58edd49d792a by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.7':
bpo-34472: Add data descriptor signature to zipfile (GH-8871) (GH-9399)
https://github.com/python/cpython/commit/44989bc2696320cf55ae6f329aaf58edd49d792a


--

___
Python tracker 

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



[issue34472] zipfile: does not include optional descriptor signature

2018-09-22 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset ed21919d69ac22232cbc0dad0323477818112b6f by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.6':
bpo-34472: Add data descriptor signature to zipfile (GH-8871) (GH-9398)
https://github.com/python/cpython/commit/ed21919d69ac22232cbc0dad0323477818112b6f


--

___
Python tracker 

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



[issue34472] zipfile: does not include optional descriptor signature

2018-09-22 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution: rejected -> fixed

___
Python tracker 

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



[issue34472] zipfile: does not include optional descriptor signature

2018-09-22 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue24638] asyncio "loop argument must agree with future" error message could be improved

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue34605] Avoid master/slave terminology

2018-09-22 Thread Socob


Change by Socob <206a8...@opayq.com>:


--
nosy: +Socob

___
Python tracker 

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



[issue23082] pathlib relative_to() can give confusing error message

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue34610] Incorrect iteration of Manager.dict() method of the multiprocessing module.

2018-09-22 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +8907

___
Python tracker 

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



[issue27513] email.utils.getaddresses does not handle Header objects

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue34736] Confusing base64.b64decode output

2018-09-22 Thread Mark Dickinson


Mark Dickinson  added the comment:

Yes, I'm having trouble thinking of an alternative message that's both accurate 
and helpful. I think what I _really_ want as a user is for b64decode to reject 
strings containing "_" and/or "-" as invalid (assuming altchars has been 
provided), but that would be a backwards-incompatible change, and has already 
been discussed in #1466065. Not sure it's worth revisiting that discussion.

Maybe just something like "invalid number of base64 characters"? We could even 
embed the actual number of base64 characters in the error message, which would 
give the user a clue that some characters are not being considered base64 
characters.

I find the "1 more than a multiple of 4" wording a bit clunky, and potentially 
misleading.

--

___
Python tracker 

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



[issue33232] Segmentation fault in operator.attrgetter

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue33194] Path-file objects does not have method to delete itself if its a file

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue33871] Possible integer overflow in iov_setup()

2018-09-22 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue34610] Incorrect iteration of Manager.dict() method of the multiprocessing module.

2018-09-22 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 69d0bc1430d2e9cddf0b39054ddcb86dbbe7927e by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-34610: Fixed iterator of multiprocessing.managers.DictProxy. 
(GH-9113). (GH-9500)
https://github.com/python/cpython/commit/69d0bc1430d2e9cddf0b39054ddcb86dbbe7927e


--

___
Python tracker 

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



[issue34610] Incorrect iteration of Manager.dict() method of the multiprocessing module.

2018-09-22 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue33194] Path-file objects does not have method to delete itself if its a file

2018-09-22 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Maybe this can be added to list at the end 
(https://docs.python.org/3/library/pathlib.html#correspondence-to-tools-in-the-os-module)
 for more visibility.

There was a similar thread in python-ideas to add more functions : 
https://groups.google.com/forum/#!topic/python-ideas/X9Eim6z31Ik

Thanks

--

___
Python tracker 

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



[issue33043] Add a 'Contributing to Docs' link at the bottom of docs.python.org

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue31737] Documentation renders incorrectly

2018-09-22 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Just as an update current docs site uses Sphinx 1.7.6 and the rendering is 
correct.

Thanks

--
nosy: +xtreak

___
Python tracker 

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



[issue30701] Exception parsing certain invalid email address headers

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue25597] unittest.mock does not wrap dunder methods (__getitem__ etc)

2018-09-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue31949] Bugs in PyTraceBack_Print()

2018-09-22 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests:  -4257

___
Python tracker 

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



[issue34751] Hash collisions for tuples

2018-09-22 Thread Tim Peters


Tim Peters  added the comment:

So you don't know of any directly relevant research either.  "Offhand I can't 
see anything wrong" is better than nothing, but very far from "and we know it 
will be OK because [see references 1 and 2]".

That Bernstein's DJBX33A has been widely used inspires no confidence 
whatsoever.  As already explained, Python _did_ use DJBX33X (with a different 
multiplier), and it systematically screwed up catastrophically in some nested 
tuple cases already spelled out.  Bernstein himself moved to DJBX33X (using xor 
instead of addition), and that would have screwed up too on a mix of smallish 
integers of both signs.

What Python does now, except for changing the multiplier, is essentially 
version 1a of the _also_ very widely used - but more recent - Fowler/Noll/Vo 
hash family[1]:

# Version 1a, recommended over version 1 (which does * before ^).
hash = offset_basis
for each octet_of_data to be hashed
hash = hash xor octet_of_data
hash = hash * FNV_prime
return hash

They did extensive studies, and very deliberately use a prime multiplier 
subject to a number of other constraints.  Not based on "offhand I can't see 
why not", but based on analysis and running extensive tests.

But, same as with Bernstein's variants (which predate FNV's work on picking 
"good" multipliers), they were developed in the context of hashing sequences of 
unsigned 8-bit integers.  There's no a priori reason I can see to expect them 
to work well in contexts other than that.  Indeed, FNV puts special constraints 
on the last 8 bits of the primes they pick, presumably because they're only 
concerned with hashing sequences of 8-bit values.

FYI, for 32-bit hashes they use multiplier 16777619, and for 64-bit 
1099511628211.

In the absence of coherent analysis directly relevant to what Python actually 
needs here, we're all flying blind.  What we do have is over a decade of 
positive real-world experience with the made-up hacks Python used to worm 
around a class of gross flaws its prior DJBX33X approach suffered, taking 
DJBX33X out of its original context and applying it in an area it wasn't 
designed for.  Which made it close to FNV-1a, but also in a context _that_ 
wasn't designed for.

However, it _is_ structurally close to FNV-1a, and using prime multipliers was 
a big deal to them.  "But offhand I don't see why" isn't a good enough reason 
to abandon that.  To the contrary, in the absence of _proof_ that it doesn't 
actually matter, I'd be happiest using the same multipliers (given above) and 
initial values "the standard" FNV-1a algorithms use.

[1] http://www.isthe.com/chongo/tech/comp/fnv/index.html#FNV-1a

--

___
Python tracker 

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



[issue34660] Replace ableist terms and pejoratives in source code.

2018-09-22 Thread Socob


Change by Socob <206a8...@opayq.com>:


--
nosy: +Socob

___
Python tracker 

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



[issue34694] Dismiss To Avoid Slave/Master wording cause it easier for non English spoken programmers

2018-09-22 Thread Socob


Change by Socob <206a8...@opayq.com>:


--
nosy: +Socob

___
Python tracker 

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



[issue34736] Confusing base64.b64decode output

2018-09-22 Thread Tal Einat


Tal Einat  added the comment:

> I think what I _really_ want as a user is for b64decode to reject strings 
> containing...

Do you mean you'd like to have this behavior by default?  One can already use 
validate=True to have invalid characters cause an exception.  I too find it 
surprising the False is the default, but changing this would be backwards 
incompatible.

> I find the "1 more than a multiple of 4" wording a bit clunky, and 
> potentially misleading.

I chose that to avoid mentioning "modulu" or "remainder".  I find it 
straightforward and clear, though admittedly a bit long and clumsy.  I don't 
believe it is inherently misleading, though.

I like your idea of including the number of base64 characters in the error 
message.  I find the phrase "base64 characters" ambiguous, though.  I suggest: 
"Invalid base64-encoded string: number of data characters (13) cannot be 1 more 
than a multiple of 4"

--

___
Python tracker 

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



[issue34772] Python will suddenly not plot

2018-09-22 Thread heiahh


New submission from heiahh :

Hi! I am experience a very strange behavior. As a student I've been using 
Spyder for my Python coding assignments. But some days ago I wanted to try out 
the Python environment in Visual Studio. So, I installed python environment in 
VS. But after that, none of even my simplest codes will produce any plots 
anymore. Even if I try the exact same code as I for sure know been showing a 
plot before. Initally I had a error message saying something like 
"mkl_aa_fw_init_workdivision" + some more info and directory reference. So 
after some googling I deleted a mkl file in the directory witch was mentioned 
in the error message. After that there is no error message, but still no plot. 
If I try a simple test code like this:

import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0,5,11)
y = x**2
plt.plot(x,y)

The only thing happening is Ipython console says "Kernel died, restarting". 
Also in Visual Studio, there is no plot coming up.I have no idea about the 
cause and how to fix it, even after hours of search and trial. Really 
frustrating to use time on this instead of my assignments. The only difference 
befor, when it was working, and after, is that I tried the Visual Studio 
environment. I highly appreciate help on this issue!

--
messages: 326112
nosy: heihaa
priority: normal
severity: normal
status: open
title: Python will suddenly not plot
type: crash
versions: Python 2.7

___
Python tracker 

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



[issue34772] Python will suddenly not plot

2018-09-22 Thread Ammar Askar


Ammar Askar  added the comment:

Hey heiahh,

This bug tracker is for issues pertaining to the python interpreter itself. 
You'd be better off asking your question on the matplotlib bug tracker or stack 
overflow:

https://github.com/matplotlib/matplotlib/issues

https://stackoverflow.com/

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



[issue24997] mock.call_args compares as equal and not equal

2018-09-22 Thread Berker Peksag


Berker Peksag  added the comment:

Correct, this has been fixed in issue 25195. Closing as 'out of date'. Thanks 
for triaging!

--
nosy: +berker.peksag
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



[issue34751] Hash collisions for tuples

2018-09-22 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

Thanks for the reference, I never heard of the FNV hash. Unfortunately, I 
haven't seen a reference for the rationale of how they pick their multiplier.

It's not clear what you are suggesting though. Keep using the FNV-ish hash 
somehow? Or using a DJBX33A hash with the FNV multiplier?

--

___
Python tracker 

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



[issue31737] Documentation renders incorrectly

2018-09-22 Thread Julien Palard


Julien Palard  added the comment:

Thanks for the follow up!

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



[issue34751] Hash collisions for tuples

2018-09-22 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

> the made-up hacks Python used to worm around a class of gross flaws its prior 
> DJBX33X approach suffered, taking DJBX33X out of its original context and 
> applying it in an area it wasn't designed for.

But we know why the DJBX33A hash didn't work (nested tuples), so we can think 
of the best way to solve that. Python messes with the multiplier, which makes 
it quite a different hash. Surely, if you believe that the precise choice of 
multiplier matters a lot, then you should also agree that arbitrarily changing 
the multiplier in the loop is a bad idea.

My proposal instead is to keep the structure of the DJBX33A hash but change the 
hash of the individual items to be hashed. That's a much less invasive change 
to the known algorithm.

Finally, something that I haven't mentioned here: an additional advantage of my 
approach is that high-order bits become more important:

BEFORE:
>>> L = [n << 60 for n in range(100)]; T = [(a,b,c) for a in L for b in L for c 
>>> in L]; len(set(hash(x) for x in T))
50

AFTER:
>>> L = [n << 60 for n in range(100)]; T = [(a,b,c) for a in L for b in L for c 
>>> in L]; len(set(hash(x) for x in T))
100

Again, I'm not claiming that this is a major issue. Just additional evidence 
that maybe my new hash might actually be slightly better than the existing hash.

--

___
Python tracker 

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



[issue34751] Hash collisions for tuples

2018-09-22 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I don't think any change should be made unless we agree that there is a real 
problem to be solved rather than because the OP is brazenly insistent on 
forcing through some change.  We shouldn't feel shoved into altering something 
that we don't agree is broken and into replacing it with something that we're 
less sure about.  Also, I'm concerned that that patch drops features like the 
post-addition of a constant and incorporating length signature -- it is as if 
we're starting from scratch rather than keeping the incremental improvements 
made over decades.  AFAICT, the only motivation for change is that the OP is 
relentless; otherwise, none of us would be giving this further thought.  I echo 
Eric's concern that it is easy to inadvertently make Python worse.

--

___
Python tracker 

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



[issue34751] Hash collisions for tuples

2018-09-22 Thread Tim Peters


Tim Peters  added the comment:

I strive not to believe anything in the absence of evidence ;-)

FNV-1a supplanted Bernstein's scheme in many projects because it works better.  
Indeed, Python itself used FNV for string hashing before the security wonks got 
exercised over collision attacks.  It worked great.  But "better" depends on 
what you value.  For example, FNV-1a has far better "avalanche" behavior than 
Bernstein[1].

Please note that I don't _object_ to your code!  It may work fine.  Or it may 
not in some cases.  The problem is that we have no way to tell.  There's no 
theory here, just misleading appeals to experience with the algorithms in 
contexts they were _intended_ to be used in.  Nobody expected some patterns of 
nested tuples to fail catastrophically before, and nobody expected mixed-sign 
integers to lead to poor (but not catastrophic) behavior after the former was 
"repaired".  Nobody now expects the next 10 catastrophes either.

We can only rely on contrived tests and bug reports.  Python's current scheme 
is unbeatable on that count, because it's the only scheme for which over a 
decade of experience _in context_ exists.

Which experience says there are no known catastophically bad real cases.  Which 
is worth a whole lot in a project that's so widely used now.

That said, the "repair" before was at least as much pure hackery as your 
proposed hackery, and - I agree - completely undercut the _theory_ FNV was 
based on (although, to be fair, I doubt anyone else _knew_ they were 
re-inventing a damaged FNV-1a at the time).

So ... since FNV-1a is in fact better in its intended context than the 
Bernstein one-liners in the same context, how about adding your

t += (t >> (4 * sizeof(t)));

hack to the _current_ code (& delete the code changing the multiplier)?  Then 
we could switch to the "official" FNV 32-bit and 64-bit multipliers too, and 
know at least that "almost everything" about the resulting algorithm is known 
to work exceedingly well in its original context.

[1] https://sites.google.com/site/murmurhash/avalanche

--

___
Python tracker 

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



[issue34751] Hash collisions for tuples

2018-09-22 Thread Tim Peters


Tim Peters  added the comment:

Raymond, I share your concerns.  There's no reason at all to make gratuitous 
changes (like dropping the "post-addition of a constant and incorporating 
length signature"), apart from that there's no apparent reason for them 
existing to begin with ;-)

Unintended consequences can abound.

Still, the last repair was pretty hacky, and a very well-known and highly 
respected algorithm (FNV-1a) _is_ hiding under it.  I would like to pursue 
seeing whether a more direct form of FNV-1a can be rehabilitated to worm around 
the known problematic cases.  That would also, if successful, give us a 
principled way to pick a better multiplier for 64-bit boxes.

--

___
Python tracker 

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



[issue34548] IDLE: Make TextView use the configured theme colors

2018-09-22 Thread Terry J. Reedy


New submission from Terry J. Reedy :

I am about to review and test, including live testing on Windows, with an eye 
to merging before the Monday midnight deadline for the coming releases.  At the 
moment I have no personal preference, nor insight into likely user perferences.

Tal, what is your rationale for the proposal?  Personal preference? Do you 
think a majority of user will prefer this?  Have you hand-tested (or htested) 
on both Mac and Linux?

Cheryl, what do you think?

--
nosy: +cheryl.sabella
versions:  -Python 2.7

___
Python tracker 

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



[issue32117] Tuple unpacking in return and yield statements

2018-09-22 Thread miss-islington


miss-islington  added the comment:


New changeset 8fabae3b00b2ccffd9f7bf4736734ae584ac5829 by Miss Islington (bot) 
(jChapman) in branch 'master':
bpo-32117: Iterable unpacking in return and yield documentation (GH-9487)
https://github.com/python/cpython/commit/8fabae3b00b2ccffd9f7bf4736734ae584ac5829


--
nosy: +miss-islington

___
Python tracker 

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



[issue16360] argparse: comma in metavar causes assertion failure when formatting long usage message

2018-09-22 Thread paul j3


paul j3  added the comment:

I'm closing this since the https://bugs.python.org/issue11874 fix also handles 
this issue.

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



[issue34479] ArgumentParser subparser error display at the wrong level

2018-09-22 Thread paul j3


Change by paul j3 :


--
resolution:  -> not a bug

___
Python tracker 

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



[issue34458] No way to alternate options

2018-09-22 Thread paul j3


Change by paul j3 :


--
resolution:  -> not a bug

___
Python tracker 

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



[issue34548] IDLE: Make TextView use the configured theme colors

2018-09-22 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

I did a review on the PR which probably answers your question, but I'll 
summarize here.

I think consistency in the windows would be good.  Consistency would include 
(but not limited to) foreground and background color, font style, font size, 
and behavior such as resizing.  If a user has changed to a dark theme with a 
font size of 20, then opening up the help or find windows should use that.

So, I think this is a good suggestion, but I think it should be considered 
within a larger scope.

--

___
Python tracker 

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



[issue34744] New %(flag)s format specifier for argparse.add_argument help string

2018-09-22 Thread paul j3


Change by paul j3 :


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