[issue30906] os.path.join misjoins paths

2017-07-13 Thread Steve Dower

Steve Dower added the comment:

Fair point. I was thinking of how chdir handles it, but of course that's 
relative to the cwd on D, so the rest of the path on C is ignored. D:dir2 is 
correct.

--

___
Python tracker 

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



[issue30907] speed up comparisons to self for built-in containers

2017-07-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The main drawback of this optimization perhaps is not tiny runtime overhead in 
common case, but the complication of the code. It adds at least 6 or 8 lines to 
every rich compare implementation.

On other hand, this optimization already is implemented for integers, strings, 
bytes and slices.

--
nosy: +haypo

___
Python tracker 

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



[issue16487] Allow ssl certificates to be specified from memory rather than files.

2017-07-13 Thread Nathaniel Smith

Changes by Nathaniel Smith :


--
nosy: +njs

___
Python tracker 

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



[issue22253] ConfigParser does not handle files without sections

2017-07-13 Thread 林自均

林自均 added the comment:

Hi Pedro Lacerda,

I think you should submit your patch as a GitHub pull request. Please correct 
me if I'm wrong. Thanks.

--
nosy: +林自均

___
Python tracker 

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



[issue30907] speed up comparisons to self for built-in containers

2017-07-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

First, few comments about the code.

1) The condition "a == b" is enough. No need to test "PyDict_CheckExact(a)" and 
like.

2) This fast path can be used only for Py_EQ and Py_NE. For other operations it 
can change the behavior.

This is common approach of implementing operator== on C++. Unless comparing 
objects is trivial the implementation of operator== almost always starts with 
comparing pointers. In Python the overhead of calling methods and comparing 
objects is larger than in C++ and I expect that the relative overhead of one 
additional pointer comparison is smaller.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue30928] Copy modified blurbs to idlelib/NEWS.txt

2017-07-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Backport of 2703 is 2704, which has been merged.  Somehow bpo# on title got 
stripped and I did not notice until merged, and merge was allowed without 
trivial tag.

NOTE: THE DOUBLE SPACING AFTER THE SEPARATOR LINE IS INTENTIONAL, to avoid 
backport merge conflicts.

--

___
Python tracker 

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



[issue30717] str.center() is not unicode aware

2017-07-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I think it at least plausible that we should add implementations of some of the 
unicode standard's algorithms.  Victor and Serhiy, as two of the active core 
devs most involved with unicode issues, what do you think?

--
nosy: +haypo, serhiy.storchaka, terry.reedy

___
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-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Raymond, if you either unassign yourself or approve the current PR, I will 
merge and backport to 3.6 (but not 3.5).

--

___
Python tracker 

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



[issue30928] Copy modified blurbs to idlelib/NEWS.txt

2017-07-13 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
pull_requests: +2769

___
Python tracker 

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



[issue30924] RPM build doc_files needs files separated into separate lines

2017-07-13 Thread Nick Coghlan

Changes by Nick Coghlan :


--
nosy: +kushal.das, ncoghlan

___
Python tracker 

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



[issue30925] RPM build lacks ability to include other files similar to doc_files

2017-07-13 Thread Nick Coghlan

Changes by Nick Coghlan :


--
nosy: +kushal.das

___
Python tracker 

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



[issue30913] IDLE: Document tk Vars, attributes, methods by tab page

2017-07-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset 9a09c667cf133e722a3e7ed2185f3e9e5af25a99 by terryjreedy in branch 
'3.6':
[3.6] bpo-30913: IDLE: Document tk vars, attributes, and methods for 
ConfigDialog (GH-2697) (#2702)
https://github.com/python/cpython/commit/9a09c667cf133e722a3e7ed2185f3e9e5af25a99


--

___
Python tracker 

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



[issue30928] Copy modified blurbs to idlelib/NEWS.txt

2017-07-13 Thread Terry J. Reedy

New submission from Terry J. Reedy:

As I prepare blurbs, I copy to a private file, replacing 'IDLE' with bpo-n. 
 And maybe edit a bit more, maybe not.  I occasionally copy batches to 
idlelib/NEWS.txt.  The first 2 times with git, I marked PR as trivial, but 
decided to open this continuing issue to record merges.

A script could be written to do this automatically, but it would have to be run 
just before the blurbs are moved into Python's NEWS.

--
assignee: terry.reedy
components: IDLE
messages: 298333
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Copy modified blurbs to idlelib/NEWS.txt
type: enhancement
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



[issue30913] IDLE: Document tk Vars, attributes, methods by tab page

2017-07-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

We can edit details as we examine functions to test and change or refactor.

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



[issue30913] IDLE: Document tk Vars, attributes, methods by tab page

2017-07-13 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
pull_requests: +2768

___
Python tracker 

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



[issue30913] IDLE: Document tk Vars, attributes, methods by tab page

2017-07-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset 36329a4dd85c03e2060a306e86ac5ddec6fd2549 by terryjreedy 
(csabella) in branch 'master':
bpo-30913: IDLE: Document tk vars, attributes, and methods for ConfigDialog 
(#2697)
https://github.com/python/cpython/commit/36329a4dd85c03e2060a306e86ac5ddec6fd2549


--

___
Python tracker 

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



[issue30906] os.path.join misjoins paths

2017-07-13 Thread Eryk Sun

Eryk Sun added the comment:

BTW, I don't see why one would expect join(r"C:\dir1", "D:dir2") to return 
r"D:\dir1\dir2" instead of "D:dir2". Python's result is in agreement with 
Windows PathCchCombineEx. Paths on different drives should not be combined. The 
first path has to be ignored:

elif p_drive and p_drive != result_drive:
if p_drive.lower() != result_drive.lower():
# Different drives => ignore the first path entirely
result_drive = p_drive
result_path = p_path
continue

--

___
Python tracker 

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



[issue30913] IDLE: Document tk Vars, attributes, methods by tab page

2017-07-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I added missing functions and created attached list with help of Find in (1) 
Files.

--
Added file: http://bugs.python.org/file47013/configdialog_funcs.txt

___
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-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset 42abf7f9737f78a5da311a42945d781dfcd6c6c0 by terryjreedy in branch 
'3.6':
[3.6] bpo-30870: IDLE: Add configdialog fontlist selection unittest (GH-2666) 
(#2701)
https://github.com/python/cpython/commit/42abf7f9737f78a5da311a42945d781dfcd6c6c0


--

___
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-13 Thread Peter Thomassen

Peter Thomassen added the comment:

I like your most recent suggestion, and updated the PR after fixing a typo 
('Fractions') and making it more complete (complex numbers).

Let me know if anything else is needed.

(A mapping is not a specialized set, at least as far as typing is concerned: 
`isinstance({}, set)` is false. Semantically, they may be related, but the 
question here is whether the types are actually related.)

--

___
Python tracker 

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



[issue30717] str.center() is not unicode aware

2017-07-13 Thread Guillaume Sanchez

Guillaume Sanchez added the comment:

Hello Steven!

Thanks for your reactivity!

unicodedata.grapheme_cluster_break() takes a unicode code point as an argument 
and return its GraphemeBreakProperty as a string. Possible values are listed 
here: http://www.unicode.org/reports/tr29/#CR

help(unicodedata.grapheme_cluster_break) says:
grapheme_cluster_break(chr, /)
Returns the GraphemeBreakProperty assigned to the character chr as string.



unicodedata.break_graphemes() takes a unicode string as argument and returns an 
GraphemeClusterIterator that spits consecutive graphemes clusters.

help(unicodedata.break_graphemes) says:

break_graphemes(unistr, /)
Returns an iterator to iterate over grapheme clusters in unistr.

It uses extended grapheme cluster rules from TR29.


Is there anything else you would like to know? Don't hesitate to ask :)

Thank you for your time!

--
assignee:  -> christian.heimes
components: +SSL, Tests, Tkinter -Library (Lib)
nosy: +christian.heimes

___
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-13 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
pull_requests: +2767

___
Python tracker 

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



[issue30717] str.center() is not unicode aware

2017-07-13 Thread Steven D'Aprano

Steven D'Aprano added the comment:

Thank you, but I cannot review your C code.

Can you start by telling us what the two functions:

unicodedata.grapheme_cluster_break()
unicodedata.break_graphemes()

take as arguments, and what they return? If we were to call 
help(function), what would we see?

--

___
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-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset 9b622fb90331f259894e6edb29b5c64b9366491a by terryjreedy (Louie 
Lu) in branch 'master':
bpo-30870: IDLE: Add configdialog fontlist selection unittest (#2666)
https://github.com/python/cpython/commit/9b622fb90331f259894e6edb29b5c64b9366491a


--

___
Python tracker 

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



[issue30927] re.sub() does not work correctly on '.' pattern and \n

2017-07-13 Thread Matthew Barnett

Matthew Barnett added the comment:

The 4th parameter is the count, not the flags:

sub(pattern, repl, string, count=0, flags=0)

>>> re.sub(r'X.', '+', '-X\n-', flags=re.DOTALL)
'-+-'

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



[issue12568] Add functions to get the width in columns of a character

2017-07-13 Thread Guillaume Sanchez

Guillaume Sanchez added the comment:

Hello,

I come from bugs.python.org/issue30717 . I have a pending PR that needs review 
( https://github.com/python/cpython/pull/2673 ) adding a function that breaks 
unicode strings into grapheme clusters (aka what one would intuitively call "a 
character"). It's based on the grapheme cluster breaking algorithm from TR29.

Let me know if this is of any relevance.

Quick demo:
>>> a=unicodedata.break_graphemes("lol")
>>> list(a)
['l', 'o', 'l']
>>> list(unicodedata.break_graphemes("lo\u0309l"))
['l', 'ỏ', 'l']
>>> list(unicodedata.break_graphemes("lo\u0309\u0301l"))
['l', 'ỏ́', 'l']
>>> list(unicodedata.break_graphemes("lo\u0301l"))
['l', 'ó', 'l']
>>> list(unicodedata.break_graphemes(""))
[]

--
nosy: +Guillaume Sanchez

___
Python tracker 

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



[issue30717] str.center() is not unicode aware

2017-07-13 Thread Guillaume Sanchez

Guillaume Sanchez added the comment:

Hello,

I implemented unicodedata.break_graphemes() that returns an iterators that 
spits consecutive graphemes.

This is a "test" implementation meant to see what doesn't fits Python's style 
and design, to discuss naming and implementation details.

https://github.com/python/cpython/pull/2673

Thanks for your time and interest

--

___
Python tracker 

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



[issue30758] test_pydoc hangs sometimes on 3.6 and master branches

2017-07-13 Thread STINNER Victor

STINNER Victor added the comment:

Another fail, so I reopen the issue:

http://buildbot.python.org/all/builders/ARMv7%20Ubuntu%203.6/builds/563

...
0:11:30 load avg: 4.45 [403/405] test_lib2to3 passed (248 sec) -- running: 
test_tools (274 sec), test_pydoc (411 sec)
running: test_tools (304 sec), test_pydoc (441 sec)
running: test_tools (334 sec), test_pydoc (471 sec)
0:12:34 load avg: 2.83 [404/405] test_tools passed (338 sec) -- running: 
test_pydoc (476 sec)

command timed out: 1200 seconds without output ...

--
resolution: fixed -> 
status: closed -> open
title: regrtest hangs sometimes on the master branch (test_pydoc? 
test_subprocess?) -> test_pydoc hangs sometimes on 3.6 and master branches
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



[issue15360] Behavior of assigning to __dict__ is not documented

2017-07-13 Thread Malcolm Smith

Changes by Malcolm Smith :


--
nosy: +Malcolm Smith

___
Python tracker 

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



[issue9262] IDLE: Use tabbed shell and edit windows

2017-07-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Vedran, thank you for the link.  The way IDLE looks on Mac is what we want on 
all systems.  I added a note to #24826.

Do you regularly work on Mac?  It would be help if someone were to test PRs on 
OSX, especially patches intended to change what users see.  Even a weekly test 
of a fresh download from the repository would be helpful.

--

___
Python tracker 

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



[issue24826] ability to integrate editor, shell, debugger in one window

2017-07-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

https://www.youtube.com/watch?v=nO78ECRighw shows IDLE on Mac with a shell and 
editor window.  Because Mac pulls the menu off of each window and puts one 
above both, which are side by side, it looks like an example of what we want to 
have on all systems.

--

___
Python tracker 

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



[issue9262] IDLE: Use tabbed shell and edit windows

2017-07-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Hi Cedric, I have been 'considering' for at least 7 years, since the core devs 
who then cared about IDLE agreed that tabbed windows would be a good idea.  The 
direst analogy with programming editors with tabs.   Notepad++ is the one I 
have used.  My impression is that this is pretty standard.

One thing I would not copy from Notepad++ is allowing only one process at a 
time, and apparently only one tabbed window in the one process.  In intend that 
IDLE continue to allow multiple processes with multiple windows.  I expect that 
'New file' will be replaced with 'New tab' and 'New window', as with FireFox.

I intend that a single window to able to have at least 2 panes.  Look at 
turtledemo to see what this means. ('python -m turtledemo' or Help => 
Turtledemo in IDLE.)  Mentally replace the text and canvas with sets of tabbed 
pages, side by side. In fact, for my large widescreen monitor, I want 3 panes 
so I can have Shell, file, and test_file visible at once.

I have not yet really considered whether we should use an improved version of 
IDLE's tabbedpageset, used for configdialog, Mark's replacement, or ttk 
Notebook.

Also see the discussion on #24826.

--

___
Python tracker 

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



[issue30927] re.sub() does not work correctly on '.' pattern and \n

2017-07-13 Thread Robert

New submission from Robert:

When running the command

re.sub(r'X.', '+', '-X\n-', re.DOTALL)

you get '-X\n-' instead of '-+-'.

Curiously findall works correctly:

re.findall(r'X.', '-X\n-', re.DOTALL) => ['X\n']

--
components: Regular Expressions
messages: 298316
nosy: ezio.melotti, mrabarnett, mrh1997
priority: normal
severity: normal
status: open
title: re.sub() does not work correctly on '.' pattern and \n
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



[issue30907] speed up comparisons to self for built-in containers

2017-07-13 Thread Tim Peters

Tim Peters added the comment:

Measuring in isolation (like with, e.g., timeit) isn't really interesting.  
Then everything is in L1 cache, branches are 100% predictable (because they 
take the same branch over & over for the duration of the test), and 
second-order effects on _other_ code are invisible.  For example, the 100% 
branch prediction comes at a hidden cost:  finite hardware branch-prediction 
tables had to kick out info about _other_ branches to make room for the 
branches in the code being tested.  Likewise other code is kicked out of 
instruction caches to make room for the new tests, and similarly for whatever 
data the test uses.  Those limited hardware resources are consumed by the new 
code whether or not it's run in the context of a micro-benchmark.

I'm not claiming the new special cases would slow code down "a lot", or even 
significantly, or even measurably.  That's not the point.  The point is that we 
avoid adding special cases unless there's _clear_ expected actual benefit, 
because when we multiply hundreds of code paths with "this could theoretically 
speed things up in some cases!" special tests, slowdowns _do_ become 
significant.  They all fight each other, and with expected-case code, for 
limited hardware acceleration gimmicks.

For a very simple example, we don't special-case integer division by 1.  `n // 
m`, when m=1, takes time proportional to the number of (internal) digits in 
`n`, despite that we _could_ simply return a pointer to `n` in constant time.

For the same reasons:  it's rare for code to divide by 1, and checking for 
anything isn't free (even if a micro-benchmark can't demonstrate it).  However, 
if someone had a way to divide by _any_ odd integer 5x faster than what we do 
now, _that_ may be worth the extra test.

That's why Raymond and I are looking for a reason to even suspect that 
special-casing container identity would pay off in _some_ plausibly realistic 
use case(s).

--

___
Python tracker 

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



[issue30926] KeyError with cgitb inspecting exception in generator expression

2017-07-13 Thread Jason R. Coombs

New submission from Jason R. Coombs:

Consider this script, which runs successfully on Python 3:

import cgitb
import sys


def fiter():
assert False
yield 1, 1
yield 2, 2
yield 3, 3


try:
x = set(id_ for id_, _ in fiter())
except:
print cgitb.html(sys.exc_info())


Run the same script on Python 2.7.13 and you get this error:

Traceback (most recent call last):
  File "test.py", line 15, in 
print(cgitb.html(sys.exc_info()))
  File ".../cgitb.py", line 130, in html
formatvalue=lambda value: '=' + pydoc.html.repr(value))
  File ".../inspect.py", line 887, in formatargvalues
specs.append(strseq(args[i], convert, join))
  File ".../inspect.py", line 840, in strseq
return join(map(lambda o, c=convert, j=join: strseq(o, c, j), object))
  File ".../inspect.py", line 840, in 
return join(map(lambda o, c=convert, j=join: strseq(o, c, j), object))
  File ".../inspect.py", line 842, in strseq
return convert(object)
  File ".../inspect.py", line 884, in convert
return formatarg(name) + formatvalue(locals[name])
KeyError: 'id_'


Wrap the generator expression in [] and it also succeeds.

Given that the issue only exists on Python 2.7, it may not need to be 
addressed, but I wanted to log the issue nonetheless.

--
components: Interpreter Core, Library (Lib)
messages: 298314
nosy: jason.coombs
priority: normal
severity: normal
status: open
title: KeyError with cgitb inspecting exception in generator expression
versions: Python 2.7

___
Python tracker 

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



[issue30466] Tutorial doesn't explain the use of classes

2017-07-13 Thread Trey Hunner

Changes by Trey Hunner :


--
pull_requests: +2766

___
Python tracker 

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



[issue30906] os.path.join misjoins paths

2017-07-13 Thread Eryk Sun

Eryk Sun added the comment:

The difference compared to PathCchCombineEx stems from the following snippet in 
ntpath.join:

if p_path and p_path[0] in seps:
# Second path is absolute
if p_drive or not result_drive:
result_drive = p_drive
result_path = p_path

The case that PathCchCombineEx fails is that the second path is rooted [*] but 
neither UNC nor drive-absolute (i.e. p_drive is empty) and the first path is 
relative but neither rooted nor drive-relative. When the second path is rooted 
but not absolute, PathCchCombineEx requires the joined path to use the root of 
the first path as determined by PathCchStripToRoot. The latter fails for a 
completely relative path (i.e. no root or drive), as it rightly should. The 
question is whether the join operation itself should fail because the first 
path has no root. Python makes a different choice, but it isn't necessarily 
wrong.

[*] 
Path Type  | Example

Relative   | file
---|
Rooted | \file
Drive-Relative | C:file

Drive-Absolute | C:\file 
UNC| \\server\share\file

Extended   | \\?\C:\file
Device | \\.\C:

In Windows, rooted paths are relative to the current drive or network share, 
but Python still classifies them as absolute. In contrast, C++ 
path::is_absolute() requires both has_root_name and has_root_directory in 
Windows, so L"\\dir" is classified as a relative path.

--

___
Python tracker 

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



[issue30923] Add -Wimplicit-fallthrough=0 to Makefile ?

2017-07-13 Thread Stefan Krah

Stefan Krah added the comment:

Stéphane, if you want the libmpdec change cherry picked and are willing to do 
the (significant) work of backporting, I'll merge it.

--

___
Python tracker 

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



[issue9262] IDLE: Use tabbed shell and edit windows

2017-07-13 Thread Vedran Čačić

Vedran Čačić added the comment:

OMG no! Please reconsider.

First, analogy with web browsers is bogus. The modes of usage is very 
different. We don't look at multiple tabs simultaneously very often, but we do 
look at multiple files at once using IDLE (at least I do).

And I'm not the only one. Please see how Raymond masterfully uses IDLE in 
https://www.youtube.com/watch?v=nO78ECRighw. Will this be as easy (or possible 
at all) with the tabbed interface?

Crowding of the taskbar is eliminated by various other techniques: Windows 10 
has virtual desktops, Linux has had them for a long time already. Please don't 
introduce real problems while solving a nonproblem.

--
nosy: +veky

___
Python tracker 

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



[issue30731] Use correct executable manifest for windows

2017-07-13 Thread Steve Dower

Changes by Steve Dower :


--
assignee:  -> steve.dower
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
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



[issue30731] Use correct executable manifest for windows

2017-07-13 Thread Steve Dower

Steve Dower added the comment:


New changeset d8e522f7cf8d59993acae9409b6af0ee9a35038f by Steve Dower in branch 
'3.6':
bpo-30731: python.manifest fix (#2328) (#2699)
https://github.com/python/cpython/commit/d8e522f7cf8d59993acae9409b6af0ee9a35038f


--

___
Python tracker 

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



[issue30731] Use correct executable manifest for windows

2017-07-13 Thread Steve Dower

Changes by Steve Dower :


--
pull_requests: +2765

___
Python tracker 

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



[issue30731] Use correct executable manifest for windows

2017-07-13 Thread Steve Dower

Steve Dower added the comment:


New changeset c40ad03bf2693b4af539978f1274e57b85367547 by Steve Dower (Segev 
Finer) in branch 'master':
bpo-30731: python.manifest fix (#2328)
https://github.com/python/cpython/commit/c40ad03bf2693b4af539978f1274e57b85367547


--

___
Python tracker 

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



[issue30906] os.path.join misjoins paths

2017-07-13 Thread Steve Dower

Steve Dower added the comment:

There's absolutely no risk of ignoring later parameters or raising a ValueError 
here, so please don't let those cloud the discussion.

The behaviour of Python 3.6 seems to be correct for every case except:
>>> os.path.join("C:\\dir1", "D:dir2")
D:dir2
(expected D:\dir1\dir2)

However, that's an incredible edge case that virtually nobody relies on and I'm 
sure nobody expects.

The other combinations of relative and absolute paths seem to be correct. I'm 
not convinced that changing the behaviour of Python 2.7 significantly improves 
either the maintainability or security of that release, so unless someone wants 
to argue about that I'm closing this as not a bug. (And if someone *does* want 
to argue about it, don't bother arguing with me :) )

--
resolution:  -> not a bug
stage: test 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



[issue30923] Add -Wimplicit-fallthrough=0 to Makefile ?

2017-07-13 Thread Stefan Krah

Stefan Krah added the comment:

Hmm, that took about 20 min to commit a 3 line diff.  Now I'm watching the 
buildbots...

--

___
Python tracker 

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



[issue30923] Add -Wimplicit-fallthrough=0 to Makefile ?

2017-07-13 Thread Stefan Krah

Stefan Krah added the comment:


New changeset 72b543308ee3087e3fa247981f5cb4be1138c515 by Stefan Krah in branch 
'master':
bpo-30923: Suppress fall-through warnings in libmpdec. (#2698)
https://github.com/python/cpython/commit/72b543308ee3087e3fa247981f5cb4be1138c515


--

___
Python tracker 

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



[issue30923] Add -Wimplicit-fallthrough=0 to Makefile ?

2017-07-13 Thread Stefan Krah

Changes by Stefan Krah :


--
pull_requests: +2764

___
Python tracker 

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



[issue30925] RPM build lacks ability to include other files similar to doc_files

2017-07-13 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +ncoghlan

___
Python tracker 

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



[issue30925] RPM build lacks ability to include other files similar to doc_files

2017-07-13 Thread Ned Deily

Changes by Ned Deily :


--
components: +Distutils
nosy: +dstufft, merwok

___
Python tracker 

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



[issue30913] IDLE: Document tk Vars, attributes, methods by tab page

2017-07-13 Thread Cheryl Sabella

Changes by Cheryl Sabella :


--
pull_requests: +2763

___
Python tracker 

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



[issue30919] Shared Array Memory Allocation Regression

2017-07-13 Thread Gareth Rees

Gareth Rees added the comment:

Note that some filesystems (e.g. HFS+) don't support sparse files, so creating 
a large Arena will still be slow on these filesystems even if the file is 
created using ftruncate().

(This could be fixed, for the "fork" start method only, by using anonymous maps 
in that case.)

--

___
Python tracker 

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



[issue30251] Windows Visual Studio solution does not have an install target

2017-07-13 Thread Steve Dower

Steve Dower added the comment:

Sure, but then I'll resolve it as rejected :)

The solution does not need an install target. That's not the point - we have 
separate projects and scripts for that.

--

___
Python tracker 

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



[issue30925] RPM build lacks ability to include other files similar to doc_files

2017-07-13 Thread John 'Warthog9' Hawley

New submission from John 'Warthog9' Hawley:

Duplicate doc-files functionality, to inject files into bdist_rpm

Enhancement to allow for files that are built outside of what's expected in 
setup.py to be injected into the bdist files_rpm listing so they are included 
in the resulting RPM.  This effectively duplicates the doc-files functionality, 
but adds it as additional files to be included.

--
messages: 298303
nosy: warthog9
priority: normal
pull_requests: 2762
severity: normal
status: open
title: RPM build lacks ability to include other files similar to doc_files
type: enhancement
versions: Python 2.7, Python 3.7

___
Python tracker 

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



[issue30923] Add -Wimplicit-fallthrough=0 to Makefile ?

2017-07-13 Thread Zachary Ware

Changes by Zachary Ware :


--
nosy: +zach.ware

___
Python tracker 

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



[issue30923] Add -Wimplicit-fallthrough=0 to Makefile ?

2017-07-13 Thread Stefan Krah

Stefan Krah added the comment:

It's a useful warning, but I find it annoying to add 20 "fall through" 
comments. I may add a pragma at some point.

--

___
Python tracker 

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



[issue30924] RPM build doc_files needs files separated into separate lines

2017-07-13 Thread John 'Warthog9' Hawley

Changes by John 'Warthog9' Hawley :


--
type:  -> behavior

___
Python tracker 

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



[issue30924] RPM build doc_files needs files separated into separate lines

2017-07-13 Thread John 'Warthog9' Hawley

New submission from John 'Warthog9' Hawley:

doc-files should break files up into multiple lines, as per RPM expectation

when using %doc section of the RPM spec, it expects multiple files
to be listed each on their own line.  Currently what gets passed in
is:

%doc file1 file2 file3

which throws:
error: More than one file on a line: file1
error: More than one file on a line: file2
error: More than one file on a line: file3

Expectation is to break the files up into separate lines:

%doc
file1
file2
file3

which then works as expected with multiple files.

--
messages: 298301
nosy: warthog9
priority: normal
pull_requests: 2761
severity: normal
status: open
title: RPM build doc_files needs files separated into separate lines
versions: Python 2.7, Python 3.7

___
Python tracker 

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



[issue1464444] ctypes should be able to link with installed libffi

2017-07-13 Thread Shlomi Fish

Changes by Shlomi Fish :


--
pull_requests: +2760

___
Python tracker 

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



[issue30923] Add -Wimplicit-fallthrough=0 to Makefile ?

2017-07-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It seems to me that by default the compiler recognizes a wide variety of "falls 
through" comments. Thus we need just add missed comments.

There are warnings emitted when compile imported third-party code. We should 
ask Stefan for adding "falls through" comments in his libmpdec. And either 
compile expat with -Wimplicit-fallthrough=0, or wait until warnings will be 
fixed in upstream, or remove the bundled copy of expat.

--
nosy: +serhiy.storchaka, skrah

___
Python tracker 

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



[issue30923] Add -Wimplicit-fallthrough=0 to Makefile ?

2017-07-13 Thread Stéphane Wirtel

New submission from Stéphane Wirtel:

Hi all,

Since I use the last version of Fedora 26 with gcc-7.1.1, I have these warnings 
(see output.txt file)

We could add -Wimplicit-fallthrough=0 to Makefile ? it will disable the 
fallthrough of the coed.

What do you think about that ? What's your feedback on this option and can we 
use it in the case of CPython ?

Thank you

--
files: output.txt
messages: 298299
nosy: matrixise
priority: normal
severity: normal
status: open
title: Add -Wimplicit-fallthrough=0 to Makefile ?
versions: Python 3.7
Added file: http://bugs.python.org/file47012/output.txt

___
Python tracker 

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



[issue30922] Process in not get killed using subprocess.call() in python thread

2017-07-13 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

@sanky8793 please, use the python-list for that 
https://mail.python.org/mailman/listinfo/python-list

Thank you

--
nosy: +matrixise -gvanrossum
priority: normal -> low
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



[issue30922] Process in not get killed using subprocess.call() in python thread

2017-07-13 Thread Sanket

Sanket added the comment:

Can i get solution here

--

___
Python tracker 

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



[issue30920] Sequence Matcher from diff lib is not implementing longest common substring problem correctly

2017-07-13 Thread Tim Peters

Tim Peters added the comment:

This is an unfortunate consequence of the default "autojunk" feature.  You can 
turn that off by passing `autojunk=False`, like so:

match = SequenceMatcher(None, string1, string2, autojunk=False)...
  

Then it returns a match of size 534.

--
nosy: +tim.peters

___
Python tracker 

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



[issue30922] Process in not get killed using subprocess.call() in python thread

2017-07-13 Thread Guido van Rossum

Guido van Rossum added the comment:

So top ope in tickets about this issue or you will be banned.

On Jul 13, 2017 8:46 AM, "Sanket"  wrote:

>
> New submission from Sanket:
>
> import threading
> import subprocess
>
> def B():
> while True:
> break
> cmd="ps -ef | grep 'shell' | awk '{print $2}' | xargs kill -9"
> subprocess.call(cmd, shell=True)
>
>
> def A():
> th = threading.Thread(target=B)
> th.start()
>
>
>
>
> In above code,  process with name "shell" has to be killed,  but its not
> working. While same when I do in simple without thread,  its working
>
>
> Why you are not answering here,at last I just had to deal with answer
> whether its getting here or else where
>
> --
> components: Library (Lib)
> messages: 298293
> nosy: gvanrossum, sanky8793
> priority: normal
> severity: normal
> status: open
> title: Process in not get killed using subprocess.call() in python thread
> type: behavior
> versions: Python 2.7, Python 3.3
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue30919] Shared Array Memory Allocation Regression

2017-07-13 Thread Gareth Rees

Gareth Rees added the comment:

In Python 2.7, multiprocessing.heap.Arena uses an anonymous memory mapping on 
Unix. Anonymous memory mappings can be shared between processes but only via 
fork().

But Python 3 supports other ways of starting subprocesses (see issue 8713 [1]) 
and so an anonymous memory mapping no longer works. So instead a temporary file 
is created, filled with zeros to the given size, and mapped into memory (see 
changeset 3b82e0d83bf9 [2]). It is the zero-filling of the temporary file that 
takes the time, because this forces the operating system to allocate space on 
the disk.

But why not use ftruncate() (instead of write()) to quickly create a file with 
holes? POSIX says [3], "If the file size is increased, the extended area shall 
appear as if it were zero-filled" which would seem to satisfy the requirement.

[1] https://bugs.python.org/issue8713
[2] https://hg.python.org/cpython/rev/3b82e0d83bf9
[3] http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html

--
nosy: +g...@garethrees.org

___
Python tracker 

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



[issue30922] Process in not get killed using subprocess.call() in python thread

2017-07-13 Thread Sanket

New submission from Sanket:

import threading
import subprocess

def B():
while True:
break
cmd="ps -ef | grep 'shell' | awk '{print $2}' | xargs kill -9"
subprocess.call(cmd, shell=True)


def A():
th = threading.Thread(target=B)
th.start()




In above code,  process with name "shell" has to be killed,  but its not 
working. While same when I do in simple without thread,  its working


Why you are not answering here,at last I just had to deal with answer whether 
its getting here or else where

--
components: Library (Lib)
messages: 298293
nosy: gvanrossum, sanky8793
priority: normal
severity: normal
status: open
title: Process in not get killed using subprocess.call() in python thread
type: behavior
versions: Python 2.7, Python 3.3

___
Python tracker 

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



[issue9262] IDLE: Use tabbed shell and edit windows

2017-07-13 Thread Charles Wohlganger

Charles Wohlganger added the comment:

I modified Mark Rosen's newTabExtension to work with more recent versions of 
IDLE, as it wasn't working when I tried it on mine. It's not clear if it ever 
could when it was originally working, but I can't get it to move tabs between 
multiple window instances.

--
nosy: +wohlganger
Added file: http://bugs.python.org/file47011/TabExtension.py

___
Python tracker 

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



[issue30919] Shared Array Memory Allocation Regression

2017-07-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It can be significantly sped up if replace the writing loop with

if size:
os.lseek(self.fd, size, 0)
os.write(self.fd, b'')
os.lseek(self.fd, 0, 0)

or just with

os.truncate(self.fd, size)

(not sure the latter always works).

But instantiating an open Arena will still be slower than in 2.7.

--

___
Python tracker 

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



[issue30921] Process in not get killed using subprocess.call() in python thread

2017-07-13 Thread Guido van Rossum

Guido van Rossum added the comment:

Please find a list like python-list (comp.lang.python) to ask for help with 
your problem.

Also please stop adding people to the nosy list.

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



[issue30921] Process in not get killed using subprocess.call() in python thread

2017-07-13 Thread Sanket

Changes by Sanket :


--
nosy: +terry.reedy

___
Python tracker 

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



[issue30921] Process in not get killed using subprocess.call() in python thread

2017-07-13 Thread Sanket

Changes by Sanket :


--
nosy: +lars.gustaebel, lemburg, pedronis

___
Python tracker 

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



[issue30921] Process in not get killed using subprocess.call() in python thread

2017-07-13 Thread Sanket

Changes by Sanket :


--
nosy: +djc, gvanrossum -sanky8793

___
Python tracker 

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



[issue30919] Shared Array Memory Allocation Regression

2017-07-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is because instantiating new Arena is much slower in Python 3.

./python -m timeit -r1 -s 'from multiprocessing.heap import Arena' 
'Arena(2**26)'

Python 3.7: 1 loop, best of 1: 1.18 sec per loop
Python 2.7: 10 loops, best of 1: 9.19 usec per loop

May be the regression was introduced by issue8713.

--
nosy: +davin, sbt, serhiy.storchaka

___
Python tracker 

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



[issue30921] Process in not get killed using subprocess.call() in python thread

2017-07-13 Thread Sanket

New submission from Sanket:

import threading
import subprocess

def B():
while True:
break
cmd="ps -ef | grep 'shell' | awk '{print $2}' | xargs kill -9"
subprocess.call(cmd, shell=True)


def A():
th = threading.Thread(target=B)
th.start()




In above code,  process with name "shell" have to killed,  but its not working. 
While same when I do in simple without thread,  its working

--
components: Library (Lib)
messages: 298288
nosy: sanky8793
priority: normal
severity: normal
status: open
title: Process in not get killed using subprocess.call() in python thread
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue30920] Sequence Matcher from diff lib is not implementing longest common substring problem correctly

2017-07-13 Thread Syam

New submission from Syam:

Was seeing this lib from difflib import SequenceMatcher not returning the 
biggest common substring always..

try the example from attachment..

it is returning wrong value, not the biggest substring

--
components: Build
files: script.py
messages: 298287
nosy: Syam Mohan
priority: normal
severity: normal
status: open
title: Sequence Matcher from diff lib is not implementing longest common 
substring problem correctly
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file47010/script.py

___
Python tracker 

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



[issue30907] speed up comparisons to self for built-in containers

2017-07-13 Thread Wouter Bolsterlee

Wouter Bolsterlee added the comment:

fwiw, "if (PyDict_CheckExact(a) && a == b)" amounts to two pointer comparisons, 
the overhead of which is too small to measure. (i tried.)

--

___
Python tracker 

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



[issue30919] Shared Array Memory Allocation Regression

2017-07-13 Thread Dimitar Tasev

New submission from Dimitar Tasev:

Hello, I have noticed a significant performance regression when allocating a 
large shared array in Python 3.x versus Python 2.7. The affected module seems 
to be `multiprocessing`.

The function I used for benchmarking:

from timeit import timeit
timeit('sharedctypes.Array(ctypes.c_float, 500*2048*2048)', 'from 
multiprocessing import sharedctypes; import ctypes', number=1)

And the results from executing it:

Python 3.5.2
Out[2]: 182.68500420999771

---

Python 2.7.12
Out[6]: 2.124835968017578

I will try to provide any information you need. Right now I am looking at 
callgrind/cachegrind without Debug symbols, and can post that, in the meantime 
I am building Python with Debug and will re-run the callgrind/cachegrind.

Allocating the same-size array with numpy doesn't seem to have a difference 
between Python versions. The numpy command used was 
`numpy.full((500,2048,2048), 5.0)`. Allocating the same number of list members 
also doesn't have a difference - `arr = [5.0]*(500*2048*2048)`

--
files: shared_array_alloc.py
messages: 298285
nosy: dtasev
priority: normal
severity: normal
status: open
title: Shared Array Memory Allocation Regression
type: performance
versions: Python 2.7, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file47009/shared_array_alloc.py

___
Python tracker 

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



[issue30918] Unable to launch IDLE in windows 7

2017-07-13 Thread dongdong

New submission from dongdong:

"unable to create user config directory   Z:\.idlerc   check path and 
permisssion"

It through out this error, when I try to launch the IDLE not as an 
adminnistrator acount. There is an networed disk memory Z: on my computer

this error is caused by configHandler.py script in the Lib/idlelib directory. 
Here is a solution: 
https://www.experts-exchange.com/questions/24006687/Invalid-Python-config-directory.html

--
messages: 298284
nosy: trencyclo
priority: normal
severity: normal
status: open
title: Unable to launch IDLE in windows 7
type: crash
versions: Python 3.5

___
Python tracker 

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



[issue28427] WeakValueDictionary next bug (with multithreading)

2017-07-13 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests:  -849

___
Python tracker 

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



[issue26617] Assertion failed in gc with __del__ and weakref

2017-07-13 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +2759

___
Python tracker 

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



[issue28427] WeakValueDictionary next bug (with multithreading)

2017-07-13 Thread Larry Hastings

Larry Hastings added the comment:

I tested this in a freshly-built 3.4.6.  Although it reproduced the behavior 
you're complaining about--it threw the assert in Armin's test.py, and Serhiy's 
issue28427.py prints an admonishing FAIL--neither test *crashes* CPython.  So 
I'm not convinced either of these is a *security* risk.  This is a bug, and 3.4 
isn't open for bugfixes, so I don't plan to accept a backport for this in 3.4.

If this is a crashing bug, please tell me how to reproduce the crashing bug 
with 3.4.6.

--
nosy: +larry

___
Python tracker 

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



[issue26617] Assertion failed in gc with __del__ and weakref

2017-07-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I'll do this.

--
nosy: +serhiy.storchaka
status: closed -> open

___
Python tracker 

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



[issue26617] Assertion failed in gc with __del__ and weakref

2017-07-13 Thread Larry Hastings

Larry Hastings added the comment:

I'll accept this as a backport for 3.4.  I'm convinced that, although the 
sample programs don't crash in release builds, the behavior is wrong and could 
be exploited.

Will someone have time to create the PR in the next day or two?  (It's not that 
it's necessary, but it seems that Victor and Serhiy are very quick, which is 
nice.  And adding it sooner will make it more comfortable to tag and release 
3.4.7rc1 next weekend, which I think I'm going to do.)

--

___
Python tracker 

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



[issue8376] Tutorial offers dangerous advice about iterators: “__iter__() can just return self”

2017-07-13 Thread R. David Murray

R. David Murray added the comment:

I just had a colleague get confused about the container returning self, and he 
was referring to the iterator protocol docs at 
https://docs.python.org/3.6/library/stdtypes.html#iterator.__iter__.  If you 
don't read that section with your thinking cap firmly in place it is easy to 
get confused about what "the iterator itself" means there.  I think it would be 
beneficial to add a sentence about the iterator state needing to be independent 
for each iterator returned by the *container's* __iter__.  A similar sentence 
in the tutorial might be all that is needed as well.

--

___
Python tracker 

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



[issue26415] Excessive peak memory consumption by the Python parser

2017-07-13 Thread Charalampos Stratakis

Changes by Charalampos Stratakis :


--
nosy: +cstratak

___
Python tracker 

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



[issue23835] configparser does not convert defaults to strings

2017-07-13 Thread Łukasz Langa

Łukasz Langa added the comment:

Backwards compatibility will be considered when the patch is ready. I'm not 
overly worried about fixing a case that currently raises exceptions all over 
the place. There's few compatibility concerns that we need to consider in this 
case.

--

___
Python tracker 

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



[issue30911] Warning in _json.c on platforms where char is unsigned

2017-07-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset b6dae2e40d14436d77d3f0bfe6a5b4ae73c83c6e by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-30911: Add tests for bad boolean arguments for accelerated json 
(GH-2690) (#2694)
https://github.com/python/cpython/commit/b6dae2e40d14436d77d3f0bfe6a5b4ae73c83c6e


--

___
Python tracker 

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



[issue30911] Warning in _json.c on platforms where char is unsigned

2017-07-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 2ec2c5f0b05efdcb7919c477591f1cb48bfb0aa9 by Serhiy Storchaka in 
branch '3.5':
[3.5] bpo-30911: Add tests for bad boolean arguments for accelerated json 
(GH-2690) (#2693)
https://github.com/python/cpython/commit/2ec2c5f0b05efdcb7919c477591f1cb48bfb0aa9


--

___
Python tracker 

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



[issue30911] Warning in _json.c on platforms where char is unsigned

2017-07-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The tests are backported to other branches. This is a one of reasons why I 
created a separate PR for tests.

--

___
Python tracker 

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



[issue30911] Warning in _json.c on platforms where char is unsigned

2017-07-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 7d0a99582050ccac2e7126484d23072be342f317 by Serhiy Storchaka in 
branch '3.6':
[3.6] bpo-30911: Add tests for bad boolean arguments for accelerated json 
(GH-2690) (#2692)
https://github.com/python/cpython/commit/7d0a99582050ccac2e7126484d23072be342f317


--

___
Python tracker 

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



[issue30911] Warning in _json.c on platforms where char is unsigned

2017-07-13 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +2758

___
Python tracker 

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



[issue30911] Warning in _json.c on platforms where char is unsigned

2017-07-13 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +2757

___
Python tracker 

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



[issue30911] Warning in _json.c on platforms where char is unsigned

2017-07-13 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +2756

___
Python tracker 

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



[issue30911] Warning in _json.c on platforms where char is unsigned

2017-07-13 Thread STINNER Victor

STINNER Victor added the comment:

Oh ok. If it's a regression in the master branch, the code was never released 
with the bug. In this case, there is no need to document such fix. Thank you 
:-) I close the issue.

Thanks for the fix Sergev, thanks for the test Serhiy ;-)

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



[issue30911] Warning in _json.c on platforms where char is unsigned

2017-07-13 Thread Segev Finer

Segev Finer added the comment:

Introduced in 
https://github.com/python/cpython/commit/ac5bbd43bc7b769c13ae0412cb28a3521f4d4ff1
 which is only in 3.7 that means this wasn't ever released. I can send a PR 
with a NEWS entry if it still needs one?

--

___
Python tracker 

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



[issue30911] Warning in _json.c on platforms where char is unsigned

2017-07-13 Thread STINNER Victor

STINNER Victor added the comment:

> Actually the issue was more serious.

If the bug is serious, it deserves a NEWS entry, no? Moreover, the fix+test 
should be backported to 2.7, 3.5 and 3.6, no?

--
nosy: +haypo

___
Python tracker 

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



[issue30911] Warning in _json.c on platforms where char is unsigned

2017-07-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset d3aaa2f1496aae0809c9ec9623fa528d3a2c16c2 by Serhiy Storchaka in 
branch 'master':
bpo-30911: Add tests for bad boolean arguments for accelerated json (#2690)
https://github.com/python/cpython/commit/d3aaa2f1496aae0809c9ec9623fa528d3a2c16c2


--

___
Python tracker 

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