[issue27590] tarfile module next() method hides exceptions

2016-07-24 Thread Lars Gustäbel

Lars Gustäbel added the comment:

The question is what you're trying to accomplish. If you just want to prevent 
tarfile from stopping at the first invalid header in order to extract 
everything following it, you may use the ignore_zeros=True keyword argument.

--

___
Python tracker 

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



[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-07-24 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

That's very helpful.  It looks like on a Mac 32-bit build has 64-bit time_t.  
I'll build a 32-bit Python on Linux tomorrow and try to get to the bottom of 
this.

--

___
Python tracker 

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



[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-07-24 Thread Martin Panter

Martin Panter added the comment:

I _think_ the system_transitions failure only happens for 32 bit (have to test 
more to be sure). (My 32-bit environment is lacking many libraries compared to 
main 64-bit environment, but still uses the same filesystem etc.) First 
system_transitions failure with today’s new code:

FAIL: test_system_transitions 
(test.datetimetester.ZoneInfoTest[posix/Africa/Casablanca])
--
Traceback (most recent call last):
  File "/media/disk/home/proj/python/cpython/Lib/test/datetimetester.py", line 
4760, in test_system_transitions
self.assertEquivDatetimes(sdt, tzdt)
  File "/media/disk/home/proj/python/cpython/Lib/test/datetimetester.py", line 
4687, in assertEquivDatetimes
(b.replace(tzinfo=None), b.fold, id(b.tzinfo)))
AssertionError: Tuples differ: (datetime.datetime(2037, 10, 11, 3, 0), 0, 
140273296) != (datetime.datetime(2037, 10, 11, 2, 0, fold=1), 1, 140273296)

First differing element 0:
datetime.datetime(2037, 10, 11, 3, 0)
datetime.datetime(2037, 10, 11, 2, 0, fold=1)

- (datetime.datetime(2037, 10, 11, 3, 0), 0, 140273296)
?  ^  ^

+ (datetime.datetime(2037, 10, 11, 2, 0, fold=1), 1, 140273296)
?  ^      ^

Your CasablancaTest gave the same failure:
==
FAIL: test_system_transitions (test.datetimetester.CasablancaTest)
--
Traceback (most recent call last):
  File "/media/disk/home/proj/python/cpython/Lib/test/datetimetester.py", line 
4760, in test_system_transitions
self.assertEquivDatetimes(sdt, tzdt)
  File "/media/disk/home/proj/python/cpython/Lib/test/datetimetester.py", line 
4687, in assertEquivDatetimes
(b.replace(tzinfo=None), b.fold, id(b.tzinfo)))
AssertionError: Tuples differ: (datetime.datetime(2037, 10, 11, 3, 0), 0, 
140273296) != (datetime.datetime(2037, 10, 11, 2, 0, fold=1), 1, 140273296)

First differing element 0:
datetime.datetime(2037, 10, 11, 3, 0)
datetime.datetime(2037, 10, 11, 2, 0, fold=1)

- (datetime.datetime(2037, 10, 11, 3, 0), 0, 140273296)
?  ^  ^

+ (datetime.datetime(2037, 10, 11, 2, 0, fold=1), 1, 140273296)
?  ^      ^

--

___
Python tracker 

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



[issue26462] Patch to enhance literal block language declaration

2016-07-24 Thread Martin Panter

Martin Panter added the comment:

With Julien’s patch applied, these are the remaining warnings:

/media/disk/home/proj/python/cpython/Doc/library/configparser.rst:240: WARNING: 
Could not lex literal_block as "ini". Highlighting skipped.
/media/disk/home/proj/python/cpython/Doc/library/configparser.rst:301: WARNING: 
Could not lex literal_block as "ini". Highlighting skipped.
/media/disk/home/proj/python/cpython/Doc/library/configparser.rst:332: WARNING: 
Could not lex literal_block as "ini". Highlighting skipped.
/media/disk/home/proj/python/cpython/Doc/library/configparser.rst:341: WARNING: 
Could not lex literal_block as "ini". Highlighting skipped.
/media/disk/home/proj/python/cpython/Doc/reference/lexical_analysis.rst:799: 
WARNING: Could not lex literal_block as "python3". Highlighting skipped.
/media/disk/home/proj/python/cpython/Doc/reference/lexical_analysis.rst:813: 
WARNING: Could not lex literal_block as "python3". Highlighting skipped.
/media/disk/home/proj/python/cpython/Doc/whatsnew/2.4.rst:1430: WARNING: Could 
not lex literal_block as "python3". Highlighting skipped.
/media/disk/home/proj/python/cpython/Doc/whatsnew/3.5.rst:285: WARNING: Could 
not lex literal_block as "python3". Highlighting skipped.
/media/disk/home/proj/python/cpython/Doc/whatsnew/3.5.rst:294: WARNING: Could 
not lex literal_block as "python3". Highlighting skipped.

Also, perhaps you didn’t see Georg’s comment in some unpatched code: 


--
nosy: +martin.panter

___
Python tracker 

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



[issue27546] Integrate tkinter and asyncio (and async)

2016-07-24 Thread Guido van Rossum

Guido van Rossum added the comment:

Oh, my tkinter.TkVersion is 8.6.

--

___
Python tracker 

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



[issue27546] Integrate tkinter and asyncio (and async)

2016-07-24 Thread Guido van Rossum

Guido van Rossum added the comment:

PS. I recommend this command line to play with tkcrawl.py:

python3 tkcrawl.py xkcd.com -q

The fetching process takes about 6.8 seconds to fetch 1765 URLs on my machine. 
The original crawl.py takes 6.2 seconds.

I guess the next step would be to hook up the logger to a Tk text widget. It 
would also be nice to have a set of Tk widgets keep track of the state of the 
connections in the ConnectionPool, showing for each connection what its state 
it. It's a little tricky because connections get opened and closed at random; I 
would recommend using a table assigning connections slots in the widget. The 
number of lines in the widget is limited by max_pool.

(I would code up more of this myself except my Tkinter is rusty!)

--

___
Python tracker 

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



[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-07-24 Thread Martin Panter

Martin Panter added the comment:

Without blocking the C implementation _datetime, I get both extremes causing 
OverflowError:

>>> import datetime, time, os
>>> os.environ["TZ"] = "EST+05EDT,M3.2.0,M11.1.0"
>>> time.tzset()
>>> t = datetime.datetime(2,1,1)
>>> s = t.timestamp()
>>> s
-122233584944.0
>>> datetime.datetime.fromtimestamp(s)
OverflowError: timestamp out of range for platform time_t
>>> t = datetime.datetime(9998,12,12)
>>> s = t.timestamp()
>>> s
760175195728.0
>>> datetime.datetime.fromtimestamp(s)
OverflowError: timestamp out of range for platform time_t

When I repeated the test with sys["_datetime"] = None, both t.timestamp() calls 
raised OverflowError, which I assume is expected.

--

___
Python tracker 

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



[issue27546] Integrate tkinter and asyncio (and async)

2016-07-24 Thread Guido van Rossum

Guido van Rossum added the comment:

OK, I'm playing with this too. I merged your loop_tk.py example with crawl.py 
and am attaching the result as tkcrawl.py. I don't like global state so I added 
root and loop as parameters to a few places. Hopefully you have the asyncio 
repo checked out so you can compare this with the original crawl.py -- it 
basically has your code (with globals replaced by locals or instance variables) 
and these three lines in main() once loop is set:

+root = tk.Tk()
+t = asyncio.Task(display_date(root, loop, 100, 1))
+tk_update(root, loop)

and a loop.run_forever() call just before the loop.close() call, to keep the 
app running once it's done.

There are also two imports near the top (datetime and tkinter as tk).

(Oh, and I just realized I made some changes to crawl.py to suppress displaying 
the URL of every HTML page retrieved when -q is given. I will commit that.)

Running this will display the widget with the hello label and the button to 
change the color, *and* update the date every second, and it's totally 
responsive, all *while* it is fetching contents from e.g. xkcd.com.

--
Added file: http://bugs.python.org/file43873/tkcrawl.py

___
Python tracker 

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



[issue27546] Integrate tkinter and asyncio (and async)

2016-07-24 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Windows 10, repository default (3.6), with tcl/tk 8.6.4. I am not sure what to 
make of your results.  I have an impression that tk on Mac was considerably 
rewritten for 8.6.   Ned would know more about that.  Which were you using? 
"print(tkinter.TkVersion)"

--

___
Python tracker 

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



[issue27611] test_tix cannot import _default_root after test_idle

2016-07-24 Thread Terry J. Reedy

Terry J. Reedy added the comment:

#24137 only patched default, so either too many versions were selected or there 
is another bug in test_tix. Martin and Serhiy can sort that out.

The restore patch I pushed is based on this from tkinter.__init__
-
_support_default_root = 1
_default_root = None

def NoDefaultRoot():
"""Inhibit setting of default root window.

Call this function to inhibit that the first instance of
Tk is used for windows without an explicit parent window.
"""
global _support_default_root
_support_default_root = 0
global _default_root
_default_root = None
del _default_root

--

___
Python tracker 

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



[issue24137] Force not using _default_root in IDLE

2016-07-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5c76f787e695 by Terry Jan Reedy in branch 'default':
Issue #24137, issue #27611: Restore tkinter after test_idle.
https://hg.python.org/cpython/rev/5c76f787e695

--

___
Python tracker 

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



[issue27611] test_tix cannot import _default_root after test_idle

2016-07-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5c76f787e695 by Terry Jan Reedy in branch 'default':
Issue #24137, issue #27611: Restore tkinter after test_idle.
https://hg.python.org/cpython/rev/5c76f787e695

--
nosy: +python-dev

___
Python tracker 

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



[issue26462] Patch to enhance literal block language declaration

2016-07-24 Thread Martin Panter

Changes by Martin Panter :


Added file: http://bugs.python.org/file43872/issue26462.v3_regen.diff

___
Python tracker 

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



[issue27581] Fix overflow check in PySequence_Tuple

2016-07-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ad3762227655 by Martin Panter in branch '3.5':
Issue #27581: Don’t rely on overflow wrapping in PySequence_Tuple()
https://hg.python.org/cpython/rev/ad3762227655

New changeset 8f84942a0e40 by Martin Panter in branch 'default':
Issue #27581: Merge overflow fix from 3.5
https://hg.python.org/cpython/rev/8f84942a0e40

New changeset 55b6e51b878b by Martin Panter in branch '2.7':
Issue #27581: Don’t rely on overflow wrapping in PySequence_Tuple()
https://hg.python.org/cpython/rev/55b6e51b878b

--
nosy: +python-dev

___
Python tracker 

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



[issue1621] Do not assume signed integer overflow behavior

2016-07-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset db93af6080e7 by Martin Panter in branch 'default':
Issue #1621: Avoid signed overflow in list and tuple operations
https://hg.python.org/cpython/rev/db93af6080e7

--

___
Python tracker 

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



[issue27611] test_tix cannot import _default_root after test_idle

2016-07-24 Thread Zachary Ware

Zachary Ware added the comment:

I think there are two bugs to be fixed here:

1) as Serhiy said, if tix needs _default_root, it should use it as 
tkinter._default_root instead of importing it directly

2) test_idle should not permanently modify the tkinter namespace

--
nosy: +zach.ware

___
Python tracker 

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



[issue27611] test_tix cannot import _default_root after test_idle

2016-07-24 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I could reverse the effect of test_idle calling tk.NoDefaultRoot by adding
tk._support_default_root = 1
tk._default_root = None
at the very end, but I take Serhiy's comment as suggesting that there should be 
no need.

--

___
Python tracker 

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



[issue27611] test_tix cannot import _default_root after test_idle

2016-07-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There is a bug in tix. _default_root shouldn't be imported, since this is 
modifiable attribute.

--
keywords: +patch
stage:  -> patch review
versions: +Python 2.7, Python 3.5
Added file: http://bugs.python.org/file43871/tix_default_root.patch

___
Python tracker 

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



[issue19198] Improve cross-references in cgi documentation

2016-07-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 128ad410c776 by Terry Jan Reedy in branch 'default':
Issue #19198: IDLE: tab after initial whitespace should tab, not autocomplete.
https://hg.python.org/cpython/rev/128ad410c776

--

___
Python tracker 

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



[issue27607] Importing the main module twice leads to two incompatible instances

2016-07-24 Thread Emanuel Barry

Emanuel Barry added the comment:

I'm fairly sure enums aren't related to this issue, so I'm unassigning Ethan 
(but feel free to self-assign back if you so desire :). As I said on IRC (I'm 
Vgr), I think that importing a module twice is the problem here, and that PEP 
499 is the way to properly solve this and related issues. Thanks for opening 
this issue!

I added Cameron Simpson (PEP 499's author) to the nosy list, hoping he still 
wants to work on this (and let us know otherwise). I would personally like to 
see the PEP accepted and implemented for 3.6.

--
assignee: ethan.furman -> 
nosy: +cameron, ebarry
title: Enums never match if imported from another file -> Importing the main 
module twice leads to two incompatible instances
versions: +Python 3.6 -Python 3.4

___
Python tracker 

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



[issue17238] IDLE: Add import statement completion

2016-07-24 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I change 'enhance' to 'add' because there is no 'import completion' now.

Ramchandra, when replying by email, delete the quoted email.  But do submit a 
patch even is less than perfect.

The idea of autoimporting a name to complete an attribute is separate from the 
idea of doing something special in import statements.  Autoimport is the 
subject of #18766, which has a patch and my thoughts so far.  So this issue is 
only about import statements.

Martin, I just opened #27609 as an umbrella issue for multiple completion 
issues.  I am not happy with the current IDLE completion code.  Does any of the 
readline completion code depend on function provided by readline, or is it all 
an extension of readline, using logic in Python?

--
title: IDLE: Enhance import statement completion -> IDLE: Add import statement 
completion
versions: +Python 3.6 -Python 3.4

___
Python tracker 

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



[issue7063] Memory errors in array.array

2016-07-24 Thread Martin Panter

Changes by Martin Panter :


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



[issue18766] IDLE: Autocomplete in editor doesn't work for un-imported modules

2016-07-24 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The concern about adding bugs could be alleviated by checking whether the name 
is in an import statement.  But it still might not be in the proper form.

I am trying to reduce the run.py import to those actually needed in run.py.  I 
already reduced sys.modules by 37.  The side effect is that fewer modules will 
autocomplete before running the code in the editor.  Hence, there is more need 
for this change.

--

___
Python tracker 

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



[issue27609] IDLE completions: format, factor, and fix

2016-07-24 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I just partly fixed #16198.  Anything more depends on a careful definition of 
desired behavior that turns out to be different from current behavior.

--

___
Python tracker 

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



[issue18766] IDLE: Autocomplete in editor doesn't work for un-imported modules

2016-07-24 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I opened #27609 to keep track of multiple completion issues.  Some additions to 
what I said above.

1. I would like to move the actual fetch code to run.py, since it is normally 
executed in the user process.  See #27534, but also below.

2. Idle currently differentiates between completion invocation by  or '.' 
and by <>, which defaults to Cntl-space.  I believe a main 
difference is that it will only call functions in the object expression, as in 
"f().", in the latter case.  I believe the distinction operates by calling for 
completions or not. (I need to check.) 

That distinction can be used here by only importing with <>, 
and then it should.  With that limitation, I think I am now in favor of adding 
this.  Importing a module is roughly equivalent to calling a function.  Either 
can do anything.  But the distinction has be known within the fetch code.  This 
could be done with a wrapper function.

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

___
Python tracker 

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



[issue27601] Minor inaccuracy in hash documentation

2016-07-24 Thread Berker Peksag

Berker Peksag added the comment:

> I am very sorry, this is probably my fault.

It's not your fault :) I removed them.

3.2, 3.3 and 3.4 are in security-fix-only mode so they won't get any 
documentation updates. You can read 
https://docs.python.org/devguide/devcycle.html#secbranch for details about 
security branches.

Thanks for the report!

--
resolution:  -> fixed
status: open -> closed
versions:  -Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue27607] Enums never match if imported from another file

2016-07-24 Thread Ethan Furman

Ethan Furman added the comment:

Oh, forgot to mention I also tried testing as just 'main.py' from inside the 
test directory (that's what accounted for one of the two error messages).

--

___
Python tracker 

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



[issue27608] Something wrong with str.upper().lower() chain?

2016-07-24 Thread Emanuel Barry

Changes by Emanuel Barry :


--
resolution:  -> not a bug
stage:  -> resolved

___
Python tracker 

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



[issue27607] Enums never match if imported from another file

2016-07-24 Thread Ethan Furman

Ethan Furman added the comment:

Sylvia, if you have any control over the name of your zip files, please use 
something shorter.  ;)

The files inside are a 'main.py' and a 'module.py' -- notice there is no 
'__main__.py'.  So it can't be executed as 'python3 -m blahblah'.

I tried renaming 'main.py' to '__main__.py' but then I get either

  ImportError: cannot import name 'Module'

or

  ImportError: No module named 'module'

I'm happy to check for strange Enum interactions, but I need a working test 
case first.

--

___
Python tracker 

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



[issue27601] Minor inaccuracy in hash documentation

2016-07-24 Thread Aleksandr Koshkin

Aleksandr Koshkin added the comment:

Originally I emphasized that this bug occurs at every py3k version since 3.2. 
For some reason version list somehow shrinked to only tow of them - 3.5 and 
3.6. I am very sorry, this is probably my fault.

--
resolution: fixed -> 
status: closed -> open
versions: +Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue7063] Memory errors in array.array

2016-07-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ab28676df655 by Martin Panter in branch 'default':
Issue #7063: Remove dead code from array slice handling
https://hg.python.org/cpython/rev/ab28676df655

--
nosy: +python-dev

___
Python tracker 

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



[issue24137] Force not using _default_root in IDLE

2016-07-24 Thread Martin Panter

Martin Panter added the comment:

It seems this change causes test_tix to fail for me; see Issue 27611

--
nosy: +martin.panter

___
Python tracker 

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



[issue27611] test_tix cannot import _default_root after test_idle

2016-07-24 Thread Martin Panter

New submission from Martin Panter:

$ ./python -m unittest -v test.test_{idle,tix}
. . .
test_tix (unittest.loader._FailedTest) ... ERROR

==
ERROR: test_tix (unittest.loader._FailedTest)
--
ImportError: Failed to import test module: test_tix
Traceback (most recent call last):
  File "/media/disk/home/proj/python/cpython/Lib/unittest/loader.py", line 153, 
in loadTestsFromName
module = __import__(module_name)
  File "/media/disk/home/proj/python/cpython/Lib/test/test_tix.py", line 11, in 

from tkinter import tix, TclError
  File "/media/disk/home/proj/python/cpython/Lib/tkinter/tix.py", line 30, in 

from tkinter import _cnfmerge, _default_root
ImportError: cannot import name '_default_root'

Without test_idle, test_tix is skipped for me:

$ ./python -m unittest -v test.test_tix
test_tix_available (test.test_tix.TestTix) ... skipped 'Tix not available'

Reverting to before revision 064b29dde096 (Issue 24137) also fixes the failure.

--
components: Tests
messages: 271206
nosy: martin.panter, serhiy.storchaka, terry.reedy
priority: normal
severity: normal
status: open
title: test_tix cannot import _default_root after test_idle
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



[issue27587] Issues, reported by PVS-Studio static analyzer

2016-07-24 Thread Berker Peksag

Berker Peksag added the comment:

I'm attaching Christian's patch at 
https://marc.info/?l=python-dev=146922730716425=2 as 
issue27587_pystate_addmodule.diff to make code reviewing easier.

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



[issue27587] Issues, reported by PVS-Studio static analyzer

2016-07-24 Thread Berker Peksag

Changes by Berker Peksag :


--
keywords: +patch
Added file: http://bugs.python.org/file43870/issue27587_pystate_addmodule.diff

___
Python tracker 

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



[issue27601] Minor inaccuracy in hash documentation

2016-07-24 Thread Berker Peksag

Berker Peksag added the comment:

Looks good to me too. 'hash_value' looks more readable to me, thanks!

--
nosy: +berker.peksag
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> behavior
versions:  -Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue27601] Minor inaccuracy in hash documentation

2016-07-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a6be689eacf8 by Berker Peksag in branch '3.5':
Issue #27601: Improve example in the "Hashing of numeric types" section
https://hg.python.org/cpython/rev/a6be689eacf8

New changeset 06bbcbaeeb18 by Berker Peksag in branch 'default':
Issue #27601: Merge from 3.5
https://hg.python.org/cpython/rev/06bbcbaeeb18

--
nosy: +python-dev

___
Python tracker 

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



[issue25966] Bug in asyncio.corotuines._format_coroutine

2016-07-24 Thread Berker Peksag

Berker Peksag added the comment:

Merged in f4fe55dd5659.

--
nosy: +berker.peksag
stage:  -> resolved
status: open -> closed
type:  -> behavior
versions: +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



[issue27454] PyUnicode_InternInPlace can use PyDict_SetDefault

2016-07-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f3187a157204 by Berker Peksag in branch 'default':
Issue #27454: Use PyDict_SetDefault in PyUnicode_InternInPlace
https://hg.python.org/cpython/rev/f3187a157204

--
nosy: +python-dev

___
Python tracker 

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



[issue27454] PyUnicode_InternInPlace can use PyDict_SetDefault

2016-07-24 Thread Berker Peksag

Berker Peksag added the comment:

Thanks!

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



[issue17238] IDLE: Enhance import statement completion

2016-07-24 Thread Martin Panter

Martin Panter added the comment:

Even if your patch isn’t quite ready, it may (have been) better than nothing :)

I had the idea to share stuff between Idle completion and Readline completion, 
but after looking at the Idle code, it did not seem very practical in general. 
But maybe you can at least use some ideas, test cases, or share the low level 
code from Issue 25419. E.g. my patch there has method _import_matches() that 
takes a path of packages and yields (sub)module names, and method 
_from_import_matches() that also yields module attribute names.

--
nosy: +martin.panter

___
Python tracker 

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



[issue27610] Add PEP 514 metadata to Windows installer

2016-07-24 Thread Steve Dower

Changes by Steve Dower :


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

___
Python tracker 

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



[issue27610] Add PEP 514 metadata to Windows installer

2016-07-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c6ce1958cebb by Steve Dower in branch 'default':
Issue #27610: Adds PEP 514 metadata to Windows installer
https://hg.python.org/cpython/rev/c6ce1958cebb

--
nosy: +python-dev

___
Python tracker 

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



[issue27610] Add PEP 514 metadata to Windows installer

2016-07-24 Thread Steve Dower

New submission from Steve Dower:

Now PEP 514 is accepted, we need to set more information when installing Python 
3.6.

--
assignee: steve.dower
components: Windows
messages: 271197
nosy: paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Add PEP 514 metadata to Windows installer
type: enhancement
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



[issue27607] Enums never match if imported from another file

2016-07-24 Thread Sylvia van Os

Sylvia van Os added the comment:

Importing it from a third module indeed works without issues and makes both 
isinstance() calls return True, yes.

--

___
Python tracker 

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



[issue27607] Enums never match if imported from another file

2016-07-24 Thread Martin Panter

Martin Panter added the comment:

I would expect isintance() to fail like this for any class, not just Enum. I 
haven’t looked in your zip file, but a workaround may be to import the Enum 
class from a third module into both main.py and the other file. The third 
module should only get executed once, thus only defining one copy of the Enum 
class.

--
nosy: +martin.panter

___
Python tracker 

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



[issue27546] Integrate tkinter and asyncio (and async)

2016-07-24 Thread Guido van Rossum

Guido van Rossum added the comment:

On what platform did you measure that? On a Mac, with Python 3.5.2, I
get very different numbers:

tkloop: 9000/sec
asloop: 9/sec (about 10x!)
tkasyncloop: 2500/sec

--

___
Python tracker 

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



[issue26851] android compilation and link flags

2016-07-24 Thread Martin Panter

Martin Panter added the comment:

I left some suggestions and questions on the code review.

--

___
Python tracker 

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



[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-07-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset dca143512f6e by Alexander Belopolsky in branch 'default':
Issue 24773: Make zoneinfo tests more robust. (reapply)
https://hg.python.org/cpython/rev/dca143512f6e

--

___
Python tracker 

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



[issue27598] Add SizedIterable to collections.abc and typing

2016-07-24 Thread Guido van Rossum

Guido van Rossum added the comment:

Regarding the design of __subclasshook__, these two flaws kind of cancel each 
other out. The idea is that if you have a "one-trick pony" class whose 
issubclass() check must verify that the purported sublass implements a specific 
method (e.g. __hash__), you don't want that subclass check to be inherited by a 
subclass. I suppose perhaps this ought to have been done by making 
ABCMeta.__subclasscheck__ check for the __subclasshook__ in the class dict, but 
(for reasons I've forgotten) it's not doing it that way, instead just calling 
cls.__subclasscheck__. All known __subclasshook__ implementations (those in 
collections.abc anyway :-) compensate for this by returning NotImplemented if 
the class for which they are being called isn't exactly the class in which they 
are defined. The final piece of the puzzle is object.__subclasshook__(), which 
always returns NotImplemented.

(NOTE: When reading the above paragraph, be careful to distinguish between 
__subclasscheck__, which is invoked by issubclass() and isinstance(), and 
__subclasshook__, which is only invoked by ABCMeta.__subclasscheck__().)

Here's an example showing why we don't want __subclasshook__ to be inherited. 
Suppose we have a class SupportsInt, like this:

class SupportsInt(ABC):
@classmethod
def __subclasshook__(cls, C):
return hasattr(C, '__int__')

Now suppose we had a concrete class inheriting from this:

class MyInteger(SupportsInt):
def __int__(self):
return 0

Now, alas, everything with an __int__ method is considered to be a MyInteger, 
for example isinstance(0, MyInteger) returns True.

So what should Collection.__subclasshook__ do? It could do something like this:

class Collection(Set, Iterable, Container):
@classmethod
def __subclasshook__(cls, C):
if cls is not Collection:
return NotImplemented
for base in Set, Iterable, Container:
ok = base.__subclasshook__(C)
if ok != True: return False
return True

(Untested, hopefully you get the idea. Hope this helps.)

--

___
Python tracker 

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



[issue27609] IDLE completions: format, factor, and fix

2016-07-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1ec47de72538 by Terry Jan Reedy in branch 'default':
Issue #27609: Explicitly return None when there are other returns.
https://hg.python.org/cpython/rev/1ec47de72538

--
nosy: +python-dev

___
Python tracker 

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



[issue27607] Enums never match if imported from another file

2016-07-24 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I left it open so that Ethan would get a chance to see anything related to Enum.

--
nosy: +rhettinger

___
Python tracker 

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



[issue27607] Enums never match if imported from another file

2016-07-24 Thread R. David Murray

R. David Murray added the comment:

Certainly reporting it is fine, if nothing else it gives a record for someone 
else searching for the same problem.  I'm not certain why Raymond left the 
issue open, so I'm not closing it myself :)

--

___
Python tracker 

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



[issue27609] IDLE completions: format, factor, and fix

2016-07-24 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Add dependencies.  Last two, #27099 and #27534 involve multiple files and 
should be removed from this autocomplete list when autocomplete part is done.

--
dependencies: +IDLE - tabbing in a string always brings up file completion 
window, IDLE code completion window can hang or misbehave with mouse, IDLE: 
Autocomplete in editor doesn't work for un-imported modules, IDLE: Enhance 
import statement completion, IDLE: Reduce number and time for user process 
imports, IDLE: turn builting extensions into regular modules, Idle: optionally 
auto-pop-up completion window for names, Teach IDLE to Autocomplete dictionary 
keys

___
Python tracker 

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



[issue27609] IDLE completions: format, factor, and fix

2016-07-24 Thread Terry J. Reedy

New submission from Terry J. Reedy:

IDLE completions are currently implemented in two files: autocomplete.py and 
autocomplete_w.py.  (Before 3.6, these were AutoComplete.py and 
AutoCompleteWindow.py.) The first handles 'open' events, decideds whether to 
open a window, and gathers possible completions.  The second open a popup and 
works with the sorted list of possible completions. There are several tracker 
issues already.

#15786 Code completion problems with mouse and .
  These lead to freezes on on Mac.  Severity: bad; prioriy: high.
#16198 Tabbing in string brings up completion when it should not.
#17238 Enhance import statement completion.
#18766 Add completions for un-imported modules (by importing).
#18903 File completions are case sensitive, should not be on Windows.
#21261 Complete dictionary keys.
#22554 Popup window for names also.  

#27099 Convert autocomplete to normal feature, along with other 'extensions'.  
Add delay to current tab.  Negative delay should disable auto-popups.
#27534 Move objects needed by run to run.py and import from there.

There are more that are not on the tracker.  Patches may be attached here or to 
new issues.

A. Use PEP8 style.  1.'return None' when there are non-None returns. 2. 
Docstrings for all functions.
B. Merge autocomplete_w into autocomplete.  This was anticipated in the 
renaming.  #27534 should be done first if possible, or soon after.
C. Refactor.  1 #27534.  2. Put list and scrollbar in Frame?  For future 
single-window IDLE?  This might make testing easier. 3. Anything else making 
tests easier.
D. Make completions work for number literals ("1 .") as well a string literals 
("'a'.").
E?. Make completions work with Entry as well as Multicall wrapping text?  Need 
use case first.  Load Modules may need own code.

Question: Why does 'dooneevent' appear in 2.x code and not 3.x code?

Tests: The currently only for a subset of autocomplete methods.  There are none 
for the buggy window.

First, a patch for A.1, return None.

--
assignee: terry.reedy
messages: 271186
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE completions: format, factor, and fix
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



[issue27607] Enums never match if imported from another file

2016-07-24 Thread Sylvia van Os

Sylvia van Os added the comment:

For what it's worth, I am not opposed to having this issue closed. As I am new 
to reporting anything on the Python issue tracker and was uncertain on how 
relevant the PEP in question was, I figured it would be better to report this 
anyway just in case.

--

___
Python tracker 

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



[issue27607] Enums never match if imported from another file

2016-07-24 Thread R. David Murray

R. David Murray added the comment:

This is a consequence of the way __main__ works.  You actually have two 
separate instances of the Enum class.  If there is a fix for this it would be 
that PEP, so I'm not sure there is any  point in keeping this issue open.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue22554] Idle: optionally auto-pop-up completion window for names

2016-07-24 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The extension configuration was added a couple weeks after this was opened.  
The idea of the second message is that new popup should be optional even when 
completions are enabled.

--

___
Python tracker 

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



[issue27608] Something wrong with str.upper().lower() chain?

2016-07-24 Thread Aleksandr Koshkin

Aleksandr Koshkin added the comment:

Conclusion made: not a bug (not a python bug at least).

--
status: open -> closed

___
Python tracker 

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



[issue27604] More details about `-O` flag

2016-07-24 Thread Brett Cannon

Brett Cannon added the comment:

Two things. One, I don't know if you meant for your comment to come off as 
antagonistic, but it did.

Two, a patch is fine as long as it makes it clear that what optimizations are 
activated by the flag could change with no backwards-compatibility guarantees.

--

___
Python tracker 

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



[issue27604] More details about `-O` flag

2016-07-24 Thread Ram Rachum

Ram Rachum added the comment:

So... The reasoning is that if someone adds optimizations to Python's `-O` mode 
(Something that hasn't happened in the last decade or two, right?) we want to 
save them from going to the trouble of writing two or three sentences in the 
docs describing the optimizations? Isn't it standard practice to require people 
who contribute code to Python to add documentation for their changes?

Anyway, I think that it'll be a good idea to add two or three sentences that 
document it. Would you like a patch? If so against which version?

--

___
Python tracker 

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



[issue25170] 3.4.4, 3.4.5, 3.5.0, 3.5.1, 3.5.2 documentation archives missing

2016-07-24 Thread Ned Deily

Ned Deily added the comment:

Larry, I updated PEP 101 to reflect I think are the steps required for this 
with the new website; the doc upload instructions are already in PEP 101.  I'm 
sure it is still missing some steps.  Feel free to improve!

https://github.com/python/peps/commit/5903b6afd4e658482d382f635a8bb60339668ef1

--

___
Python tracker 

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



[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-07-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ae19ea7c36e6 by Alexander Belopolsky in branch 'default':
Issue #24773: Made ZoneInfoCompleteTest a TestSuit.
https://hg.python.org/cpython/rev/ae19ea7c36e6

--

___
Python tracker 

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



[issue27608] Something wrong with str.upper().lower() chain?

2016-07-24 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Here is a little more detail on what is occurring:

>>> from unicodedata import *
>>> c = 'µ'
>>> for s in (c, c.lower(), c.upper(), c.lower().upper(), c.upper().lower()):
print(s, ord(s), name(s), category(s))

µ 181 MICRO SIGN Ll
µ 181 MICRO SIGN Ll
Μ 924 GREEK CAPITAL LETTER MU Lu
Μ 924 GREEK CAPITAL LETTER MU Lu
μ 956 GREEK SMALL LETTER MU Ll

--
nosy: +rhettinger

___
Python tracker 

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



[issue27608] Something wrong with str.upper().lower() chain?

2016-07-24 Thread Aleksandr Koshkin

Aleksandr Koshkin added the comment:

So, yes, unicode table seems to be a bit inconsistent. In str documentation it 
worth to emphasize that something.upper().lower() in general not equals to 
something.

--

___
Python tracker 

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



[issue27608] Something wrong with str.upper().lower() chain?

2016-07-24 Thread Aleksandr Koshkin

Aleksandr Koshkin added the comment:

Note, that
>>> ord('µ')
181

there is another Mu like symbol chr(956), on which this code passes

--

___
Python tracker 

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



[issue27608] Something wrong with str.upper().lower() chain?

2016-07-24 Thread Aleksandr Koshkin

New submission from Aleksandr Koshkin:

For some reason 
>>> 'µ'.upper().lower() == 'µ'
False

--
components: Unicode
messages: 271174
nosy: ezio.melotti, haypo, magniff
priority: normal
severity: normal
status: open
title: Something wrong with str.upper().lower() chain?
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue25170] 3.4.4, 3.4.5, 3.5.0, 3.5.1, 3.5.2 documentation archives missing

2016-07-24 Thread Larry Hastings

Larry Hastings added the comment:

I can fix it.  Are instructions on how to update that in PEP 101 and I missed 
it?

(Do you know where it is in the Django maze of twisty little passages?)

--

___
Python tracker 

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



[issue22557] Local import is too slow

2016-07-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Seems not all such easy. Looking in sys.module is not enough, we should check 
__spec__._initializing.

Following patch moves optimizations to PyImport_ImportModuleLevelObject (C 
implementation of standard __import__). Main optimizations:

1. PyImport_ImportModuleLevelObject is called directly if builtins.__import__ 
is standard __import__.

2. Import lock is not acquired for looking up in sys.modules and other 
operations. Some of these operations are atomic in C (guarded by GIL), others 
are used only for optimization and race condition can cause only insignificant 
slow down.

3. Avoided creating empty dict for globals, looking up __package__ and __spec__ 
if they are not needed.

4. Saving standard __import__ in interpreter state.

Microbenchmarking results:

$ ./python -m timeit 'import os'
Unpatched:  100 loops, best of 3: 0.845 usec per loop
Patched:100 loops, best of 3: 0.338 usec per loop

$ ./python -m timeit 'import os.path'
Unpatched:  10 loops, best of 3: 2.07 usec per loop
Patched:100 loops, best of 3: 0.884 usec per loop

$ ./python -m timeit 'from os import path'
Unpatched:  10 loops, best of 3: 3.7 usec per loop
Patched:10 loops, best of 3: 2.77 usec per loop

--
Added file: http://bugs.python.org/file43869/faster_import_6.patch

___
Python tracker 

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



[issue25170] 3.4.4, 3.4.5, 3.5.0, 3.5.1, 3.5.2 documentation archives missing

2016-07-24 Thread Ned Deily

Ned Deily added the comment:

"Perhaps related is that the list at  
only goes up to 3.4.3."

That page is manually updated by the release managers.  Note that there are 
entries on the page for the most recent 2.7.x releases, 2.7.11 and 2.7.12, and 
the corresponding doc archives are available in /ftp/python/doc.  It looks like 
3.5.x is the odd duck here and should be updated.  Larry?

--
nosy: +ned.deily

___
Python tracker 

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



[issue26944] android: test_posix fails

2016-07-24 Thread Xavier de Gaye

Changes by Xavier de Gaye :


--
nosy: +haypo
stage: patch review -> commit review

___
Python tracker 

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



[issue27598] Add SizedIterable to collections.abc and typing

2016-07-24 Thread Raymond Hettinger

Raymond Hettinger added the comment:

In putting together a patch for this, I noticed that the __subclasshook__ 
classmethods don't compose well.   I'm unclear about the semantics about what 
these hooks are supposed to mean for subclasses and whether there is a bug in 
the existing code for Set, Sequence, and Mapping.  Each of those inherits from 
Sized, Iterable, and Container, but only the Sized.__subclasshook__ is visible 
to the subclass.  Also, the code for Sized.__subclasshook__ has an identity 
check for Sized which doesn't seem correct from the point-of-view of the 
subclasses.

--

___
Python tracker 

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



[issue26851] android compilation and link flags

2016-07-24 Thread Xavier de Gaye

Xavier de Gaye added the comment:

The previous patch was using awkwardly, a 'host_cpu' configure argument to 
specify the arm ABI and missed setting LDFLAGS for the armv7 ABI.
This patch instead uses the __ARM_ARCH macro defined by each compiler of the 
Android toolchains:

echo | ./clang -target armv7-none-linux-androideabi -dM -E - | grep ARM_ARCH
  #define __ARM_ARCH 7
  #define __ARM_ARCH_7A__ 1
echo | ./clang -target armv5te-none-linux-androideabi -dM -E - | grep 
ARM_ARCH
  #define __ARM_ARCH 5
  #define __ARM_ARCH_5TE__ 1
echo | ./arm-linux-androideabi-gcc -march=armv7-a -dM -E - | grep ARM_ARCH
  #define __ARM_ARCH 7
  #define __ARM_ARCH_7A__ 1
echo | ./arm-linux-androideabi-gcc -dM -E - | grep ARM_ARCH
  #define __ARM_ARCH_5TE__ 1
  #define __ARM_ARCH 5

Python built with clang for the armv5te target crashes as reported in issue 
27606.

--
assignee:  -> xdegaye
nosy: +doko, haypo, martin.panter
stage:  -> patch review
Added file: http://bugs.python.org/file43868/build-flags_2.patch

___
Python tracker 

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



[issue27607] Enums never match if imported from another file

2016-07-24 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> ethan.furman

___
Python tracker 

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



[issue27607] Enums never match if imported from another file

2016-07-24 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy: +ethan.furman

___
Python tracker 

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



[issue27604] More details about `-O` flag

2016-07-24 Thread Brett Cannon

Brett Cannon added the comment:

No, there are only the two optimizations, but I think historically the 
vagueness has been on purpose to allow us to add appropriate optimizations 
without breaking backwards-compatibility with what is documented.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-07-24 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Looking at the stable buildbots.

http://buildbot.python.org/all/waterfall?category=3.x.stable

AMD64 OpenIndiana 3.x - unrelated failures
AMD64 Snow Leop 3.x - crash in test_all / system_transitions
PPC64 Fedora 3.x - fail in test_all Africa/El_Aaiun system_transitions
x86 Ubuntu Shared 3.x - two failures: time_t overflow and Africa/El_Aaiun

--

___
Python tracker 

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



[issue27493] logging module fails with unclear error when supplied a (Posix)Path

2016-07-24 Thread Berker Peksag

Changes by Berker Peksag :


--
status: open -> closed

___
Python tracker 

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



[issue27605] Inconsistent calls to __eq__ from built-in __contains__

2016-07-24 Thread Raymond Hettinger

Raymond Hettinger added the comment:

+1 for "approximately equivalent".   The "conceptually equivalent" wording 
raises more questions in my mind than it answers.  

What we're really trying to say here is that for typically symmetric operations 
such as __eq__(), an implementation is free to use either a==b or b==a.  The 
choice usually doesn't matter, but can be revealed by a clever user.

Pretty all of the pure python equivalents in the docs are only approximate 
equivalents.  1) Tracebacks are different.  2) Timing of exceptions can be 
different (C functions tend to check arguments before the body of the function 
and pure python code tends to check when the argument is used).  3) 
Thread-safety may be different (C datatypes have to work hard to prevent 
segfaulting when a container mutates in the middle of a call, but in pure 
python code that tends to be too expensive and the consequences don't result in 
a segfault). 4) The internal algorithms may be different.

With respect to 4, we really do want to preserve implementation freedom.  
Otherwise, it would have been impossible to switch to the timsort algorithm or 
for set intersection to decide to iterate over the smaller input set.  Another 
reason that implementation freedom is important is that what is fast, clear, 
and convenient in one implementation is may by slow, obscure, and difficult in 
another.

Lastly, the primary purpose of the pure python approximate equivalents in the 
docs is to help people get a high level understanding of what is going on.  If 
we were to modify the pure python code to be an exact equivalent, it would 1) 
tend to over-specify the implementation resulting in unnecessary rigidity and 
2) it would tend to be more obscure, defeating our goal of making the docs more 
clear.

Perhaps, there should be a general FAQ entry to this effect.  The approximate 
pure python equivalents should be read loosely with the goal of understanding 
overall functionality and not be interpreted as exact drop in replacements (the 
PyPy folks can attest that exact drop-in replacements tend to be much more 
difficult than you might guess).

The FAQ should also mention that in order to make even simple examples of pure 
python code possible, there needs to be generous reading of the code the 
precludes the uncommon, exotic, or diabolical contortions that the language is 
capable of doing.  For example, after "b = a", there a values that cause all of 
these assertions to fail "assert a==b; assert b==a; assert a==b;".  For another 
example, after "s = {a, a}", there are values than can cause these to fail 
"assert a in s;  assert len(s) == 1".

--

___
Python tracker 

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



[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-07-24 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

> the time_t OverflowError

The issue here is that for a large date, dt.timestamp() returns a float large 
enough to cause overflow in fromtimestamp.

> Let me know if you want any more info.

Can you figure out what date causes this (0002-01-01 or 9998-12-12 or both)?  
What value is returned by dt.timestamp()?  Does pure python implementation 
behave the same as C? (SEt sys.modules['_datetime'] to None before importing 
datetime to get a pure python implementation.)

> In my case the message for the test_all() failure is “posix/Africa/Casablanca 
> system_transitions”.

Do you get this failure only on a 32-bit interpreter?  Please add

class CasablancaTest(ZoneInfoTest):
zonename = 'Africa/Casablanca'

to datetimetester.py and run python -mtest -v test_datetime.

--

___
Python tracker 

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



[issue27607] Enums never match if imported from another file

2016-07-24 Thread Sylvia van Os

New submission from Sylvia van Os:

If main imports another file, and this file imports an Enum class from main, 
isinstance will return false for Enum variables set in this file, causing the 
Enums to never match.

A proof of concept is added as a zip. I thank Kwpolska for simplifying my 
initial proof of concept.

To test this, unzip both files into the same directory and launch main.py with 
Python 3. I have succesfully been able to reproduce this issue on Python 3.4.3.

>From discussion on IRC with Vgr, PEP 499 may be related to this issue: 
>https://www.python.org/dev/peps/pep-0499/.

--
components: Interpreter Core
files: 
a040de8b978dcc4c272c0571d456a382-ea6d8fb8acc988a1f060c94070f70a6ed8439069.zip
messages: 271164
nosy: Kwpolska, SylvieLorxu
priority: normal
severity: normal
status: open
title: Enums never match if imported from another file
type: behavior
versions: Python 3.4
Added file: 
http://bugs.python.org/file43867/a040de8b978dcc4c272c0571d456a382-ea6d8fb8acc988a1f060c94070f70a6ed8439069.zip

___
Python tracker 

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



[issue27366] PEP487: Simpler customization of class creation

2016-07-24 Thread Guido van Rossum

Guido van Rossum added the comment:

That's a no from me.

On Sunday, July 24, 2016, Martin Teichmann  wrote:

>
> Martin Teichmann added the comment:
>
> Thanks for the nice review!
>
> I made the proposed changes, see attached patch.
>
> I am still waiting for a decision whether type.__setattr__ should call
> __set_name__ from python-dev, once that's sorted out I'll implement and
> test the one or the other behavior.
>
> --
> Added file: http://bugs.python.org/file43854/pep487.patch
>
> ___
> Python tracker >
> 
> ___
>

--

___
Python tracker 

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



[issue26823] Shrink recursive tracebacks

2016-07-24 Thread Emanuel Barry

Emanuel Barry added the comment:

Alright, I think this works now. No more magic number, just some regex as well 
as checking that the number is in range(sys.getrecursionlimit()-50, 
sys.getrecursionlimit()) :)

--
Added file: http://bugs.python.org/file43866/short_tracebacks_7.patch

___
Python tracker 

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



[issue8623] Aliasing warnings in socketmodule.c

2016-07-24 Thread Martin Panter

Martin Panter added the comment:

The Modules/_multiprocessing/multiprocessing.c code was removed in 3.3 (Issue 
12981). Therefore I am calling this fixed.

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

___
Python tracker 

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



[issue10036] compiler warnings for various modules on Linux buildslaves

2016-07-24 Thread Martin Panter

Martin Panter added the comment:

The three unused results in Modules/_posixsubprocess.c are probably fixed by 
revision dd18cccb55b0.

The Modules/socketmodule.c pointer aliasing was addressed in 3.3 by Issue 8623, 
and the Modules/_multiprocessing/multiprocessing.c type-punning has been 
eliminated in 3.3 by Issue 12981.

Also, I tend to agree about the libffi stuff. So I am closing this.

--
nosy: +martin.panter
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Aliasing warnings in socketmodule.c

___
Python tracker 

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



[issue26546] Provide translated french translation on docs.python.org

2016-07-24 Thread Julien

Julien added the comment:

I'm on the way of simplifying my [pull request for 
docsbuild-script](https://github.com/python/docsbuild-scripts/pull/1) with two 
goals in mind:

 - Simplify to make it more robust
 - Avoid executing external (~untrusted) Makefile on docs.python.org servers

To achieve this, I need to pass sphinx options to the `Doc/Makefile`, I'd like 
to call, typically:

make autobuild-stable SPHINXOPTS='-D language=fr -D locale_dirs=./locale/'

Which work if `Doc/Makefile` don't erase but append to the `SPHINXOPTS` 
variable. Which is done by `allow_sphinxopts.diff`.

We may simplify it further by adding `locale_dirs` to `Doc/conf.py` which does 
not break the english build, but I'm not sure if it's of any interest.

We may abstract it further by accepting a new parameter like SPHINXLANG='fr', 
with a default of 'en', but in every case I think it's a good thing to allow 
passing arbitrary SPHINXOPTS so let's start with this?

--
Added file: http://bugs.python.org/file43865/allow_sphinxopts.diff

___
Python tracker 

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



[issue27605] Inconsistent calls to __eq__ from built-in __contains__

2016-07-24 Thread R. David Murray

R. David Murray added the comment:

I did look at the code.  Indeed list and tuple compare x to e, while dict, set, 
and frozenset (well, I didn't check each one, just list and set) compare the e 
to x, where e is they key stored at hash(x).

Steve has a good point about the iteration.  And a user class can do anything 
it wants in contains.  I wonder if it would be even more accurate to say 
"conceptually equal" rather than "approximately equal", given that hash table 
'in' doesn't do iteration at all.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue8623] Aliasing warnings in socketmodule.c

2016-07-24 Thread Martin Panter

Martin Panter added the comment:

I think the time for backporting to 3.2 has passed. Is there anything else to 
do for this report?

--
nosy: +martin.panter
versions:  -Python 3.2

___
Python tracker 

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



[issue26823] Shrink recursive tracebacks

2016-07-24 Thread Nick Coghlan

Nick Coghlan added the comment:

Since you're ultimately comparing a list of lines, it may be useful to split 
the checks into two parts:

1. Check the deterministic lines
2. Check the variable line (which should always be at index -2 in the 
splitlines() result)

For the recursion error, we're not too worried about the *exact* repetition 
count, we're mostly interested in checking that it abbreviated the traceback. 
Once you've pulled that line out of the main "Are they the same?" comparison, 
you can use a regex (or just string operations) to extract the repetition 
count, convert it to an integer and check that it gives the right answer to 
within (say) +/- 50 repetitions.

--

___
Python tracker 

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



[issue27605] Inconsistent calls to __eq__ from built-in __contains__

2016-07-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +rhettinger

___
Python tracker 

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



[issue27495] Pretty printing sorting for set and frozenset instances

2016-07-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Following patch adds support of all standard collections in pprint.saferepr().

--
Added file: http://bugs.python.org/file43864/saferepr_collections.patch

___
Python tracker 

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



[issue27605] Inconsistent calls to __eq__ from built-in __contains__

2016-07-24 Thread Steven D'Aprano

Steven D'Aprano added the comment:

I'm reluctant to call this a behaviour bug, because I'm reluctant to guarantee 
the *precise* behaviour when the classes are different.

I haven't checked the source of dict.__contains__, but by experimentation it 
seems that:

needle in {key: value}

calls key == needle, rather than needle == key as the docs would imply. This 
seems to apply going all the way back to at least CPython2.4.

On the other hand, Jython2.5 and IronPython2.6 seem to call needle == key as 
Vasily expected.

But the docs are clearly incomplete, as they suggest a linear search through 
all the keys of the dict (or set), which is wrong. Only if needle hashes to the 
same value as key will == be called.

I suggest updating the docs to make it clear that the sample code shown is only 
the *approximate* behaviour, which may call == in either direction.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue23545] Turn on extra warnings on GCC

2016-07-24 Thread Martin Panter

Martin Panter added the comment:

-Wall is already added (unconditionally) to $OPT above. What’s the point of 
also adding it to $CFLAGS_NODIST as well? Does it have to be added to both?

--
nosy: +martin.panter

___
Python tracker 

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



[issue26823] Shrink recursive tracebacks

2016-07-24 Thread Emanuel Barry

Emanuel Barry added the comment:

Thank you Nick for the comments! Updated patch attached.

The new patch uses inspect.stack() to calculate the total stack size, but I'm 
unable to get the exact number needed, and I found that I'm either 19 or 20 
above (depending on whether I run it with -m or manually). The test now "just 
works" with it, but I'm quite sure it's going to break at some point. Any idea?

The other alternative would be to use traceback.walk_tb(exc.__traceback__), but 
the Python implementation uses that, so it'd be comparing itself; and that's 
about as useful as not caring about the size at all. (On the other hand, the C 
and Python implementations get the exact same number, so it can confirm it's 
fine)

--
stage: commit review -> patch review
Added file: http://bugs.python.org/file43863/short_tracebacks_6.patch

___
Python tracker 

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



[issue26915] Test identity first in membership operation of ItemsView, ValuesView and Sequence in collections.abc

2016-07-24 Thread Xiang Zhang

Xiang Zhang added the comment:

Ping again.

--

___
Python tracker 

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



[issue1621] Do not assume signed integer overflow behavior

2016-07-24 Thread Xiang Zhang

Xiang Zhang added the comment:

It turns out you just want to see the output. That is easy. Patch v3 adding the 
test.

--
Added file: http://bugs.python.org/file43862/tuple_and_list_v3.patch

___
Python tracker 

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



[issue27606] Android cross-built for armv5te with clang and '-mthumb' crashes with SIGSEGV or SIGILL

2016-07-24 Thread Xavier de Gaye

Xavier de Gaye added the comment:

The reference to '-mthumb' in the ndk documentation: 
https://developer.android.com/ndk/guides/standalone_toolchain.html#abi.

--

___
Python tracker 

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



[issue26865] Meta-issue: support of the android platform

2016-07-24 Thread Xavier de Gaye

Xavier de Gaye added the comment:

issue #27606: Android cross-built for armv5te with clang and '-mthumb' crashes 
with SIGSEGV or SIGILL

--
dependencies: +Android cross-built for armv5te with clang and '-mthumb' crashes 
with SIGSEGV or SIGILL

___
Python tracker 

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



[issue24773] Implement PEP 495 (Local Time Disambiguation)

2016-07-24 Thread Martin Panter

Martin Panter added the comment:

FWIW I can produce two of these failures locally: the time_t OverflowError, and 
the test_all() system_transitions one. Let me know if you want any more info. 
In my case the message for the test_all() failure is “posix/Africa/Casablanca 
system_transitions”. I am on 64-bit Arch Linux, but Python is currently 
compiled for the 32-bit ABI.

$ pacman -Qo /usr/share/zoneinfo/posix/Africa/Casablanca
/usr/share/zoneinfo/posix/Africa/Casablanca is owned by tzdata 2013h-1

--

___
Python tracker 

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



[issue27606] Android cross-built for armv5te with clang and '-mthumb' crashes with SIGSEGV or SIGILL

2016-07-24 Thread Xavier de Gaye

Changes by Xavier de Gaye :


Added file: http://bugs.python.org/file43859/logcat.txt

___
Python tracker 

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



  1   2   >