[issue36459] A possible double PyMem_FREE() due to tokenizer.c's tok_nextc()

2019-03-27 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +pablogsal

___
Python tracker 

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



[issue36459] A possible double PyMem_FREE() due to tokenizer.c's tok_nextc()

2019-03-27 Thread Zackery Spytz


Change by Zackery Spytz :


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

___
Python tracker 

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



[issue36459] A possible double PyMem_FREE() due to tokenizer.c's tok_nextc()

2019-03-27 Thread Zackery Spytz


New submission from Zackery Spytz :

Commit cb90c89de14aab636739b3e810cf949e47b54a0c added a PyMem_FREE(tok->buf) 
call in tok_nextc() if a PyMem_REALLOC() call fails. This will cause a double 
free when PyTokenizer_Free() is called on the tokenizer state.

--
components: Interpreter Core
messages: 339013
nosy: ZackerySpytz
priority: normal
severity: normal
status: open
title: A possible double PyMem_FREE() due to tokenizer.c's tok_nextc()
type: crash
versions: Python 2.7, 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



[issue36457] functools.singledispatchmethod interacts poorly with subclasses

2019-03-27 Thread Inada Naoki


Change by Inada Naoki :


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue36458] Compile errors --without-threads

2019-03-27 Thread patrik


patrik  added the comment:

Not a problem. I wanted to record the issue just in case someone else 
encounters it, and also because there seems to have been a history of issues 
with the no-threads option. Happy to hear its sorted in 3.7.

--

___
Python tracker 

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



[issue6422] timeit called from within Python should allow autoranging

2019-03-27 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

> Were you working on the additional functionality that you mentioned in 
> msg272704 or would that be open for someone else to do?  Thanks!

Please consider it open. I don't expect it to be difficult, it's just 
finding the Round Tuits. Perhaps an easy first issue for someone?

--

___
Python tracker 

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



[issue36458] Compile errors --without-threads

2019-03-27 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the report. Unfortunately, Python 3.6.8 was the last bugfix release 
of 3.6 so we now only accept and fix security-related issues for it.  I did a 
quick check and this does not appear to be a problem in 3.7.x but feel free to 
re-open the issue if it can be reproduced there.  Sorry!

https://devguide.python.org/#status-of-python-branches
https://devguide.python.org/devcycle/#security-branches

--
nosy: +ned.deily
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



[issue36458] Compile errors --without-threads

2019-03-27 Thread patrik


New submission from patrik :

Compiling python 3.6.8 configured with --without-threads (no other options) 
fails, with undefined references to PyGILState_GetThisThreadState in 
pylifecycle.c, and PyGILState_Ensure and PyGILState_Release in object.c.

I used Louis' fix from issue #24784 in pylifecycle.c, and placed #ifdef 
WITH_THREADS around the undefined calls in object.c (both in _PyObject_dump). 
With this, compiling works.

Installing then fails because Lib/threading.py attempts to import _thread, 
which is not available. This can be fixed by replacing the import with the 
pattern described in _dummy_thread:

try:
import _thread
except ImportError:
import _dummy_thread as _thread

import _thread happens in two places in threading.py (the second is "from 
_thread import stack_size"); both have to be rewritten as above.

There is also an unguarded import _thread in telnetlib, but it's inside a 
method def (mt_interact in class Telnet) so perhaps it does not cause 
installation to fail.

--
components: Build
messages: 339009
nosy: patrik
priority: normal
severity: normal
status: open
title: Compile errors --without-threads
type: compile error
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



[issue36457] functools.singledispatchmethod interacts poorly with subclasses

2019-03-27 Thread Tim Mitchell


New submission from Tim Mitchell :

The new functools.singledispatchmethod (issue32380) class interacts poorly with 
subclasses.
There is no way for a sub-class to override or extend the dispatch registry.
E.g.

class BaseVistor:
   @singledispatchmethod
   def visit(self, obj):
  raise ValueError('Explict vistor implementation missing)

class AVisitor(BaseVisitor):
   # problem: here we can only register against base class method
   @BaseVistor.visit.reister(int)
   def visit_int(self, obj):
   print ('integer')

The AVistor class has now changed the dispatch registry for BaseVistor class 
which is bad.

To fix this the dispatch registry needs to be copied for each subclass and an 
alternate register mechanism provided for subclasses to register against a 
subclass method.
See attached file and pypi methoddispatch for details :)

--
components: Library (Lib)
files: methoddispatch36.py
messages: 339008
nosy: Tim Mitchell2, inada.naoki
priority: normal
severity: normal
status: open
title: functools.singledispatchmethod interacts poorly with subclasses
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file48235/methoddispatch36.py

___
Python tracker 

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



[issue36455] collections.abc.Sequence doesn't support reflection/introspection

2019-03-27 Thread James Edwards


James Edwards  added the comment:

Edit conflict -- indeed -- self closing.

---

I should point out that this could be fixed with something like the following:

@classmethod
def __subclasshook__(cls, C):
if cls is Sequence:
return _check_methods(C, "__reversed__", "__iter__",
  "__len__", "__contains__", "__getitem__")
return NotImplemented

But seeing as it's not the only abc that is without a subclass hook, I wanted 
to raise an issue before I submitted a complete PR implementing subclasshooks 
for the rest of the abcs that need them.

--
nosy:  -josh.r

___
Python tracker 

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



[issue36456] task.cancel unbound recursion

2019-03-27 Thread Dima Tisnek


New submission from Dima Tisnek :

Cancelling a deadlocked group of tasks results in MaximumRecursionError

Inspired by 
https://stackoverflow.com/questions/55341189/handling-asyncio-deadlocks

Given the following test-asyncio.py:

```
import asyncio


async def test():
async def f():
await g_task

async def g():
await f_task

f_task = asyncio.create_task(f())
g_task = asyncio.create_task(g())

async def release():
await asyncio.sleep(5)
f_task.cancel()

await asyncio.gather(f_task, g_task, release())

asyncio.run(test())
```

Results in:

```
Traceback (most recent call last):
  File ".../python3.8/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
  File ".../python3.8/asyncio/base_events.py", line 589, in run_until_complete
return future.result()
  File "test-asyncio.py", line 18, in test
await asyncio.gather(f_task, g_task, release())
  File "test-asyncio.py", line 16, in release
f_task.cancel()
RecursionError: maximum recursion depth exceeded while calling a Python object

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "test-asyncio.py", line 20, in 
asyncio.run(test())
  File ".../python3.8/asyncio/runners.py", line 46, in run
_cancel_all_tasks(loop)
  File ".../python3.8/asyncio/runners.py", line 59, in _cancel_all_tasks
task.cancel()
RecursionError: maximum recursion depth exceeded while calling a Python object
Exception in default exception handler
Traceback (most recent call last):
  File ".../python3.8/asyncio/base_events.py", line 1644, in 
call_exception_handler
self.default_exception_handler(context)
  File ".../python3.8/asyncio/base_events.py", line 1615, in 
default_exception_handler
value = repr(value)
  File ".../python3.8/asyncio/base_tasks.py", line 21, in _task_repr_info
info.insert(3, f'wait_for={task._fut_waiter!r}')
  File ".../python3.8/asyncio/base_tasks.py", line 21, in _task_repr_info
info.insert(3, f'wait_for={task._fut_waiter!r}')
  File ".../python3.8/asyncio/base_tasks.py", line 21, in _task_repr_info
info.insert(3, f'wait_for={task._fut_waiter!r}')
  [Previous line repeated 326 more times]
  File ".../python3.8/asyncio/base_tasks.py", line 9, in _task_repr_info
info = base_futures._future_repr_info(task)
  File ".../python3.8/asyncio/base_futures.py", line 57, in _future_repr_info
info.append(_format_callbacks(future._callbacks))
  File ".../python3.8/asyncio/base_futures.py", line 36, in _format_callbacks
cb = '{}, {}'.format(format_cb(cb[0][0]), format_cb(cb[1][0]))
  File ".../python3.8/asyncio/base_futures.py", line 31, in format_cb
return format_helpers._format_callback_source(callback, ())
  File ".../python3.8/asyncio/format_helpers.py", line 23, in 
_format_callback_source
func_repr = _format_callback(func, args, None)
  File ".../python3.8/asyncio/format_helpers.py", line 56, in _format_callback
func_repr += _format_args_and_kwargs(args, kwargs)
  File ".../python3.8/asyncio/format_helpers.py", line 41, in 
_format_args_and_kwargs
return '({})'.format(', '.join(items))
RecursionError: maximum recursion depth exceeded while calling a Python object
Exception in default exception handler
Traceback (most recent call last):
  File ".../python3.8/asyncio/base_events.py", line 1644, in 
call_exception_handler
self.default_exception_handler(context)
  File ".../python3.8/asyncio/base_events.py", line 1615, in 
default_exception_handler
value = repr(value)
  File ".../python3.8/asyncio/base_tasks.py", line 21, in _task_repr_info
info.insert(3, f'wait_for={task._fut_waiter!r}')
  File ".../python3.8/asyncio/base_tasks.py", line 21, in _task_repr_info
info.insert(3, f'wait_for={task._fut_waiter!r}')
  File ".../python3.8/asyncio/base_tasks.py", line 21, in _task_repr_info
info.insert(3, f'wait_for={task._fut_waiter!r}')
  [Previous line repeated 326 more times]
  File ".../python3.8/asyncio/base_tasks.py", line 9, in _task_repr_info
info = base_futures._future_repr_info(task)
  File ".../python3.8/asyncio/base_futures.py", line 57, in _future_repr_info
info.append(_format_callbacks(future._callbacks))
  File ".../python3.8/asyncio/base_futures.py", line 36, in _format_callbacks
cb = '{}, {}'.format(format_cb(cb[0][0]), format_cb(cb[1][0]))
  File ".../python3.8/asyncio/base_futures.py", line 31, in format_cb
return format_helpers._format_callback_source(callback, ())
  File ".../python3.8/asyncio/format_helpers.py", line 23, in 
_format_callback_source
func_repr = _format_callback(func, args, None)
  File ".../python3.8/asyncio/format_helpers.py", line 56, in _format_callback
func_repr += _format_args_and_kwargs(args, kwargs)
  File ".../python3.8/asyncio/format_helpers.py", line 41, in 
_format_args_and_kwargs
return '({})'.format(', '.join(items))
RecursionError: maximum recursion depth exceeded while 

[issue36455] collections.abc.Sequence doesn't support reflection/introspection

2019-03-27 Thread Josh Rosenberg


Change by Josh Rosenberg :


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



[issue36455] collections.abc.Sequence doesn't support reflection/introspection

2019-03-27 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

This is an exact duplicate of #35190 - "collections.abc.Sequence cannot be used 
to test whether a class provides a particular interface (doc issue)"

--
nosy: +josh.r
resolution:  -> duplicate
superseder:  -> collections.abc.Sequence cannot be used to test whether a class 
provides a particular interface (doc issue)

___
Python tracker 

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



[issue36455] collections.abc.Sequence doesn't support reflection/introspection

2019-03-27 Thread James Edwards


James Edwards  added the comment:

This was tagged as 3.7, but the issue still exists AFAICT in the latest github 
master: https://github.com/python/cpython/blob/master/Lib/_collections_abc.py

--

___
Python tracker 

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



[issue36455] collections.abc.Sequence doesn't support reflection/introspection

2019-03-27 Thread James Edwards


New submission from James Edwards :

Consider:

from collections.abc import *

class DefinitelyNotAList:
def __init__(self, backer):
self.backer = backer

def __getitem__(self, key):
return self.backer[key]

def __len__(self):
return len(self.backer)

def __contains__(self, needle):
return needle in self.backer

def __reversed__(self):
return reversed(self.backer)

def __iter__(self):
return list.__iter__(self.backer)

def index(self, *args, **kwargs): return self.backer.index(*args, 
**kwargs)

def count(self, *args, **kwargs): return self.backer.count(*args, 
**kwargs)


dnal = DefinitelyNotAList([2,4,6,8])

for abc in [Collection, Reversible, Sized, Iterable, Container, Sequence]:
print(abc.__name__.ljust(12), isinstance(dnal, abc))


Which prints:

Collection   True
Reversible   True
SizedTrue
Iterable True
ContainerTrue
Sequence False

I'm not sure whether this is a bug, a docs bug, or just a misunderstanding but 
my expectation, is that, somehow, I could get isinstance(obj, Sequence) to 
return *without* explicitly registering it, just as True is returned for the 
other abcs.

--
components: Library (Lib)
messages: 339003
nosy: jedwards
priority: normal
severity: normal
status: open
title: collections.abc.Sequence doesn't support reflection/introspection
versions: Python 3.7

___
Python tracker 

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



[issue36454] test_time: test_monotonic() failed on AMD64 FreeBSD 10-STABLE Non-Debug 3.7

2019-03-27 Thread STINNER Victor


New submission from STINNER Victor :

AMD64 FreeBSD 10-STABLE Non-Debug 3.7:
https://buildbot.python.org/all/#/builders/170/builds/354

==
FAIL: test_monotonic (test.test_time.TimeTestCase)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.7.koobs-freebsd10.nondebug/build/Lib/test/test_time.py",
 line 474, in test_monotonic
self.assertTrue(0.45 <= dt <= 1.0, dt)
AssertionError: False is not true : 1.0372954378835857

Extract of the test:

def test_monotonic(self):
...

# monotonic() includes time elapsed during a sleep
t1 = time.monotonic()
time.sleep(0.5)
t2 = time.monotonic()
dt = t2 - t1
self.assertGreater(t2, t1)
# Issue #20101: On some Windows machines, dt may be slightly low
self.assertTrue(0.45 <= dt <= 1.0, dt)

...

IMHO the test is too strict. It should not test the maximum value of dt, only 
the minimum.

--
components: Tests
messages: 339002
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_time: test_monotonic() failed on AMD64 FreeBSD 10-STABLE Non-Debug 
3.7
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



[issue36085] Enable better DLL resolution

2019-03-27 Thread Eryk Sun


Eryk Sun  added the comment:

> There are no specific "import" tests, because it's such a pain to set 
> those up (I need to delete files from the build directory during the 
> test, and if other tests have already used them that will fail, or I 
> need to copy the Python install elsewhere so it doesn't pick those
> up). 

Instead of copying the whole install, you should be able to symlink the core 
binaries (e.g. python.exe, python38.dll, python3.dll, vcruntime140.dll) to a 
temporary directory and set PYTHONHOME. Most (or at least some) of the build 
bots should be set up to grant the symlink privilege to the current user or all 
standard users, and %TEMP% should be on an NTFS/ReFS volume that supports 
reparse points.

--

___
Python tracker 

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



[issue36451] Docs zh-cn roots error in nav bar

2019-03-27 Thread Ned Deily


Change by Ned Deily :


--
assignee:  -> mdk
components: +Documentation

___
Python tracker 

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



[issue36453] get_importer only return the first valid path_hook(importer)

2019-03-27 Thread Windson Yang


New submission from Windson Yang :

Is it an expected behavior the get_importer function only returns the first 
valid path_hook(importer) from sys.path_hooks?

def get_importer(path_item):
"""Retrieve a finder for the given path item

The returned finder is cached in sys.path_importer_cache
if it was newly created by a path hook.

The cache (or part of it) can be cleared manually if a
rescan of sys.path_hooks is necessary.
"""
try:
importer = sys.path_importer_cache[path_item]
except KeyError:
for path_hook in sys.path_hooks:
try:
importer = path_hook(path_item)
sys.path_importer_cache.setdefault(path_item, importer)
break
except ImportError:
pass
else:
importer = None
return importer

Does the order in sys.path_hooks matters? We should document it if it does. Btw 
get_importer function is lack of test.

--
components: Library (Lib)
messages: 339000
nosy: Windson Yang
priority: normal
severity: normal
status: open
title: get_importer only return the first valid path_hook(importer)
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue36245] PCBuild/build.bat errors, probably from space characters in paths

2019-03-27 Thread miss-islington


miss-islington  added the comment:


New changeset 1ff04dcadfb57a8a8f61a6ea93292e8ae96dca4a by Miss Islington (bot) 
in branch '3.7':
bpo-36245: Fix more empty environment variable checks (GH-12592)
https://github.com/python/cpython/commit/1ff04dcadfb57a8a8f61a6ea93292e8ae96dca4a


--

___
Python tracker 

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



[issue36448] Message "You will need to rebuild pythoncore to see the changes" should mention "make regen-all"

2019-03-27 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

> For some reason, the Travis CI build on 
> https://github.com/python/cpython/pull/12582 isn't actually starting. It says 
> "Waiting for status to be reported" but I pushed 10 hours ago.

Travis CI had some problem with linux builds

https://www.traviscistatus.com

--
nosy: +xtreak

___
Python tracker 

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



[issue36452] Detect dict iteration "overflow" when changing keys

2019-03-27 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +inada.naoki, rhettinger

___
Python tracker 

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



[issue36452] Detect dict iteration "overflow" when changing keys

2019-03-27 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue36452] Detect dict iteration "overflow" when changing keys

2019-03-27 Thread Thomas Perl


New submission from Thomas Perl :

Using: Python 3.8 (git commit ID: d5a5a33f12b60129d57f9b423b77d2fcba506834), 
the following code snippet:

=
a = {0: 0}

for i in a:
del a[i]
a[i+1] = 0
print(i)
=

Prints the following output:

=
0
1
2
3
4
=

The reason for this seems to be the way the internal key list is managed and 
the "next" value in this list is retrieved. The amount of items seems to be 
related to USABLE_FRACTION(PyDict_MINSIZE).

Since cases where the dictionary size changes are detected with a RuntimeError, 
I would expect the invariant to be "the number of iterations is the len() of 
the dict at the time the iterator is created to be enforced. Whether to raise a 
StopIteration instead or raising a RuntimeError is up for debate.

Attached is a patch that tries to detect this corner case and raise a 
RuntimeError instead (plus a unit test).

Note also that without the patch, the __length_hint__() of the iterator 
actually underflows:

=
a = {0: 0}
it = iter(a)
print('Length hint:', it.__length_hint__())
next(it)
print('Length hint:', it.__length_hint__())
del a[0]
a[1] = 0
next(it)
print('Length hint:', it.__length_hint__())
=

--
files: 0001-dictiterobject-Track-maximum-iteration-count-via-di-.patch
keywords: patch
messages: 338997
nosy: thomas.perl
priority: normal
severity: normal
status: open
title: Detect dict iteration "overflow" when changing keys
type: behavior
versions: Python 3.8
Added file: 
https://bugs.python.org/file48234/0001-dictiterobject-Track-maximum-iteration-count-via-di-.patch

___
Python tracker 

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



[issue36245] PCBuild/build.bat errors, probably from space characters in paths

2019-03-27 Thread Steve Dower


Change by Steve Dower :


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



[issue36245] PCBuild/build.bat errors, probably from space characters in paths

2019-03-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12538

___
Python tracker 

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



[issue36245] PCBuild/build.bat errors, probably from space characters in paths

2019-03-27 Thread Steve Dower


Steve Dower  added the comment:


New changeset bb89aa24cf71f9874d1d26f3a2440fefa0b6bbcc by Steve Dower in branch 
'2.7':
bpo-36245: Avoid problems when building in a directory containing spaces. 
(GH-12241)
https://github.com/python/cpython/commit/bb89aa24cf71f9874d1d26f3a2440fefa0b6bbcc


--

___
Python tracker 

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



[issue36245] PCBuild/build.bat errors, probably from space characters in paths

2019-03-27 Thread Steve Dower


Steve Dower  added the comment:


New changeset b95a79c928fc4a6135d91c0c553cb2a63cf15140 by Steve Dower in branch 
'master':
bpo-36245: Fix more empty environment variable checks (GH-12592)
https://github.com/python/cpython/commit/b95a79c928fc4a6135d91c0c553cb2a63cf15140


--

___
Python tracker 

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



[issue36085] Enable better DLL resolution

2019-03-27 Thread Steve Dower


Steve Dower  added the comment:

I implemented the feature Eryk was asking for, as it's also by far the easiest 
way to test the add_dll_directory function. So now ctypes.CDLL (and subclasses) 
have a `winmode` argument that gets turned directly into LoadLibraryEx flags 
(changing `mode` would have required a deprecation period, as it's explicitly 
documented as being ignored on Windows).

I believe the docs are updated as much as necessary, but if I missed something 
please call out.

There are no specific "import" tests, because it's such a pain to set those up 
(I need to delete files from the build directory during the test, and if other 
tests have already used them that will fail, or I need to copy the Python 
install elsewhere so it doesn't pick those up). But with ctypes I can exclude 
the application directory from the search paths. Open to brilliant ideas here.

--

___
Python tracker 

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



[issue36451] Docs zh-cn roots error in nav bar

2019-03-27 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

I guess it will be fixed with https://bugs.python.org/issue36425

--
nosy: +mdk, xtreak, zhsj

___
Python tracker 

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



[issue36451] Docs zh-cn roots error in nav bar

2019-03-27 Thread Solo Lee


New submission from Solo Lee :

There is no link to zh-cn docs in python docs page, as in the file upload.
Thx!

--
files: python docs en page.png
messages: 338992
nosy: Solo Lee
priority: normal
severity: normal
status: open
title: Docs zh-cn roots error in nav bar
type: behavior
Added file: https://bugs.python.org/file48233/python docs en page.png

___
Python tracker 

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



[issue31327] bug in dateutil\tz\tz.py

2019-03-27 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue31327] bug in dateutil\tz\tz.py

2019-03-27 Thread Cheryl Sabella


Change by Cheryl Sabella :


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

___
Python tracker 

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



[issue33953] The DEFAULT_ENTROPY variable used to store the current default random bytes value should be documented for `secrets` module

2019-03-27 Thread Cheryl Sabella


Change by Cheryl Sabella :


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



[issue31292] `python setup.py check --restructuredtext` fails when a include directive is present.

2019-03-27 Thread miss-islington


miss-islington  added the comment:


New changeset 9cad523328324bd82fa19b597ead1614a0e61ae2 by Miss Islington (bot) 
in branch '3.7':
bpo-31292: Fixed distutils check --restructuredtext for include directives 
(GH-10605)
https://github.com/python/cpython/commit/9cad523328324bd82fa19b597ead1614a0e61ae2


--

___
Python tracker 

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



[issue31292] `python setup.py check --restructuredtext` fails when a include directive is present.

2019-03-27 Thread miss-islington


miss-islington  added the comment:


New changeset 600aca47f085a06579e7af4c6423ea7e907b4bb4 by Miss Islington (bot) 
in branch '2.7':
bpo-31292: Fixed distutils check --restructuredtext for include directives 
(GH-10605)
https://github.com/python/cpython/commit/600aca47f085a06579e7af4c6423ea7e907b4bb4


--
nosy: +miss-islington

___
Python tracker 

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



[issue31292] `python setup.py check --restructuredtext` fails when a include directive is present.

2019-03-27 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Thanks @flying sheep for the PR and @merwok for the review!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 2.7, Python 3.8 -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



[issue36448] Message "You will need to rebuild pythoncore to see the changes" should mention "make regen-all"

2019-03-27 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

> As an aside, I thought we had a merge hook to check this on Travis?

For some reason, the Travis CI build on 
https://github.com/python/cpython/pull/12582 isn't actually starting. It says 
"Waiting for status to be reported" but I pushed 10 hours ago...

--

___
Python tracker 

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



[issue31292] `python setup.py check --restructuredtext` fails when a include directive is present.

2019-03-27 Thread Cheryl Sabella


Cheryl Sabella  added the comment:


New changeset d5a5a33f12b60129d57f9b423b77d2fcba506834 by Cheryl Sabella 
(Philipp A) in branch 'master':
bpo-31292: Fixed distutils check --restructuredtext for include directives 
(GH-10605)
https://github.com/python/cpython/commit/d5a5a33f12b60129d57f9b423b77d2fcba506834


--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue31292] `python setup.py check --restructuredtext` fails when a include directive is present.

2019-03-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12537

___
Python tracker 

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



[issue31292] `python setup.py check --restructuredtext` fails when a include directive is present.

2019-03-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12536

___
Python tracker 

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



[issue36373] asyncio.gather: no docs for deprecated loop parameter

2019-03-27 Thread dtrauma


dtrauma  added the comment:

Yes, exactly, document deprecation status XOR what it does :)

--

___
Python tracker 

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



[issue36373] asyncio.gather: no docs for deprecated loop parameter

2019-03-27 Thread Emmanuel Arias


Emmanuel Arias  added the comment:

@dtrauma jus for clarify. You say that if loop is not deprecated document it 
else document it.


Right?

--

___
Python tracker 

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



[issue36373] asyncio.gather: no docs for deprecated loop parameter

2019-03-27 Thread dtrauma


dtrauma  added the comment:

Just to be clear, I don't know if loop is deprecated on this function like on 
all the others, I just suspect it to be. But it currently is completely 
undocumented, which either way is a bug. :)

--

___
Python tracker 

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



[issue36448] Message "You will need to rebuild pythoncore to see the changes" should mention "make regen-all"

2019-03-27 Thread Steve Dower


Steve Dower  added the comment:

So an important aspect of the "fix" is that this message only appears after the 
fix has been applied. Anyone running into this locally has already updated 
those files, and just needs to "git add -u" to include them in their next 
commit. (Unfortunately, MSBuild has no reasonable way to retrigger a build it 
has already completed, since that introduces cycles into its dependency 
resolution.)

The problem here is that when a non-Windows developer sees this error in CI, 
it's not clear what *they* should do about it.

The current text is: "@(_Updated->'%(Filename)%(Extension)',', ') updated. You 
will need to rebuild pythoncore to see the changes."

The PR adds: "You may also need to run 'make regen-all'."

I'd propose adding "%0D%0A%0D%0AIf you are developing on another platform, try 
make regen-all and commit the updated files"

(The %0D%0A's at the start add newlines to the output for readability.)

As an aside, I thought we had a merge hook to check this on Travis? Why didn't 
that trigger? There's no reason why any of our CI platforms should let you 
build with out-of-date frozens, so it's a bit of a shame to blame the Windows 
build for doing its job properly :)

--
versions: +Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue35983] tp_dealloc trashcan shouldn't be called for subclasses

2019-03-27 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

To clarify: the purpose of MyList is specifically to check that no double 
deallocations occur. For this test to make sense, MyList should not use the 
trashcan itself.

--

___
Python tracker 

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



[issue35983] tp_dealloc trashcan shouldn't be called for subclasses

2019-03-27 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

Yes of course. When not using the trashcan, stuff crashes. I don't get your 
point...

--

___
Python tracker 

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



[issue36443] Disable coerce_c_locale and utf8_mode by default in _PyPreConfig?

2019-03-27 Thread STINNER Victor


STINNER Victor  added the comment:

Done. I close the issue.

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



[issue36202] Calling Py_DecodeLocale() before _PyPreConfig_Write() can produce mojibake

2019-03-27 Thread STINNER Victor


STINNER Victor  added the comment:

My commit disabled C locale coercion and UTF-8 Mode by default when Python is 
embedded which fix this issue in Python 3.8. I close the issue.

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



[issue36202] Calling Py_DecodeLocale() before _PyPreConfig_Write() can produce mojibake

2019-03-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d929f1838a8fba881ff0148b7fc31f6265703e3d by Victor Stinner in 
branch 'master':
bpo-36443: Disable C locale coercion and UTF-8 Mode by default (GH-12589)
https://github.com/python/cpython/commit/d929f1838a8fba881ff0148b7fc31f6265703e3d


--

___
Python tracker 

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



[issue36443] Disable coerce_c_locale and utf8_mode by default in _PyPreConfig?

2019-03-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d929f1838a8fba881ff0148b7fc31f6265703e3d by Victor Stinner in 
branch 'master':
bpo-36443: Disable C locale coercion and UTF-8 Mode by default (GH-12589)
https://github.com/python/cpython/commit/d929f1838a8fba881ff0148b7fc31f6265703e3d


--

___
Python tracker 

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



[issue35983] tp_dealloc trashcan shouldn't be called for subclasses

2019-03-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Disabling the trashcan mechanism returns the problem for solving which the 
trashcan mechanism was introduced.

>>> from _testcapi import MyList
>>> L = None
>>> for i in range(100):
... L = MyList((L,))
... 
>>> del L
Segmentation fault (core dumped)

I think we need better way to resolve this issue.

For example, setting the object type to the parent type should solve this issue.

--

___
Python tracker 

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



[issue36273] test_thread leaks a core dump on PPC64 AIX 3.x

2019-03-27 Thread Michael Felt


Michael Felt  added the comment:

I have looked at this briefly.

I would consider it a regression, or a spurious incident as the bot run before 
(https://buildbot.python.org/all/#/builders/10/builds/2223) and after 
(https://buildbot.python.org/all/#/builders/10/builds/2225) do not show this 
error. It may also be spurious - as there are other users on that bot system 
and the cause could be a side-effect of something else.

FYI: The error message is something similar to what I see when building using 
xlc - there is a core dump - but I cannot get a copy of the core dump to 
evaluate it.

See: https://bugs.python.org/issue35828#msg336134 - where I ask for a hint on 
how to get the code that reports the ENV change to save/copy a core dump.

--

___
Python tracker 

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



[issue20271] urllib.parse.urlparse() accepts wrong URLs

2019-03-27 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

See also issue36338 for a possible security issue for host of value 
"benign.com[attacker.com]" (spam[::1] format) where attacker.com is parsed as 
the host name assuming presence of [ and ] to be a IPV6 address without 
validation of the value attacker.com inside [] to be a valid IPV6 address.

As a datapoint input "http://[::1]spam; raises exception in Java, golang and 
Ruby. Browser's JS console returns invalid URL. I too would like exception 
being raised but not sure at which level.

Ruby seems to use a regex : 
https://github.com/ruby/ruby/blob/trunk/lib/uri/rfc3986_parser.rb#L6
Java parseurl : 
http://hg.openjdk.java.net/jdk/jdk/file/c4c225b49c5f/src/java.base/share/classes/java/net/URLStreamHandler.java#l124
golang : 
https://github.com/golang/go/blob/50bd1c4d4eb4fac8ddeb5f063c099daccfb71b26/src/net/url/url.go#L587

See also https://url.spec.whatwg.org/#host-parsing

If input starts with U+005B ([), then:

If input does not end with U+005D (]), validation error, return failure.

Return the result of IPv6 parsing input with its leading U+005B ([) and 
trailing U+005D (]) removed.

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



[issue36338] urlparse of urllib returns wrong hostname

2019-03-27 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

I found this page to be uesful : https://url.spec.whatwg.org/#host-parsing and 
following the steps it seems that this should raise an error since at the 7th 
step it denotes that asciiDomain shouldn't contain forbidden host code point 
including "[]" . As another data point using 'new 
URL("http://benign.com[attacker.com];)' in browser's Javascript console also 
raises exception that this is a bad URL. Even if attacker.com is assumed to be 
the correct host by Python it's not validated to be an IPV6 address where it 
should fail.

Ruby seems to use a regex : 
https://github.com/ruby/ruby/blob/trunk/lib/uri/rfc3986_parser.rb#L6
Java parseurl : 
http://hg.openjdk.java.net/jdk/jdk/file/c4c225b49c5f/src/java.base/share/classes/java/net/URLStreamHandler.java#l124
golang : 
https://github.com/golang/go/blob/50bd1c4d4eb4fac8ddeb5f063c099daccfb71b26/src/net/url/url.go#L587

--

___
Python tracker 

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



[issue33356] Windows 10 buildbot: test__xxsubinterpreters.test_already_running() fails randomly

2019-03-27 Thread STINNER Victor


STINNER Victor  added the comment:

The bug is still here. It looks like a race condition triggered on very slow 
buildbot like AMD64 FreeBSD 10-STABLE Non-Debug 3.x:

https://buildbot.python.org/all/#/builders/167/builds/728

0:18:13 load avg: 4.84 [405/420/1] test__xxsubinterpreters failed -- running: 
test_tools (6 min 1 sec)
spam
test_bad_id (test.test__xxsubinterpreters.ChannelIDTests) ... ok
(...)
test_initial (test.test__xxsubinterpreters.ListAllTests) ... ok
test_SystemExit (test.test__xxsubinterpreters.RunStringTests) ... ok
test_already_running (test.test__xxsubinterpreters.RunStringTests) ... FAIL
test_bad_id (test.test__xxsubinterpreters.RunStringTests) ... Exception in 
thread Thread-9:
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/threading.py",
 line 917, in _bootstrap_inner
self.run()
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/threading.py",
 line 865, in run
self._target(*self._args, **self._kwargs)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/test__xxsubinterpreters.py",
 line 51, in run
interpreters.run_string(interp, dedent(f"""
RuntimeError: interpreter already running

ok
test_bad_script (test.test__xxsubinterpreters.RunStringTests) ... ok
test_bytes_for_script (test.test__xxsubinterpreters.RunStringTests) ... ok
(...)

==
FAIL: test_already_running (test.test__xxsubinterpreters.RunStringTests)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/test__xxsubinterpreters.py",
 line 855, in test_already_running
interpreters.run_string(self.id, 'print("spam")')
AssertionError: RuntimeError not raised

--

Ran 112 tests in 12.936s

FAILED (failures=1, skipped=5)
test test__xxsubinterpreters failed
(...)
Re-running test 'test__xxsubinterpreters' in verbose mode
(...)
Ran 112 tests in 3.058s
OK (skipped=5)

--
nosy: +pablogsal
resolution: out of date -> 
status: closed -> open

___
Python tracker 

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



[issue36441] Cannot create venv with debug binaries installed

2019-03-27 Thread miss-islington


miss-islington  added the comment:


New changeset 65445f65e6080310d612f73083ba172eb2c6e326 by Miss Islington (bot) 
in branch '3.7':
bpo-36441: Fixes creating a venv when debug binaries are installed. (GH-12566)
https://github.com/python/cpython/commit/65445f65e6080310d612f73083ba172eb2c6e326


--
nosy: +miss-islington

___
Python tracker 

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



[issue36245] PCBuild/build.bat errors, probably from space characters in paths

2019-03-27 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +12535

___
Python tracker 

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



[issue36245] PCBuild/build.bat errors, probably from space characters in paths

2019-03-27 Thread Steve Dower


Steve Dower  added the comment:

I did the 2.7 backport, and also fixed two more instances in that file.

Pretty sure my automerges won't work without a core dev review, so if someone 
wants to hit Approve and/or Merge for me, feel free.

--

___
Python tracker 

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



[issue36245] PCBuild/build.bat errors, probably from space characters in paths

2019-03-27 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +12534
stage: backport needed -> patch review

___
Python tracker 

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



[issue36450] 3D Array Assignment to all 2D sub-arrays

2019-03-27 Thread Eric Snow


Eric Snow  added the comment:

In Python, multiplication on a list does not make copies of the values in the 
original list.  So what you have done is equivalent to the following:

  a = [0, 0]
  b = [a, a]
  M = [b, b]

Hence:

  >>> M[0] is M[1]
  True
  >>> M[0][0] is M[0][1]
  True
  >>> M[1][0] is M[1][1]
  True
  >>> M[0][0] is M[1][0]
  True

So the following *all* modify the first value in "a":

  M[0][0][0] = 1
  M[1][0][0] = 1
  M[0][1][0] = 1
  M[1][1][0] = 1

That is why you are seeing the result you reported.  Depending on your needs, 
better solutions include using a list comprehension, spelling out the for loops 
(for readability), a helper function (for complex problems), or simply spelling 
out the full list literal instead of composing it.  Regardless, I highly 
recommend using a solution that is easy for a new reader to understand.  Even 
if no one else will read this code, your six-months-from-now self will thank 
you. :)

--
nosy: +eric.snow
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



[issue33261] inspect.isgeneratorfunction fails on hand-created methods

2019-03-27 Thread Petr Viktorin


Petr Viktorin  added the comment:

I just reviewed, and I plan to merge it if I don't see any pushback from the 
others.
Sorry for the extreme delay.

--
nosy: +petr.viktorin

___
Python tracker 

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



[issue32312] Create Py_AtExitRegister C API

2019-03-27 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This may be especially useful to make sure that extension modules that have 
threads that were not created by Python calling into Python (registering with 
the interpreter and picking up the GIL) are stopped before the interpreter 
starts shutting down to avoid callbacks in the middle of the tear-down 
procedure.

--

___
Python tracker 

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



[issue36441] Cannot create venv with debug binaries installed

2019-03-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12533

___
Python tracker 

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



[issue36441] Cannot create venv with debug binaries installed

2019-03-27 Thread Steve Dower


Steve Dower  added the comment:


New changeset 4a9a505d6f2474a570422dad89f8d1b344d6cd36 by Steve Dower in branch 
'master':
bpo-36441: Fixes creating a venv when debug binaries are installed. (#12566)
https://github.com/python/cpython/commit/4a9a505d6f2474a570422dad89f8d1b344d6cd36


--

___
Python tracker 

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



[issue32312] Create Py_AtExitRegister C API

2019-03-27 Thread Eric Snow


Eric Snow  added the comment:

> Neil Schemenauer  added the comment:
> Regarding m_traverse, maybe the list of finalizers should be stored somewhere 
> in the interpreter
> state, not in the atexit module state.  That would make more sense to me.  
> atexit could merely be
> a way to manage it rather than actually holding it.

+1

--
nosy: +eric.snow

___
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-03-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f4333d0479d6974d142e858522e95cbf8381f016 by Victor Stinner 
(hliu0) in branch 'master':
bpo-31904: Fix test_utf8_mode on VxWorks (GH-12428)
https://github.com/python/cpython/commit/f4333d0479d6974d142e858522e95cbf8381f016


--

___
Python tracker 

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



[issue36450] 3D Array Assignment to all 2D sub-arrays

2019-03-27 Thread John Bachman


Change by John Bachman :


--
versions: +Python 3.7

___
Python tracker 

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



[issue36444] Python initialization: remove _PyMainInterpreterConfig

2019-03-27 Thread STINNER Victor


Change by STINNER Victor :


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



[issue36450] 3D Array Assignment to all 2D sub-arrays

2019-03-27 Thread John Bachman


New submission from John Bachman :

Tested on Python3.6 on Ubuntu 18.04
The following code snippet produces the wrong results.

Snippet:

M = [[[0] * 2] * 2] * 2 
   
M[0][0][0] = 1  

   
print(M[0][0][0]) # Should be one   
   
print(M[1][0][0]) # Should still be zero 

My output:
1
1

For some reason when you assign to any list inside the 3D matrix, all lists in 
the array are changed, 2D Matrix works but 3D modifies every 2D matrix.

--
components: Interpreter Core
messages: 338963
nosy: John Bachman
priority: normal
severity: normal
status: open
title: 3D Array Assignment to all 2D sub-arrays
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



[issue36443] Disable coerce_c_locale and utf8_mode by default in _PyPreConfig?

2019-03-27 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue36202] Calling Py_DecodeLocale() before _PyPreConfig_Write() can produce mojibake

2019-03-27 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue35983] tp_dealloc trashcan shouldn't be called for subclasses

2019-03-27 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue35900] Add pickler hook for the user to customize the serialization of user defined functions and types.

2019-03-27 Thread Pierre Glaser


Change by Pierre Glaser :


--
pull_requests: +12530

___
Python tracker 

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



[issue31341] remove IRIX support code

2019-03-27 Thread Chih-Hsuan Yen


Change by Chih-Hsuan Yen :


--
pull_requests: +12529

___
Python tracker 

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



[issue16995] Add Base32 support for RFC4648 "Extended Hex" alphabet (patch attached)

2019-03-27 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Is there interest in having this patch converted to a pull request?

--
nosy: +cheryl.sabella
versions: +Python 3.8 -Python 3.6

___
Python tracker 

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



[issue36446] Need Windows x86-64 MSI installer for Python >= 3.x.x

2019-03-27 Thread Zachary Ware


Zachary Ware  added the comment:

Our installer scheme was modernized for Python 3.5, and a description of its 
use can be found here: https://docs.python.org/3/using/windows.html

The new scheme is significantly more flexible, though it is somewhat more 
complex to enable that flexibility.  If you have a case that can't be handled 
by the current installer, please open an issue detailing what you want to do 
and how the installer falls short.

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



[issue36338] urlparse of urllib returns wrong hostname

2019-03-27 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
pull_requests:  -12526

___
Python tracker 

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



[issue36418] urllib.parse.*Result: support _replace for additional computed addresses

2019-03-27 Thread Fred L. Drake, Jr.


Change by Fred L. Drake, Jr. :


--
nosy: +fdrake

___
Python tracker 

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



[issue36338] urlparse of urllib returns wrong hostname

2019-03-27 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Given a quick scan of RFC 3986[1] I'd say that the behaviour of Ruby seems to 
be the most correct. That said, I'd also check what the major browsers do in 
this case (FWIW both FF and Safari use 'benign.com' as the hostname in this 
case).


[1] https://tools.ietf.org/html/rfc3986#page-17

--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue25251] Unknown MS Compiler version 1900

2019-03-27 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Should this issue be closed as third-party or do we want to leave it open as 
reference?

--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue6422] timeit called from within Python should allow autoranging

2019-03-27 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Hello Steven,

Were you working on the additional functionality that you mentioned in 
msg272704 or would that be open for someone else to do?  Thanks!

--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue32312] Create Py_AtExitRegister C API

2019-03-27 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
nosy: +pablogsal

___
Python tracker 

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



[issue36447] test__xxsubinterpreters leaked references and memory blocks

2019-03-27 Thread Zackery Spytz


Change by Zackery Spytz :


--
title: test__xxsubinterpreters leaked regards and memory blocks -> 
test__xxsubinterpreters leaked references and memory blocks

___
Python tracker 

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



[issue36447] test__xxsubinterpreters leaked regards and memory blocks

2019-03-27 Thread STINNER Victor


Change by STINNER Victor :


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



[issue36447] test__xxsubinterpreters leaked regards and memory blocks

2019-03-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 34ef64fe5947bd7e1b075c785fc1125c4e600cd4 by Victor Stinner (Pablo 
Galindo) in branch 'master':
bpo-36447, bpo-36447: Fix refleak in _PySys_InitMain() (GH-12586)
https://github.com/python/cpython/commit/34ef64fe5947bd7e1b075c785fc1125c4e600cd4


--

___
Python tracker 

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



[issue36444] Python initialization: remove _PyMainInterpreterConfig

2019-03-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 5ac27a50ff2b42216746fedc0522a92c53089bb3 by Victor Stinner in 
branch 'master':
bpo-36444: Rework _Py_InitializeFromConfig() API (GH-12576)
https://github.com/python/cpython/commit/5ac27a50ff2b42216746fedc0522a92c53089bb3


--

___
Python tracker 

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



[issue36447] test__xxsubinterpreters leaked regards and memory blocks

2019-03-27 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue36407] xml.dom.minidom wrong indentation writing for CDATA section

2019-03-27 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



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

2019-03-27 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset 364f0b0f19cc3f0d5e63f571ec9163cf41c62958 by Petr Viktorin (Eddie 
Elizondo) in branch 'master':
bpo-35810: Incref heap-allocated types in PyObject_Init (GH-11661)
https://github.com/python/cpython/commit/364f0b0f19cc3f0d5e63f571ec9163cf41c62958


--

___
Python tracker 

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



[issue36449] __aexit__ is not called when a context manager is used in an async generator

2019-03-27 Thread Karthikeyan Singaravelan

Karthikeyan Singaravelan  added the comment:

Could this be possibly due to issue34769 ? There was another report related to 
this commit : issue36403

➜  cpython git:(41e5ec377b) git checkout 41e5ec377b && make -s -j4 > /dev/null
HEAD is now at 41e5ec377b bpo-34769: Thread safety for 
_asyncgen_finalizer_hook(). (GH-9716)
➜  cpython git:(41e5ec377b) ./python.exe ../backups/bpo36449.py
aenter
Traceback (most recent call last):
  File "../backups/bpo36449.py", line 25, in 
loop.run_until_complete(main())
  File 
"/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/asyncio/base_events.py",
 line 573, in run_until_complete
return future.result()
  File "../backups/bpo36449.py", line 20, in main
raise Exception
Exception
➜  cpython git:(41e5ec377b) git checkout 41e5ec377b~1 && make -s -j4 > /dev/null
Previous HEAD position was 41e5ec377b bpo-34769: Thread safety for 
_asyncgen_finalizer_hook(). (GH-9716)
HEAD is now at 0ce31d340b bpo-32962: Fix test_gdb failure in debug build with 
-mcet -fcf-protection -O0 (GH-9656)
➜  cpython git:(0ce31d340b) ./python.exe ../backups/bpo36449.py
aenter
aexit
Traceback (most recent call last):
  File "../backups/bpo36449.py", line 25, in 
loop.run_until_complete(main())
  File 
"/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/asyncio/base_events.py",
 line 576, in run_until_complete
return future.result()
  File "../backups/bpo36449.py", line 20, in main
raise Exception
Exception

--
nosy: +asksol, xtreak

___
Python tracker 

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



[issue36449] __aexit__ is not called when a context manager is used in an async generator

2019-03-27 Thread Andrey Lemets


New submission from Andrey Lemets :

This code (https://gist.github.com/EnotYoyo/d751951c5ff77e22686715aa9ab05b56) 
works correctly in python3.6.6 but does not in python3.6.8+

--
components: asyncio
messages: 338953
nosy: Andrey Lemets, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: __aexit__ is not called when a context manager is used in an async 
generator
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue36448] Message "You will need to rebuild pythoncore to see the changes" should mention "make regen-all"

2019-03-27 Thread Jeroen Demeyer


Change by Jeroen Demeyer :


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

___
Python tracker 

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



[issue36448] Message "You will need to rebuild pythoncore to see the changes" should mention "make regen-all"

2019-03-27 Thread Jeroen Demeyer


New submission from Jeroen Demeyer :

On Windows builds, one may get the message

C:\projects\cpython\PCbuild\_freeze_importlib.vcxproj(130,5): error : 
importlib.h, importlib_external.h, importlib_zipimport.h updated. You will need 
to rebuild pythoncore to see the changes.

See for example https://bugs.python.org/issue29631 and 
https://discuss.python.org/t/windows-ci-build-fails-with-you-will-need-to-rebuild-pythoncore-to-see-the-changes/1071

The fix is simply running "make regen-all". It would be good to mention this in 
that error message.

--
components: Windows
messages: 338952
nosy: jdemeyer, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Message "You will need to rebuild pythoncore to see the changes" should 
mention "make regen-all"

___
Python tracker 

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



[issue36447] test__xxsubinterpreters leaked regards and memory blocks

2019-03-27 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Bisecting shows that:

8b9dbc017a190d13f717e714630d620adb7c7ac2 is the first bad commit
commit 8b9dbc017a190d13f717e714630d620adb7c7ac2
Author: Victor Stinner 
Date:   Wed Mar 27 01:36:16 2019 +0100

bpo-36444: Remove _PyMainInterpreterConfig (GH-12571)

--

___
Python tracker 

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



[issue36447] test__xxsubinterpreters leaked regards and memory blocks

2019-03-27 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
Removed message: https://bugs.python.org/msg338950

___
Python tracker 

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



[issue36338] urlparse of urllib returns wrong hostname

2019-03-27 Thread Pierre Glaser


Change by Pierre Glaser :


--
pull_requests: +12526

___
Python tracker 

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



[issue36338] urlparse of urllib returns wrong hostname

2019-03-27 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
pull_requests:  -12525

___
Python tracker 

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



[issue36447] test__xxsubinterpreters leaked regards and memory blocks

2019-03-27 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

I cannot reproduce with the current master:

❯ ./python -m test test__xxsubinterpreters -R :
Run tests sequentially
0:00:00 load avg: 1.50 [1/1] test__xxsubinterpreters
beginning 9 repetitions
123456789
.

== Tests result: SUCCESS ==

1 test OK.

Total duration: 11 sec 964 ms
Tests result: SUCCESS

--

___
Python tracker 

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



[issue36338] urlparse of urllib returns wrong hostname

2019-03-27 Thread Pierre Glaser


Change by Pierre Glaser :


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

___
Python tracker 

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



  1   2   >