[issue24993] The C function PyCodec_NameReplaceErrors doesn't handle PyCapsule_Import() failure

2015-09-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ac1995b01028 by Victor Stinner in branch '3.5':
Issue #24993: Handle import error in namereplace error handler
https://hg.python.org/cpython/rev/ac1995b01028

--
nosy: +python-dev

___
Python tracker 

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



[issue24992] collections.OrderedDict constructor (odict_new) doesn't handle PyDict_New() failure

2015-09-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> We only give the reference to the caller when the newly created OrderedDict
> is fully initialized (consistent).

See msg246573. PyDict_New() can trigger garbage collecting and traversing , 
and GC have a reference to underinitialized OrderedDict and can call 
odict_traverse() for it.

--

___
Python tracker 

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



[issue24984] document AF_BLUETOOTH socket address formats

2015-09-03 Thread Tim Tisdall

Tim Tisdall added the comment:

I'm not really sure how to add a `versionadded` tag to specify that only the 
BSD-specific support was added in 3.2 (as general support was there prior to 
that).  If I just add the plain tag below that bullet point it would imply that 
the whole protocol was added in 3.2 .

Perhaps I should reword it to just list the original (prior to 3.2) 
documentation, then add the difference with BSD in a separate paragraph such 
that I can tag just that part?  Or maybe I shouldn't bother?

--

___
Python tracker 

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



[issue24990] Foreign language support in turtle module

2015-09-03 Thread R. David Murray

R. David Murray added the comment:

There is a discussion elsewhere about whether it is time to start formalizing 
translation efforts for the python docs (Sphinx supports it).  Unfortunately I 
don't remember where I saw it (probably another issue in the tracker.

I can see your argument about turtle being special in this regard.  There's no 
guarantee a patch would be accepted, though, so before you do much work on it 
I'd recommend posting to python-ideas about it.

Regardless of that, it would be a new feature and so can only go into 3.6, 
unless you can get some consensus for this being another exception to that rule 
like Idle is :)

--
nosy: +gregorlingl, r.david.murray
versions: +Python 3.6 -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 
3.5

___
Python tracker 

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



[issue24994] Python 3.4.2 64-bit Installer error (Please insert the disk:)

2015-09-03 Thread Cameron Walker

Cameron Walker added the comment:

Never mind. I just had to click repair...

--

___
Python tracker 

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



[issue24992] collections.OrderedDict constructor (odict_new) doesn't handle PyDict_New() failure

2015-09-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ef1f5aebe1a6 by Victor Stinner in branch '3.5':
Issue #24992: Fix error handling and a race condition (related to garbage
https://hg.python.org/cpython/rev/ef1f5aebe1a6

--
nosy: +python-dev

___
Python tracker 

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



[issue24993] The C function PyCodec_NameReplaceErrors doesn't handle PyCapsule_Import() failure

2015-09-03 Thread STINNER Victor

STINNER Victor added the comment:

Thanks for your review and your cool error handler.

--

___
Python tracker 

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



[issue24992] collections.OrderedDict constructor (odict_new) doesn't handle PyDict_New() failure

2015-09-03 Thread STINNER Victor

STINNER Victor added the comment:

> It looks to me as an ordinal bug and that is encountered only in special 
> circumstances with small probability. I think it can wait for 3.5.1.

Ok, I agree. What about the second patch, does it look ok?

--

___
Python tracker 

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



[issue24984] document AF_BLUETOOTH socket address formats

2015-09-03 Thread Tim Tisdall

Tim Tisdall added the comment:

I added a note to BTPROTO_SCO that it doesn't work in FreeBSD (I forgot to 
mention that).

--
Added file: http://bugs.python.org/file40341/bluetooth_socket_docs_3.patch

___
Python tracker 

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



[issue24993] The C function PyCodec_NameReplaceErrors doesn't handle PyCapsule_Import() failure

2015-09-03 Thread STINNER Victor

STINNER Victor added the comment:

> The purpose was to make the dependence of unicodedata optional.

In which case the unicodedata module is missing? It's always part of CPython no?

> (...) but now I think that probably your approach is more preferable because 
> it makes the code simpler and errors more explicit.

Yeah, it's not a good practice to *hide* errors. At least, your patch must log 
the error.

--

___
Python tracker 

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



[issue24993] The C function PyCodec_NameReplaceErrors doesn't handle PyCapsule_Import() failure

2015-09-03 Thread STINNER Victor

Changes by STINNER Victor :


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

___
Python tracker 

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



[issue24992] collections.OrderedDict constructor (odict_new) doesn't handle PyDict_New() failure

2015-09-03 Thread STINNER Victor

STINNER Victor added the comment:

> See msg246573. PyDict_New() can trigger garbage collecting and traversing and 
> GC have a reference to underinitialized OrderedDict and can call 
> odict_traverse() for it.

Oooh ok, I understand.

I updated my patch to implement your idea.

--
Added file: http://bugs.python.org/file40340/odict-2.patch

___
Python tracker 

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



[issue24992] collections.OrderedDict constructor (odict_new) doesn't handle PyDict_New() failure

2015-09-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It looks to me as an ordinal bug and that is encountered only in special 
circumstances with small probability. I think it can wait for 3.5.1.

--

___
Python tracker 

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



[issue24984] document AF_BLUETOOTH socket address formats

2015-09-03 Thread Tim Tisdall

Tim Tisdall added the comment:

I'm not sure the proper way to update the patch... I can't seem to edit the 
existing one or replace it.  I'm uploading an updated one, but should I simply 
"unlink" (aka delete) the old one?

--
Added file: http://bugs.python.org/file40339/bluetooth_socket_docs_2.patch

___
Python tracker 

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



[issue24993] The C function PyCodec_NameReplaceErrors doesn't handle PyCapsule_Import() failure

2015-09-03 Thread STINNER Victor

STINNER Victor added the comment:

> It was optional in Python 2 (at least in Unicode-disabled build).

Yeah, even if I don't think that anyone is really using python without unicode 
in the wild. I guess that too many libraries don't work without unicode. Well, 
anyway this issue is for Python 3.6 which has always unicode support :-)

> Perhaps it can be exclude from custom build in Python 3 too.

Right, some patches were proposed to disable some features of Python to get a 
smaller Python core/stdlib, but some developers were opposed to this idea.

It's not supported officially by Python, so I don't think that we should polute 
the code for an hypothetic use case.

If you use a custom build, you must be prepared to some corner case bugs. If 
you modify the build, you are able to fix such simple issue.

--

___
Python tracker 

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



[issue24984] document AF_BLUETOOTH socket address formats

2015-09-03 Thread Tim Tisdall

Tim Tisdall added the comment:

Martin, the odd thing with the SCO protocol is it's expecting an bluetooth 
address as a byte string (ex b'12:23:34:45:56:67' [note the `b`]) where the 
other 3 are expecting a regular string (ex '12:23:34:45:56:67').  I think it 
may have been a case of someone doing a blanket search-and-replace and missing 
the consequences there, but I'm really not sure.  However, this is somewhat 
besides the point as right now I'm trying to focus on just documenting the 
actual behaviour.  ;)

The issue is, what versions have the changes from 23ab586c427a in it, and what 
versions come before that where it's probably expecting a regular string.  
Unfortunately I can't access the web interface for the repo at the moment so I 
can't even try to figure that out at right now.  (Though, I haven't confirmed 
that the old method was looking at regular strings or not...)

--

___
Python tracker 

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



[issue23406] interning and list comprehension leads to unexpected behavior

2015-09-03 Thread R. David Murray

R. David Murray added the comment:

Looks good to me.

--

___
Python tracker 

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



[issue23630] support multiple hosts in create_server/start_server

2015-09-03 Thread Yann Sionneau

Yann Sionneau added the comment:

Here is a new patch without any dependency on netifaces.
Thanks Victor for the great deal of help for all the mock() stuff!

--
Added file: http://bugs.python.org/file40342/multibind6.patch

___
Python tracker 

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



[issue24992] collections.OrderedDict constructor (odict_new) doesn't handle PyDict_New() failure

2015-09-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

If don't initialize fields, then they will be not initialized in odict_dealloc, 
odict_tp_clear and odict_traverse. But _odict_FIRST(od) and od->od_weakreflist 
are used in these functions.

I would allocate a dict for od_inst_dict before calling PyDict_Type.tp_new. An 
allocator can release GIL and call Python code, and at that moment the 
OrderedDict object is in inconsistent state. I already were fell in similar 
trap with lru_cache (issue14373, msg246573).

--
nosy: +rhettinger, serhiy.storchaka

___
Python tracker 

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



[issue24992] collections.OrderedDict constructor (odict_new) doesn't handle PyDict_New() failure

2015-09-03 Thread STINNER Victor

STINNER Victor added the comment:

@Serhiy: Python 3.5 is impacted. Do you consider this bug serious enough to 
request a pull request in Larry's branch for Python 3.5.0?

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



[issue24984] document AF_BLUETOOTH socket address formats

2015-09-03 Thread Tim Tisdall

Tim Tisdall added the comment:

changed "This protocol does not work under FreeBSD." to the more accurate "This 
protocol is not supported under FreeBSD."

--
Added file: http://bugs.python.org/file40343/bluetooth_socket_docs_4.patch

___
Python tracker 

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



[issue24994] Python 3.4.2 64-bit Installer error (Please insert the disk:)

2015-09-03 Thread Cameron Walker

New submission from Cameron Walker:

I had attempted to uninstall python 3.4.2 from the start menu in Windows 7, but 
it was still visible in my Programs and features. I tried to uninstall it from 
there but it said it was missing some files. So I re-downloaded the installer, 
but when it tried to install, the following error came up.

Please insert the disk:
with an Ok and Cancel prompt.
When I click on Ok it causes the same error to reappear, but clicking cancel 
causes it to abort.

Please help.

--
components: Windows
messages: 249654
nosy: Cameron Walker, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Python 3.4.2 64-bit Installer error (Please insert the disk:)
type: behavior
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



[issue24992] collections.OrderedDict constructor (odict_new) doesn't handle PyDict_New() failure

2015-09-03 Thread STINNER Victor

STINNER Victor added the comment:

> If don't initialize fields, then they will be not initialized in odict_dealloc

Old code initialized all fields to zero (or NULL), like "_odict_FIRST(od) = 
NULL;". The type allocator fills the newly allocated with zeros. So setting 
fields again to zero is redundant (useless).

> I would allocate a dict for od_inst_dict before calling PyDict_Type.tp_new. 
> An allocator can release GIL and call Python code, and at that moment the 
> OrderedDict object is in inconsistent state.

Yes, but the newly created object is not still private at this point, there is 
only one reference known in the C code. dict_new() has the same design. You can 
please elaborate the issue?

We only give the reference to the caller when the newly created OrderedDict is 
fully initialized (consistent).

--

___
Python tracker 

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



[issue23375] test_py3kwarn fails on Windows

2015-09-03 Thread Berker Peksag

Changes by Berker Peksag :


--
stage: patch review -> resolved

___
Python tracker 

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



[issue24993] The C function PyCodec_NameReplaceErrors doesn't handle PyCapsule_Import() failure

2015-09-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> In which case the unicodedata module is missing? It's always part of CPython
> no?

It was optional in Python 2 (at least in Unicode-disabled build). Perhaps it 
can be exclude from custom build in Python 3 too.

> Yeah, it's not a good practice to *hide* errors. At least, your patch must
> log the error.

Then please commit your patch. We can reenable optional dependency later if it 
will be needed for embedded systems.

--

___
Python tracker 

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



[issue24974] ICC on Windows 8.1: _decimal fails to compile with default fp model

2015-09-03 Thread Zachary Ware

Zachary Ware added the comment:

Committed!  Thank you Steve for the suggestion and Stefan for the approval.

--

___
Python tracker 

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



[issue24305] The new import system makes it inconvenient to correctly issue a deprecation warning for a module

2015-09-03 Thread Zachary Ware

Zachary Ware added the comment:

Just to note, there's an easier way to run a custom build on multiple bots: go 
to http://buildbot.python.org/all/builders/ and scroll (way) down to the 
section for forcing a build on custom builders (you can search for 'Repo path:' 
(with the colon)), check the box next to all the builders you want, then fill 
out the Repo path, your name, reason, and revision.  You can also force the 
build on *all* custom builders; search for the second hit on 'Repo path:'.

...might not hurt if we document that somewhere.

--
nosy: +zach.ware

___
Python tracker 

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



[issue24974] ICC on Windows 8.1: _decimal fails to compile with default fp model

2015-09-03 Thread Zachary Ware

Zachary Ware added the comment:

There's not a 32-bit ICC buildbot, though I could force one.

But since you say commit it, I'll commit it ;)

--

___
Python tracker 

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



[issue24974] ICC on Windows 8.1: _decimal fails to compile with default fp model

2015-09-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 863407e80370 by Zachary Ware in branch '3.5':
Issue #24974: Force fp-model precice in mpdecimal.c on Windows
https://hg.python.org/cpython/rev/863407e80370

New changeset 88c28d29afe4 by Zachary Ware in branch 'default':
Closes #24974: Merge with 3.5
https://hg.python.org/cpython/rev/88c28d29afe4

--
nosy: +python-dev
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



[issue24992] collections.OrderedDict constructor (odict_new) doesn't handle PyDict_New() failure

2015-09-03 Thread STINNER Victor

STINNER Victor added the comment:

Yury wrote:
> Is this something that we should ship in 3.5.0rc3?

I don't think so. I agree with Serhiy who wrote:
> It looks to me as an ordinal bug and that is encountered only in special 
> circumstances with small probability. I think it can wait for 3.5.1.

It looks like the bug can only occurs in case of very low memory (an empty dict 
takes 1 KB or less) which is a rare use case.

--

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

Terry J. Reedy added the comment:

I just found #24801 which addressed the editor issue.

--

___
Python tracker 

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



[issue24979] Allow timezone offsets greater than 24 hours

2015-09-03 Thread TJ

TJ added the comment:

Thanks for the pointer to #5288. Happy to consolidate there.

In my reading of #5094 (from which I pulled your RFC 2822 reference), the 
justification I found was "For the allowable range, follow the datetime docs as 
someone might be relying on that specification already".  But this didn't 
explain why it was in the spec in the first place, and that is the decision I 
thought was arbitrary, not the decision to maintain the restriction. Splitting 
hairs at this point. Looking forward to the restriction being removed.

--

___
Python tracker 

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



[issue24974] ICC on Windows 8.1: _decimal fails to compile with default fp model

2015-09-03 Thread Stefan Krah

Stefan Krah added the comment:

Hmm, I don't see a 32-bit ICC buildbot. This problem can only occur
on 32-bit with -DPPRO defined.


Please go ahead and commit the patch. The inline asm
miscompilation problem I mentioned earlier was solved in
12.0 (I think), so let's just assume it's gone (probably
it has never been an issue for MASM anyway).

--
assignee:  -> zach.ware

___
Python tracker 

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



[issue24974] ICC on Windows 8.1: _decimal fails to compile with default fp model

2015-09-03 Thread Stefan Krah

Stefan Krah added the comment:

We can always blame any fallout on ICC. ;)

--

___
Python tracker 

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



[issue24913] deque.index() overruns deque boundary

2015-09-03 Thread Brett Cannon

Brett Cannon added the comment:

PR created, Larry.

--
assignee: brett.cannon -> larry
stage:  -> resolved

___
Python tracker 

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



[issue24974] ICC on Windows 8.1: _decimal fails to compile with default fp model

2015-09-03 Thread Zachary Ware

Zachary Ware added the comment:

I tested both 32 and 64 bit, with MSVC 14 (VS 2015) and ICC 15.0 (backed by VS 
2015).

I can go ahead and commit this to a sandbox for buildbot testing if it would 
help.

--

___
Python tracker 

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



[issue24994] Python 3.4.2 64-bit Installer error (Please insert the disk:)

2015-09-03 Thread Zachary Ware

Zachary Ware added the comment:

Glad you solved it for yourself :)

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



[issue24992] collections.OrderedDict constructor (odict_new) doesn't handle PyDict_New() failure

2015-09-03 Thread STINNER Victor

STINNER Victor added the comment:

> I left a nitpick. In any case the patch LGTM.

Ok, fixed.

I pushed my fix. Thanks for the review Serhiy.

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

___
Python tracker 

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



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

2015-09-03 Thread Mark Roseman

Mark Roseman added the comment:

Terry, the new code I've proposed includes a "tkextras" module that is a good 
place for these sort of little convenience functions.

--

___
Python tracker 

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




[issue24979] Allow timezone offsets greater than 24 hours

2015-09-03 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

I always thought that restriction came from ISO 8601, but at the moment I don't 
have it to check.

--

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

Terry J. Reedy added the comment:

The standard on Windows is to bring up a context menu on right-button-release, 
not on r-b-press.  What about linux and mac?  

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.

EditorWindow.py has this code for context menu event binding:

if macosxSupport.isAquaTk():
# Some OS X systems have only one mouse button,
# so use control-click for pulldown menus there.
#  (Note, AquaTk defines <2> as the right button if
#   present and the Tk Text widget already binds <2>.)
text.bind("",self.right_menu_event)
else:
# Elsewhere, use right-click for pulldown menus.
text.bind("<3>",self.right_menu_event)

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.

Would it confuse Mac users to have rt-click for context menu only work in 
debugger?  Could we make rt-click work in editor windows by recording position 
or time on press and compare position or time on release?

--

___
Python tracker 

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



[issue24995] better exception message when an unsupported object is passed to `async for` (pep 492)

2015-09-03 Thread Yury Selivanov

New submission from Yury Selivanov:

Should we raise something like "'int' object is not an asynchronous iterable", 
instead of "'async for' requires an object with __aiter__ method, got int"?


>>> foo().send(None)
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 2, in foo
TypeError: 'async for' requires an object with __aiter__ method, got int


>>> for i in 1: pass
...
Traceback (most recent call last):
  File "", line 1, in 
TypeError: 'int' object is not iterable

--
assignee: yselivanov
components: Interpreter Core
messages: 249689
nosy: gvanrossum, haypo, ncoghlan, yselivanov
priority: normal
severity: normal
status: open
title: better exception message when an unsupported object is passed to `async 
for` (pep 492)
type: enhancement
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



[issue24996] IDLE: debugger local/global vars should not be editable

2015-09-03 Thread Mark Roseman

New submission from Mark Roseman:

In the debugger, the values for the variables shown in the locals/globals panes 
are editable (i.e. using Entry widget) but I don't see any mechanism to have 
those changes affect anything. If I'm not missing something, why Entry and not 
Label?

--
messages: 249690
nosy: kbk, markroseman, roger.serwy, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE: debugger local/global vars should not be editable
type: behavior
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



[issue15348] IDLE - shell becomes unresponsive if debugger windows is closed while active.

2015-09-03 Thread Mark Roseman

Changes by Mark Roseman :


--
nosy: +markroseman

___
Python tracker 

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



[issue15347] IDLE - does not close if the debugger was active

2015-09-03 Thread Mark Roseman

Changes by Mark Roseman :


--
nosy: +markroseman

___
Python tracker 

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



[issue24996] IDLE: debugger local/global vars should not be editable

2015-09-03 Thread Mark Roseman

Mark Roseman added the comment:

Thanks Terry, sorry I missed your previous mention of this. From what I recall 
the treeview doesn't allow editable items, but what I've done in similar 
circumstances before (editing text items on a canvas in drawing type programs) 
was 'place' an entry widget on top of it at the right location as needed and 
then get rid of the entry when done, which provides the correct effect.

You know what, I think I know why they might have used an Entry widget... for 
really long values of variables the entry can stay a fixed width and will 
horizontal scroll, but a label will expand to the size of the content

--

___
Python tracker 

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



[issue24912] The type of cached objects is mutable

2015-09-03 Thread Mark Shannon

Mark Shannon added the comment:

Larry, of the two choices, I prefer rolling back the change entirely.

I would like to see the bug fixes for typeobject.c applied, but I see no reason 
why making the __class__ of module objects assignable should be included.

--

___
Python tracker 

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



[issue24305] The new import system makes it inconvenient to correctly issue a deprecation warning for a module

2015-09-03 Thread Larry Hastings

Larry Hastings added the comment:

That *is* easier, thanks.  Though the UI for that is baffling.  Protip: search 
for the section where all the "custom" builders are listed all in one section, 
three-quarters of the way down the page.

--

___
Python tracker 

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



[issue24990] Foreign language support in turtle module

2015-09-03 Thread Al Sweigart

Al Sweigart added the comment:

Good idea. I'll bring it up on the python-ideas list.

--

___
Python tracker 

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



[issue24995] better exception message when an unsupported object is passed to `async for` (pep 492)

2015-09-03 Thread STINNER Victor

STINNER Victor added the comment:

IMHO the current message is clear enough.

--

___
Python tracker 

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



[issue24995] better exception message when an unsupported object is passed to `async for` (pep 492)

2015-09-03 Thread Yury Selivanov

Yury Selivanov added the comment:

I saw this reddit thread: 
https://www.reddit.com/r/Python/comments/3ewnwq/async_function_as_generator_for_async_for/
 where people are struggling with understanding how 'async for' works.  Which 
led me to check what error messages we raise when we pass a wrong object to it. 
 Turns out the message is fine, but different from what we raise on iter(1) etc.

--

___
Python tracker 

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



[issue21192] Idle: Print filename when running a file from editor

2015-09-03 Thread Larry Hastings

Larry Hastings added the comment:

On the other hand, I do not hold with marking a minor cosmetic change like this 
as "release blocker".  I'm willing to accept the change, given PEP 434, but I'm 
not going to delay any releases for it.

--
priority: release blocker -> normal

___
Python tracker 

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



[issue24987] subprocess.Popen with shell=True doesn't create socket

2015-09-03 Thread Martin Panter

Changes by Martin Panter :


--
resolution:  -> works for me

___
Python tracker 

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



[issue24995] better exception message when an unsupported object is passed to `async for` (pep 492)

2015-09-03 Thread Guido van Rossum

Guido van Rossum added the comment:

Did you get multiple complaints about this? The existing error doesn't seem so 
bad.

--

___
Python tracker 

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



[issue24996] IDLE: debugger local/global vars should not be editable

2015-09-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I already brought this up as part of one of the StackViewer/Debugger/merge 
issues. Replacing the list with a tree would automatically change this unless 
the tree was changed to have a entry.  Why? My speculation is an intention 
never carried out.  Labels could be made to look different, so that cannot be 
the reason. Can a ttk Treeview allow entries in a column, in case we ever 
wanted to make changes propagate?

--

___
Python tracker 

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



[issue24991] Define instance mutability explicitly on type objects

2015-09-03 Thread Eugene Toder

Changes by Eugene Toder :


--
nosy: +eltoder

___
Python tracker 

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



[issue21192] Idle: Print filename when running a file from editor

2015-09-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Sorry, my memory was that I was supposed to that as a signal, but maybe that 
was with a different RM.

--

___
Python tracker 

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



[issue17849] Missing size argument in readline() method for httplib's class LineAndFileWrapper

2015-09-03 Thread Cory Benfield

Cory Benfield added the comment:

Martin, the idea of simply rejecting the LifeAndFileWrapper HTTP/0.9 fallback 
for _tunnel feels reasonable to me, that can work. Let me whip up an 
alternative patch that does that.

--

___
Python tracker 

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



[issue24991] Define instance mutability explicitly on type objects

2015-09-03 Thread Nick Coghlan

New submission from Nick Coghlan:

Issue #24912 showed that the interpreter has historically assumed that all 
instances of non-heap types are immutable when it comes to preventing __class__ 
reassignment, and changing this assumption caused problems with genuinely 
immutable types that use implicit instance caching (like string interning and 
the small integrer cache).

More generally, whether or not type instances are mutable or not has been 
defined somewhat informally - decimal.Decimal instances, for example, are 
nominally immutable, but this immutability is only by convention, rather than 
enforced by the interpreter.

It may be desirable to be able to explicitly declare instances of a type as 
mutable or immutable (both from Python and from C), rather than having that 
property be inferred from other characteristics in a situational way.

--
messages: 249605
nosy: ncoghlan, njs
priority: normal
severity: normal
status: open
title: Define instance mutability explicitly on type objects
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



[issue23375] test_py3kwarn fails on Windows

2015-09-03 Thread Zachary Ware

Zachary Ware added the comment:

Could this have anything to do with the fact that imageop is a 'built-in' (as 
opposed to 'extension') module on Windows?  Either way, I'm about ready to just 
skip testing the warning for that module on Windows.

--

___
Python tracker 

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



[issue24912] The type of cached objects is mutable

2015-09-03 Thread Nick Coghlan

Nick Coghlan added the comment:

I've filed issue 24991 to suggest reviewing the wider question of how we deal 
with identifying whether or not a type's instances are expected to be "truly 
immutable" in the Python 3.6 time frame.

For 3.5, I think Nathaniel's proposed patch restoring the assumption that 
non-heap types are immutable by default, and whitelisting __class__ assignment 
for PyModuleType specifically is a good way to resolve this with minimal code 
churn late in the release cycle.

--

___
Python tracker 

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



[issue24989] scan_eol() Buffer Over-read

2015-09-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +larry

___
Python tracker 

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



[issue24989] scan_eol() Buffer Over-read

2015-09-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It should be self->string_size, not PyBytes_GET_SIZE(self->buf).

Thank you for your report and your patch John. Here is revised patch with tests 
based on Martin's test.

Larry, perhaps this bug is grave enough to be fixed in RC3.

--
components: +Extension Modules, IO
stage:  -> patch review
Added file: http://bugs.python.org/file40330/scan_eol_Buffer_Over-read_2.patch

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bf634dfe076f by Victor Stinner in branch 'default':
Issue #23517: fromtimestamp() and utcfromtimestamp() methods of
https://hg.python.org/cpython/rev/bf634dfe076f

--

___
Python tracker 

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



[issue24991] Define instance mutability explicitly on type objects

2015-09-03 Thread Nathaniel Smith

Nathaniel Smith added the comment:

Adding Eric Snow to nosy because it seems like there may be some natural 
overlap between this and the per-subinterpreter GIL ideas he brought up on 
python-ideas back in June.

--
nosy: +eric.snow

___
Python tracker 

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



[issue23375] test_py3kwarn fails on Windows

2015-09-03 Thread STINNER Victor

Changes by STINNER Victor :


Added file: http://bugs.python.org/file40332/test_py3kwarn-2.patch

___
Python tracker 

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



[issue24987] subprocess.Popen with shell=True doesn't create socket

2015-09-03 Thread asduj

asduj added the comment:

After executing this code in Python 2.7  I check if OpenOffice is listening the 
localhost:8100, and get the output:

netstat -a | grep 8100
tcp   0   0   localhost:8100   *:*   LISTEN

If I executing the same code in Python 3.4 and check, I get nothing.
Platform: Ubuntu 15.04. In fact, command runs any office installed on the 
computer (LibreOffice or OpenOffice), and on my computer I have LibreOffice.

There are no messages, the command runs normal, just not working as it should.

--

___
Python tracker 

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



[issue23375] test_py3kwarn fails on Windows

2015-09-03 Thread STINNER Victor

STINNER Victor added the comment:

To easily test my patch, you can inject a Python 3 DeprecationWarning in the 
unicodedata module using attached unicodedata.patch, and then modify 
Lib/test/test_py3kwarn.py to add "unicodedata" to the "optional_modules" list.

I tested my patch on Linux (Fedora 22, 64-bit system).

--
Added file: http://bugs.python.org/file40333/unicodedata.patch

___
Python tracker 

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



[issue24872] Add /NODEFAULTLIB:MSVCRT to _msvccompiler

2015-09-03 Thread Christoph Gohlke

Christoph Gohlke added the comment:

Just to confirm: the following script fails with `ImportError: DLL load failed` 
on Python 3.5.0rc2. It fails around the 120th extension. The script passes on 
Python 3.4.3.

Also, Python 3.5.0rc2 (not Python 3.4.3) requires the `extra_postargs=['/DLL']` 
argument to the `link_shared_lib` function, otherwise the linker fails with 
`LINK : fatal error LNK1561: entry point must be defined`.

```
# test_issue24872.py
#
# Build up to 256 C extension modules and import them.
#
# On Python 3.5.0rc2 for Windows this raises "ImportError: DLL load failed:
#   A dynamic link library (DLL) initialization routine failed."
#
# http://bugs.python.org/issue24872

import os
import sys
from importlib import import_module
from distutils import ccompiler

assert sys.platform == 'win32'
assert sys.version_info > (3, 2)

c_source = """/* Minimal Python 3 extension module */
#include "Python.h"
static struct PyModuleDef moduledef = {
PyModuleDef_HEAD_INIT, "%s", NULL, -1, NULL, NULL, NULL, NULL, NULL
};
PyMODINIT_FUNC PyInit_%s(void) { return PyModule_Create(); }
"""

cl = ccompiler.new_compiler()

for i in range(256):
name = '_tmp%.3i' % i
try:
os.remove(name+'.pyd')
except FileNotFoundError:
pass
with open(name+'.c', 'w') as fh:
fh.write(c_source % (name, name))
objects = cl.compile([name+'.c'])
cl.link_shared_lib(objects, output_libname=name, extra_postargs=['/DLL'],
   export_symbols=["PyInit_"+name])
for ext in 'c', 'obj', 'exp', 'lib':
os.remove(name+'.'+ext)
os.rename(name+'.dll', name+'.pyd')
import_module(name)
```

--

___
Python tracker 

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



[issue24912] The type of cached objects is mutable

2015-09-03 Thread Larry Hastings

Larry Hastings added the comment:

Mark, Victor, Benjamin: how do you feel about v2 patch vs rolling back the 
change entirely?

--

___
Python tracker 

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



[issue24989] scan_eol() Buffer Over-read

2015-09-03 Thread STINNER Victor

STINNER Victor added the comment:

scan_eol_Buffer_Over-read_2.patch looks good to me.

> Larry, perhaps this bug is grave enough to be fixed in RC3.

Since it looks like a regression in Python 3.5, yes, it's a severe bug. Please 
send a pull request to Larry for it.

--

___
Python tracker 

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



[issue23375] test_py3kwarn fails on Windows

2015-09-03 Thread STINNER Victor

STINNER Victor added the comment:

> I can't reproduce the failure on Linux.

Do you have a 64-bit system? imageop is only built on 32-bit systems...

> Looks like a test ordering issue. When test_imageop runs before 
> test_py3kwarn, the warning has presumably already been shown once and so 
> isn't triggered when the test is looking for it (compare build 3092 linked 
> above with 3093, which passed).

Yes, I already investigated this issue and I found the same root cause. 

A Python module implemented in C like imageop cannot be reloaded twice. In 
fact, it can never be unloaded. Since the warning is emited when the module is 
loaded, the warning will only be emited once.

The issue is not specific to imageop: test_optional_module_removals() must fail 
on any module implemented in C if the module was already loaded before the test 
is executed.

> Either way, I'm about ready to just skip testing the warning for that module 
> on Windows.

The correct fix is to skip the test if the module was already loaded and if the 
module is implemented in C.

Attached patch implements this fix. I don't know how to test if a module is 
implemented in C or not. I chose to check if its filename ends with ".py" (or 
.pyc or .pyo).

--
keywords: +patch
nosy: +haypo
Added file: http://bugs.python.org/file40331/test_py3kwarn.patch

___
Python tracker 

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



[issue23375] test_py3kwarn fails on Windows

2015-09-03 Thread STINNER Victor

Changes by STINNER Victor :


Removed file: http://bugs.python.org/file40331/test_py3kwarn.patch

___
Python tracker 

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



[issue23375] test_py3kwarn fails on Windows

2015-09-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The approach LGTM. I left comments on Rietveld.

--
stage:  -> patch review

___
Python tracker 

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



[issue24305] The new import system makes it inconvenient to correctly issue a deprecation warning for a module

2015-09-03 Thread Larry Hastings

Larry Hastings added the comment:

Well, this is making me nervous to apply during the RCs.  But... I'm willing to 
risk it.

My price: I want to see this run on a bunch of otherwise-healthy buildbots to 
make sure it doesn't break any platforms.

In case you've never done such a thing, here's how: create a "server-side 
clone" on hg.python.org, apply the patch to that tree, and push to the 
server-side clone.  Then grab a fistful of URLs to "custom" buildbots from here:

http://buildbot.python.org/all/waterfall

and visit each individual page, e.g.

http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%20custom

and use the "Force Build" GUI at the bottom to kick off a build using the 
server-side clone with the patch applied.


Nathaniel: If Brett doesn't have the time to deal with this, I can make the 
server-side clone and check in the patch onto it.  You can then kick off the 
builds and report back the results.

--

___
Python tracker 

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



[issue24912] The type of cached objects is mutable

2015-09-03 Thread Nathaniel Smith

Nathaniel Smith added the comment:

Since I know there's a lot of text here for people to process, here's an 
attempted TL;DR (with inspiration from Serhiy's msg249495):

There were three parts to the original change:
1) Bug fixes for typeobject.c
2) Enabling __class__ assignment for module objects
3) Enabling __class__ assignment for other objects, in particular all non-heap 
types, including 'int', 'str', etc.

Everyone agrees we want to revert (3), which is the bit that has caused all the 
problems. And I don't think anyone has argued for reverting (1) after learning 
that it is separable from the rest. So the main question still under discussion 
is whether we want to revert (2)+(3), or just revert (3) alone.

(Either of these is easy to do; the attached "v2" patch implements the revert 
(3) alone option.)

My position:

When making changes for rc3 (!), we should definitely revert any functionality 
that is breaking things, and should definitely not revert any functionality 
that isn't.

The (3) change obviously meets this bar, so we'll revert it. But when it comes 
to module objects specifically -- the (2) change -- then (AFAICT) no-one has 
identified any problem with the functionality itself, even though it's been 
specifically discussed and reviewed multiple times over the last year, and been 
enabled all the way through the pre-release with explicit tests provided, etc. 
The only argument I see raised against it here is that there might be some 
more-or-less-equivalent but maybe-more-aesthetic way of accomplishing the same 
thing, so maybe we should revert it now so we can get in another round of 
bikeshedding. And if this had been raised a few months ago I'd have been 
sympathetic... but IMO the rc3 release is too late to be churning functionality 
based purely on aesthetics, so I think we should revert (3) alone, while 
leaving (1)+(2) in place.

--

___
Python tracker 

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



[issue21192] Idle: Print filename when running a file from editor

2015-09-03 Thread Larry Hastings

Larry Hastings added the comment:

Terry, if you want this pulled in to Python 3.5.0, you'll need to create a pull 
request on Bitbucket.  Instructions are here:

https://mail.python.org/pipermail/python-dev/2015-August/141167.html

and here:

https://mail.python.org/pipermail/python-dev/2015-August/141365.html

--

___
Python tracker 

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



[issue23375] test_py3kwarn fails on Windows

2015-09-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d739bc20d7b2 by Victor Stinner in branch '2.7':
Issue #23375: Fix test_py3kwarn for modules implemented in C
https://hg.python.org/cpython/rev/d739bc20d7b2

--
nosy: +python-dev

___
Python tracker 

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



[issue23375] test_py3kwarn fails on Windows

2015-09-03 Thread STINNER Victor

STINNER Victor added the comment:

> The approach LGTM. I left comments on Rietveld.

Thanks for the review. I replaced warnings.warn() with a simple print().

This issue should now be fixed.

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

___
Python tracker 

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



[issue24974] ICC on Windows 8.1: _decimal fails to compile with default fp model

2015-09-03 Thread Stefan Krah

Stefan Krah added the comment:

Are you sure that you always tested the 32-bit build, also with ICC 15.0?

--

___
Python tracker 

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



[issue24989] scan_eol() Buffer Over-read

2015-09-03 Thread Larry Hastings

Larry Hastings added the comment:

Yes, please create a pull request for this patch.  Thanks!

And just to confirm: I just applied patch 2 to CPython, then undid the change 
to bytesio.c.  The new test fails, and sometimes Python will segmentation 
fault.  If I then apply the patch to bytesio.c it passes.  Nice work!

--

___
Python tracker 

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



[issue24989] scan_eol() Buffer Over-read

2015-09-03 Thread Larry Hastings

Changes by Larry Hastings :


--
priority: high -> release blocker

___
Python tracker 

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



[issue24992] collections.OrderedDict constructor (odict_new) doesn't handle PyDict_New() failure

2015-09-03 Thread STINNER Victor

STINNER Victor added the comment:

You can try the odict_failmalloc.py program with a Python compiled in debug 
mode to see the bug.

The script requires:
https://pypi.python.org/pypi/pyfailmalloc

--
Added file: http://bugs.python.org/file40335/odict_failmalloc.py

___
Python tracker 

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



[issue24992] collections.OrderedDict constructor (odict_new) doesn't handle PyDict_New() failure

2015-09-03 Thread STINNER Victor

New submission from STINNER Victor:

If PyDict_New() fails (ex: memory allocation failure), odict_new() returns a 
new OrderedDict with an exception set. It's a bug. Attached patch fixes it.

odict_new() constructor also returns NULL without destroying the newly created 
object if _odict_initialize() fails. My patch also fixes this.

My patch inlines _odict_initialize() into odict_new() and avoids useless 
initialization to 0.

--
files: odict.patch
keywords: patch
messages: 249625
nosy: eric.snow, haypo
priority: normal
severity: normal
status: open
title: collections.OrderedDict constructor (odict_new) doesn't handle 
PyDict_New() failure
versions: Python 3.6
Added file: http://bugs.python.org/file40334/odict.patch

___
Python tracker 

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



[issue22241] strftime/strptime round trip fails even for UTC datetime object

2015-09-03 Thread Berker Peksag

Berker Peksag added the comment:

I left a couple comments on Rietveld.

--
nosy: +berker.peksag

___
Python tracker 

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



[issue7175] Define a standard location and API for configuration files

2015-09-03 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 02.09.2015 16:37, flying sheep wrote:
> 
> hi mark, i’ve just lengthily replied to you on python-ideas.
> 
> in short: nope! many command line tools that are relatively new (among them 
> your examples git and pip) honor the specs, my ~/.cache, ~/.config, and 
> ~/.local/share is full of things belonging to libraries, cli tools, my DE, 
> and of course also GUI applications.
> 
> please let’s continue this discussion on python-ideas if you’re still not 
> convinced ☺

I think we're mixing two discussions here:

1. How Python itself should install config files, data, etc.

2. How applications written using Python should get help
   from some module to determine where to install their
   config files, data, etc.

For 1. we already have a solution (in sysconfig.py). If you want to
change or amend this, I think a PEP is needed, since the consequences
will affect a lot of users.

For 2. we can use whatever convention or standard is en vogue today.
The module would have to pay close attention to providing backwards
compatibility right from the start, since these conventions are
bound to change over time.

Note that this ticket started with the location of the distutils
config file. The title has since been broadened way too much for
a ticket. I'd suggest closing it as out-of-date and going with
a proper PEP process or development of a new stdlib module
on python-ideas and -dev.

Given the experience with the platform module, I'm not convinced
that the Python release process is suitable to properly respond
to platform changes, so it may be better to simply have a
standard module on PyPI for 2.

--

___
Python tracker 

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



[issue24993] The C function PyCodec_NameReplaceErrors doesn't handle PyCapsule_Import() failure

2015-09-03 Thread STINNER Victor

STINNER Victor added the comment:

Note: I found the bug when running test_codecs using failmalloc, a library to 
inject MemoryError.

--

___
Python tracker 

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



[issue24993] The C function PyCodec_NameReplaceErrors doesn't handle PyCapsule_Import() failure

2015-09-03 Thread STINNER Victor

New submission from STINNER Victor:

The namereplace error handler introduced in Python 3.5 doesn't handle correctly 
PyCapsule_Import() failure. If the function raises an exception, the 
PyCodec_NameReplaceErrors() function must return NULL.

I see that the code correctly handle the case where PyCodec_NameReplaceErrors() 
failed, but it doesn't clear the exception.

Attached patch changes PyCodec_NameReplaceErrors() to return immediatly NULL if 
PyCodec_NameReplaceErrors() failed.

Or should we log the exception (PyErr_WriteUnraisable) and then clear it? 
PyErr_WriteUnraisable is usually used in corner case when it's impossible to 
report bugs to the function caller.

--
files: namereplace_errors.patch
keywords: patch
messages: 249628
nosy: haypo, serhiy.storchaka
priority: normal
severity: normal
status: open
title: The C function PyCodec_NameReplaceErrors doesn't handle 
PyCapsule_Import() failure
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file40336/namereplace_errors.patch

___
Python tracker 

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



[issue23719] PEP 475: port test_eintr to Windows

2015-09-03 Thread STINNER Victor

STINNER Victor added the comment:

The change ed0e6a9c11af replaced os.fork() with subprocess to try to fix race 
conditions in test_eintr (the test sometimes hangs on FreeBSD buildbots). 
os.fork() is not available on Windows, so this change should help to port 
test_eintr to Windows.

About win32-sleep-test.diff: I'm not sure that it's a good idea to introduce a 
new thread in test_eintr. Signal handlers is more complex when we have multiple 
threads. Would it be possible to spawn a new process which will send a signal 
every N seconds to its parent?

--

___
Python tracker 

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



[issue7175] Define a standard location and API for configuration files

2015-09-03 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 03.09.2015 13:37, flying sheep wrote:
> all three OSs have stable, widely followed standards in place, and the idea 
> of providing a python stdlib API for them received an almost unanimously 
> positive response – with the sole exception being you.

I'm not against developing another module based on appdirs for this.

I do question the usefulness of having such a module in the stdlib,
since I've already gone through a similar experience with the platform
module I wrote several years ago. Ongoing development is not really possible
once a module is in the stdlib and older Python releases don't
benefit from new developments either.

Regarding standard vs. convention: that's all smoke and mirrors :-)
A standard that's not being adopted is not a standard. A convention
may well turn into a standard without ever being written down as
one. A module implementing any such standards or conventions will
have to address more than just one way of doing things in order
to stay compatible with existing software or new developments.
That's what I wanted to say.

But this ticket is not about that discussion anyway...

--

___
Python tracker 

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



[issue23406] interning and list comprehension leads to unexpected behavior

2015-09-03 Thread Matheus Vieira Portela

Matheus Vieira Portela added the comment:

Applying review comments. Now, there is an internal link to the FAQ entry on 
multidimensional lists.

--
Added file: 
http://bugs.python.org/file40337/issue23406_doc_stdtypes_and_faq.patch

___
Python tracker 

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



[issue7175] Define a standard location and API for configuration files

2015-09-03 Thread flying sheep

flying sheep added the comment:

you’re right about the two problems being mixed, however not about the 
standards.

also you’re intermingling conventions with actual standards.

the directory standards for all three big OSs are either not going to change or 
fitted with a backwards-compatibility layer (like windows did with the “My 
Music/Videos/*” folders):

https://developer.apple.com/library/mac/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/MacOSXDirectories/MacOSXDirectories.html

http://windows.microsoft.com/de-de/windows-8/what-appdata-folder

https://msdn.microsoft.com/en-us/library/windows/desktop/dd378457%28v=vs.85%29.aspx

http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

all three OSs have stable, widely followed standards in place, and the idea of 
providing a python stdlib API for them received an almost unanimously positive 
response – with the sole exception being you.

--

___
Python tracker 

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



[issue24992] collections.OrderedDict constructor (odict_new) doesn't handle PyDict_New() failure

2015-09-03 Thread Eric Snow

Eric Snow added the comment:

Thanks for taking care of this, Victor (and Serhiy). :)

--
stage:  -> resolved
type:  -> behavior

___
Python tracker 

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



[issue24989] scan_eol() Buffer Over-read

2015-09-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a5858c30db7c by Serhiy Storchaka in branch '3.5':
Issue #24989: Fixed buffer overread in BytesIO.readline() if a position is
https://hg.python.org/cpython/rev/a5858c30db7c

New changeset 215800fb955d by Serhiy Storchaka in branch 'default':
Issue #24989: Fixed buffer overread in BytesIO.readline() if a position is
https://hg.python.org/cpython/rev/215800fb955d

--
nosy: +python-dev

___
Python tracker 

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



[issue24913] deque.index() overruns deque boundary

2015-09-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9f8c59e61594 by Brett Cannon in branch '3.5':
Issue #24913: Fix overrun error in deque.index().
https://hg.python.org/cpython/rev/9f8c59e61594

New changeset d093d87e449c by Brett Cannon in branch '3.5':
Merge from 3.5.0 for issue #24913
https://hg.python.org/cpython/rev/d093d87e449c

New changeset c6e0c29913ec by Brett Cannon in branch 'default':
Merge from 3.5 for issue #24913
https://hg.python.org/cpython/rev/c6e0c29913ec

--

___
Python tracker 

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



[issue17849] Missing size argument in readline() method for httplib's class LineAndFileWrapper

2015-09-03 Thread Cory Benfield

Cory Benfield added the comment:

Ok, version three of the patch is now available.

--
Added file: http://bugs.python.org/file40345/readline_3.patch

___
Python tracker 

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



[issue24913] deque.index() overruns deque boundary

2015-09-03 Thread Brett Cannon

Brett Cannon added the comment:

OK, that should cover 3.5.0 and then null merge through 3.5 and default. I thus 
consider my favour to Larry done and Raymond now owes me one.

--

___
Python tracker 

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



[issue24996] IDLE: debugger local/global vars should not be editable

2015-09-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

That makes sense, given that a string or list could be indefinitely long.

--

___
Python tracker 

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



[issue24857] mock: Crash on comparing call_args with long strings

2015-09-03 Thread A Kaptur

A Kaptur added the comment:

It looks like there's a related bug in call_args around __ne__:

>>> m = Mock()
>>> m(1,2)

>>> m.call_args
call(1, 2)
>>> m.call_args == call(1,2)
True
>>> m.call_args != call(1,2)
True

Any reason not to define __ne__ as not __eq__? Otherwise it looks like you fall 
back to tuple.__ne__, which does the wrong thing here.

--
nosy: +akaptur

___
Python tracker 

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



[issue24857] mock: Crash on comparing call_args with long strings

2015-09-03 Thread A Kaptur

A Kaptur added the comment:

Here's a simple patch + test for the original bug. I'll file the __ne__ 
question separately.

--
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file40348/issue24857.patch

___
Python tracker 

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



  1   2   >