[issue23663] Crash on failure in ctypes on Cygwin

2015-03-14 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +amaury.forgeotdarc, belopolsky, meador.inge
stage:  - patch review
versions: +Python 3.5 -Python 3.3

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



[issue23441] rlcompleter: tab on empty prefix = insert spaces

2015-03-14 Thread Ezio Melotti

Ezio Melotti added the comment:

+1 for 4 spaces.

Smart backspace would be nice too, but I agree it's a separate issue (unless 
it's trivial to implement).  Deeply-nested code in the interactive interpreter 
is uncommon, and the lack of smart backspace never bothered me.

--
nosy: +ezio.melotti

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



[issue23549] heapq docs should be more precise about how to access the smallest element

2015-03-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8ddda7d1f8e3 by Eli Bendersky in branch '3.4':
Issue #23549: Clarify confusion in heapq doc - accessing the mininmal element
https://hg.python.org/cpython/rev/8ddda7d1f8e3

New changeset 642247a536d5 by Eli Bendersky in branch 'default':
Issue #23549: Clarify confusion in heapq doc - accessing the mininmal element
https://hg.python.org/cpython/rev/642247a536d5

--
nosy: +python-dev

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



[issue21818] cookielib documentation references Cookie module, not cookielib.Cookie class

2015-03-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch for 2.7 that fixes above a hundred of broken class references. 
But may be even more broken function references. I think it would be better to 
fix Sphinx rules.

--
keywords: +patch
priority: normal - high
Added file: http://bugs.python.org/file38485/docs_class_links-2.7.patch

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



[issue23663] Crash on failure in ctypes on Cygwin

2015-03-14 Thread David Macek

New submission from David Macek:

Two Cygwin-specific sections in `Modules/_ctypes/_ctypes.c` cause a crash due 
to bad call to `PyErr_Format`. I'm not sure if there's one extra format 
specifier, or one argument is missing. Patches assuming the former case for 
v2.7 and v3.3:

https://github.com/Alexpux/MSYS2-packages/blob/master/python3/3.3-wrong-parameters.patch

https://github.com/Alexpux/MSYS2-packages/blob/master/python2/0260-wrong-parameters.patch

--
components: ctypes
files: 3.3-wrong-parameters.patch
keywords: patch
messages: 238101
nosy: elieux
priority: normal
severity: normal
status: open
title: Crash on failure in ctypes on Cygwin
type: crash
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file38486/3.3-wrong-parameters.patch

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



[issue23661] Setting a exception side_effect on a mock from create_autospec does not work

2015-03-14 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +berker.peksag, michael.foord

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



[issue23667] IDLE to provide option for making trailing whitespace visible

2015-03-14 Thread Raymond Hettinger

New submission from Raymond Hettinger:

We have an option to clear trailing whitespace (Format / Strip trailing 
whitespace) but it isn't always clear when to use it (because the trailing 
whitespace is invisible).

One thing the can be done is to colorize trailing white space to make it more 
visible (this idea is inspired by a similar feature in mercurial's colorized 
diffs).

Another option is put a hook on File / Save to scan for trailing whitespace and 
offer to remove it (this idea is inspired by the whitespace commit hook used in 
Python's own source code management).

--
components: IDLE
messages: 238110
nosy: rhettinger
priority: normal
severity: normal
status: open
title: IDLE to provide option for making trailing whitespace visible
type: enhancement
versions: Python 3.5

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



[issue22351] NNTP constructor exception leaves socket for garbage collector

2015-03-14 Thread Martin Panter

Martin Panter added the comment:

Oops, meant to link to Issue 14534 about the test case mixing hack.

BTW this new patch also tests NNTP_SSL, by bypassing the encryption step and 
repeating the non-SSL tests.

--

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



[issue23549] heapq docs should be more precise about how to access the smallest element

2015-03-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b61578bb5014 by Eli Bendersky in branch '2.7':
Issue #23549: Clarify confusion in heapq doc - accessing the mininmal element
https://hg.python.org/cpython/rev/b61578bb5014

--

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



[issue23549] heapq docs should be more precise about how to access the smallest element

2015-03-14 Thread Eli Bendersky

Changes by Eli Bendersky eli...@gmail.com:


--
resolution:  - fixed
status: open - closed

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



[issue2052] Allow changing difflib._file_template character encoding.

2015-03-14 Thread Berker Peksag

Berker Peksag added the comment:

Thanks Serhiy.

--
resolution:  - fixed
stage: commit review - resolved
status: open - closed

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



[issue2052] Allow changing difflib._file_template character encoding.

2015-03-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e058423d3ca4 by Berker Peksag in branch 'default':
Issue #2052: Add charset parameter to HtmlDiff.make_file().
https://hg.python.org/cpython/rev/e058423d3ca4

--
nosy: +python-dev

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



[issue23665] Provide IDLE menu option to set command-line arguments

2015-03-14 Thread Raymond Hettinger

New submission from Raymond Hettinger:

A number of IDEs support menu options to set the execution environment for 
programs under development and testing.  In particular, it would be nice if 
IDLE let the user set command line arguments to be passed into sys.argv when 
running a script by pressing F5.

Here are some existing implementations for reference:
* Wing-IDE: https://wingware.com/doc/intro/tutorial-debugging-launch
* Visual Studio: https://www.youtube.com/watch?v=IgbQCRHKV-Y
* PyCharm: 
https://www.jetbrains.com/pycharm/help/run-debug-configuration-python.html

This feature will help users interactively develop and test command-line tools 
while retaining all the nice features of the IDE.   I would personally find it 
useful when teaching students about how sys.argv works.

I suggest adding an option under the Run menu for Set Command Line arguments.  
It would trigger a dialog box that lets a user set a string such as 
somefile.txt -r 10.  The user string would be run through shlex to break it 
into separate fields.  When F5 is pressed, the sys.argv list would be 
repopulated to include the script name and the lexed arguments.

A little more elaborate option is to add a Run menu entry for Set Execution 
Enviroment that let's the user 1) set the command-line  2) specify the start-up 
directory (using os.chdir), 3) and edit the environment variables (from 
os.environ) or at least be able to set PYTHONPATH.

--
components: IDLE
messages: 238108
nosy: rhettinger
priority: normal
severity: normal
stage: needs patch
status: open
title: Provide IDLE menu option to set command-line arguments
type: enhancement
versions: Python 3.5

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



[issue23467] Improve byte formatting compatibility between Py2 and Py3

2015-03-14 Thread Ethan Furman

Ethan Furman added the comment:

Added in
https://hg.python.org/peps/rev/7fe79194a4f2

--

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



[issue23441] rlcompleter: tab on empty prefix = insert spaces

2015-03-14 Thread Antoine Pitrou

Antoine Pitrou added the comment:

4 spaces is the recommended indent width in PEP 8. That's what most Python 
users will expect.

--

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



[issue23441] rlcompleter: tab on empty prefix = insert spaces

2015-03-14 Thread Martin Sekera

Martin Sekera added the comment:

Is it necessary to force a predefined tab width (4) onto the user here? I 
prefer 2-character tabs for example, and have all my terminals set up 
accordingly (setterm --regtabs 2). I presume many people prefer 8-column tabs, 
hence the default width in most software.

Additionally, the user shouldn't have to backspace 4 characters to remove one 
level of indentation. Not only is it annoying, it is also prone to errors if 
the user miscounts (and ends up with an IndentationError).

I've been using the attached patch (just 5 lines) to emulate the behavior 
familiar from unix shells: pressing tab activates the completion function, but 
indents if the line is empty (i.e. '' or all whitespace). It also indents 
properly if the cursor is moved to whitespace in front of a line, as one would 
expect.

--
nosy: +Martin Sekera
Added file: http://bugs.python.org/file38487/rlcompleter-tab.patch

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



[issue23568] unittest.mock.MagicMock doesn't support __rdivmod__

2015-03-14 Thread Berker Peksag

Berker Peksag added the comment:

Thanks to both of you for the report and the patch.

--
resolution:  - fixed
stage:  - resolved
status: open - closed
versions: +Python 3.4, Python 3.5 -Python 3.3

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



[issue2052] Allow changing difflib._file_template character encoding.

2015-03-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM

--
assignee:  - berker.peksag
stage: patch review - commit review

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



[issue23668] Support os.[f]truncate on Windows

2015-03-14 Thread Steve Dower

Changes by Steve Dower steve.do...@microsoft.com:


--
keywords: +patch
Added file: http://bugs.python.org/file38488/23668_1.diff

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



[issue23546] Windows, 'Edit withIDLE', and multplie installed versions

2015-03-14 Thread Steve Dower

Steve Dower added the comment:

It's possible, though personally I wouldn't like it (but I don't use IDLE, so I 
guess that makes the difference). I'd prefer to be able to list them all under 
the Open With menu, since that also allows users to easily make any of them the 
default if that's what they'd like. Unfortunately, to do that we need to start 
shipping an EXE launcher, probably with a unique name (e.g. idle35-32.exe).

Alternatively, if IDLE provided a selection of installed versions within the 
program, then it would make sense to always open with the most recent version 
(or more likely, the most recently installed version, due to how file 
associations have to be set up when you don't have separate .EXEs).

Currently the 3.5 installer doesn't add any commands for IDLE, so when I fix 
that I'll include the version information. It may require that the py launcher 
is also installed, since the launcher owns the file association.

--

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



[issue21818] cookielib documentation references Cookie module, not cookielib.Cookie class

2015-03-14 Thread R. David Murray

R. David Murray added the comment:

This happens because the role is pretty much ignored by Sphinx for linking 
purposes.  I remember Georg talking about the reason for this, but I forget 
what it was.  Perhaps it would be possible to, as you suggest, have the roll 
affect the priority...but it may be the case that the references don't 
currently retain the needed information.  Regardless, that would be an issue 
for the Sphinx tracker.

--
nosy: +r.david.murray

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



[issue23662] Cookie.domain is undocumented

2015-03-14 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


--
nosy: +vadmium

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



[issue23668] Support os.[f]truncate on Windows

2015-03-14 Thread Steve Dower

New submission from Steve Dower:

With _chsize_s (which supports 64-bit sizes, unlike _chsize), this seems fairly 
trivial to do, but I'll put a patch up for it in case there's something I've 
missed.

--
assignee: steve.dower
components: Windows
messages: 238113
nosy: steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Support os.[f]truncate on Windows
type: enhancement
versions: Python 3.5

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



[issue19541] ast.dump(indent=True) prettyprinting

2015-03-14 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
nosy: +berker.peksag

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



[issue23666] Add shell session logging option to IDLE

2015-03-14 Thread Raymond Hettinger

New submission from Raymond Hettinger:

IDLE's interactive shell supports File / Save to save an interactive session.  
However, if a user restarts a session or accidentally exits without saving, all 
is lost.

In Python courses I've taught, there has been a recurring request for an 
auto-logging feature (save the session at some regular interval).  This would 
help user's record everything they type during a Python class.

I suggest an addition to the File menu (for the interactive shell only): 
Session Logging Enable/Disable.

--
components: IDLE
messages: 238109
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Add shell session logging option to IDLE
type: enhancement
versions: Python 3.5

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



[issue23568] unittest.mock.MagicMock doesn't support __rdivmod__

2015-03-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 35a780a9a3b4 by Berker Peksag in branch '3.4':
Issue #23568: Add rdivmod support to MagicMock() objects.
https://hg.python.org/cpython/rev/35a780a9a3b4

New changeset 90f08e7fbdc3 by Berker Peksag in branch 'default':
Issue #23568: Add rdivmod support to MagicMock() objects.
https://hg.python.org/cpython/rev/90f08e7fbdc3

--
nosy: +python-dev

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



[issue22351] NNTP constructor exception leaves socket for garbage collector

2015-03-14 Thread Martin Panter

Martin Panter added the comment:

Posting issue22351_nntp_fail_4.patch; changes:

* Merge mixin and main TestCase class; mixins like this are sometimes useful to 
work around Issue 22351, but not necessary in this case, because there is only 
one TestCase class involved.
* Turn the local server in the background thread into mock socket object, with 
makefile() returning a duplex stream object, reusing the existing _NNTPServerIO 
and NNTPv1Handler classes.
* Test socket closure by checking mock socket and stream objects directly, 
rather than relying on a lack of ResourceWarning.

--
Added file: http://bugs.python.org/file38489/issue22351_nntp_fail_4.patch

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



[issue23664] Modernize HTML output of difflib.HtmlDiff.make_file()

2015-03-14 Thread Berker Peksag

New submission from Berker Peksag:

This is a split off from issue 2052. issue2052_html5_v2.diff (from issue 2052) 
needs to be updated.

--
assignee: berker.peksag
components: Library (Lib)
messages: 238106
nosy: berker.peksag
priority: normal
severity: normal
stage: needs patch
status: open
title: Modernize HTML output of difflib.HtmlDiff.make_file()
type: enhancement
versions: Python 3.5

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



[issue23524] Use _set_thread_local_invalid_parameter_handler in posixmodule

2015-03-14 Thread Steve Dower

Steve Dower added the comment:

New patch.

* Includes the _Py_fstat fix so that callers can use GetLastError for accurate 
info or errno for approximate info
* Reverts the _Py_VERIFY_FD proposal and just makes _PyVerify_fd a no-op except 
on VS 2010, 2012 and 2013. (After VS 2015 RC is released, I'm willing to remove 
_PyVerify_fd completely.)
* Still uses _Py_BEGIN/END_SUPPRESS_IPH to protect calls into the CRT where we 
can't ensure valid parameters in advance. (Chances are I haven't got all of 
these yet, but currently the test suite isn't revealing any others for me.)

--
Added file: http://bugs.python.org/file38490/23524_3.patch

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



[issue23669] test_socket.NonBlockingTCPTests failing due to race condition

2015-03-14 Thread Steve Dower

New submission from Steve Dower:

The test at Lib/test/test_socket.py:3883 is failing intermittently (but more 
often than not) due to a race condition between the two threads involved in the 
test.

==
FAIL: testRecv (test.test_socket.NonBlockingTCPTests)
--
Traceback (most recent call last):
  File C:\build\cpython\lib\test\test_socket.py, line 3883, in testRecv
self.fail(Error trying to do non-blocking recv.)
AssertionError: Error trying to do non-blocking recv.

--

The message in this case means the recv succeeded when it should have failed 
due to lack of data. But the second thread just delays briefly before sending 
data, and apparently the main thread can stall long enough for the data to be 
available in the first part of the test.

A quick check using an Event rather than the sleep shows that the race 
condition can be fixed, but it seems like this may affect more tests as a lot 
seem to involve sleep-based timing.

(I've only seen this on Windows, but I see no reason why it shouldn't affect 
other platforms as well.)

--
components: Tests
messages: 238121
nosy: pitrou, steve.dower
priority: normal
severity: normal
status: open
title: test_socket.NonBlockingTCPTests failing due to race condition
type: behavior
versions: Python 3.5

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



[issue23500] Argument Clinic: multiple macro definition

2015-03-14 Thread Larry Hastings

Larry Hastings added the comment:

Oops, I should have run make clinic, so you could see all the changes that 
result from this patch.

--
Added file: 
http://bugs.python.org/file38492/larry.ac_multiple_macro_definitions.diff.2.txt

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



[issue23621] Uninstalling Python 3.5 removes a py.exe that was installed with Python 3.4

2015-03-14 Thread Steve Dower

Steve Dower added the comment:

This is already fixed for 3.5 and later, since the launcher now has a 
consistent component ID regardless of which version/architecture of Python is 
installed.

It's too late to go back and make equivalent changes to the installer for 3.4 - 
running a Repair on a 3.4 installation is the best way to get it back.

--
resolution:  - wont fix
status: open - closed

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



[issue23529] Limit decompressed data when reading from LZMAFile and BZ2File

2015-03-14 Thread Martin Panter

Martin Panter added the comment:

Well my last patch just added the _compression.py file without doing anything 
special, and it seems to be installed properly with “make install” so I will 
assume nothing else needs to be done.

--

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



[issue23500] Argument Clinic: multiple macro definition

2015-03-14 Thread Larry Hastings

Larry Hastings added the comment:

(see larry.ac_multiple_macro_definitions.diff.1.txt posted above)

--

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



[issue23500] Argument Clinic: multiple macro definition

2015-03-14 Thread Larry Hastings

Larry Hastings added the comment:

How about this approach?  Only ever emit the #ifndef stanza once per symbol.

--
Added file: 
http://bugs.python.org/file38491/larry.ac_multiple_macro_definitions.diff.1.txt

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



[issue23187] Segmentation fault, possibly asyncio related

2015-03-14 Thread STINNER Victor

STINNER Victor added the comment:

It looks like you are running your app on Windows. Are you using the
proactor event loop? I guess yes since you have more than 1000 clients and
select() is limited to 500 sockets.

In Python 3.4.3, I fixed a *lot* of crashes and race conditions in the
proactor event loop. There are maybe more race conditions. Are you running
subprocesses with asyncio?

Le 14 mars 2015 05:42, Guido van Rossum rep...@bugs.python.org a écrit :
 PyObject_GC_Malloc(unsigned __int64 basicsize=4046951880)

 That's nearly 4 GB. I somehow doubt your app is actually trying to
allocate
 that much memory

The caller is PyList_New(0).

When using a debugger on an optimized build, you should not trust the
debugger. For example, variables can be stored in registers. Displaying
values in the old frames can just display junk. In gdb, you see
optimized. The fast call convention uses registers to pass first
parameters to functions. I'm not sure that debuggers handle this case
correctly. Etc.

--

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



[issue23566] RFE: faulthandler.register() should support file descriptors

2015-03-14 Thread Wei Wu

Wei Wu added the comment:

I attached a patch that implements the solution described above.

--
Added file: http://bugs.python.org/file38480/issue23566_fd_tests.patch

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



[issue23655] Memory corruption using pickle over pipe to subprocess

2015-03-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

No, there are no subprocess specific tests for pickle. Pickle tests are in 
Lib/test/pickletester.py  and Lib/test/test_pickle.py.

First try dump pickled data to a file and then load it in other process. Is it 
still failed?

--

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



[issue23500] Argument Clinic: multiple macro definition

2015-03-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

May be first commit this non-perfect solution? Generated code is correct, it is 
just not optimal. This issue is a dependency of issue23501, that is a 
dependency of issue23492, that is a dependency of my patch for optimizing 
argument parsing in 1-argument functions.

--

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



[issue14904] test_unicode_repr_oflw (in test_bigmem) crashes

2015-03-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Unfortunately original logs are not available.

test_unicode_repr_oflw incorrectly declares required memory usage. It declares 
only 6.4 GiB, but actually needs 10.4 GiB only on narrow build (and at least 
13.4 on wide build).

Proposed patch fixes memuse parameters in test_unicode_repr_oflw and other 
bigmem tests. It also changes test_unicode_repr_oflw so it no more uses eval(), 
is much faster, and requires only 5.33 GiB on narrow build (6.67 GiB on wide 
build) (based on Python 3 tests).

Please test.

--
keywords: +patch
nosy: +serhiy.storchaka
stage:  - patch review
Added file: http://bugs.python.org/file38482/issue14904.patch

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



[issue23187] Segmentation fault, possibly asyncio related

2015-03-14 Thread Michael Goldish

Michael Goldish added the comment:

 That's nearly 4 GB. I somehow doubt your app is actually trying to allocate 
 that much memory

There's no reason for the app to allocate that much memory in a single call. 
It's using almost 4 GB of memory in total today, but that makes sense given its 
load today.

 Is there any you can run an unoptimized build?

I'll try doing that now. I suppose I should build it myself with Py_DEBUG 
enabled.

--

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



[issue23657] Don't do isinstance checks in zipapp

2015-03-14 Thread Brett Cannon

Brett Cannon added the comment:

Depends on whether you want to support pathlib.Path objects explicitly. =) If 
so then yes, we should add tests.

Which reminds me, it might be time for you to request commit privileges so you 
can commit patches like this yourself.

--

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



[issue21574] Port image types detections from PIL to the imghdr module

2015-03-14 Thread Claudiu Popa

Claudiu Popa added the comment:

Well, we should have test files for each format imghdr supports. Doesn't PIL 
have test files for them?

--

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



[issue23659] csv.register_dialect doc string

2015-03-14 Thread Vladimir Ulupov

Vladimir Ulupov added the comment:

Incorrect docstring(PyDoc_STRVAR) for function csv.register_dialect

--

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



[issue21518] Expose RegUnLoadKey in winreg

2015-03-14 Thread Claudiu Popa

Claudiu Popa added the comment:

Thank you for the review. The new patch uses the name UnLoadKey for the API.

--
Added file: http://bugs.python.org/file38481/issue21518_6.patch

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



[issue23657] Don't do isinstance checks in zipapp

2015-03-14 Thread Paul Moore

Paul Moore added the comment:

Cool, I'll look at sorting it out.

--

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



[issue23546] Windows, 'Edit withIDLE', and multplie installed versions

2015-03-14 Thread Liam Marsh

Liam Marsh added the comment:

in fact, the idlelib.__main__ file exists in the 3.4 version...
the question is: is it possible to make it exist on older versions?

--

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



[issue23187] Segmentation fault, possibly asyncio related

2015-03-14 Thread Michael Goldish

Michael Goldish added the comment:

 It looks like you are running your app on Windows. Are you using the proactor 
 event loop?

Yes.

 In Python 3.4.3, I fixed a *lot* of crashes and race conditions in the 
 proactor event loop. There are maybe more race conditions.

I've already tried Python 3.4.3 and got the same crash. The one described in my 
long message with the stack trace is from 3.4.2, but I got that same stack 
trace (or a very similar one) with 3.4.3. I have a core dump from that crash as 
well so I can provide the exact stack trace if necessary.

 Are you running subprocesses with asyncio?

I can't recall running any subprocesses in the server program. The clients do 
that very often, but they're not the ones crashing...

 The caller is PyList_New(0).

I suppose this creates an empty list?

I managed to get a stack trace from faulthandler somehow and it points to this 
line in one of the threads:

d = rg.item_counts_by_params.setdefault(params, {})

This runs in a thread (managed by a ThreadPoolExecutor) that computes stuff and 
writes it to a file. It's in a loop that runs ~20 times per job. Several 
lines above there's a similar line that passes an empty list as the 2nd 
parameter to setdefault().

The other threads are all in threading.wait(), probably doing nothing 
interesting. One thread is in _run_once().

Unfortunately I don't have any additional information about this particular 
crash (no dump or stack trace), but it's not unreasonable to assume other 
crashes occurred during creation of new lists/dicts in a similar manner.

--

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



[issue2052] Allow changing difflib._file_template character encoding.

2015-03-14 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


Added file: http://bugs.python.org/file38483/issue2052_v3.diff

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



[issue21112] 3.4 regression: unittest.expectedFailure no longer works on TestCase subclasses

2015-03-14 Thread William Schwartz

William Schwartz added the comment:

3.4.3 has been released, it seems, without this getting fixed.

3.4.4 then?

-- 
William Schwartz

On Mon, Sep 8, 2014 at 3:42 AM, Michael Foord rep...@bugs.python.org
wrote:


 Michael Foord added the comment:

 The patch looks good to me.

 --

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue21112
 ___


--

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



[issue23662] Cookie.domain is undocumented

2015-03-14 Thread Malcolm Smith

New submission from Malcolm Smith:

This is a fundamental attribute of a cookie, which will be set even if the 
server doesn't specify it, yet it doesn't appear in the documentation either of 
2.x cookielib or 3.x http.cookiejar.

--
assignee: docs@python
components: Documentation
messages: 238087
nosy: Malcolm Smith, docs@python
priority: normal
severity: normal
status: open
title: Cookie.domain is undocumented
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5

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



[issue23659] csv.register_dialect doc string

2015-03-14 Thread R. David Murray

R. David Murray added the comment:

Ah, you are trying to point out that the docstring doesn't mention fmtparams, 
or that the dialect object is optional. Sure, that should be fixed.

--

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



[issue23659] csv.register_dialect doc string

2015-03-14 Thread Vladimir Ulupov

Vladimir Ulupov added the comment:

Yes, sorry for my bad English.

--

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



[issue23551] IDLE to provide menu options for using PIP

2015-03-14 Thread Saimadhav Heblikar

Saimadhav Heblikar added the comment:

The proof of concept is almost ready.
I have a couple of questions to anyone familiar with pip api (and on windows 
for question 2)

1. Is a restart of the interpreter absolutely required for 
pip.operations.freeze.freeze() to reflect changes?(install/uninstall)?

2. (Windows particular) Is a permission similar to sudo required to install 
packages using pip? If not, would it be OK to install only to user home 
director in *nix? Doing so would be allow code to be same across platforms. It 
would also prevent asking the end user where they want the package to be 
installed.

--

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



[issue23551] IDLE to provide menu options for using PIP

2015-03-14 Thread Mark Lawrence

Mark Lawrence added the comment:

I think that on Windows you might have to assume that the user has the rights 
to install to site-packages, regardless of where the Python version is 
installed.  Please see https://docs.python.org/dev/using/windows.html for the 
installation screen for 3.5.  If this is not the case Raymond's final 
requirement Change default install directory would not help as the user still 
needs to change the environment to get Python working, or have I missed 
something?

--

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



[issue2052] Allow changing difflib._file_template character encoding.

2015-03-14 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


Added file: http://bugs.python.org/file38484/issue2052_v4.diff

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



[issue23546] Windows, 'Edit withIDLE', and multplie installed versions

2015-03-14 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Liam, your question was answered in the technical sense in my two previous 
messages.  However, being able to type 'python -m idlelib' instead of 'python 
-m idlelib.idle' is a separate issue from 'Edit with Idle' on the right context 
menu.

Steve, is it possible to add Edit with Idle x.y on the context menu for each 
x.y installed?  Or even Edit with Idle x.y (nn)? in case both 32 and 64 bit 
versions are installed?

--

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



[issue21818] cookielib documentation references Cookie module, not cookielib.Cookie class

2015-03-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Georg, this looks as a bug in Sphinx configuration. Why module takes priority 
on class when the role is explicitly specified? I have counted about two 
hundreds of similar bugs in the documentation.

--
nosy: +georg.brandl, serhiy.storchaka
type:  - behavior

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



[issue23632] memoryview doesn't allow tuple-indexing

2015-03-14 Thread Stefan Krah

Stefan Krah added the comment:

It turns out that msg237933 was too simplistic: There are some
intricacies of numpy array indexing that *are* very complex:

  http://docs.scipy.org/doc/numpy/reference/arrays.indexing.html


In particular, x[::2, 1, ::2] is not necessarily equal to
x[::2][1][::2].

--

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



[issue23606] ctypes.util.find_library(c) no longer makes sense

2015-03-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fabbe6093567 by Steve Dower in branch 'default':
Issue #23606: Temporarily suppress test for CRT name.
https://hg.python.org/cpython/rev/fabbe6093567

--

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