[issue30870] IDLE: configdialog/fonts: change font when select by key up/down

2017-07-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset 5b62b35e6fcba488da2f809965a5f349a4170b02 by terryjreedy in branch 
'master':
bpo-30870: IDLE -- fix logic error in eae2537. (#2660)
https://github.com/python/cpython/commit/5b62b35e6fcba488da2f809965a5f349a4170b02


--

___
Python tracker 

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



[issue30870] IDLE: configdialog/fonts: change font when select by key up/down

2017-07-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I believe I read somewhere (SO?) that root.withdraw sometimes affects the 
effectiveness of event_generate.  I will try de-iconifying for just this.

--

___
Python tracker 

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



[issue30870] IDLE: configdialog/fonts: change font when select by key up/down

2017-07-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

My manual test procedure was faulty.  Without a unit test, I should have asked 
for another person to verify.

--

___
Python tracker 

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



[issue30870] IDLE: configdialog/fonts: change font when select by key up/down

2017-07-10 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
pull_requests: +2725

___
Python tracker 

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



[issue30870] IDLE: configdialog/fonts: change font when select by key up/down

2017-07-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I don't know how to make the testing code working.

--

___
Python tracker 

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



[issue30881] IDLE: add docstrings to browser.py

2017-07-10 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
stage:  -> patch review

___
Python tracker 

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



[issue30714] test_ssl fails with openssl 1.1.0f

2017-07-10 Thread Gregory P. Smith

Gregory P. Smith added the comment:

I updated to PGO buildbot from Debian 8 "jessie" to Debian 9 "stretch" which 
revealed the failures.

--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2017-07-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue30879] os.listdir(bytes) gives a list of bytes, but os.listdir(buffer) gives a list of unicodes

2017-07-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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

___
Python tracker 

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



[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2017-07-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 44eb51e6fcf45f3c2bf21c16e18c4da48a23d2d3 by Serhiy Storchaka in 
branch '3.5':
[3.5] bpo-22207: Add checks for possible integer overflows in unicodeobject.c. 
(GH-2623) (#2659)
https://github.com/python/cpython/commit/44eb51e6fcf45f3c2bf21c16e18c4da48a23d2d3


--

___
Python tracker 

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



[issue30879] os.listdir(bytes) gives a list of bytes, but os.listdir(buffer) gives a list of unicodes

2017-07-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 7527c32f5fedc3260d767900f1014495c0a1b7a5 by Serhiy Storchaka in 
branch '3.5':
[3.5] bpo-30879: os.listdir() and os.scandir() now emit bytes names when 
(GH-2634) (#2657)
https://github.com/python/cpython/commit/7527c32f5fedc3260d767900f1014495c0a1b7a5


--

___
Python tracker 

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



[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2017-07-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 82a907560011c7b784badccc78082cef70ea7128 by Serhiy Storchaka in 
branch '3.6':
[3.6] bpo-22207: Add checks for possible integer overflows in unicodeobject.c. 
(GH-2623) (#2658)
https://github.com/python/cpython/commit/82a907560011c7b784badccc78082cef70ea7128


--

___
Python tracker 

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



[issue30879] os.listdir(bytes) gives a list of bytes, but os.listdir(buffer) gives a list of unicodes

2017-07-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset ecfe4f678bfb0e3c19c90fd7db79c5f3c76023e4 by Serhiy Storchaka in 
branch '3.6':
[3.6] bpo-30879: os.listdir() and os.scandir() now emit bytes names when 
(GH-2634) (#2656)
https://github.com/python/cpython/commit/ecfe4f678bfb0e3c19c90fd7db79c5f3c76023e4


--

___
Python tracker 

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



[issue27364] Deprecate invalid escape sequences in str/bytes

2017-07-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yes, this was the intention. One of often errors is using "\n" in non-raw 
docstrings. This change doesn't prevent this error, but increases chances of 
catching it when there are other backslashes in the docstring.

--

___
Python tracker 

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



[issue27364] Deprecate invalid escape sequences in str/bytes

2017-07-10 Thread Guido van Rossum

Guido van Rossum added the comment:

Yes.

--

___
Python tracker 

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



[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2017-07-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +2724

___
Python tracker 

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



[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2017-07-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +2723

___
Python tracker 

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



[issue22207] Test for integer overflow on Py_ssize_t: explicitly cast to size_t

2017-07-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 64e461be09e23705ecbab43a8b01722186641f71 by Serhiy Storchaka in 
branch 'master':
bpo-22207: Add checks for possible integer overflows in unicodeobject.c. (#2623)
https://github.com/python/cpython/commit/64e461be09e23705ecbab43a8b01722186641f71


--

___
Python tracker 

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



[issue30879] os.listdir(bytes) gives a list of bytes, but os.listdir(buffer) gives a list of unicodes

2017-07-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +2722

___
Python tracker 

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



[issue30879] os.listdir(bytes) gives a list of bytes, but os.listdir(buffer) gives a list of unicodes

2017-07-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +2721

___
Python tracker 

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



[issue27364] Deprecate invalid escape sequences in str/bytes

2017-07-10 Thread Jason R. Coombs

Jason R. Coombs added the comment:

One consequence of this change is that now any string that has a backslash 
needs to be escaped or raw, leading to changes like this on 
(https://github.com/cherrypy/cherrypy/pull/1610/commits/1d8c03ea8c5fe90f29bbea267300b97c78391c24#diff-be33a4f55d59dfc70fc6452482f3a7a4)
 where the diagram in the docstring is the culprit. An escaped backslash is not 
viable in this case, so a raw string is required.

This particular example strikes me as counter-intuitive, though maybe I just 
need to adjust my intuition.

Was the intention for a docstring like above to use raw strings?

--
nosy: +jason.coombs

___
Python tracker 

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



[issue30879] os.listdir(bytes) gives a list of bytes, but os.listdir(buffer) gives a list of unicodes

2017-07-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 1180e5a51871fa53ca6892e83fd2e69dc2600447 by Serhiy Storchaka in 
branch 'master':
bpo-30879: os.listdir() and os.scandir() now emit bytes names when (#2634)
https://github.com/python/cpython/commit/1180e5a51871fa53ca6892e83fd2e69dc2600447


--

___
Python tracker 

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



[issue30897] Add a is_mount() to pathlib

2017-07-10 Thread Cooper Lees

Cooper Lees added the comment:

Mocked up a concept PR. Will try teach myself how to test + see if I need to 
add Windows support etc.
https://github.com/cooperlees/cpython/commit/master

--

___
Python tracker 

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



[issue30890] IDLE: Input method error in comment with Korean language

2017-07-10 Thread DelTos

DelTos added the comment:

Or it may be a problem that only happens on my PC.

--

___
Python tracker 

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



[issue30890] IDLE: Input method error in comment with Korean language

2017-07-10 Thread DelTos

DelTos added the comment:

It doesn't occur when I'm typing comments with numbers or English. It only 
occurs in Korean comments.
Plus, I changed the font and another problem has occured. The letters are 
printed in vertically.(Attached file) It seems there is a problem only in the 
Korean language.
I gave up typing comments with Korean and changed it into English.

--
Added file: http://bugs.python.org/file47004/comparison.png

___
Python tracker 

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



[issue30890] IDLE: Input method error in comment with Korean language

2017-07-10 Thread Louie Lu

Changes by Louie Lu :


--
title: Comment error in Korean language -> IDLE: Input method error in comment 
with Korean language

___
Python tracker 

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



[issue30890] Comment error in Korean language

2017-07-10 Thread Louie Lu

Louie Lu added the comment:

I'm using Arch Linux with HIME input method, and using 3.7a0 Python. But I 
can't reproduce your problem in Korean input.

Could you provide how to type in the sentence in your picture? (Roman or the 
stroke maybe) and your environment?

thanks.

--
nosy: +louielu

___
Python tracker 

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



[issue30890] Comment error in Korean language

2017-07-10 Thread Louie Lu

Changes by Louie Lu :


--
type: crash -> behavior

___
Python tracker 

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



[issue30897] Add a is_mount() to pathlib

2017-07-10 Thread Cooper Lees

Changes by Cooper Lees :


--
title: Add a ismount() to pathlib -> Add a is_mount() to pathlib

___
Python tracker 

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



[issue30890] Comment error in Korean language

2017-07-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

File loads normally for me. What happens when you load it as is?

If you need to type something, can you produce effect with entering numbers 
with keypad, without using any special Korean entry method that I would not 
have?  If so, give exact directions and since we both have win10, I will try.

--

___
Python tracker 

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



[issue30890] Comment error in Korean language

2017-07-10 Thread DelTos

DelTos added the comment:

I attched simple main.py file.
TK version is 8.6.6 and OS is Windows 10.

--
Added file: http://bugs.python.org/file47003/main.py

___
Python tracker 

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



[issue30897] Add a ismount() to pathlib

2017-07-10 Thread Cooper Lees

New submission from Cooper Lees:

It would be nice to have pathlib.Path objects to have a ismount() function to 
return a bool if it is a POSIX mount point, similar to `os.path.ismount(path)`

--
components: Library (Lib)
messages: 298104
nosy: cooperlees
priority: normal
severity: normal
status: open
title: Add a ismount() to pathlib
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



[issue30890] Comment error in Korean language

2017-07-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I can seen that the last char is not colored correctly, but not that it is 
small.  The white pixels seems to comprise a character that is about as big as 
the others.  But I don't know Hangul chars.

What version of Tk (see Help => About IDLE), and what OS?

Please upload your main.py so I can load it into my IDLE on Win10.

--

___
Python tracker 

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



[issue30890] Comment error in Korean language

2017-07-10 Thread DelTos

DelTos added the comment:

It was my mistake. I tested it on IDLE 3.6.

--

___
Python tracker 

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



[issue30890] Comment error in Korean language

2017-07-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Did you actually test on 3.7?  If you did, and got different results, then this 
is not an IDLE issue, as it is unchanged in 3.7.

This might be a tcl/tk issue rather than IDLE issue.

--

___
Python tracker 

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



[issue28879] smtplib send_message should add Date header if it is missing, per RFC5322

2017-07-10 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +2720

___
Python tracker 

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



[issue30896] BytesWarning in re module when compiling certain bytes patterns

2017-07-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your report Jelle, but this was fixed in issue30605.

--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue30803] Truth value of sets not properly documented

2017-07-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Responding here to Peter's PR comment.  Peter opened this issue with the claim 
that the doc failed a specific test case-- document the truth value of set().  
Since mappings are (or can be viewed as) a specialized type of set, I always 
considered that the empty mapping line implicitly covered sets.  But I 
acknowledge that this is not clear for everyone.  The simplest fix to make the 
test pass would be: "any unordered collection, for example, set(), {}".  This 
should also cover frozenset and a possible frozendict.

Raymond noted that 'user-defined' in the last bullet point is wrong (it implies 
that built-in functions are different) and should be deleted.  He then combined 
the corrected rule for false with the default rule in the next sentence to 
produce a succinct statement of the actual rule.  (In CPython, 'default' is 
literally true. Class 'object' has neither __bool__ nor __len__; ditto for all 
subclasses that do not add one.)

With a minor change, I like this statement and agree that it should be moved 
above the examples.  But I think the bullet points should be reduced to just 3, 
rewritten, and single spaced, but not smashed into running text.  I suggest 
replacing everything between the first sentence (ending with 'below.') and the 
last two (beginning with 'Operations') with:

"By default, an object is considered true unless its class defines either a 
__bool__ method that returns False or __len__ method that returns zero, when 
called with the object.  Here are most of the built-in objects considered false.

* constants defined to be false: None and False.
* numeric 0 of any type: 0, 0.0, Decimal(0), Fractions(0, 1)
* empty sequences and collections: '', (), [], {}, set(), range(0)
"

Before writing the above, I checked that an instance attribute __bool__ = 
lambda: False is not consulted by bool().

--

___
Python tracker 

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



[issue30893] Expose importlib._bootstrap._ModuleLockManager in importlib.machinery

2017-07-10 Thread Nick Coghlan

Nick Coghlan added the comment:

Based on https://github.com/python/cpython/pull/2646/files#r126574323, I'm 
actually thinking along different lines: I'm starting to think we should move 
the current sys.modules to sys._modules, and make sys.modules a synchronised 
wrapper that does the following for all get/set/delete operations:

  # Acquires the global import lock
  # Acquires the relevant module lock
  # Releases the global import lock
  # Mutates sys._modules
  # Releases the module lock

That said, I'm not sure that would be sufficient to give the desired level of 
atomicity, so exposing ModuleLockManager may actually be a better approach.

--

___
Python tracker 

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



[issue30895] Decimal arithmetic sum error

2017-07-10 Thread Steven D'Aprano

Steven D'Aprano added the comment:

Also, for the future, please do not post screen shots of text. Copy and Paste 
the text from the console. Thank you.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue30894] Python 3.6.1 String Literal Error Not Going to sys.stderr

2017-07-10 Thread Steven D'Aprano

Steven D'Aprano added the comment:

Before Python runs your code, it compiles it to byte-code. A SyntaxError means 
that the code cannot be compiled, and so it does not run.

So the SyntaxError is raised *before* any of the code runs, and standard error 
is not re-directed. This is expected behaviour, not a bug. You cannot catch 
compile-time errors at run-time.

--
nosy: +steven.daprano
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



[issue30781] IDLE: configdialog -- switch to ttk widgets.

2017-07-10 Thread Cheryl Sabella

Changes by Cheryl Sabella :


--
pull_requests: +2719

___
Python tracker 

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



[issue12910] urrlib.quote quotes too many chars, e.g., '()'

2017-07-10 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
stage:  -> patch review
versions:  -Python 2.7, Python 3.3, 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



[issue30896] BytesWarning in re module when compiling certain bytes patterns

2017-07-10 Thread Jelle Zijlstra

New submission from Jelle Zijlstra:

This code in sre_parse (line 738 and down):

warnings.warn(
'Flags not at the start of the expression %s%s' 
% (
source.string[:20],  # truncate long regexes
' (truncated)' if len(source.string) > 20 
else '',
),
DeprecationWarning, stacklevel=7
)


triggers a BytesWarning if you do `_line_re = re.compile(br'^(.*?)$(?m)')`.

The fix should be simple; I can try to get a PR in over the next few days.

--
components: Library (Lib)
messages: 298095
nosy: Jelle Zijlstra, ezio.melotti, serhiy.storchaka
priority: normal
severity: normal
status: open
title: BytesWarning in re module when compiling certain bytes patterns
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



[issue30895] Decimal arithmetic sum error

2017-07-10 Thread Zachary Ware

Zachary Ware added the comment:

https://docs.python.org/3/tutorial/floatingpoint.html

--
nosy: +zach.ware
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



[issue30895] Decimal arithmetic sum error

2017-07-10 Thread Yelson Chevarrias Huaman

Changes by Yelson Chevarrias Huaman :


--
versions: +Python 3.3, Python 3.4, 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



[issue30895] Decimal arithmetic sum error

2017-07-10 Thread Yelson Chevarrias Huaman

Changes by Yelson Chevarrias Huaman :


--
type: performance -> behavior

___
Python tracker 

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



[issue30895] Decimal arithmetic sum error

2017-07-10 Thread Yelson Chevarrias Huaman

New submission from Yelson Chevarrias Huaman:

Decimal arithmetic sum error

--
components: Interpreter Core
files: csm.png
messages: 298093
nosy: Yelson Chevarrias Huaman
priority: normal
severity: normal
status: open
title: Decimal arithmetic sum error
type: performance
versions: Python 2.7, Python 3.5
Added file: http://bugs.python.org/file47002/csm.png

___
Python tracker 

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



[issue30883] test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address

2017-07-10 Thread Berker Peksag

Changes by Berker Peksag :


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



[issue24776] IDLE: Improve config dialog font change user interface

2017-07-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Make this the master issue for improving the font tab user interface by 
improving components and rearranging them.  With basic tests done, I am moving 
this up in priority.

Related issues currently open.
#30870 (dependency) made Up/Down change font selection; unit test needed.
#27755 replaces IDLE's custom DynOptionMenu with ttk.Combobox.  Comboboxes 
allow key entry of a value and the arrow toggles. See msg298091 for comparison 
and evaluation for font page.
#13802 (dependency) is about the improving the sample display.
#17642 is about font resizing by hot key and wheel in editor.
#20917 is about the font change notification system.

Additional changes for this issue or new related issues.

* Selecting a font by name (as well as a font size by number) can be done with 
an entry box with a validator linked to the listbox.  If a ttk Combobox can be 
locked open, I would try that.  See #27755.  For a demo of another alternative, 
run the tk fontchooser.

import tkinter
root = tkinter.Tk()
root.tk.call('tk', 'fontchooser', 'show')

For IDLE, I like some parts, not others.  I view it as an alternate mockup for 
ideas to build on.

* Mark's mockup removes "Base Editor Font".  If an editor window can have its 
font individually resized, then the settings on the font page define just that. 
 'Font Size' would then have to be 'Starting [or Default] Font Size'. 

* Font size a slider?  I am not convinced.  It would have to be vertical to go 
up to 40.  (I added larger sizes by request for classroom projector use.)  On 
the other hand, it would allow any size in the given range.  A spinbox that 
could be spun by mousewheel would also and stay compact.  Or use a ttk Combobox.

* See #13802 for discussion of sample display.

* Indent.  I don't understand "cries out to be moved (usually when people are 
intending to increase their font size)."  But I think it take too much space 
and should be shrunk to a spin box or drop box.  Reduced to a single line, I am 
thinking of moving it to the General tab, or perhaps a new Editor tab.  It does 
not particularly belong with font selection.

* Factor the Font page, with associated Variables and their tracers, other 
attributes, and methods, into a FontPage class.

--
dependencies: +IDLE Prefernces/Fonts: use multiple alphabets in examples, IDLE: 
configdialog/fonts: change font when select by key up/down, Retire 
DynOptionMenu with a ttk Combobox
priority: low -> normal
title: Improve Fonts/Tabs UX for IDLE -> IDLE: Improve config dialog font 
change user interface
versions: +Python 3.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



[issue27755] Retire DynOptionMenu with a ttk Combobox

2017-07-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I did more experiments with DOM (DynamicOptionMenu) and Combobox (CB).  This 
was partly to evaluate CB as replacement for DOM for font size; partly to 
consider CB for the font list.   At least by default, both start closed.  Font 
list should start open. CB has an Entry area, DOM does not.  They get focus by 
clicking.  Both open with Down or click on Down button.  DOM also opens on Up, 
not essential. CB adds scrollbar if needed.  DOM?  Needed for font list.  Up 
and Down move the selection highlight but do not select.  Selection by click 
and  close the box and generate <>  This is unlike 
Listbox where moving highlight generates <>.  #30870 fixed code 
so that Up and Down, in addition to click, caused sample change.  I want to 
keep this for font choice and add it for size choice.  For CB, click on Down 
button closes without changing selection.  For DOM, it does not, a deficiency.

--

___
Python tracker 

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



[issue30714] test_ssl fails with openssl 1.1.0f

2017-07-10 Thread STINNER Victor

STINNER Victor added the comment:

The test now fails on AMD64 Debian PGO 3.x:

http://buildbot.python.org/all/builders/AMD64%20Debian%20PGO%203.x/builds/985/steps/test/logs/stdio

FAIL: test_alpn_protocols (test.test_ssl.ThreadedTests)

--

___
Python tracker 

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



[issue30886] multiprocessing.Queue.join_thread() does nothing if created and use in the same process

2017-07-10 Thread STINNER Victor

STINNER Victor added the comment:

I'm not sure that the bug is fully fixed, I still saw a warning on:
http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/561/

This build tested the commit aa8d0a24694bea05061f1920ec3f944a9e6799d5 which is 
more recent than commit 3b69d911c57ef591ac0c0f47a66dbcad8337f33a.

test_handle_called_with_mp_queue (test.test_logging.QueueListenerTest) ...

Warning -- threading_cleanup() failed to cleanup -1 threads after 5 sec (count: 
0, dangling: 1)

ok

--

___
Python tracker 

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



[issue30891] importlib: _find_and_load() race condition on sys.modules[name] check

2017-07-10 Thread STINNER Victor

STINNER Victor added the comment:

Backporting the fix ot Python 3.5 doesn't seem trivial, 3.5 lacks many changes.

--

___
Python tracker 

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



[issue30891] importlib: _find_and_load() race condition on sys.modules[name] check

2017-07-10 Thread STINNER Victor

STINNER Victor added the comment:


New changeset fe6e686c27ce3a3ecdf03803cff7e230dee5530d by Victor Stinner in 
branch '3.6':
bpo-30891: Fix importlib _find_and_load() race condition (#2646) (#2651)
https://github.com/python/cpython/commit/fe6e686c27ce3a3ecdf03803cff7e230dee5530d


--

___
Python tracker 

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



[issue27099] IDLE: turn builting extensions into regular modules

2017-07-10 Thread Charles Wohlganger

Changes by Charles Wohlganger :


--
pull_requests: +2718

___
Python tracker 

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



[issue30892] _elementtree: assertion error if stdlib copy module is overriden

2017-07-10 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 7f567e7472dd6c3d066eec1c204301df251484b5 by Victor Stinner in 
branch '3.5':
bpo-30892: Fix _elementtree module initialization (#2647) (#2650)
https://github.com/python/cpython/commit/7f567e7472dd6c3d066eec1c204301df251484b5


--

___
Python tracker 

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



[issue30892] _elementtree: assertion error if stdlib copy module is overriden

2017-07-10 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 044e156426825acac8b6c6d1ce14d5b7bcb20bc9 by Victor Stinner in 
branch '3.6':
bpo-30892: Fix _elementtree module initialization (#2647) (#2649)
https://github.com/python/cpython/commit/044e156426825acac8b6c6d1ce14d5b7bcb20bc9


--

___
Python tracker 

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



[issue29854] Segfault when readline history is more then 2 * history size

2017-07-10 Thread Berker Peksag

Berker Peksag added the comment:

Ok, I think we can finally close this one :) Thank you, everyone!

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



[issue30894] Python 3.6.1 String Literal Error Not Going to sys.stderr

2017-07-10 Thread George Gillan

New submission from George Gillan:

Python 3.6.1 String Literal Error Not Going to sys.stderr

Using Windows 7 and Python 3.6.1. Attempting to redirect sys.stderr to a file. 
The application will be deployed via .pyw file instead of .py so the GUI 
application runs without a console window.

Is this fixable or 'as-is' due to the nature of the way the interpreter scans 
the code?

The following code worked as intended.

#!/usr/bin/env python3.6 
errfile = 'test_err.txt'

import sys
errorlog = open(errfile, 'w')
sys.stderr = errorlog

1/0

The code above produced a file called test_err.txt with the following contents:

Traceback (most recent call last):
  File "C:\Users\George\Coding\Python\test\mintest.py", line 8, in 
1/0
ZeroDivisionError: division by zero


The following code did not work as intended.

#!/usr/bin/env python3.6 
errfile = 'test_err.txt'

import sys
errorlog = open(errfile, 'w')
sys.stderr = errorlog

print("test)

The code above did not create the file test_err.txt with the error going to the 
console window instead.


Copy-paste from the Windows console.

The successful test (first) showed nothing in the console window; the error was 
logged to the file as noted above. The unsuccessful test (second) did not 
create the file, instead the error was sent to the console.

C:\Users\George\Coding\Python\test>mintest

C:\Users\George\Coding\Python\test>mintest
  File "C:\Users\George\Coding\Python\test\mintest.py", line 8
print("test)
   ^
SyntaxError: EOL while scanning string literal

C:\Users\George\Coding\Python\test>

PS: This is my first bug/issue submission here. Please coach me as needed if I 
messed it up.

--
components: Interpreter Core
files: Python361_bug.txt
messages: 298083
nosy: George Gillan
priority: normal
severity: normal
status: open
title: Python 3.6.1 String Literal Error Not Going to sys.stderr
type: behavior
versions: Python 3.6
Added file: http://bugs.python.org/file47001/Python361_bug.txt

___
Python tracker 

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



[issue29854] Segfault when readline history is more then 2 * history size

2017-07-10 Thread Berker Peksag

Berker Peksag added the comment:


New changeset bfa4fe4f39dd8b5ce1a0b649cedd36857859081a by Berker Peksag (Nir 
Soffer) in branch '2.7':
[2.7] bpo-29854: Fix segfault in call_readline() (GH-728)
https://github.com/python/cpython/commit/bfa4fe4f39dd8b5ce1a0b649cedd36857859081a


--

___
Python tracker 

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



[issue30891] importlib: _find_and_load() race condition on sys.modules[name] check

2017-07-10 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2717

___
Python tracker 

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



[issue30891] importlib: _find_and_load() race condition on sys.modules[name] check

2017-07-10 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 4f9a446f3fb42f800e73cd9414dd1eccb3ca4fa7 by Victor Stinner in 
branch 'master':
bpo-30891: Fix importlib _find_and_load() race condition (#2646)
https://github.com/python/cpython/commit/4f9a446f3fb42f800e73cd9414dd1eccb3ca4fa7


--

___
Python tracker 

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



[issue30892] _elementtree: assertion error if stdlib copy module is overriden

2017-07-10 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2716

___
Python tracker 

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



[issue30892] _elementtree: assertion error if stdlib copy module is overriden

2017-07-10 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2715

___
Python tracker 

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



[issue30892] _elementtree: assertion error if stdlib copy module is overriden

2017-07-10 Thread STINNER Victor

STINNER Victor added the comment:


New changeset b136f11f3a51f9282ae992bac68f170ca5563b55 by Victor Stinner in 
branch 'master':
bpo-30892: Fix _elementtree module initialization (#2647)
https://github.com/python/cpython/commit/b136f11f3a51f9282ae992bac68f170ca5563b55


--

___
Python tracker 

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



[issue20917] Idle: Enhance font change notification system

2017-07-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I believe I saw somewhere that the 'somehow' in the opening post is looping 
through the windows listed under the Window tab.

This issue was inspired by #17642, which allows hotkeys (^-, ^+) and wheel to 
change font size in editor window.  If the size change only applies to the 
current window, then only the CodeContext for that window should be notified.  
If CodeContext becomes a feature rather than extension, #27099, then code 
editor windows could know they have a code context and notify it when they get 
notified.  That will not help external extensions.

--

___
Python tracker 

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



[issue30851] IDLE: configdialog -- fix tkinter Variables

2017-07-10 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
dependencies:  -IDLE: configdialog - add tests for ConfigDialog GUI.
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



[issue30893] Expose importlib._bootstrap._ModuleLockManager in importlib.machinery

2017-07-10 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy: +eric.snow, ncoghlan

___
Python tracker 

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



[issue30851] IDLE: configdialog -- fix tkinter Variables

2017-07-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset 8e3f73e5499a5bc575a5e7ad4ee0f16b1aaae829 by terryjreedy in branch 
'3.6':
[3.6] bpo-30851: IDLE: Remove unused tk variables in configdialog. (GH-2626) 
(#2648)
https://github.com/python/cpython/commit/8e3f73e5499a5bc575a5e7ad4ee0f16b1aaae829


--

___
Python tracker 

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



[issue30893] Expose importlib._bootstrap._ModuleLockManager in importlib.machinery

2017-07-10 Thread Brett Cannon

Changes by Brett Cannon :


--
dependencies: +importlib: _find_and_load() race condition on sys.modules[name] 
check

___
Python tracker 

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



[issue30893] Expose importlib._bootstrap._ModuleLockManager in importlib.machinery

2017-07-10 Thread Brett Cannon

New submission from Brett Cannon:

Based on all the work currently going into fixing the locking situation for 
imports, it's probably a good idea to expose it publicly so others can use it.

--
components: Library (Lib)
messages: 298077
nosy: brett.cannon
priority: normal
severity: normal
status: open
title: Expose importlib._bootstrap._ModuleLockManager in importlib.machinery
type: enhancement

___
Python tracker 

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



[issue30870] IDLE: configdialog/fonts: change font when select by key up/down

2017-07-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It isn't my. It was added by Guilherme in r69050.

I'll take a look at code tomorrow.

--

___
Python tracker 

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



[issue30780] IDLE: configdialog - add tests for ConfigDialog GUI.

2017-07-10 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
dependencies: +IDLE: configdialog/fonts: change font when select by key up/down

___
Python tracker 

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



[issue30870] IDLE: configdialog/fonts: change font when select by key up/down

2017-07-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Serhiy, I tried tkinter.test.support.simulate_mouse_click to test this patch 
but it seems not to work.  Code at end of previous message. Any idea on how to 
fix?

--
nosy: +serhiy.storchaka
stage: patch review -> test needed

___
Python tracker 

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



[issue30851] IDLE: configdialog -- fix tkinter Variables

2017-07-10 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
pull_requests: +2714

___
Python tracker 

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



[issue30851] IDLE: configdialog -- fix tkinter Variables

2017-07-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset aa8d0a24694bea05061f1920ec3f944a9e6799d5 by terryjreedy 
(csabella) in branch 'master':
bpo-30851: IDLE: Remove unused tk variables in configdialog. (#2626)
https://github.com/python/cpython/commit/aa8d0a24694bea05061f1920ec3f944a9e6799d5


--

___
Python tracker 

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



[issue30892] _elementtree: assertion error if stdlib copy module is overriden

2017-07-10 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2713

___
Python tracker 

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



[issue30892] _elementtree: assertion error if stdlib copy module is overriden

2017-07-10 Thread STINNER Victor

New submission from STINNER Victor:

The _elementtree fails with an assertion error if the stdlib copy module is 
overriden by the user.

haypo@selma$ mkdir copy/
haypo@selma$ touch copy/__init__.py
haypo@selma$ ./python -c 'import _elementtree'
python: Objects/abstract.c:153: PyObject_GetItem: Assertion `(item != NULL) ^ 
(PyErr_Occurred() != NULL)' failed.
Aborted (core dumped)

--
messages: 298073
nosy: haypo
priority: normal
severity: normal
status: open
title: _elementtree: assertion error if stdlib copy module is overriden
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



[issue30183] [HPUX] compilation error in pytime.c with cc compiler

2017-07-10 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
stage:  -> patch review

___
Python tracker 

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



[issue30891] importlib: _find_and_load() race condition on sys.modules[name] check

2017-07-10 Thread STINNER Victor

Changes by STINNER Victor :


--
title: Sometimes, test_concurrency() of test_import fails with AttributeError: 
module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6 
-> importlib: _find_and_load() race condition on sys.modules[name] check
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



[issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6

2017-07-10 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +2712

___
Python tracker 

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



[issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6

2017-07-10 Thread Nick Coghlan

Nick Coghlan added the comment:

I'm about to head to bed so I'll get back to this discussion tomorrow, but in 
the meantime: Victor, maybe it would make sense to reformulate your reproducer 
as a monkeypatch for _find_and_load_unlocked() that injects the 10 ms sleep 
from the test case if it finds _frozen_importlib in sys.modules?

That is, temporarily replacing it with something like:

orig_find_and_load_unlocked = _frozen_importlib._find_and_load_unlocked
def _slow_find_and_load_unlocked(name, import_):
time.sleep(0.010)
return orig_find_and_load_unlocked(name, import_)

That way, we'd hopefully be able to reproduce the failure independently of the 
slower buildbot.

--

___
Python tracker 

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



[issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6

2017-07-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Victor tested test_concurrency on 3.5, and it is failed on slow Windows VM. 
Therefore the bug exists on 3.5 and is not related to recent changes.

--

___
Python tracker 

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



[issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6

2017-07-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +2711

___
Python tracker 

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



[issue30890] Comment error in Korean language

2017-07-10 Thread DelTos

Changes by DelTos :


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



[issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6

2017-07-10 Thread STINNER Victor

STINNER Victor added the comment:

Using attached importlib_sleep.patch, you can *see* the race condition with:

diff --git a/Lib/test/test_import/data/package/__init__.py 
b/Lib/test/test_import/data/package/__init__.py
index a4f2bc3..f07eb11 100644
--- a/Lib/test/test_import/data/package/__init__.py
+++ b/Lib/test/test_import/data/package/__init__.py
@@ -1,2 +1,3 @@
 import package.submodule
+print("package: id=%#x" % id(package))
 package.submodule


Example of output:
---
haypo@selma$ ./python -m test -m test_concurrency -v test_import
package: id=0x7fb497400d58
package: id=0x7fb49744d458
test test_import failed -- (...)
---

Lib/test/test_import/data/package/__init__.py is run twice instead of being run 
once. A lock is missing somewhere on the package module.

--

___
Python tracker 

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



[issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6

2017-07-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

test_concurrency is failed before b4baacee1adc06edbe30ac7574d17a8cd168e2e0 on 
my computer. I think it tests the issue30814 bug even if it doesn't fail on all 
computers. At the end, this is a race condition, and the failure is 
probabilistic.

--

___
Python tracker 

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



[issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6

2017-07-10 Thread STINNER Victor

STINNER Victor added the comment:

> FYI test_concurrency() added by commit 
> b4baacee1adc06edbe30ac7574d17a8cd168e2e0 doesn't really test bpo-30814. I 
> backported the unit test on 1ccbad9c95cf5782a1329eeaecba6e3eb0c37cb8 (commit 
> before b4baacee1adc06edbe30ac7574d17a8cd168e2e0), and the test pass, whereas 
> I expected it to fail before the fix.

Oops, please ignore this comment, it was a mistake. After clearing my 
repository (removing __pycache__ directories), the test failed. I forgot to 
copy the Lib/test/test_import/data/package/ directory.

--

___
Python tracker 

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



[issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6

2017-07-10 Thread Nick Coghlan

Nick Coghlan added the comment:

No, there's no global lock on the import system these days.

Instead, imports are supposed to be atomic on a per-module basis, but issue 
30814 showed that some of the accesses to the shared state management (which 
*is* still supposed to be protected by the import lock) could get into trouble 
given concurrent imports from different threads.

However, the new test exercises an interesting sequence of per-module lock 
acquisition, since each thread effectively runs through this sequence:

- import package # Test case
- import package.submodule # Package init
- import package # Parent package import

That moves back-and-forth between C & Python in a few different places, and 
hence may have been relying on the GIL to keep the parts executed in C atomic.

So now I'm wondering whether or not this new problem might be due to moving the 
_imp.acquire_lock() calls into Python code as part of issue 30814, as that 
creates a window near the start of _find_and_load() where the thread may end up 
holding neither the GIL *nor* the import lock. By contrast, when the import 
lock was acquired in C, then by the time the Python code starts running 
(potentially releasing the GIL), the import lock has already been acquired.

--

___
Python tracker 

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



[issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6

2017-07-10 Thread STINNER Victor

STINNER Victor added the comment:

FYI test_concurrency() added by commit b4baacee1adc06edbe30ac7574d17a8cd168e2e0 
doesn't really test bpo-30814. I backported the unit test on 
1ccbad9c95cf5782a1329eeaecba6e3eb0c37cb8 (commit before 
b4baacee1adc06edbe30ac7574d17a8cd168e2e0), and the test pass, whereas I 
expected it to fail before the fix.

--

___
Python tracker 

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



[issue30814] Import dotted name as alias breaks with concurrency

2017-07-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It is worth to backport the test to older versions. Just to be sure that this 
is a 3.6 regression.

--

___
Python tracker 

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



[issue30814] Import dotted name as alias breaks with concurrency

2017-07-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +2710

___
Python tracker 

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



[issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6

2017-07-10 Thread STINNER Victor

STINNER Victor added the comment:

I added print(id(package)) in Lib/test/test_import/data/package/__init__.py: 
when the bug occurs on my Windows VM, I see two print with two different 
identifiers. Moreover, when the bug occurs, first id(sys.modules['package']) is 
the first identifier, and then package is replaced with the new 'package' 
package in sys.modules (new identifier).

I don't understand something: sys.modules isn't supposed to be protected by a 
lock? I checked if _installed_safely.__enter__() if the _imp is held: it isn't 
held when _bootstrap._setup() is called, nor when 
_imp._install_external_importers() is called. But even if I patch these two 
functions to acquire the lock, Python startup fails on importing a codec 
module, because the _imp lock is not held in _installed_safely.__enter__(). So 
maybe sys.modules dict is supposed to be protected by a different lock, maybe 
indirectly?

I hack _bootstrap._find_and_load_unlocked() to sleep 10 ms if name == 
'package'. With this change, test_concurrency() fails immediatly on my Linux 
box.

* Apply attached importlib_sleep.patch (written for the current master branch)
* Recompile: make regen-importlib && make
* Run test_concurrency() just once: ./python -m test -m test_concurrency -v 
test_import
* You get the bug

By the way, importlib_sleep.patch changes test_concurrency() to run the test 
exactly once (it changes to loop to a single iteration, instead of 10).

Is it normal that a sleep makes import failing? Imports are not supposed to be 
atomic?

--

I tried to similar hack before the commit 
b4baacee1adc06edbe30ac7574d17a8cd168e2e0:

* add a sleep in importlib
* copy test_concurrency() from master
* Run test_concurrency()
* The test pass

While I'm not sure of my hack, it *seems* like sys.modules was somehow atomic 
before this commit?

--
keywords: +patch
Added file: http://bugs.python.org/file47000/importlib_sleep.patch

___
Python tracker 

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



[issue30882] Built-in list disappeared from Python 2.7 intersphinx inventory

2017-07-10 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
assignee: docs@python -> Mariatta
nosy: +Mariatta

___
Python tracker 

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



[issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6

2017-07-10 Thread STINNER Victor

STINNER Victor added the comment:

> Victor, try to add importlib.invalidate_caches() inside a loop. Does it cause 
> a failure in a single test_concurrency?

I added a "importlib.invalidate_caches()" call in the "for i in range(10):" 
loop. With this change, a single run doesn't fail. It doesn't fix the test 
neither: with -R 3:100, the command still fails.

> Some parts of import machinery are platform depended (see issue30873).

I don't think that this issue30873 or issue30626 is platform dependent.


> I don't have idea what is wrong on Windows.

IMHO it's just that my Windows VM is slow. It's a race condition. If I run 
"./python -m test -m test_concurrency test_import test_import": the command 
pass, but when again, it fails. It's pure random :-)

--

___
Python tracker 

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



[issue30873] `SystemError: returned NULL without setting an error` from importing _pickle on Windows

2017-07-10 Thread STINNER Victor

STINNER Victor added the comment:

ppperry: First, please create a Python script and attach it to the issue, it 
would make it easier to reproduce the bug. Second, which Python version did you 
test? I tested 3.6 and master Git branches on Windows, and I'm unable to 
reproduce the bug.

I'm able to reproduce the bug on Windows using Python 3.6.1, but this version 
still contains issue30626 bug. I'm unable to reproduce the bug using 3.6.2rc2, 
so to be, this bug is just a duplicate of issue30626.

Please try: https://www.python.org/downloads/release/python-362rc2/

--
nosy: +haypo
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> "SystemError:  returned NULL without 
setting an error"  from open function

___
Python tracker 

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



[issue29464] Specialize FASTCALL for functions with positional-only parameters

2017-07-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Removed _PyArg_NoStackKeywords() (7e60192fe0dfd763b0d458cf0898ba4f7ac7d81a).

--
status: open -> closed

___
Python tracker 

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



[issue30866] Add _testcapi.stack_pointer() to measure the C stack consumption

2017-07-10 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 64fa449f559b0e7b0480a177000419a78ebcf3ff by Victor Stinner in 
branch 'master':
bpo-30866: Add _testcapi.stack_pointer() (#2601)
https://github.com/python/cpython/commit/64fa449f559b0e7b0480a177000419a78ebcf3ff


--

___
Python tracker 

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



[issue30822] Python implementation of datetime module is not being tested correctly.

2017-07-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

If testing with -u tzdata is such expensive, tzdata can be excluded from all 
resources. There is a precedence with the extralargefile resource (see 
test_zipfile64).

Actually this means that these test will never run until you request this 
specially.

--

___
Python tracker 

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



  1   2   >