[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows

2014-05-08 Thread Tim Golden

Tim Golden added the comment:

+1 for Kristjan's latest patch. And thanks for working this through, Kristjan: 
I'd missed the fact that the microseconds conversion could itself overflow even 
an unsigned long.

--

___
Python tracker 

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



[issue21452] make_buildinfo.exe with VS2013 fails due ill-formed IntDir path

2014-05-08 Thread Mateusz Loskot

New submission from Mateusz Loskot:

While building Python 3.2 or Python 3.4 with Visual Studio 2013 on Windows 8.1, 
pythoncore.vcxproj fails to build due to illformed pre-link event command.
(FYI, I have upgraded all .vcxproj files to VS2013 locally.)

Here is the command and the error:


1>PreLinkEvent:
1>  Description: Generate build information...
1>  cl.exe -c -D_WIN32 -DUSE_DL_EXPORT -D_WINDOWS -DWIN32 -D_WINDLL -D_DEBUG 
-MDd ..\Modules\getbuildinfo.c 
-Fo"D:\tmp\Python-3.4.0-vs2013\PCbuild\Win32-temp-Debug\pythoncore" 
\getbuildinfo.o" -I..\Include -I..\PC
1>  getbuildinfo.c
1>..\Modules\getbuildinfo.c(1): fatal error C1083: Cannot open include file: 
'Python.h': No such file or directory



Notice the superfluous double quote followed by whitespace in the following 
argument:


-Fo"D:\tmp\Python-3.4.0-vs2013\PCbuild\Win32-temp-Debug\pythoncore" 
\getbuildinfo.o"


The problem is somewhat known as there is related comment in the 
make_buildinfo.c file about the custom commands arguments parsing:


/* Hack fix for bad command line:  If the command is issued like this:
 * $(SolutionDir)make_buildinfo.exe" Debug "$(IntDir)"
 * we will get a trailing quote because IntDir ends with a backslash that then
 * escapes the final ".  To simplify the life for developers, catch that problem
 * here by cutting it off.
 * The proper command line, btw is:
 * $(SolutionDir)make_buildinfo.exe" Debug "$(IntDir)\"
 * Hooray for command line parsing on windows.
 */


There are two solutions possible:

1) Correct the PreLinkEvent command in make_buildinfo.vcxproj according to the 
comment above:


$(SolutionDir)make_buildinfo.exe" Debug "$(IntDir)\"


2) Patch make_buildinfo.c (attached).

Then, the cl.exe command is correct:


1>  cl.exe -c -D_WIN32 -DUSE_DL_EXPORT -D_WINDOWS -DWIN32 -D_WINDLL -D_DEBUG 
-MDd ..\Modules\getbuildinfo.c -Fo"F:\V81-VS2013.win32\Librarie
s\External\Source\Python\Debug\PCbuild\Win32-temp-Debug\pythoncore\getbuildinfo.o"
 -I..\Include -I..\PC
1>  getbuildinfo.c



I'm not sure why this problems leaks while building with VS2013.
I have been building Python 3.2 with VS2012 for long time w/o any issues.
Perhaps, it is related to combination of VS2013 and Windows 8.1.
Although, I'm not observing this problem while building with VS2012 on Windows 
8.1,
it would be helpful if someone else who uses VS2012 or VS2013 could confirm my 
results.

--
components: Build
files: Python340-make_buildinfo-vs2013.patch
keywords: patch
messages: 218097
nosy: mloskot
priority: normal
severity: normal
status: open
title: make_buildinfo.exe with VS2013 fails due ill-formed IntDir path
type: compile error
versions: Python 3.2, Python 3.4
Added file: 
http://bugs.python.org/file35183/Python340-make_buildinfo-vs2013.patch

___
Python tracker 

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



[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows

2014-05-08 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

Thanks.  Can you confirm that it resolves the issue?  I'll get it checked in 
once I get the regrtest suite run.

--

___
Python tracker 

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



[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows

2014-05-08 Thread Tim Golden

Tim Golden added the comment:

s/Py_LONG_LONG/PY_LONG_LONG/

--

___
Python tracker 

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



[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows

2014-05-08 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

I see, I wasn't able to compile it yesterday when I did it :)

--

___
Python tracker 

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



[issue13630] IDLE: Find(ed) text is not highlighted while dialog box is open

2014-05-08 Thread Francisco Gracia

Francisco Gracia added the comment:

I had problems for installing your *SearchBar*, Tal, in Python 33 and 34 until 
it downed onto me that in its present form it is only Python 2 compliant. This 
is then its first weakness, that of course can be easily remedied by applying 
*2to3.py* to it, as I did. I am using Windows 7.

Another fault is that when IDLE's editor window is expanded to full screen the 
bar's widget fills half of it. I imagine that this should not be difficult to 
mend either.

If you would be interested in suggestions for your revision, mine would be that 
the option controls of the *Find* searchbar be disposed in two rows. This would 
avoid a certain clutter and allow the addition of a new one that, if possible, 
I would find convenient. It would perform the toggling of the simultaneous 
highlighting of all the matches of the search, something that is handy in some 
situations but can be confusing in others.

These are the only quirks that I have observed until now. I think that 
*SearchBar* is a must for anyone that uses IDLE's editor in 3.4 or in any 
previous version of Python (as I have discovered here that the problem is an 
old one) and am surprised that it does not belong to the standard distribution 
since it was available.

Thanks and congratulations for your excellent job.

--

___
Python tracker 

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



[issue12916] Add inspect.splitdoc

2014-05-08 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

Hi all,

No news about this issue,

Do you have time for a feedback?

Thanks

--

___
Python tracker 

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



[issue21452] make_buildinfo.exe with VS2013 fails due ill-formed IntDir path

2014-05-08 Thread Tim Golden

Tim Golden added the comment:

What effect does your patch have on a VS2010 build? VS2010 is the official 
toolset for current Python 3.x versions so any changes we make must support 
that.

Also: does the same problem occur on the development branch? 

(De-selecting 3.2 as it's in security-fix mode only)

--
components: +Windows
nosy: +tim.golden
versions:  -Python 3.2

___
Python tracker 

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



[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows

2014-05-08 Thread Tim Golden

Tim Golden added the comment:

I can confirm that the attached test.py times out after 2150 seconds (ie
30+ minutes) with your (tweaked) patch applied:

python test.py 2150

Running Debug|Win32 interpreter...
2014-05-08 10:33:53.670091
Expected to time out by 2014-05-08 11:09:43.670091
Timed Out
2014-05-08 11:09:43.765079

I don't see us adding a test which would lengthen the test suite run by
more than 30 minutes!

--
Added file: http://bugs.python.org/file35184/test.py

___
Python tracker 

___import sys
import threading
import datetime

now = datetime.datetime.now()
print(now)
seconds_to_wait = int(sys.argv[1])
expected_to_finish = now + datetime.timedelta(seconds=seconds_to_wait)
print("Expected to time out by", expected_to_finish)
print("Event Fired" if threading.Event().wait(seconds_to_wait) else "Timed Out")
print(datetime.datetime.now())
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows

2014-05-08 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

nope, let's not do that :)

--

___
Python tracker 

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



[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows

2014-05-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 80b76c6fad44 by Kristján Valur Jónsson in branch 'default':
The PyCOND_TIMEDWAIT must use microseconds for the timeout argument
http://hg.python.org/cpython/rev/80b76c6fad44

--
nosy: +python-dev

___
Python tracker 

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



[issue13630] IDLE: Find(ed) text is not highlighted while dialog box is open

2014-05-08 Thread Tal Einat

Tal Einat added the comment:

Thanks for the kind words, Francisco! And also for taking the time to get 
SearchBar working on Python3 and giving it a try.

I agree that SearchBar is a huge improvement over IDLE's simple find and 
replace dialogs. And by now every potential user is used to such search 
interfaces, whereas search dialogs are a thing of the past.

Regarding your suggestion to split the buttons into a separate line, that would 
make problems with the replace mode. In the replace mode there are two bars, 
the first of which is the regular search bar. By adding another bar for 
controls, that would mean having three bars, and it would be non-obvious to 
users whether the option refer to the find or replace bar.

Also, we must be careful not to add many options and controls to the interface, 
and this is the first time someone has asked to be able to toggle search hit 
highlighting. If this comes up repeatedly I will consider it.

--

___
Python tracker 

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



[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows

2014-05-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ab5e2b0fba15 by Kristján Valur Jónsson in branch '3.3':
The PyCOND_TIMEDWAIT must use microseconds for the timeout argument
http://hg.python.org/cpython/rev/ab5e2b0fba15

New changeset 7764bb7f2983 by Kristján Valur Jónsson in branch '3.4':
Merging from 3.3: The PyCOND_TIMEDWAIT must use microseconds for the timeout 
argument
http://hg.python.org/cpython/rev/7764bb7f2983

--

___
Python tracker 

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



[issue20737] 3.3 _thread lock.acquire() timeout and threading.Event().wait() do not wake for certain values on Windows

2014-05-08 Thread Kristján Valur Jónsson

Changes by Kristján Valur Jónsson :


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



[issue21452] make_buildinfo.exe with VS2013 fails due ill-formed IntDir path

2014-05-08 Thread Mateusz Łoskot

Mateusz Łoskot added the comment:

On 8 May 2014 11:53, Tim Golden  wrote:
>
> What effect does your patch have on a VS2010 build?

I don't know. I don't use VS2010.
However, I suspect the option 1) fix should be applied anyway as it is
suggested by the comment in make_buildinfo.c.
Why the pythoncore.vc[x]proj project files do not use "$(IntDir)\" by
default, no idea.

> Also: does the same problem occur on the development branch?

I haven't tested, I work with released Python sources now.

I noticed though, that this issue is somewhat random.
I'm building from VS2013 command prompt, and I've just successully
built the non-patched make_buildinfo.{c|vcxproj}.
This made me wonder if the problem is related to cmd.exe
configuration, extensions enabled/disabled, and such.

--
nosy: +Mateusz.Łoskot

___
Python tracker 

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



[issue21300] Docs (incorrectly) suggest email.policy.default is the default policy

2014-05-08 Thread Merlijn van Deen

Merlijn van Deen added the comment:

Small typo that slipped in:

'udpate' instead of 'update' on the following lines:

http://hg.python.org/cpython/rev/63fa945119cb#l2.18
http://hg.python.org/cpython/rev/63fa945119cb#l2.43
http://hg.python.org/cpython/rev/63fa945119cb#l2.66

--

___
Python tracker 

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



[issue21452] make_buildinfo.exe with VS2013 fails due ill-formed IntDir path

2014-05-08 Thread Tim Golden

Tim Golden added the comment:

Attached project patch seems to build successfully on VS2010. It's possible 
that this failed in some way on VS2008; AFAICT it hasn't been touched since 
Brian first ported it two years ago.

Adding Zach Ware for a second opinion.

--
nosy: +zach.ware
Added file: http://bugs.python.org/file35185/issue21452.pythoncore.diff

___
Python tracker 

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



[issue21300] Docs (incorrectly) suggest email.policy.default is the default policy

2014-05-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9e55089aa505 by R David Murray in branch '3.4':
#21300: fix typo
http://hg.python.org/cpython/rev/9e55089aa505

New changeset 232938736a31 by R David Murray in branch 'default':
Merge #21300: fix typo
http://hg.python.org/cpython/rev/232938736a31

--

___
Python tracker 

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



[issue21300] Docs (incorrectly) suggest email.policy.default is the default policy

2014-05-08 Thread R. David Murray

R. David Murray added the comment:

That was actually copy and paste of an existing typo, which I've also now 
fixed.  Thanks.

--

___
Python tracker 

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



[issue13598] string.Formatter doesn't support empty curly braces "{}"

2014-05-08 Thread Armin Ronacher

Armin Ronacher added the comment:

Is there any chance this will be fixed for 2.7 as well?

--
nosy: +aronacher

___
Python tracker 

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



[issue21435] Segfault with cyclic reference and asyncio.Future

2014-05-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> finalize4.patch repairs the comment typos, adds a new comment, and
> removes the unused `old` argument.  I think the code is ready to ship 
> with this.

Thanks! So do I.

--

___
Python tracker 

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



[issue21435] Segfault with cyclic reference and asyncio.Future

2014-05-08 Thread Larry Hastings

Larry Hastings added the comment:

I'm totally on board with you guys checking this in for 3.4.1.

--

___
Python tracker 

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



[issue21350] bug in file.writelines accepting buffers

2014-05-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thanks for the report and the patch! For a bit of trivia, this code has been 
there since 2000 (63ea2a2df06f).

--

___
Python tracker 

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



[issue21350] bug in file.writelines accepting buffers

2014-05-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset db842f730432 by Antoine Pitrou in branch '2.7':
Issue #21350: Fix file.writelines() to accept arbitrary buffer objects, as 
advertised.
http://hg.python.org/cpython/rev/db842f730432

--
nosy: +python-dev

___
Python tracker 

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



[issue21350] bug in file.writelines accepting buffers

2014-05-08 Thread Antoine Pitrou

Changes by Antoine Pitrou :


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

___
Python tracker 

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



[issue21453] Support of RPM subpackages in distutils

2014-05-08 Thread Vitaly Isaev

New submission from Vitaly Isaev:

RPM Subpackages are very useful when you maintain the big project on the 
RHEL-kind Linux distro and you need to sparse the project into several 
differing packages (for instance - , -libs, -devel, -debuginfo).

It would be convenient to do the same in a purely Pythonic projects (i mean to 
place something in setup.py and to obtain the output spec-file with a 
corresponding number of `%package ` sections). I didn't manage 
to find the code that matches these purposes in the most up-to-date release of 
the distutils (/usr/lib64/python2.7/distutils/command/bdist_rpm.py). 

So I would ask to implement this feature. Also I can try to do it on my own in 
case if the community considers it as a good offer. Thank you.

--
components: Distutils
messages: 218119
nosy: dstufft, eric.araujo, vitalyisaev2
priority: normal
severity: normal
status: open
title: Support of RPM subpackages in distutils
type: enhancement
versions: Python 2.7

___
Python tracker 

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



[issue21454] asyncio's loop.connect_read_pipe makes pipes non-blocking contrary to the documentation

2014-05-08 Thread John Isidore

New submission from John Isidore:

the documentation for BaseEventLoop.connect_read_pipe says: 

> "pipe is file-like object **already switched** to nonblocking."

http://hg.python.org/cpython/file/232938736a31/Doc/library/asyncio-eventloop.rst#l453

But it looks like connect_read_pipe() accepts blocking pipes and switches
them to non-blocking mode:

> "It looks like connect_read_pipe() (eventually) sets the fd to non-blocking. 
> So it does work."

https://code.google.com/p/tulip/source/detail?r=0a716436176993a12cf861b6cafffe8a31bc1127

If it is indeed the case then the documentation should mention that it
accepts blocking pipes and makes them non-blocking.

May it break other processes by making the file non-blocking if it is a pty
that is shared between processes? 

Related: "Don't set shared file descriptors to non-blocking I/O mode."
http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/dont-set-shared-file-descriptors-to-non-blocking-mode.html

--
assignee: docs@python
components: Documentation
messages: 218120
nosy: John Isidore, docs@python, gvanrossum
priority: normal
severity: normal
status: open
title: asyncio's loop.connect_read_pipe makes pipes non-blocking contrary to 
the documentation
type: behavior
versions: 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



[issue21455] add default backlog to socket.listen()

2014-05-08 Thread Charles-François Natali

New submission from Charles-François Natali:

Having to pass an explicit backlog value to listen() is a pain: most people 
don't know which value to pass, and often end up using a value too small which 
can lead to connections being rejected.
For example, if you search throughout the standard library, you'll see many 
different hard-coded values.

The patch attached uses a default value of SOMAXCONN for socket.listen(): it 
should give a good default behavior (that's what golang does for example: in 
fact they go even further by checking the runtime value from 
net.core.somaxconn).

A second step would be to update the codebase to remove explicit backlogs 
(unless specific case).

--
components: Library (Lib)
files: socket_listen.diff
keywords: patch
messages: 218121
nosy: haypo, neologix, pitrou, sbt
priority: normal
severity: normal
stage: patch review
status: open
title: add default backlog to socket.listen()
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file35186/socket_listen.diff

___
Python tracker 

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



[issue21454] asyncio's loop.connect_read_pipe makes pipes non-blocking contrary to the documentation

2014-05-08 Thread Guido van Rossum

Guido van Rossum added the comment:

Thanks for the report, that should be easy to fix.

Regarding PTYs, we're aware: 
https://code.google.com/p/tulip/issues/detail?id=147

--
nosy: +haypo

___
Python tracker 

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



[issue21435] Segfault with cyclic reference and asyncio.Future

2014-05-08 Thread Tim Peters

Changes by Tim Peters :


--
assignee:  -> tim.peters

___
Python tracker 

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



[issue21448] Email Parser use 100% CPU

2014-05-08 Thread jader fabiano

jader fabiano added the comment:

Hi.
I undestood this problem that It was happening,
I was writting the mime wrong in the attachments. I read a file with size
4M and I've converted to Base64, so I've written in the mime the content.
But i wasn't put the lines with 76 ccharacters plus ""/r/n". I was writing
the every in the only line. I think this did the Email Parser uses 100% of
the CPU and It delay mora time.
I packed up and I was sending email very fast.

Thanks

2014-05-06 17:25 GMT-03:00 R. David Murray :

>
> R. David Murray added the comment:
>
> Also to clarify: HeaderParser will *also* read the entire message, it just
> won't look for MIME attachments in the 'everything else', it will just
> treat the 'everything else' as arbitrary data and record it as the payload
> of the top level Message object.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue21444] __len__ can't return big numbers

2014-05-08 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I recommend this be closed:  too much impact on existing code for too little 
benefit.  

CPython has historically imposed some artificial implementation specific 
details in order make the implementation cleaner and faster internally (i.e. a 
limit on the number of function arguments, sys.maxsize limits, etc.)

--
nosy: +rhettinger
priority: normal -> low
type:  -> enhancement
versions: +Python 3.5 -Python 3.4

___
Python tracker 

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



[issue21435] Segfault in gc with cyclic trash

2014-05-08 Thread Tim Peters

Changes by Tim Peters :


--
title: Segfault with cyclic reference and asyncio.Future -> Segfault in gc with 
cyclic trash

___
Python tracker 

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



[issue21444] __len__ can't return big numbers

2014-05-08 Thread Benjamin Peterson

Changes by Benjamin Peterson :


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

___
Python tracker 

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



[issue21435] Segfault in gc with cyclic trash

2014-05-08 Thread Tim Peters

Tim Peters added the comment:

finalize42.patch includes a test case.  If nobody objects within a few hours, 
I'll commit it.

--
Added file: http://bugs.python.org/file35187/finalize42.patch

___
Python tracker 

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



[issue21037] add an AddressSanitizer build option

2014-05-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 17689e43839a by Charles-François Natali in branch 'default':
Issue #21037: Add a build option to enable AddressSanitizer support.
http://hg.python.org/cpython/rev/17689e43839a

--
nosy: +python-dev

___
Python tracker 

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



[issue21455] add default backlog to socket.listen()

2014-05-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Is there a risk of SOMAXCONN being huge and therefore allocating a large amount 
of resources?

--

___
Python tracker 

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



[issue18564] Integer overflow in socketmodule

2014-05-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> I am thinking about patching it there and then open another ticket
> here in order to adopt str2ba(). This way we can close this ticket for > now.

Well, if some str2ba() versions are notoriously buggy, we should probably not 
use it, IMHO.

--

___
Python tracker 

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



[issue21396] Python io implementation doesn't flush with write_through=True unlike C implementation

2014-05-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The patch looks basically fine. I will make a few tweaks to the comments in the 
test case.

--

___
Python tracker 

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



[issue21396] Python io implementation doesn't flush with write_through=True unlike C implementation

2014-05-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Actually, with the patch, the universal_newlines tests in test_subprocess hang 
(quite logically, since they lack a flush()). I will fix them as well.

--

___
Python tracker 

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



[issue21037] add an AddressSanitizer build option

2014-05-08 Thread Charles-François Natali

Charles-François Natali added the comment:

I just pushed the patch.

Stefan, did you have time to setup a buildbot?

--

___
Python tracker 

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



[issue21396] Python io implementation doesn't flush with write_through=True unlike C implementation

2014-05-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 39f2a78f4357 by Antoine Pitrou in branch '3.4':
Issue #21396: Fix TextIOWrapper(..., write_through=True) to not force a flush() 
on the underlying binary stream.
http://hg.python.org/cpython/rev/39f2a78f4357

New changeset 37d0c41ed8ad by Antoine Pitrou in branch 'default':
Issue #21396: Fix TextIOWrapper(..., write_through=True) to not force a flush() 
on the underlying binary stream.
http://hg.python.org/cpython/rev/37d0c41ed8ad

--
nosy: +python-dev

___
Python tracker 

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



[issue21396] Python io implementation doesn't flush with write_through=True unlike C implementation

2014-05-08 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thank you for the patch!

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

___
Python tracker 

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



[issue21435] Segfault in gc with cyclic trash

2014-05-08 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 64ba3f2de99c by Tim Peters in branch '3.4':
Issue #21435: Segfault in gc with cyclic trash
http://hg.python.org/cpython/rev/64ba3f2de99c

New changeset cb9a3985df00 by Tim Peters in branch 'default':
Merge from 3.4.
http://hg.python.org/cpython/rev/cb9a3985df00

--
nosy: +python-dev

___
Python tracker 

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



[issue21435] Segfault in gc with cyclic trash

2014-05-08 Thread Tim Peters

Changes by Tim Peters :


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

___
Python tracker 

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



[issue21455] add default backlog to socket.listen()

2014-05-08 Thread Charles-François Natali

Charles-François Natali added the comment:

> Is there a risk of SOMAXCONN being huge and therefore allocating a large 
> amount of resources?

On a sensible operating system, no, but better safe than sorry: the
patch attached caps the value to 128 (a common SOMAXCONN value).
It should be high enough to avoid connection drops in common
workloads, and still guard against non-sensical SOMAXCONN values.

--
Added file: http://bugs.python.org/file35188/socket_listen-1.diff

___
Python tracker 

___diff -r 17689e43839a Doc/library/socket.rst
--- a/Doc/library/socket.rstThu May 08 23:08:51 2014 +0100
+++ b/Doc/library/socket.rstThu May 08 23:52:22 2014 +0100
@@ -906,12 +906,15 @@
On other platforms, the generic :func:`fcntl.fcntl` and :func:`fcntl.ioctl`
functions may be used; they accept a socket object as their first argument.
 
-.. method:: socket.listen(backlog)
+.. method:: socket.listen([backlog])
 
-   Listen for connections made to the socket.  The *backlog* argument 
specifies the
-   maximum number of queued connections and should be at least 0; the maximum 
value
-   is system-dependent (usually 5), the minimum value is forced to 0.
+   Enable a server to accept connections.  If *backlog* is specified, it must
+   be at least 0 (if it is lower, it is set to 0); it specifies the number of
+   unaccepted connections that the system will allow before refusing new
+   connections. If not specified, a default reasonable value is chosen.
 
+   .. versionchanged:: 3.5
+  The *backlog* parameter is now optional.
 
 .. method:: socket.makefile(mode='r', buffering=None, *, encoding=None, \
 errors=None, newline=None)
diff -r 17689e43839a Lib/test/test_socket.py
--- a/Lib/test/test_socket.py   Thu May 08 23:08:51 2014 +0100
+++ b/Lib/test/test_socket.py   Thu May 08 23:52:22 2014 +0100
@@ -1344,10 +1344,13 @@
 
 def test_listen_backlog(self):
 for backlog in 0, -1:
-srv = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as srv:
+srv.bind((HOST, 0))
+srv.listen(backlog)
+
+with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as srv:
 srv.bind((HOST, 0))
-srv.listen(backlog)
-srv.close()
+srv.listen()
 
 @support.cpython_only
 def test_listen_backlog_overflow(self):
diff -r 17689e43839a Modules/socketmodule.c
--- a/Modules/socketmodule.cThu May 08 23:08:51 2014 +0100
+++ b/Modules/socketmodule.cThu May 08 23:52:22 2014 +0100
@@ -121,7 +121,7 @@
 getsockname() -- return local address\n\
 getsockopt(level, optname[, buflen]) -- get socket options\n\
 gettimeout() -- return timeout or None\n\
-listen(n) -- start listening for incoming connections\n\
+listen([n]) -- start listening for incoming connections\n\
 recv(buflen[, flags]) -- receive data\n\
 recv_into(buffer[, nbytes[, flags]]) -- receive data (into a buffer)\n\
 recvfrom(buflen[, flags]) -- receive data and sender\'s address\n\
@@ -2534,14 +2534,16 @@
 /* s.listen(n) method */
 
 static PyObject *
-sock_listen(PySocketSockObject *s, PyObject *arg)
+sock_listen(PySocketSockObject *s, PyObject *args)
 {
-int backlog;
+/* We try to choose a default backlog high enough to avoid connection drops
+ * for common workloads, yet not too high to limit resource usage. */
+int backlog = Py_MIN(SOMAXCONN, 128);
 int res;
 
-backlog = _PyLong_AsInt(arg);
-if (backlog == -1 && PyErr_Occurred())
+if (!PyArg_ParseTuple(args, "|i:listen", &backlog))
 return NULL;
+
 Py_BEGIN_ALLOW_THREADS
 /* To avoid problems on systems that don't allow a negative backlog
  * (which doesn't make sense anyway) we force a minimum value of 0. */
@@ -2556,12 +2558,12 @@
 }
 
 PyDoc_STRVAR(listen_doc,
-"listen(backlog)\n\
+"listen([backlog])\n\
 \n\
-Enable a server to accept connections.  The backlog argument must be at\n\
-least 0 (if it is lower, it is set to 0); it specifies the number of\n\
+Enable a server to accept connections.  If backlog is specified, it must be\n\
+at least 0 (if it is lower, it is set to 0); it specifies the number of\n\
 unaccepted connections that the system will allow before refusing new\n\
-connections.");
+connections. If not specified, a default reasonable value is chosen.");
 
 
 /*
@@ -3795,7 +3797,7 @@
 {"share", (PyCFunction)sock_share, METH_VARARGS,
   sock_share_doc},
 #endif
-{"listen",(PyCFunction)sock_listen, METH_O,
+{"listen",(PyCFunction)sock_listen, METH_VARARGS,
   listen_doc},
 {"recv",  (PyCFunction)sock_recv, METH_VARARGS,
   recv_doc},
___
Python-bugs-list mailing list
Unsubsc

[issue21332] subprocess bufsize=1 docs are misleading

2014-05-08 Thread akira

akira added the comment:

I've updated the patch to remove changes to test_universal_newlines 
test that was fixed in revision 37d0c41ed8ad that closes #21396 issue

--
Added file: 
http://bugs.python.org/file35189/subprocess-line-buffering-issue21332-ps4.patch

___
Python tracker 

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



[issue14910] argparse: disable abbreviation

2014-05-08 Thread paul j3

paul j3 added the comment:

Update the patch - 
test_argparse.py - cleanup spaces
argparse.rst - merging conflicts

--
Added file: http://bugs.python.org/file35190/issue14910_2.patch

___
Python tracker 

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



[issue14910] argparse: disable abbreviation

2014-05-08 Thread paul j3

Changes by paul j3 :


Removed file: http://bugs.python.org/file35190/issue14910_2.patch

___
Python tracker 

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



[issue14910] argparse: disable abbreviation

2014-05-08 Thread paul j3

Changes by paul j3 :


Added file: http://bugs.python.org/file35191/issue14910_2.patch

___
Python tracker 

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



[issue21435] Segfault in gc with cyclic trash

2014-05-08 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Thanks a lot!
The patch fixes crush dump issue with __del__ in aiohttp library tests also.

--
nosy: +asvetlov

___
Python tracker 

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