[issue29783] Modify codecs.open() to use the io module instead of codecs.StreamReaderWriter()

2017-06-16 Thread STINNER Victor

Changes by STINNER Victor :


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

___
Python tracker 

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



[issue30671] dict: improve lookup function

2017-06-16 Thread Dmitry Rubanovich

Dmitry Rubanovich added the comment:

Changing the title, to remove "simplify", since the discussion revealed that 
the potential improvement would have to be treated as a special case and, 
therefore, would not simplify the code.

--
title: dict: simplify and improve lookup function -> dict: improve lookup 
function

___
Python tracker 

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



[issue29581] __init_subclass__ causes TypeError when used with standard library metaclasses (such as ABCMeta)

2017-06-16 Thread Nick Coghlan

Nick Coghlan added the comment:

Thanks for the work on resolving this, all!

--
resolution:  -> fixed
stage: backport needed -> resolved
status: pending -> closed

___
Python tracker 

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



[issue28709] PyStructSequence_NewType is broken; makes GC type without setting Py_TPFLAGS_HEAPTYPE

2017-06-16 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue30682] f-string assert is too restrictive

2017-06-16 Thread Eric V. Smith

New submission from Eric V. Smith:

>>> eval("f'\\\n'")
python: Python/ast.c:4906: FstringParser_ConcatFstring: Assertion 
`!state->last_str || PyUnicode_GET_LENGTH(state->last_str) != 0' failed.
[2]12810 abort (core dumped)  ./python

The problem is that some literal strings are zero length. The assert can be 
deleted.

--
assignee: eric.smith
components: Interpreter Core
messages: 296166
nosy: eric.smith, ned.deily, serhiy.storchaka
priority: normal
severity: normal
status: open
title: f-string assert is too restrictive
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



[issue30657] Unsafe arithmetic in PyString_DecodeEscape

2017-06-16 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
stage: needs patch -> patch review

___
Python tracker 

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



[issue30678] Widget variable binding does not work if mainloop is called from a different function

2017-06-16 Thread Javier Dehesa

Javier Dehesa added the comment:

Note, this is not something specific to check buttons, the same happens with 
other widgets such as entries.

--

___
Python tracker 

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



[issue30682] f-string assert is too restrictive

2017-06-16 Thread Eric V. Smith

Changes by Eric V. Smith :


--
pull_requests: +2285

___
Python tracker 

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



[issue30678] Widget variable binding does not work if mainloop is called from a different function

2017-06-16 Thread Louie Lu

Louie Lu added the comment:

Sorry, but I can't see the different between your first and second code. On my 
Linux, it all set to check the box when it run up. Do I miss anything?

--
nosy: +louielu

___
Python tracker 

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



[issue30523] unittest: add --list-tests option to only display the list of test names, don't run tests

2017-06-16 Thread STINNER Victor

STINNER Victor added the comment:


New changeset a49c935cfd6b4f8ea1f750888dd9260bbf5b9980 by Victor Stinner 
(mlouielu) in branch 'master':
bpo-30523: regrtest: Add --list-cases option (#2238)
https://github.com/python/cpython/commit/a49c935cfd6b4f8ea1f750888dd9260bbf5b9980


--

___
Python tracker 

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



[issue30678] Widget variable binding does not work if mainloop is called from a different function

2017-06-16 Thread Javier Dehesa

Javier Dehesa added the comment:

Yeah is quite subtle, I should have pointed it out...
The difference is that `root.mainloop()` is called inside `make_var_cb(root)` 
in the first example and under `if __name__ == '__main__'` in the second one. I 
have experience the problem on Windows 10, and I'd say there is a good chance 
it's a platform-specific thing...

--

___
Python tracker 

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



[issue30678] Widget variable binding does not work if mainloop is called from a different function

2017-06-16 Thread Paul Moore

Paul Moore added the comment:

I suspect that the problem is somehow related to garbage collection - in your 
failing example you don't keep any references to v or cb. I don't know what 
references tkinter keeps internally, it may be that this is OK because the root 
window is guaranteed to keep references to everything, but it's certainly worth 
a look.

--

___
Python tracker 

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



[issue30678] Widget variable binding does not work if mainloop is called from a different function

2017-06-16 Thread Javier Dehesa

Javier Dehesa added the comment:

I see what you mean. Looking at TkDocs (not sure if this is an "official" or 
"officially endorsed" source or not), one of the Python examples in the "Tk 
Concepts" section (http://www.tkdocs.com/tutorial/concepts.html) says:

> Whether or not you save the widget object in a variable is entirely up to 
> you, and depends of course whether you'll need to refer to it later. Because 
> the object is inserted into the widget hierarchy, it won't be garbage 
> collected even if you don't keep your own reference to it.

However, it very much looks like it may be related to what you said.

--

___
Python tracker 

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



[issue30675] test_zipfile leaks references on Python 3.5 on the wo Refleaks buildbots (Gentoo, Windows)

2017-06-16 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 8bb0863e0282c71d21bc2c1b5184d05d8f3a0988 by Victor Stinner in 
branch '2.7':
bpo-30675: Fix refleak hunting in regrtest (#2227)
https://github.com/python/cpython/commit/8bb0863e0282c71d21bc2c1b5184d05d8f3a0988


--

___
Python tracker 

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



[issue30682] f-string assert is too restrictive

2017-06-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 11e97f2f80bf65cc828c127eafc95229df35d403 by Serhiy Storchaka 
(ericvsmith) in branch 'master':
bpo-30682: Removed a too-strict assertion that failed for certain f-strings. 
(#2232)
https://github.com/python/cpython/commit/11e97f2f80bf65cc828c127eafc95229df35d403


--

___
Python tracker 

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



[issue30682] f-string assert is too restrictive

2017-06-16 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +2286

___
Python tracker 

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



[issue30523] unittest: add --list-tests option to only display the list of test names, don't run tests

2017-06-16 Thread STINNER Victor

STINNER Victor added the comment:

Yeah, Louie fixed most issues!

> I concur with Julien, the result should be printed to stdout.

Done by Louie. The code now uses a simple print().

> I tried:
>
> $ ./python -m unittest test.test_builtin --list-tests
> doctest.DocTestCase.runTest
> doctest.DocTestCase.runTest
> ...

Using Louie's implementation, it "just" works!

haypo@selma$ ./python -m test test_builtin --list-cases|grep ^builtins
builtins.bin
builtins.float.as_integer_ratio
...

Even if these test names are not fully qualified, they are accept by 
--match/--matchfile!

./python -m test test_builtin --match=builtins.bin -v
...
0:00:00 load avg: 0.12 [1/1] test_builtin
bin (builtins)
Doctest: builtins.bin ... ok
...

So it will be possible to implement my bisect feature on these doctests as well!

I pushed Louie Lu's implementation: add a new --list-cases option to regrtest. 
Serhiy proposed a different CLI:

* --list=methods
* --list=files
* --list=classes

But I chose to push Louie's patch anyway since its patch is super simple and 
doesn't break anything: you can still use the existing --list-tests to list 
test *files*. I don't need --list=classes yet, it may be added later.

Serhiy: I plan to backport --matchfile and --list-cases features to 2.7, 3.5 
and 3.6 branches, once Louie writes the unit test I requested him. Are you ok 
with that?

I really need to get my bisect tool on all branches, because more and more 
often I have to bisect refernece leaks, tests leaking resources (files, leaking 
memory, etc.), etc. --matchfile and --list-cases are the key features to 
implement such bisection.

--

___
Python tracker 

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



[issue30523] unittest: add --list-tests option to only display the list of test names, don't run tests

2017-06-16 Thread STINNER Victor

STINNER Victor added the comment:

Ah something else: doctests are not fully supported.

./python -m test test_extcall --list-cases

This command has not output, whereas Lib/test/test_extcall.py contains doctests.

test_builtins works because it uses:

def load_tests(loader, tests, pattern):
from doctest import DocTestSuite
tests.addTest(DocTestSuite(builtins))
return tests

whereas test_extcall uses:

def test_main():
support.run_doctest(sys.modules[__name__], True)

I see two options:

* Replace support.run_doctest() with doctest.DocTestSuite() in all tests
* Enhance --list-cases to discover doctests. support.run_doctest() calls 
doctest.testmod(), but doctest.testmod() has no API to list tests. testmod() 
lists tests and directly runs them. Maybe --list-cases can reuse 
doctest.DocTestSuite(), I don't know.

I chose to merge Louie Lu's PR anyway, since I prefer to move step by step. 
Supporting test_extcall can be done later.

--

___
Python tracker 

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



[issue30523] unittest: add --list-tests option to only display the list of test names, don't run tests

2017-06-16 Thread Louie Lu

Changes by Louie Lu :


--
pull_requests: +2287

___
Python tracker 

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



[issue30523] unittest: add --list-tests option to only display the list of test names, don't run tests

2017-06-16 Thread STINNER Victor

STINNER Victor added the comment:


New changeset b0c58d3c569d1b9060248e665857b5df94817340 by Victor Stinner (Louie 
Lu) in branch 'master':
bpo-30523: Add --list-cases unittest (#2243)
https://github.com/python/cpython/commit/b0c58d3c569d1b9060248e665857b5df94817340


--

___
Python tracker 

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



[issue30678] Widget variable binding does not work if mainloop is called from a different function

2017-06-16 Thread Javier Dehesa

Javier Dehesa added the comment:

With the additional hint of garbage collection I have found now a number of 
examples of this behaviour (e.g. 
https://stackoverflow.com/questions/7439432/python-themed-tkinter-entry-variable-will-not-set).
However, I haven't found actual documentation warning of this, so I'm not sure 
if this is really expected or just something people has gotten used to live 
with. One could argue that you normally wouldn't need a variable in the first 
place if you are not keeping a reference to it, but I'm not sure what is the 
benefit of having a (I assume) weak reference in the widget. Maybe there are 
solid technical reasons but, from what I have seen, it seems to have caused 
more than one confusion.

--

___
Python tracker 

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



[issue30284] Build CPython out of tree with a read-only source tree

2017-06-16 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2289

___
Python tracker 

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



[issue30258] [2.7] regrtest: handle child process crash

2017-06-16 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2291

___
Python tracker 

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



[issue30523] unittest: add --list-tests option to only display the list of test names, don't run tests

2017-06-16 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2288

___
Python tracker 

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



[issue30540] regrtest: add --matchfile option

2017-06-16 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2290

___
Python tracker 

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



[issue30263] regrtest: log the system load?

2017-06-16 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2292

___
Python tracker 

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



[issue30523] unittest: add --list-tests option to only display the list of test names, don't run tests

2017-06-16 Thread STINNER Victor

STINNER Victor added the comment:

I created bpo-30683: Enhance doctest support in regrtest --list-cases.

--

___
Python tracker 

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



[issue30683] Enhance doctest support in regrtest --list-cases

2017-06-16 Thread STINNER Victor

New submission from STINNER Victor:

bpo-30523 added a new --list-cases command to regrtest to list test methods. It 
is able to list doctest tests in test_builtins, but not in test_extcall.

test_builtin doctest tests:

haypo@selma$ ./python -m test test_builtin --list-cases|grep ^builtins
builtins.bin
builtins.float.as_integer_ratio
...


test_builtins works because it uses:

def load_tests(loader, tests, pattern):
from doctest import DocTestSuite
tests.addTest(DocTestSuite(builtins))
return tests

Listing test methods of test_extcall doesn't work, the following command has no 
output (but succeed):

./python -m test test_extcall --list-cases

test_extcall uses:

def test_main():
support.run_doctest(sys.modules[__name__], True)

I see two options:

* Replace support.run_doctest() with doctest.DocTestSuite() in all tests
* Enhance --list-cases to discover doctests. support.run_doctest() calls 
doctest.testmod(), but doctest.testmod() has no API to list tests. testmod() 
lists tests and directly runs them. Maybe --list-cases can reuse 
doctest.DocTestSuite(), I don't know.

--
components: Tests
messages: 296179
nosy: haypo
priority: normal
severity: normal
status: open
title: Enhance doctest support in regrtest --list-cases
type: enhancement
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



[issue30673] Add -t option (timeout) to Tools/buildbot/test.bat for "AMD64 Windows8.1 Refleaks 3.x" buildbot

2017-06-16 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2295

___
Python tracker 

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



[issue30673] Add -t option (timeout) to Tools/buildbot/test.bat for "AMD64 Windows8.1 Refleaks 3.x" buildbot

2017-06-16 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2293

___
Python tracker 

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



[issue30673] Add -t option (timeout) to Tools/buildbot/test.bat for "AMD64 Windows8.1 Refleaks 3.x" buildbot

2017-06-16 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2294

___
Python tracker 

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



[issue30673] Add -t option (timeout) to Tools/buildbot/test.bat for "AMD64 Windows8.1 Refleaks 3.x" buildbot

2017-06-16 Thread STINNER Victor

STINNER Victor added the comment:

> Oh wait, it seems like I misunderstood how Tools/buildbot/test.bat works: 
> unknown parameters as passed as if to regrtest. So it wasn't needed to add a 
> new -t option, using --timeout should just work.

Right, --timeout already worked... I just checked the buildbots.

So I created 3 PR to revert my change to remove my -t parameter :-)

--

___
Python tracker 

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



[issue30625] Documentation is unclear how "y*" and "y#" format units vary

2017-06-16 Thread Stefan Krah

Stefan Krah added the comment:

Okay thanks, it's good to hear what others think about the docs.

> So I have no clue why "y#" is refusing such an object.

"y#" is refusing memoryview(bytes) because "y#" only allows objects without a 
releasebufferproc and memoryview itself always has one.


I wonder if we could simply use the cleanup() solution also for "y#", but I 
have to look closer at this.

--

___
Python tracker 

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



[issue30673] Add -t option (timeout) to Tools/buildbot/test.bat for "AMD64 Windows8.1 Refleaks 3.x" buildbot

2017-06-16 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 085a57a8d63b3c8057b5f793518e3d04179710a1 by Victor Stinner in 
branch '3.6':
Revert "bpo-30673: test.bat: add -t option (timeout) (#2211) (#2225)" (#2246)
https://github.com/python/cpython/commit/085a57a8d63b3c8057b5f793518e3d04179710a1


--

___
Python tracker 

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



[issue30673] Add -t option (timeout) to Tools/buildbot/test.bat for "AMD64 Windows8.1 Refleaks 3.x" buildbot

2017-06-16 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 2d98c5354239e600cc4f799feabc9cb44666118e by Victor Stinner in 
branch 'master':
Revert "bpo-30673: test.bat: add -t option (timeout) (#2211)" (#2245)
https://github.com/python/cpython/commit/2d98c5354239e600cc4f799feabc9cb44666118e


--

___
Python tracker 

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



[issue30673] Add -t option (timeout) to Tools/buildbot/test.bat for "AMD64 Windows8.1 Refleaks 3.x" buildbot

2017-06-16 Thread STINNER Victor

STINNER Victor added the comment:


New changeset f50a3b1e7a74f3132d6b5e1afc793ace6de7e631 by Victor Stinner in 
branch '3.5':
Revert "bpo-30673: test.bat: add -t option (timeout) (#2211) (#2226)" (#2247)
https://github.com/python/cpython/commit/f50a3b1e7a74f3132d6b5e1afc793ace6de7e631


--

___
Python tracker 

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



[issue30540] regrtest: add --matchfile option

2017-06-16 Thread STINNER Victor

STINNER Victor added the comment:


New changeset a0ccc54e6dffacf9e7c06f2a3e9056d2d35d21eb by Victor Stinner in 
branch '3.6':
Synchronize libregrtest from master to 3.6 (#2244)
https://github.com/python/cpython/commit/a0ccc54e6dffacf9e7c06f2a3e9056d2d35d21eb


--

___
Python tracker 

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



[issue30284] Build CPython out of tree with a read-only source tree

2017-06-16 Thread STINNER Victor

STINNER Victor added the comment:


New changeset a0ccc54e6dffacf9e7c06f2a3e9056d2d35d21eb by Victor Stinner in 
branch '3.6':
Synchronize libregrtest from master to 3.6 (#2244)
https://github.com/python/cpython/commit/a0ccc54e6dffacf9e7c06f2a3e9056d2d35d21eb


--

___
Python tracker 

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



[issue30263] regrtest: log the system load?

2017-06-16 Thread STINNER Victor

STINNER Victor added the comment:


New changeset a0ccc54e6dffacf9e7c06f2a3e9056d2d35d21eb by Victor Stinner in 
branch '3.6':
Synchronize libregrtest from master to 3.6 (#2244)
https://github.com/python/cpython/commit/a0ccc54e6dffacf9e7c06f2a3e9056d2d35d21eb


--

___
Python tracker 

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



[issue30523] unittest: add --list-tests option to only display the list of test names, don't run tests

2017-06-16 Thread STINNER Victor

STINNER Victor added the comment:


New changeset a0ccc54e6dffacf9e7c06f2a3e9056d2d35d21eb by Victor Stinner in 
branch '3.6':
Synchronize libregrtest from master to 3.6 (#2244)
https://github.com/python/cpython/commit/a0ccc54e6dffacf9e7c06f2a3e9056d2d35d21eb


--

___
Python tracker 

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



[issue30258] [2.7] regrtest: handle child process crash

2017-06-16 Thread STINNER Victor

STINNER Victor added the comment:


New changeset a0ccc54e6dffacf9e7c06f2a3e9056d2d35d21eb by Victor Stinner in 
branch '3.6':
Synchronize libregrtest from master to 3.6 (#2244)
https://github.com/python/cpython/commit/a0ccc54e6dffacf9e7c06f2a3e9056d2d35d21eb


--

___
Python tracker 

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



[issue30684] datetime.fromtimestamp raises OSError on first day after epoch on Windows

2017-06-16 Thread Christoph Reiter

New submission from Christoph Reiter:

I'm not sure this is a bug since the docs says raising OSError is allowed, but 
it looks weird to me.

On Windows.

Using Python 3.4:

>>> datetime.datetime.fromtimestamp(0)
datetime.datetime(1970, 1, 1, 1, 0)

Using Python 3.6.1:

>>> datetime.datetime.fromtimestamp(0)
OSError: [Errno 22] Invalid argument

The first time stamp which works with 3.6 is 86400, so exactly the next day.

--
messages: 296191
nosy: lazka
priority: normal
severity: normal
status: open
title: datetime.fromtimestamp raises OSError on first day after epoch on Windows
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



[issue29606] urllib FTP protocol stream injection

2017-06-16 Thread Dong-hee Na

Dong-hee Na added the comment:

Yeah, I agree about your approach. I will update it for this weekend.

--

___
Python tracker 

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



[issue30682] f-string assert is too restrictive

2017-06-16 Thread Eric V. Smith

Eric V. Smith added the comment:


New changeset 2eca5b465f7404cc8484457b7966f828f434ec20 by ericvsmith (Serhiy 
Storchaka) in branch '3.6':
[3.6] bpo-30682: Removed a too-strict assertion that failed for certain 
f-strings. (GH-2232) (#2242)
https://github.com/python/cpython/commit/2eca5b465f7404cc8484457b7966f828f434ec20


--

___
Python tracker 

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



[issue29478] email.policy.Compat32(max_line_length=None) not as documented

2017-06-16 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset e9f4d8db5f30a9603fa0c005382bff78aa1ce232 by Mariatta in branch 
'3.6':
[email] bpo-29478: Fix passing max_line_length=None from Compat32 policy 
(GH-595) (GH-2233)
https://github.com/python/cpython/commit/e9f4d8db5f30a9603fa0c005382bff78aa1ce232


--

___
Python tracker 

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



[issue30176] curses attribute constants list is incomplete

2017-06-16 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 304a96e5868c1b38a87692668f297aaf041e6e67 by Mariatta in branch 
'3.6':
bpo-30176: Add missing curses cell attributes constants (GH-1302). (GH-2241)
https://github.com/python/cpython/commit/304a96e5868c1b38a87692668f297aaf041e6e67


--

___
Python tracker 

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



[issue29478] email.policy.Compat32(max_line_length=None) not as documented

2017-06-16 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
resolution:  -> fixed
stage: backport needed -> resolved
status: open -> closed

___
Python tracker 

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



[issue30684] datetime.fromtimestamp raises OSError on first day after epoch on Windows

2017-06-16 Thread Eryk Sun

Eryk Sun added the comment:

This is due to computing the PEP 495 fold in the function 
datetime_from_timet_and_us in Modules/_datetimemodule.c. It computes the local 
time for (timet - max_fold_seconds), which is negative for timestamps less than 
max_fold_seconds (86400). It's documented that localtime_s [1] fails for 
negative time values. For example:

0:000> kc 6
Call Site
python36_d!localtime_s
python36_d!_PyTime_localtime
python36_d!local
python36_d!datetime_from_timet_and_us
python36_d!datetime_from_timestamp
python36_d!datetime_fromtimestamp

Dereference the time_t* arg (-86400):

0:000> ?? *(int64_t *)@rdx
int64 0n-86400

Print the errno_t return value (0x16 is EINVAL):

0:000> pt; r rax
rax=0016

[1]: https://msdn.microsoft.com/en-us/library/a442x3ye.aspx

--
components: +Library (Lib), Windows
nosy: +belopolsky, eryksun, paul.moore, steve.dower, tim.golden, tim.peters, 
zach.ware
type:  -> behavior
versions: +Python 3.7

___
Python tracker 

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



[issue27945] Various segfaults with dict

2017-06-16 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +2296

___
Python tracker 

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



[issue30484] Garbage Collector can cause Segfault whilst iterating dictionary items

2017-06-16 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +2297

___
Python tracker 

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



[issue30484] Garbage Collector can cause Segfault whilst iterating dictionary items

2017-06-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

PR 2248 backports the issue27945 patch to 3.4. Seems it fixes this issue.

--
stage:  -> patch review

___
Python tracker 

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



[issue30540] regrtest: add --matchfile option

2017-06-16 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2298

___
Python tracker 

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



[issue30523] unittest: add --list-tests option to only display the list of test names, don't run tests

2017-06-16 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2299

___
Python tracker 

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



[issue30484] Garbage Collector can cause Segfault whilst iterating dictionary items

2017-06-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Larry, does it worth to fix this issue in 3.4?

--
assignee:  -> larry

___
Python tracker 

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



[issue30674] IDLE: add docstrings to grep.py

2017-06-16 Thread Terry J. Reedy

New submission from Terry J. Reedy:

On PR 2213, Cheryl said "One other question -- when I run this, the dialog box 
always opens way on the bottom of my screen. Has anyone requested a change to 
this before? Or would it be worth mentioning on idle-dev?"  Louie sees top left 
on Mac, I see same on Windows.

Same is true for me for all search boxes.  Cheryl, only grep box or others?  I 
would find bottom surprising and likely annoying.  Feel free to open issue with 
detail.  Louie, what do you see on Linux?

--

___
Python tracker 

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



[issue30674] IDLE: add docstrings to grep.py

2017-06-16 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
stage:  -> commit review
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



[issue30674] IDLE: add docstrings to grep.py

2017-06-16 Thread Louie Lu

Louie Lu added the comment:

On Linux, it stick to the top-right of the IDLE, that says I can't reproduce 
the bump-out at the bottom :(

--
nosy: +louielu

___
Python tracker 

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



[issue30523] unittest: add --list-tests option to only display the list of test names, don't run tests

2017-06-16 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2301

___
Python tracker 

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



[issue30540] regrtest: add --matchfile option

2017-06-16 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2300

___
Python tracker 

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



[issue30523] unittest: add --list-tests option to only display the list of test names, don't run tests

2017-06-16 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 24c2c20873dc800c99d1dabf26419b40cadfe627 by Victor Stinner in 
branch '2.7':
bpo-30540, bpo-30523: Add --matchfile and --list-cases options to regrtest 
(#2249)
https://github.com/python/cpython/commit/24c2c20873dc800c99d1dabf26419b40cadfe627


--

___
Python tracker 

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



[issue30540] regrtest: add --matchfile option

2017-06-16 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 24c2c20873dc800c99d1dabf26419b40cadfe627 by Victor Stinner in 
branch '2.7':
bpo-30540, bpo-30523: Add --matchfile and --list-cases options to regrtest 
(#2249)
https://github.com/python/cpython/commit/24c2c20873dc800c99d1dabf26419b40cadfe627


--

___
Python tracker 

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



[issue30523] regrtest: add --list-cases option to only display test case identifiers

2017-06-16 Thread STINNER Victor

Changes by STINNER Victor :


--
title: unittest: add --list-tests option to only display the list of test 
names, don't run tests -> regrtest: add --list-cases option to only display 
test case identifiers

___
Python tracker 

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



[issue30682] f-string assert is too restrictive

2017-06-16 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Before the patch, eval("f'\\\n'") gives me the same assertion failure, with an 
IDLE freeze instead of core dump equivalent, but is seems that the string 
should be of length 2.

>>> len('\\\n')
2
>>> len(f'\\\n')
2

--
nosy: +terry.reedy
stage:  -> resolved
type:  -> behavior

___
Python tracker 

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



[issue30683] Enhance doctest support in regrtest --list-cases

2017-06-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Note that --match (and --matchfile) is ignored by doctests. I think this can 
cause a problem for bisect feature. After making --match working with doctests 
we can found a way to name doctests and list them.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue30683] Enhance doctest support in regrtest --list-cases

2017-06-16 Thread STINNER Victor

STINNER Victor added the comment:

> Note that --match (and --matchfile) is ignored by doctests, so technically, 
> it seems that it's doable ;-)

In test_os, --match works on doctest tests:

haypo@selma$ ./python -m test -v test_builtin --match=builtins.hex 
(...)
0:00:00 load avg: 0.28 [1/1] test_builtin
hex (builtins)
Doctest: builtins.hex ... ok

--
Ran 1 test in 0.002s
(...)

--

___
Python tracker 

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



[issue30674] IDLE: add docstrings to grep.py

2017-06-16 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Are you two using different Linux distributions with different graphics 
managers?  Could tk act different on different distributions?

--

___
Python tracker 

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



[issue30523] regrtest: add --list-cases option to only display test case identifiers

2017-06-16 Thread STINNER Victor

STINNER Victor added the comment:

On Python 2.7, listing *all* test cases with "./python -m test --list-cases" 
fails on the following test files:

* test_multibytecodec_support 
* test_robotparser
* test_xpickle

regrtest of Python 2.7 uses the test_main() function of each test file, if the 
function is defined. Whereas --list-cases is more written as a raw discovery 
function listing all cases which inherit from unittest.TestCase. These 3 files 
have base test cases which are "abstract" or configured below.

Options:

* Modify --list-cases to tolerate failures and report them at exit
* Modify these 3 tests to make them more "test discovery"-friendly
* Use test_main() function if available but modify its behaviour to only list 
test cases, instead of running them

I would prefer to limit changes in Python 2.7 branch, so IMHO the second option 
is the best: modify the 3 tests.

--

___
Python tracker 

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



[issue30523] regrtest: add --list-cases option to only display test case identifiers

2017-06-16 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 46e299c1536da541b9dbf76c0cb909bf8c79f589 by Victor Stinner in 
branch '3.5':
[3.5] bpo-30540, bpo-30523: Add --matchfile and --list-cases options to 
regrtest (#2250)
https://github.com/python/cpython/commit/46e299c1536da541b9dbf76c0cb909bf8c79f589


--

___
Python tracker 

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



[issue30540] regrtest: add --matchfile option

2017-06-16 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 46e299c1536da541b9dbf76c0cb909bf8c79f589 by Victor Stinner in 
branch '3.5':
[3.5] bpo-30540, bpo-30523: Add --matchfile and --list-cases options to 
regrtest (#2250)
https://github.com/python/cpython/commit/46e299c1536da541b9dbf76c0cb909bf8c79f589


--

___
Python tracker 

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



[issue30685] Multiprocessing Send to Manager Fails for Large Payload

2017-06-16 Thread Max Ehrlich

New submission from Max Ehrlich:

On line 393 of multiprocessing/connection.py, the size of the payload to be 
sent is serialized as an integer. This fails for sending large payloads. It 
should probably be serialized as a long or better yet a long long.

--
components: Library (Lib)
messages: 296210
nosy: maxehr
priority: normal
severity: normal
status: open
title: Multiprocessing Send to Manager Fails for Large Payload
versions: Python 3.5

___
Python tracker 

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



[issue30674] IDLE: add docstrings to grep.py

2017-06-16 Thread Cheryl Sabella

Cheryl Sabella added the comment:

Thanks.  It seems like my windows pop-up all over the place.  It's probably a 
Ubuntu thing.  

I was used to looking at help_about and textview, which cascade over the 
current window (I think because of self.geometry) and that's what prompted my 
initial question.  But, the search dialogs aren't even all the same.  

If IDLE is in the middle of the screen,
- 'Find' and 'replace' pin to the top left of my screen, as far top and as far 
left as it could go.
- 'Find in files' pins to the bottom left, as far to the bottom as possible.

If I move the IDLE window, it generally stays the same as above, but if IDLE is 
in the top left, then the find and replace are to the right of it and find in 
files is still at the bottom.

I was going to ask this anyway, but help_about and those dialogs inherit from 
Toplevel and have a parent, but searchbase doesn't.  I don't understand why 
there's a difference.  The search dialogs are modal, even though the Output 
Window isn't.  Maybe it would help to control where they display in relation to 
a parent window?

--

___
Python tracker 

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



[issue30682] f-string assert is too restrictive

2017-06-16 Thread Eric V. Smith

Eric V. Smith added the comment:

Terry:

The eval is important. The bug was in evaluating an f-string that consisted of 
two bytes: a backslash followed by a newline.

And just as:
eval("'\\\n'") == ''  # len == 0
so should
eval("f'\\\n'") == ''  # len == 0

It's the second one that was throwing the assertion. The parser was seeing 
these bytes:
f  0x66
'  0x27
\  0x5c
nl 0xa
'  0x27
and behaving badly (to say the least) by asserting.

Without the eval, I can't think of a way to have a string consisting of those 
two bytes, but I assume someone who's trickier than I can come up with a way.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue30684] datetime.fromtimestamp raises OSError on first day after epoch on Windows

2017-06-16 Thread R. David Murray

R. David Murray added the comment:

This appears to be a duplicate of issue 29097.

--
nosy: +r.david.murray
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 
3.6

___
Python tracker 

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



[issue30682] f-string assert is too restrictive

2017-06-16 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
type: behavior -> crash

___
Python tracker 

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



[issue29097] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6

2017-06-16 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

> I just ran the following script to check if there are any folds from 
> timestamps [0, 86399] in any timezone.

Ammar, I am not sure pytz timezones support PEP 495 conventions. Can you repeat 
your experiment using the latest dateutil.tz or test.datetimetester.ZoneInfo 
from Python 3.6 test suit?

See .

--

___
Python tracker 

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



[issue30681] email.utils.parsedate_to_datetime() should return None when date cannot be parsed

2017-06-16 Thread R. David Murray

R. David Murray added the comment:

OK, I think I've reloaded my brain at least partially on this topic.

I think my original reason for having prasedate_to_datetime raise errors is 
that it was my opinion that that is the way it should work, and that parsedate 
should work the same way (raise errors, not return None).  The logic is that 
parsedate is not itself part of the *parser* and it is the parser that has a 
contract to not raise errors but instead register defects.  When you call 
parsedate from your code (that is, not as part of the parser), it ought to 
raise an error, IMO, and so I made parsedate_to_datetime do that.

I think I understand the logic behind the original behavior: None as the 'error 
value', thus being consistent with the parser in not raising errors.  But I 
think our understanding of Python best practices has evolved (solidified?) 
since the days when the parsedate API was designed, and raising errors is 
better.

*However*, consistency is also important, so if the consensus is that 
parsedate_to_datetime should parallel the parsedate API, I'm not going to argue 
with it.

Regardless of that, however, I think your notion, Tim, that the *string* value 
of a date header with an invalid date in it should be the invalid string is a 
good one.  One can check the validity by inspecting the datetime argument.  
Regardless of whether errors are reported via None or an exception, the 
headerregistry method should catch the error and set the value accordingly (to 
the invalid string on error, to the normalized string if valid).

A couple of notes on the PR you submitted. (1) this change affects only the new 
policies, so the test should go somewhere in the new tests, not in test_email, 
which means you don't need to muck with the test support infrastructure in that 
file.  There are already date header tests in test_headerregistry, so add the 
new test there. (2) I'm moving us away from putting 'test emails' in separate 
files, so include the text under test in the test file.  You only need the date 
string in the date header test, but you can add your sample (changed to meet 
Brett's child filter, although I bet any children who will be looking at the 
python source code will already have seen many such spam emails) to 
test_inversion (which currently only contains one test message in msg_params, 
add yours  to that list and make it two :)

As for the decision on the return value vs exception, let's see which side 
Barry comes down on :)

--

___
Python tracker 

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



[issue694339] IDLE: Dedenting with Shift+Tab

2017-06-16 Thread Cheryl Sabella

Changes by Cheryl Sabella :


--
nosy: +csabella

___
Python tracker 

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



[issue30686] make `make install` faster

2017-06-16 Thread INADA Naoki

New submission from INADA Naoki:

Currently, `make install` doesn't use -jN option of compileall.py

My idea is:

* Use os.cpu_count() for -j0.
* Use the option in Makefile

--
components: Build
messages: 296216
nosy: inada.naoki
priority: normal
severity: normal
status: open
title: make `make install` faster
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



[issue24813] Redesign Help => About IDLE, make it non-modal

2017-06-16 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy
stage:  -> test needed
title: Idle Help dialogs shouldn't be modal -> Redesign Help => About IDLE, 
make it non-modal
versions: +Python 3.7 -Python 2.7, Python 3.5

___
Python tracker 

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



[issue30674] IDLE: add docstrings to grep.py

2017-06-16 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Since all three search boxes call the same open, they use the same hidden 
placement algorithm.  On Windows, the last position when closed is re-used for 
the next open for the duration of the IDLE session.  When IDLE is closed and 
reopened, the initial position is reset to a 'cascade' position.  What about 
Ubuntu?  Is it remembering across IDLE sessions? 

The 'difference' you noticed concerns 'is-a' relationships (via inheritance) 
versus 'has-a' relationships (via composition).  It is a perennial debate among 
some in the OOP community, with no resolution.  Python allows both.

IDLE uses both.  Different people? Same person, different times? Some perceived 
specific reason for each? I slightly prefer 'is-a' because it seems simpler, 
and inheritance does not bother me.  When we 'framify' the search widgets, I 
expect to use Frame subclasses.

Perhaps more important is grab-bag or kitchen-sink classes versus focused 
classes.  EditorWindow has a TopLevel, a Frame placed within the Toplevel, and, 
among other things, a Multicall-wrapped Text placed within the frame.  A method 
can be about any of them, and there are methods not about any of them, or about 
editing (open turtledemo).  There should be separate window, frame, and text 
classes with the methods appropriate to each.  I am sure that this would make 
the editor easier to learn, test and patch.

Modal or not is a separate debate.  Most recent opinions have been to make 
fewer things modal.  #24813 would make About IDLE non-modal. #24039 and #24760 
include search dialogs.

--

___
Python tracker 

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



[issue30687] build.bat should locate msbuild.exe rather than vcvarsall.bat

2017-06-16 Thread Steve Dower

New submission from Steve Dower:

Due to how installation of Visual Studio 2017 has changed, it's very possible 
to end up with a valid install of the build tools without vcvarsall.bat being 
valid.

We only require MSBuild.exe to build, so we should find that tool and invoke 
it, rather than trying to configure the entire environment.

--
assignee: steve.dower
components: Build, Windows
messages: 296218
nosy: paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: patch review
status: open
title: build.bat should locate msbuild.exe rather than vcvarsall.bat
type: compile error
versions: Python 3.5, 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



[issue30687] build.bat should locate msbuild.exe rather than vcvarsall.bat

2017-06-16 Thread Steve Dower

Changes by Steve Dower :


--
pull_requests: +2302

___
Python tracker 

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



[issue30619] typing.Union doc incoherence in case a class and its subclass are present

2017-06-16 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Yes, you are right. Could you please make a PR at 
https://github.com/python/cpython/pulls ?

--
nosy: +levkivskyi

___
Python tracker 

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



[issue30674] IDLE: add docstrings to grep.py

2017-06-16 Thread Cheryl Sabella

Cheryl Sabella added the comment:

Thanks, Terry.  It seems that it *is* the hidden placement algorithm and I just 
never noticed it before.  I opened a bunch of terminal windows and they opened 
top left, bottom left, top right, bottom right, then continuing to follow a 
pattern.  IDLE did the same thing.  However, it isn't always opening the search 
dialogs in the same place even when I open the three in a row.  Maybe it's the 
size of the windows or something else that is causing the algorithm to render 
them differently.  Even though I can now understand the behavior, it's still 
frustrating because I'd expect the search box to pop up where I'm looking and 
not somewhere else on the screen entirely.

I have Windows 7 on my work laptop with 2 monitors and behavior was better.  
The search dialogs opened more in the middle of the screen, near the IDLE 
window.  Although, if I put IDLE on the left monitor, the search dialog still 
opened in the same place on the right monitor, but it was easy to notice.

Thanks for explaining all that about the windows and dialogs.  At this point, I 
would say that consitency within the app would make it easier to understand for 
me as a newcomer.  If everything followed the pattern of window, frame, and 
text, then I wouldn't wonder about the differences, especially if there really 
isn't any intended difference.  And thank you for the links to those other 
issues and discussions.

--

___
Python tracker 

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



[issue30671] dict: improve lookup function

2017-06-16 Thread Tim Peters

Tim Peters added the comment:

Yes, any scheme whatsoever that guarantees to visit every int in range(2**i) 
meets the "correctness" part.

But I concur with Inada:  "head arguments" aren't compelling here, not even if 
I understood what they were saying ;-)  If you implement it and demonstrate 
significant speedups in plausibly realistic settings, then it may be worth 
pursuing.  Anything short of that is at best informed speculation, and so 
better hashed out on, e.g., the python-ideas mailing list than on the bug 
tracker.

BTW, I realize you're not running tests against random data.  But you're not 
running tests against _any_ real data, which is worrisome.  Your code appears 
to be utterly uniform, thus approximating a uniform random distribution.  I 
have scant idea of what you believe your code shows.  For example, it only 
looks at "hash codes" in `range(1<

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



[issue30629] lower() is called twice

2017-06-16 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset 3358d589fb51372a56ddcfffa277855e5661c4c0 by terryjreedy (Motoki 
Naruse) in branch 'master':
bpo-30629: Remove second call of str.lower() in html.parser.parse_endtag. 
(#2099)
https://github.com/python/cpython/commit/3358d589fb51372a56ddcfffa277855e5661c4c0


--
nosy: +terry.reedy

___
Python tracker 

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



[issue30629] lower() is called twice

2017-06-16 Thread Terry J. Reedy

Terry J. Reedy added the comment:

This appears to be your first CPython contribution.  Welcome.  We hope it is 
not the last.  If you prepare a PR to add yourself to Misc/ACKS, in appropriate 
alphabetical position, I will merge it.  Just suggest me as a reviewer.

--
resolution:  -> fixed
stage:  -> resolved
type:  -> enhancement

___
Python tracker 

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



[issue30630] Missing MSI files

2017-06-16 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Unless you are experimenting, you only need 3.6.1.  3.0 is deprecated in the 
sense that it was not meant for production use.

This tracker is for developing the next releases of CPython.  If you have any 
more questions, try python-list.

--
nosy: +terry.reedy
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



[issue30420] Clarify kwarg handing for subprocess convenience APIs

2017-06-16 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
pull_requests: +2303

___
Python tracker 

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



[issue30681] email.utils.parsedate_to_datetime() should return None when date cannot be parsed

2017-06-16 Thread Tim Bell

Changes by Tim Bell :


--
pull_requests: +2304

___
Python tracker 

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



[issue30637] Syntax error reported on compile(...), but not on compile(..., ast.PyCF_ONLY_AST)

2017-06-16 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Python grammar is constrained to be, I believe, LL(1).  Whatever the constraint 
is, there are a few syntax rules that either cannot be written or would be 
difficult to write within the constraint.  So they are checked during 
compilation.  Can you suggest a couple of sentences you would have like to have 
seen, and where?

I might also note that not all exceptions raised by compile are literally 
'SyntaxError's.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue30667] IDLE: revise doc subsection 'Completions'

2017-06-16 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
title: IDLE: revise doc subsections 'Completions' -> IDLE: revise doc 
subsection 'Completions'

___
Python tracker 

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



[issue30670] pprint for dict in sorted order or insert order?

2017-06-16 Thread Terry J. Reedy

Changes by Terry J. Reedy :


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



[issue30681] email.utils.parsedate_to_datetime() should return None when date cannot be parsed

2017-06-16 Thread Tim Bell

Tim Bell added the comment:

Thanks for the feedback. I've made a new pull request which addresses the 
points raised.

--

___
Python tracker 

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



[issue18140] urlparse, urlsplit confused when password includes fragment (#), query (?)

2017-06-16 Thread Martin Panter

Changes by Martin Panter :


--
dependencies: +[security] urllib connects to a wrong host

___
Python tracker 

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



[issue23894] lib2to3 doesn't recognize rb'...' and f'...' in Python 3.6

2017-06-16 Thread Ned Deily

Changes by Ned Deily :


--
pull_requests: +2305

___
Python tracker 

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



[issue23894] lib2to3 doesn't recognize rb'...' and f'...' in Python 3.6

2017-06-16 Thread Ned Deily

Ned Deily added the comment:


New changeset b7c59f0d05bde0d4dd2d7bffc1b8af72c25d3f71 by Ned Deily in branch 
'3.6':
bpo-23894: add Misc/NEWS entry. (#2255)
https://github.com/python/cpython/commit/b7c59f0d05bde0d4dd2d7bffc1b8af72c25d3f71


--

___
Python tracker 

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



[issue23894] lib2to3 doesn't recognize rb'...' and f'...' in Python 3.6

2017-06-16 Thread Ned Deily

Changes by Ned Deily :


--
pull_requests: +2306

___
Python tracker 

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



[issue23894] lib2to3 doesn't recognize rb'...' and f'...' in Python 3.6

2017-06-16 Thread Ned Deily

Ned Deily added the comment:


New changeset ceb817dcfe8bf99725de033cce16a6f4cbced6ba by Ned Deily in branch 
'master':
bpo-23894: add Misc/NEWS entry. (#2256)
https://github.com/python/cpython/commit/ceb817dcfe8bf99725de033cce16a6f4cbced6ba


--

___
Python tracker 

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



[issue30038] Race condition in how trip_signal writes to wakeup fd

2017-06-16 Thread Ned Deily

Changes by Ned Deily :


--
pull_requests: +2307

___
Python tracker 

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



  1   2   >