[issue25188] regrtest.py improvement for Profile Guided Optimization builds

2015-09-26 Thread Alecsandru Patrascu

Alecsandru Patrascu added the comment:

Thank you for the tweaks. I tested the patch and it is all working fine. 
Without failure count the PGO run is even more transparent to the user. 

I tested your final version of the patch on several Linux server and regular 
desktop distributions and software configurations and I saw that test_eintr 
does not block and the entire PGO build finishes in good conditions every time.

--

___
Python tracker 

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



[issue25220] Enhance and refactor test.regrtest (convert regrtest.py to a package)

2015-09-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4a9418ed0d0c by Victor Stinner in branch 'default':
Issue #25220: Move most regrtest.py code to libregrtest
https://hg.python.org/cpython/rev/4a9418ed0d0c

--

___
Python tracker 

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



[issue25220] Enhance and refactor test.regrtest (convert regrtest.py to a package)

2015-09-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 40667f456c6f by Victor Stinner in branch 'default':
Issue #25220: Create Lib/test/libregrtest/
https://hg.python.org/cpython/rev/40667f456c6f

--

___
Python tracker 

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



[issue25238] Version added of context parameter for xmlrpc.client.ServerProxy incorrect

2015-09-26 Thread desbma

New submission from desbma:

Doc of 3.4 branch says the context parameter for xmlrpc.client.ServerProxy was 
added at version 3.4.3: 
https://docs.python.org/3.4/library/xmlrpc.client.html?highlight=xmlrpc.client#module-xmlrpc.client

Although doc of 3.5 branch says the context parameter for 
xmlrpc.client.ServerProxy was added at version 3.5: 
https://docs.python.org/3/library/xmlrpc.client.html?highlight=xmlrpc.client#module-xmlrpc.client

See issue22960 for original issue and patch.

--
components: Library (Lib)
messages: 251644
nosy: desbma
priority: normal
severity: normal
status: open
title: Version added of context parameter for xmlrpc.client.ServerProxy 
incorrect
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



[issue25125] "Edit with IDLE" does not work for shortcuts

2015-09-26 Thread Steve Dower

Steve Dower added the comment:

Ah, I misread that part. Will have to look deeper, but I'm not actually sure 
that shortcuts are supposed to support the same operations (though if it shows 
up, I guess it should work).

--

___
Python tracker 

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



[issue25135] Deques to adopt the standard clearing procedure for mutable objects

2015-09-26 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
resolution:  -> fixed
status: open -> closed
type:  -> behavior
versions: +Python 2.7, Python 3.5

___
Python tracker 

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



[issue25135] Deques to adopt the standard clearing procedure for mutable objects

2015-09-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fc6d62db8d42 by Raymond Hettinger in branch '2.7':
Issue #25135: Avoid possible reentrancy issues in deque_clear.
https://hg.python.org/cpython/rev/fc6d62db8d42

--

___
Python tracker 

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



[issue24820] IDLE themes for light on dark

2015-09-26 Thread Anand Krishnakumar

Anand Krishnakumar added the comment:

Hi!
I'm a 14 year old who wants to start developing for Python. I absolutely adore 
this enhancement and I would love to contribute towards this.
So please let me know if I can help, and if yes, how?

--
nosy: +Anand Krishnakumar

___
Python tracker 

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



[issue25234] test_eintr.test_os_open hangs under Xcode 7

2015-09-26 Thread Brett Cannon

Brett Cannon added the comment:

It is 10.10, but apparently a reboot fixed it (software, am I right? =/ ).

--
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

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



[issue747320] rfc2822 formatdate functionality duplication

2015-09-26 Thread Berker Peksag

Berker Peksag added the comment:

Here is an updated patch (including tests and documentation updates).

--
components:  -email
nosy: +berker.peksag
stage: needs patch -> patch review
type: performance -> enhancement
versions: +Python 3.6 -Python 3.5
Added file: http://bugs.python.org/file40587/issue747320.diff

___
Python tracker 

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



[issue25234] test_eintr.test_os_open hangs under Xcode 7

2015-09-26 Thread Ned Deily

Ned Deily added the comment:

Brett, was this on OS X 10.10.x or a 10.11 pre-release?  test_eintr does not 
fail fail for me on either using the most recent Xcode 7.

--
title: test_einter.test_os_open hangs under Xcode 7 -> test_eintr.test_os_open 
hangs under Xcode 7

___
Python tracker 

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



[issue25233] AssertionError from asyncio Queue get

2015-09-26 Thread Guido van Rossum

Guido van Rossum added the comment:

I have a fix pending here: https://github.com/python/asyncio/pull/269

--

___
Python tracker 

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



[issue19884] Importing readline produces erroneous output

2015-09-26 Thread Berker Peksag

Berker Peksag added the comment:

The version check doesn't work because 0ed1801bf4bd added #ifndef __APPLE__ to 
guard the code, so if you're using readline on OS X, that rl_variable_bind 
workaround won't work.

There are two alternatives:

1) convert ifndef to ifdef and add a check for the ``using_libedit_emulation`` 
variable.

#ifdef __APPLE__
if (using_libedit_emulation) {
...
...

looks like a common idiom in readline.c.


2) just skip the test if _READLINE_VERSION < 0x0603

--
nosy: +berker.peksag

___
Python tracker 

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



[issue25239] HTMLParser handle_starttag replaces entity references in attribute value even without semicolon

2015-09-26 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue25241] ctypes: access violation reading

2015-09-26 Thread Dum Dum

New submission from Dum Dum:

On Windows 8.1 64-bit, using a fresh installation of Python 3.5.150.0 64-bit, 
`error_script.py` crashes, while Python 3.4.3150 and 2.7.10150 (both 64-bit) 
run the script properly.

Here is a traceback: https://bpaste.net/show/3ecfbf93b96e

--
files: error_script.py
messages: 251658
nosy: Dum.Dum
priority: normal
severity: normal
status: open
title: ctypes: access violation reading
type: crash
versions: Python 3.5
Added file: http://bugs.python.org/file40589/error_script.py

___
Python tracker 

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



[issue25135] Deques to adopt the standard clearing procedure for mutable objects

2015-09-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 005590a4a005 by Raymond Hettinger in branch '3.5':
Issue #25135: Avoid possible reentrancy issues in deque_clear.
https://hg.python.org/cpython/rev/005590a4a005

--
nosy: +python-dev

___
Python tracker 

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



[issue25220] Enhance and refactor test.regrtest (convert regrtest.py to a package)

2015-09-26 Thread STINNER Victor

STINNER Victor added the comment:

Ok, I started simply by *moving* code, without additionnal changes. I will 
watch for buildbots to ensure that no regression was added. The 
Lib/test/regrtest.py is kept to not break any existing tool. It looks like 
Lib/test/regrtest.py is very important in Python, much more than what I 
expected. It's used for PGO compilation, it's used by various scripts for 
different platforms, it's used in scripts to build Linux packages,etc.

I used "hg cp" to create new files to ensure that the history is not lost.

I will write new patches for the real refactoring work described in the first 
message. It will be much easier to review changes written after the code was 
moved. So we can discuss controversal changes like the creation of a class for 
libregrtest/main.py ;-)

--

___
Python tracker 

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



[issue24820] IDLE themes for light on dark

2015-09-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

My only question right now is whether I should apply as is or with minor 
adjustments.  Thanks for the encouragements either way.

--

___
Python tracker 

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



[issue25240] Stack overflow in reprlib causes a core dump

2015-09-26 Thread Ceridwen

New submission from Ceridwen:

I have a linked list implementation made of nested tuples with a custom repr:

def __repr__(self):
return 'LinkedList(' + ', '.join(repr(v) for v in self) + ')'

(Iterating over a LinkedList returns just its contents.)

When using Raymond Hettinger's recipe for finding the size in memory of an 
object, 
https://code.activestate.com/recipes/577504-compute-memory-footprint-of-an-object-and-its-cont/?in=user-178123
 , when I set verbose=True and exceed the recursion limit with reprlib.repr, I 
get the following error:

Fatal Python error: Cannot recover from stack overflow.

Current thread 0x7fa24200d700 (most recent call first):
  File ".py", line 327 in __repr__
  File "/usr/lib/python3.4/reprlib.py", line 135 in repr_instance
  File "/usr/lib/python3.4/reprlib.py", line 64 in repr1
  File "/usr/lib/python3.4/reprlib.py", line 54 in repr
  File "recipe.py", line 46 in sizeof
  [many instances of the above line repeated]
  ...
Aborted (core dumped)

The line in the recipe it fails when recursing on is:

print(s, type(o), repr(o), file=stderr)

On 2.7 it fails with a RuntimeError as I'd expect.

--
components: Library (Lib)
messages: 251655
nosy: ceridwen
priority: normal
severity: normal
status: open
title: Stack overflow in reprlib causes a core dump
type: crash
versions: Python 3.4

___
Python tracker 

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



[issue25243] decouple string-to-boolean logic from ConfigParser.getboolean and offer as separate function

2015-09-26 Thread Joshua Bronson

New submission from Joshua Bronson:

ConfigParser.getboolean[1] has logic to convert strings like '0' and 'False' to 
False. This logic is generally useful in other contexts and need not be coupled 
to ConfigParser. Would you consider accepting a patch that factored this 
string-to-boolean logic out of ConfigParser into a standalone function, and 
changed ConfigParser.getboolean internally to call that?

Thanks for your consideration.

[1] 
https://docs.python.org/3/library/configparser.html#configparser.ConfigParser.getboolean

--
messages: 251664
nosy: jab
priority: normal
severity: normal
status: open
title: decouple string-to-boolean logic from ConfigParser.getboolean and offer 
as separate function
type: enhancement

___
Python tracker 

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



[issue24988] IDLE: debugger context menus not working on Mac

2015-09-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Opened #25244 to consider changing exact right-click behavior.

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



[issue25241] ctypes: access violation reading

2015-09-26 Thread Dum Dum

Dum Dum added the comment:

I rewrote the code following your suggestions and it appears the error was 
indeed on my side. I somewhat expected that, but found it weird that it only 
seemed to occur on 3.5. Thank you!

--

___
Python tracker 

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



[issue24988] IDLE: debugger context menus not working on Mac

2015-09-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bf11034f0291 by Terry Jan Reedy in branch '2.7':
Issue #24988: Idle ScrolledList context menus (used in debugger)
https://hg.python.org/cpython/rev/bf11034f0291

New changeset 85a4c95ad02f by Terry Jan Reedy in branch '3.4':
Issue #24988: Idle ScrolledList context menus (used in debugger)
https://hg.python.org/cpython/rev/85a4c95ad02f

--
nosy: +python-dev

___
Python tracker 

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



[issue25244] Idle: refine right-click behavior

2015-09-26 Thread Terry J. Reedy

New submission from Terry J. Reedy:

Spinoff from #24988, where I noted "The standard on Windows is to bring up a 
context menu on right-button-release, not on r-b-press." and asked "What about 
linux and mac?"

The question is relevant for 'Go to File/Line'.  Look at text where pressed or 
where released?

Current code in multiple places is
if macosxSupport.isAquaTk():
listbox.bind("", self.popup_event)
listbox.bind("", self.popup_event)
else:
listbox.bind("", self.popup_event)

Also for paste: where insert?

Thunderbird and Notepad++ move the insertion cursor on rb-press, That is the 
paste position even if the mouse is moved before release. Notepad does not move 
the insert cursor. MS Word is confusing, erasing the cursor when the menu is 
displayed and moving it when the menu goes away.

Additional note: Testing with my middle button, a press and release act the 
same as left click to move the insertion cursor to the mouse cursor. Moving my 
mouse while holding the middle button down moves the text pane within the text 
window. The insertion cursor is not moved. This is pretty much redundant with 
using the scroll wheel or scroll bar.

--
assignee: terry.reedy
messages: 251669
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Idle: refine right-click behavior
type: enhancement
versions: Python 2.7, 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



[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-26 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

I am afraid you misunderstand how fromutc() method works.  Note that you rarely 
need to call it directly: use astimezone() method to convert between timezones.

--
nosy: +tim.peters

___
Python tracker 

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



[issue24570] IDLE Autocomplete and Call Tips Do Not Pop Up on OS X with ActiveTcl 8.5.18

2015-09-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b5bc7e9dab77 by Terry Jan Reedy in branch '2.7':
Issue #24570: Idle: make calltip and completion boxes appear on Macs
https://hg.python.org/cpython/rev/b5bc7e9dab77

New changeset 6687630e201a by Terry Jan Reedy in branch '3.4':
Issue #24570: Idle: make calltip and completion boxes appear on Macs
https://hg.python.org/cpython/rev/6687630e201a

--

___
Python tracker 

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



[issue25243] decouple string-to-boolean logic from ConfigParser.getboolean and offer as separate function

2015-09-26 Thread Joshua Bronson

Joshua Bronson added the comment:

One way this could be offered is as a new static method on bool (something like 
bool.parse_str?), but I of course defer to the better judgment of the Python 
core developers. I'd be happy to take a crack at a patch adding it wherever you 
like, if you like.

--

___
Python tracker 

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



[issue9051] Improve pickle format for timezone aware datetime instances

2015-09-26 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

> For stability it is better to use public name 'timezone.utc' instead of 
> '_utc'.

Can you elaborate on the "stability" consideration?

I would like to revisit this issue since we will have some changes made to 
datetime pickles in the context of PEP 495.

--

___
Python tracker 

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



[issue24988] IDLE: debugger context menus not working on Mac

2015-09-26 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy

___
Python tracker 

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



[issue18967] Find a less conflict prone approach to Misc/NEWS

2015-09-26 Thread Nick Coghlan

Nick Coghlan added the comment:

Just noting a potential practical benefit of the "NEWS entry first" approach 
that David suggests: I believe it will help encourage the creation of a 
succinct answer to "Why are we making this change?" as part of the patch review 
process.

That's then useful both during the patch review itself (since there's a shared 
understanding between reviewers and implementors of the goal to be achieved), 
as well as when the change is released (since there's hopefully a user centric 
explanation of *why* something changed, rather than merely *what* changed)

However, the key trap I'd like us to avoid falling into is letting the fact a 
particular approach falls short of our ideal approach deter the introduction of 
interim improvements. We're going to need the checked in filesystem database 
anyway to backfill historical NEWS entries after switching to a generated NEWS 
file, so it seems harmless to me to switch to it early and then incrementally 
add to it until a tracker based solution is available.

--

___
Python tracker 

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



[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-26 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
versions: +Python 3.6 -Python 3.4

___
Python tracker 

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



[issue24570] IDLE Autocomplete and Call Tips Do Not Pop Up on OS X with ActiveTcl 8.5.18

2015-09-26 Thread Terry J. Reedy

Changes by Terry J. Reedy :


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



[issue24570] IDLE Autocomplete and Call Tips Do Not Pop Up on OS X with ActiveTcl 8.5.18

2015-09-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Added equivalent completion window patch.  Would have preferred confirmation 
that Idle versions work, but 3.4.4rc1 is only a week away and I think having 
bug confirmed and fixed in tcl is enough to go with.

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



[issue23496] Steps for Android Native Build of Python 3.4.2

2015-09-26 Thread Cyd Haselton

Cyd Haselton added the comment:

UPDATE: Before downloading/building Google gdb source I ran test_gdb.py, which 
failed completely.  Details of those tests are attached.

--
Added file: http://bugs.python.org/file40586/test_gdb.log

___
Python tracker 

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



[issue25188] regrtest.py improvement for Profile Guided Optimization builds

2015-09-26 Thread Brett Cannon

Brett Cannon added the comment:

I fixed my test_eintr problem, but now 
https://hg.python.org/cpython/rev/4a9418ed0d0c landed in 3.6/default and broke 
the patch. Since missing getting this in before the aforementioned change was 
my fault, I'll personally handle making the patch apply cleanly in default.

--

___
Python tracker 

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



[issue25239] HTMLParser handle_starttag replaces entity references in attribute value even without semicolon

2015-09-26 Thread Sean Liu

New submission from Sean Liu:

In the document of HTMLParser.handle_starttag, it states "All entity references 
from html.entities are replaced in the attribute values." However it will 
replace the string if it matches ampersand followed by the entity name without 
the semicolon.

For example foo will produce "t=buy¤cy=usd" 
as the value of href attribute due to "curren" is the entity name for the 
currency sign.

--
components: Library (Lib)
files: parserentity.py
messages: 251654
nosy: Sean Liu
priority: normal
severity: normal
status: open
title: HTMLParser handle_starttag replaces entity references in attribute value 
even without semicolon
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file40588/parserentity.py

___
Python tracker 

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



[issue25240] Stack overflow in reprlib causes a core dump

2015-09-26 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +rhettinger

___
Python tracker 

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



[issue25239] HTMLParser handle_starttag replaces entity references in attribute value even without semicolon

2015-09-26 Thread Ezio Melotti

Ezio Melotti added the comment:

This seems indeed to be a bug.  The relevant bit seems to be at 
http://www.w3.org/TR/html5/syntax.html#consume-a-character-reference :

"""
If the character reference is being consumed as part of an attribute, and the 
last character matched is not a ";" (U+003B) character, and the next character 
is either a "=" (U+003D) character or an alphanumeric ASCII character, then, 
for historical reasons, all the characters that were matched after the U+0026 
AMPERSAND character (&) must be unconsumed, and nothing is returned. However, 
if this next character is in fact a "=" (U+003D) character, then this is a 
parse error, because some legacy user agents will misinterpret the markup in 
those cases.
"""

Off the top of my head, this paragraph is not implemented in HTMLParser (and it 
should).
Also note that foo is not valid HTML and 
the & should have been escaped with .

--
assignee:  -> ezio.melotti
stage:  -> test needed
versions: +Python 2.7, 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



[issue25241] ctypes: access violation reading

2015-09-26 Thread eryksun

eryksun added the comment:

The default function pointer restype is c_int, and the default integer argument 
conversion is also c_int. However, the handle returned by FindFirstVolume is a 
pointer to a private structure that it uses for the volume enumeration, so you 
must set restype to a pointer type. Similarly, if restype is a simple type that 
gets converted to a Python integer (e.g. wintypes.HANDLE), then you must either 
set FindNextVolumeW.argtypes or manually wrap the handle value (e.g. vhandle = 
wintypes.HANDLE(vhandle)). The default c_int conversions will only work if the 
address happens to fit in a 32-bit int. 

Don't forget to call FindVolumeClose if the process is expected to continue. 
Otherwise you're leaking memory.

Also, if you're defining function pointer prototypes for a library, please do 
not use ctypes.cdll or ctypes.windll. The loaders are global to ctypes and by 
design cache the loaded library, which by design caches function pointers. 
Projects such as pyreadline and colorama have demonstrated the problems that 
this creates due to inconsistent prototype definitions, especially for commonly 
used Win32 APIs.

Here is one way to rewrite your code to have it work more reliably:

import ctypes
from ctypes import wintypes

kernel32 = ctypes.WinDLL('kernel32', use_last_error=True)

kernel32.FindFirstVolumeW.restype = wintypes.HANDLE
kernel32.FindNextVolumeW.argtypes = (wintypes.HANDLE,
 wintypes.LPWSTR,
 wintypes.DWORD)
kernel32.FindVolumeClose.argtypes = (wintypes.HANDLE,)

INVALID_HANDLE_VALUE = wintypes.HANDLE(-1).value
ERROR_NO_MORE_FILES = 18

def list_volumes():
vname = ctypes.create_unicode_buffer(wintypes.MAX_PATH)
vhandle = kernel32.FindFirstVolumeW(vname, len(vname))
if vhandle == INVALID_HANDLE_VALUE:
raise ctypes.WinError(ctypes.get_last_error())
volumes = []
try:
while True:
volumes.append(vname.value)
if not kernel32.FindNextVolumeW(vhandle, vname, len(vname)):
last_error = ctypes.get_last_error()
if last_error == ERROR_NO_MORE_FILES:
break
else:
raise ctypes.WinError(last_error)
finally:
if not kernel32.FindVolumeClose(vhandle):
raise ctypes.WinError(ctypes.get_last_error())
return volumes

if __name__ == '__main__':
for volume in list_volumes():
print(volume)

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



[issue25242] Failed tests for Python 3.5.0 on shared virtual host

2015-09-26 Thread R. David Murray

R. David Murray added the comment:

I've only scanned the first couple of test failures in your attachment, but 
they don't seem to have anything to do with spawn or /tmp.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue25241] ctypes: access violation reading

2015-09-26 Thread eryksun

eryksun added the comment:

Here's a rewrite with a cleaner while loop, at least to me:

def list_volumes():
vname = ctypes.create_unicode_buffer(wintypes.MAX_PATH)
vhandle = kernel32.FindFirstVolumeW(vname, len(vname))
if vhandle == INVALID_HANDLE_VALUE:
raise ctypes.WinError(ctypes.get_last_error())
volumes = [vname.value]
try:
while kernel32.FindNextVolumeW(vhandle, vname, len(vname)):
volumes.append(vname.value)
last_error = ctypes.get_last_error()
if last_error != ERROR_NO_MORE_FILES:
raise ctypes.WinError(last_error)
finally:
if not kernel32.FindVolumeClose(vhandle):
raise ctypes.WinError(ctypes.get_last_error())
return volumes

--

___
Python tracker 

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



[issue25125] "Edit with IDLE" does not work for shortcuts

2015-09-26 Thread eryksun

eryksun added the comment:

> Ah, I misread that part. Will have to look deeper, but I'm not
> actually sure that shortcuts are supposed to support the same 
> operations (though if it shows up, I guess it should work).

A LNK shortcut should support the same commands (e.g. open, edit) as its 
target. This works for me in Windows 10. 

BTW, I don't see how to ShellExecute a subcommand documented on MSDN. One way 
is to just pass the subkey path as the 'verb', e.g. 
r"editwithidle\shell\edit35". Probably it's just passed along to RegOpenKeyEx 
as the subkey, so this shouldn't be used in practice. Could the installer 
create a simple "edit" command? It doesn't have to be smart about it. Just 
overwrite the current value, and let a per-user install take precedence.

--
nosy: +eryksun

___
Python tracker 

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



[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-09-26 Thread Tim Peters

Tim Peters added the comment:

I expect Peter is correct:  the C fromutc() doesn't match the logic of the 
Python fromutc(), and there are no comments explaining why the C version 
changed the logic.

The last 4 lines of his `time_issues.py` show the difference.  The simplified 
UKSummerTime tzinfo always says the total UTC offset and the DST offset are 
+1:00:00.  The Python .fromutc() adds that hour to the datetime passed in, but 
the C .fromutc() does not.  That's because they implement different functions, 
not because Peter is using .fromutc() ;-)

--

___
Python tracker 

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



[issue9051] Improve pickle format for timezone aware datetime instances

2015-09-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

For now "_utc" is not a part of API. When use it in pickling, you implicitly 
make it a part of API, and should support it forever (and force other Python 
implementations to support it). As far as it looks as implementation detail, 
there is a risk that the "_utc" variable can be renamed and this will break 
pickle compatibility.

--

___
Python tracker 

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



[issue24972] IDLE: revisit text highlighting for inactive windows on win32

2015-09-26 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I verified that inactiveselectbackground exists and starts as ''.  Since it 
should match the active selectbackground on all systems, as set by the current 
theme. I will try adding a line where selection colors are set: 
EditorWindow.ResetColorizer:
self.text.config(
...
selectforeground=select_colors['foreground'],
selectbackground=select_colors['background'],
inactiveselectbackground=select_colors['background']
)
I believe this is the only place where this is needed.  The select colors are 
used for a different widget in TreeWidget. The use in ParenMatch for 'paren' 
tag should be temporary.

We will need to reconsider the 'found' highlight and the select versus found 
usage after this change.

--

___
Python tracker 

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



[issue25245] Compile warnings in _pickle.c

2015-09-26 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Changeset 88d98f6c2d7d causes compile warnings in Modules/_pickle.c.

/home/serhiy/py/cpython/Modules/_pickle.c: In function ‘load_counted_long’:
/home/serhiy/py/cpython/Modules/_pickle.c:4752:15: warning: ‘pdata’ may be used 
uninitialized in this function [-Wmaybe-uninitialized]
 value = _PyLong_FromByteArray((unsigned char *)pdata, (size_t)size,
   ^
/home/serhiy/py/cpython/Modules/_pickle.c: In function ‘load’:
/home/serhiy/py/cpython/Modules/_pickle.c:5534:24: warning: ‘s’ may be used 
uninitialized in this function [-Wmaybe-uninitialized]
 idx = Py_CHARMASK(s[0]);
^
/home/serhiy/py/cpython/Modules/_pickle.c:5529:11: note: ‘s’ was declared here
 char *s;
   ^
/home/serhiy/py/cpython/Modules/_pickle.c:4800:7: warning: ‘s’ may be used 
uninitialized in this function [-Wmaybe-uninitialized]
 x = _PyFloat_Unpack8((unsigned char *)s, 0);
   ^
/home/serhiy/py/cpython/Modules/_pickle.c:4795:11: note: ‘s’ was declared here
 char *s;
   ^

--
components: Extension Modules
messages: 251683
nosy: benjamin.peterson, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Compile warnings in _pickle.c
type: compile error
versions: Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue18814] Add utilities to "clean" surrogate code points from strings

2015-09-26 Thread Martin Panter

Martin Panter added the comment:

[padding]

I think my suggested colours for the bikeshed would be handle_surrogates() and 
handle_surrogateescape(). “Rehandle” seems awkward and too assuming to me. And 
I agree with Serhiy that surrogates are a Unicode thing, not just related to 
the “surrogatepass” handler.

Adding them to “codecs” makes sense to me. The most important one, 
handle_surrogateescape() or equivalent, is closely related to the error handler 
of that module.

Having handle_surrogateescape or equivalent would probably be useful for Issue 
25184 (displaying an arbitrary file path in a UTF-8 HTML file).

--
nosy: +martin.panter

___
Python tracker 

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



[issue25194] Register of Financial Interests for core contributors

2015-09-26 Thread Nick Coghlan

Nick Coghlan added the comment:

Posting an alternate draft that takes the approach MAL suggested, emphasising 
the personal motivation side of things.

This one doesn't attempt to pre-categories the list of contributors - instead, 
I'd expect us to do that based on analysis of the raw text.

The opening section also makes it clear that we're not shifting the goal posts 
on becoming a core contributor - the only required disclosure remains that 
which is needed to sign the CLA and submit the signed copy to the PSF.

I like this version a lot better then the previous draft, but am still open to 
suggestions for improving both the formatting and the content.

--
Added file: http://bugs.python.org/file40591/motives.diff

___
Python tracker 

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



[issue25242] Failed tests for Python 3.5.0 on shared virtual host

2015-09-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

May be /tmp is mounted on a filesystem that forbids setting the execution bit.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue23329] _ssl cannot be compiled with LibreSSL anymore (on OpenBSD 5.5) because of ALPN

2015-09-26 Thread Remi Pointel

Remi Pointel added the comment:

Good, I think we should test on a machine with a version of openssl that does 
not support ALPN to be sure.

--

___
Python tracker 

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



[issue25242] Failed tests for Python 3.5.0 on shared virtual host

2015-09-26 Thread Open Genomes

New submission from Open Genomes:

Several tests for Python 3.5.0 failed. 
The install is a local one on a shared virtual server from bluehost.com
This is a local user install, with a prefix in $HOME/python directory. 
Output of uname -a:
Linux box874.bluehost.com 3.12.35.1418868052 #1 SMP Wed Dec 17 20:04:02 CST 
2014 x86_64 x86_64 x86_64 GNU/Linux

It would seem that there are no permissions to spawn() a new process, and to 
write temporary files to /tmp

The tests should be able to work on a virtual server, or the test should check 
if there are permissions to fork a process and write to a system-wide temporary 
directory. Of course many installations use Python on virtual hosts and often 
the system-wide default installation on Linux systems is 2.7.0. The tests need 
to fail gracefully or accommodate the lack of permissions for to fork new 
processes and write to system-wide temporary directories.

--
components: Tests
files: tests.out
messages: 251659
nosy: Open Genomes
priority: normal
severity: normal
status: open
title: Failed tests for Python 3.5.0 on shared virtual host
type: compile error
versions: Python 3.5
Added file: http://bugs.python.org/file40590/tests.out

___
Python tracker 

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