[issue16443] Add docstrings to regular expression match objects

2012-12-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

`MatchObject` term is not defined anywhere in the documentation. It will be 
better to use `match object` instead.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue6538] MatchObject is not a hyperlink in the 're' module documentation

2012-12-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I have opened a new issue16760 for regex HOWTO.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue16760] Get rid of MatchObject in regex HOWTO

2012-12-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +akuchling

___
Python tracker 

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



[issue16760] Get rid of MatchObject in regex HOWTO

2012-12-24 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

MatchObject is not defined anywhere and is not used except HOWTO (see 
issue6538).

--
assignee: docs@python
components: Documentation, Regular Expressions
messages: 178036
nosy: asvetlov, docs@python, ezio.melotti, mrabarnett, pitrou, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Get rid of MatchObject in regex HOWTO
type: enhancement
versions: Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue16751] Using modern unittest asserts in the documentation

2012-12-24 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Sorry, I'm going to reject this one.

FWIW, I'm working on revising the example anyway (to not use the random module 
and instead test something more straight-forward).

--
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue16751] Using modern unittest asserts in the documentation

2012-12-24 Thread Ezio Melotti

Ezio Melotti added the comment:

Raymond, the changes in the "mock" documentation look good to me, and I think 
they can be applied.

Regarding the basic example in the "unittest" doc, I think the patch attached 
to #11468 (or something similar) should be applied instead.  That patch uses 
straight-forward string methods and the basic assertEqual/True/False/Raises.

--

___
Python tracker 

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



[issue11468] Improve unittest basic example in the doc

2012-12-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I think `self.assertRaises(TypeError, s.split, 2)` looks simpler. In any case 
two examples for assertRaises needed, simple inlined and more complicated use 
as context manager.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue11468] Improve unittest basic example in the doc

2012-12-24 Thread Ezio Melotti

Ezio Melotti added the comment:

Given that this is a basic example, it's not necessary to introduce both the 
forms of assertRaises.
I personally find the context manager form more readable, and I prefer it to 
the regular one even if it takes two lines instead of one.

--

___
Python tracker 

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



[issue13555] cPickle MemoryError when loading large file (while pickle works)

2012-12-24 Thread Charles-François Natali

Charles-François Natali added the comment:

Could someone with a 64-bit box take over this one?
I won't go anywhere with my 32-bit box...

--

___
Python tracker 

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



[issue15523] Block on close TCP socket in SocketServer.py

2012-12-24 Thread Charles-François Natali

Changes by Charles-François Natali :


--
status: open -> pending

___
Python tracker 

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



[issue879399] socket line buffering

2012-12-24 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
assignee:  -> kristjan.jonsson

___
Python tracker 

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



[issue16761] Fix int(base=X)

2012-12-24 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Currently int() ignores base keyword argument if first string argument omitted. 
Such usage is no other than bug. The proposed patch raises TypeError in such 
case.

See also discussion at Python-Dev: 
http://comments.gmane.org/gmane.comp.python.cvs/92290 .

--
components: Interpreter Core
files: int_without_x.patch
keywords: patch
messages: 178043
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Fix int(base=X)
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file28414/int_without_x.patch

___
Python tracker 

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



[issue16761] Fix int(base=X)

2012-12-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +asvetlov, chris.jerdonek, terry.reedy
Added file: http://bugs.python.org/file28415/int_without_x-3.2.patch

___
Python tracker 

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




[issue16761] Fix int(base=X)

2012-12-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

In additional some int creation tests backported to old Python versions.

--
Added file: http://bugs.python.org/file28416/int_without_x-2.7.patch

___
Python tracker 

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



[issue16762] test_subprocess failure on OpenBSD/NetBSD buildbots

2012-12-24 Thread Charles-François Natali

New submission from Charles-François Natali:

test_subprocess fails on OpenBSD/NetBSD buildbots:
http://buildbot.python.org/all/builders/AMD64 NetBSD 5.1.2 [SB] 
2.7/builds/158/steps/test/logs/stdio
"""

==
ERROR: test_kill_dead (test.test_subprocess.POSIXProcessTestCase)
--
Traceback (most recent call last):
  File 
"/home/cpython/buildslave/2.7.snakebite-netbsd51-amd64-1/build/Lib/test/test_subprocess.py",
 line 940, in test_kill_dead
self._kill_dead_process('kill')
  File 
"/home/cpython/buildslave/2.7.snakebite-netbsd51-amd64-1/build/Lib/test/test_subprocess.py",
 line 913, in _kill_dead_process
getattr(p, method)(*args)
  File 
"/home/cpython/buildslave/2.7.snakebite-netbsd51-amd64-1/build/Lib/subprocess.py",
 line 1506, in kill
self.send_signal(signal.SIGKILL)
  File 
"/home/cpython/buildslave/2.7.snakebite-netbsd51-amd64-1/build/Lib/subprocess.py",
 line 1496, in send_signal
os.kill(self.pid, sig)
OSError: [Errno 3] No such process

==
ERROR: test_send_signal_dead (test.test_subprocess.POSIXProcessTestCase)
--
Traceback (most recent call last):
  File 
"/home/cpython/buildslave/2.7.snakebite-netbsd51-amd64-1/build/Lib/test/test_subprocess.py",
 line 936, in test_send_signal_dead
self._kill_dead_process('send_signal', signal.SIGINT)
  File 
"/home/cpython/buildslave/2.7.snakebite-netbsd51-amd64-1/build/Lib/test/test_subprocess.py",
 line 913, in _kill_dead_process
getattr(p, method)(*args)
  File 
"/home/cpython/buildslave/2.7.snakebite-netbsd51-amd64-1/build/Lib/subprocess.py",
 line 1496, in send_signal
os.kill(self.pid, sig)
OSError: [Errno 3] No such process

==
ERROR: test_terminate_dead (test.test_subprocess.POSIXProcessTestCase)
--
Traceback (most recent call last):
  File 
"/home/cpython/buildslave/2.7.snakebite-netbsd51-amd64-1/build/Lib/test/test_subprocess.py",
 line 944, in test_terminate_dead
self._kill_dead_process('terminate')
  File 
"/home/cpython/buildslave/2.7.snakebite-netbsd51-amd64-1/build/Lib/test/test_subprocess.py",
 line 913, in _kill_dead_process
getattr(p, method)(*args)
  File 
"/home/cpython/buildslave/2.7.snakebite-netbsd51-amd64-1/build/Lib/subprocess.py",
 line 1501, in terminate
self.send_signal(signal.SIGTERM)
  File 
"/home/cpython/buildslave/2.7.snakebite-netbsd51-amd64-1/build/Lib/subprocess.py",
 line 1496, in send_signal
os.kill(self.pid, sig)
OSError: [Errno 3] No such process
"""

According to POSIX, kill shoudln't fail with ESRCH on a zombie processes:
"""
Existing implementations vary on the result of a kill() with pid indicating an 
inactive process (a terminated process that has not been waited for by its 
parent). Some indicate success on such a call (subject to permission checking), 
while others give an error of [ESRCH]. Since the definition of process lifetime 
in this volume of POSIX.1-2008 covers inactive processes, the [ESRCH] error as 
described is inappropriate in this case. In particular, this means that an 
application cannot have a parent process check for termination of a particular 
child with kill(). (Usually this is done with the null signal; this can be done 
reliably with waitpid().)
"""

--
components: Tests
keywords: buildbot, needs review, patch
messages: 178045
nosy: neologix
priority: low
severity: normal
stage: patch review
status: open
title: test_subprocess failure on OpenBSD/NetBSD buildbots
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue16761] Fix int(base=X)

2012-12-24 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue16762] test_subprocess failure on OpenBSD/NetBSD buildbots

2012-12-24 Thread Charles-François Natali

Changes by Charles-François Natali :


Added file: http://bugs.python.org/file28417/kill_esrch.diff

___
Python tracker 

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



[issue13582] IDLE and pythonw.exe stderr problem

2012-12-24 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue16511] IDLE configuration file: blank height and width fields trip up IDLE

2012-12-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ffe091ebd5de by Andrew Svetlov in branch '3.2':
Issue #16511: Use default IDLE width and height if config param is not valid.
http://hg.python.org/cpython/rev/ffe091ebd5de

New changeset 10656b0975b3 by Andrew Svetlov in branch '3.3':
Issue #16511: Use default IDLE width and height if config param is not valid.
http://hg.python.org/cpython/rev/10656b0975b3

New changeset a7c9869a5114 by Andrew Svetlov in branch 'default':
Issue #16511: Use default IDLE width and height if config param is not valid.
http://hg.python.org/cpython/rev/a7c9869a5114

--
nosy: +python-dev

___
Python tracker 

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



[issue16511] IDLE configuration file: blank height and width fields trip up IDLE

2012-12-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 133f87a7dbf5 by Andrew Svetlov in branch '2.7':
Issue #16511: Use default IDLE width and height if config param is not valid.
http://hg.python.org/cpython/rev/133f87a7dbf5

--

___
Python tracker 

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



[issue16511] IDLE configuration file: blank height and width fields trip up IDLE

2012-12-24 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Fixed. 

Trung, I think installation procedure is not subject of this issue.
If needed please create new one.

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue16511] IDLE configuration file: blank height and width fields trip up IDLE

2012-12-24 Thread Trung Doan

Trung Doan added the comment:

I think I will leave it at that, because in the general case probably some
things should be re-initialised during a new/re-install while others should
be left as is, but as a beginner I am far from knowing which ones are which.

Trung
==

On Mon, Dec 24, 2012 at 10:20 PM, Andrew Svetlov wrote:

>
> Andrew Svetlov added the comment:
>
> Fixed.
>
> Trung, I think installation procedure is not subject of this issue.
> If needed please create new one.
>
> --
> resolution:  -> fixed
> stage: patch review -> committed/rejected
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue16511] IDLE configuration file: blank height and width fields trip up IDLE

2012-12-24 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Ok. Agree with you.

--

___
Python tracker 

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



[issue16763] test_ssl with connect_ex don't handle unreachable server correctly

2012-12-24 Thread Charles-François Natali

New submission from Charles-François Natali:

test_ssl tests calling connect_ex don't handle unreachable servers properly:
"""
test_ssl
Resource 'svn.python.org' is not available
Resource 'svn.python.org' is not available
test test_ssl failed -- Traceback (most recent call last):
  File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/test/test_ssl.py", 
line 246, in test_connect_ex
self.assertEqual(0, s.connect_ex(("svn.python.org", 443)))
AssertionError: 0 != None
"""

support.transient doesn't help here since no exception is raised.
Note that I'm not sure that connect_ex returning None is normal in the first 
place...

There's a related failure on OpenBSD/NetBSD  buildbots:
"""
test_timeout_connect_ex (test.test_ssl.NetworkedTests) ... ok

==
ERROR: test_non_blocking_connect_ex (test.test_ssl.NetworkedTests)
--
Traceback (most recent call last):
  File 
"/home/cpython/buildslave/3.x.snakebite-openbsd51-amd64-1/build/Lib/test/test_ssl.py",
 line 685, in test_non_blocking_connect_ex
select.select([], [s], [], 5.0)
OSError: [Errno 22] Invalid argument
"""

I guess that connect() can't succeed because of an unreachable host/connection 
refused, and the subsequent select() fails with EINVAL. This is most likely a 
kernel bug, select should report the socket as ready for write (one could then 
use getsockopt() to find the actual error).

--
components: Tests
messages: 178051
nosy: neologix, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: test_ssl with connect_ex don't handle unreachable server correctly
type: behavior

___
Python tracker 

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



[issue15302] Use argparse instead of getopt in test.regrtest

2012-12-24 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Well. Do you like to apply Chris patch and wait for next step appear?

On Mon, Dec 24, 2012 at 2:33 AM, R. David Murray  wrote:
>
> R. David Murray added the comment:
>
> I am -1 on doing this as one big refactoring, unless tests are written for 
> regrtest first.  Incremental (over a period of weeks or months, so that the 
> changes get some soak time each time) is I think acceptable even without 
> tests, given that this is a test runner and not part of Python proper.
>
> --
>
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue16764] Make zlib accept keyword-arguments

2012-12-24 Thread Lukas Lueg

New submission from Lukas Lueg:

The patch "zlib_keywords.patch" makes zlib's classes and functions accept 
keyword arguments as documented. It also fixes two cases in which the docstring 
differ from the documentation (decompress(data) vs. decompress(string) and 
compressobj(memlevel) vs. compressobj(memLevel)). Additional tests are provided.

--
components: Library (Lib)
files: zlib_keywords.patch
keywords: patch
messages: 178053
nosy: ebfe
priority: normal
severity: normal
status: open
title: Make zlib accept keyword-arguments
versions: Python 3.4
Added file: http://bugs.python.org/file28418/zlib_keywords.patch

___
Python tracker 

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



[issue16764] Make zlib accept keyword-arguments

2012-12-24 Thread Lukas Lueg

Lukas Lueg added the comment:

Attaching a patch to fix all pep8/pyflakes warnings and errors in test_zlib.py

--
Added file: http://bugs.python.org/file28419/zlib_tests_pep8.patch

___
Python tracker 

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



[issue16765] Superfluous import in cgi module

2012-12-24 Thread Michiel Holtkamp

New submission from Michiel Holtkamp:

The standard module cgi.py from Python 2.x imports urllib, but urllib is not 
used. This causes a little bit of extra memory usage and a small increase in 
load time. It's not much, but it was enough for me to notice when I was 
profiling my program.

I think the urllib import can be safely removed in 2.6 and 2.7. I've tested 
without the import and it works as expected in my case.

In Python 3.2 (other 3.x versions not checked), urllib.parse is imported but 
here it is actually used, so no problem there.

PS. first time submitting a bug here, so if I'm doing something wrong, please 
be gentle :)

--
components: Library (Lib)
messages: 178055
nosy: mjholtkamp
priority: normal
severity: normal
status: open
title: Superfluous import in cgi module
type: performance
versions: Python 2.6, Python 2.7

___
Python tracker 

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



[issue16764] Make zlib accept keyword-arguments

2012-12-24 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue16765] Superfluous import in cgi module

2012-12-24 Thread Ezio Melotti

Ezio Melotti added the comment:

Python 2.6/3.1 only get security fixes, and 2.7/3.2/3.3 only get bug fixes.
This is technically a performance issue, so I'm not sure it can go in 2.7, but 
if the change is as simple as it seems it could be considered.

--
keywords: +easy
nosy: +ezio.melotti
stage:  -> needs patch
versions:  -Python 2.6

___
Python tracker 

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



[issue16765] Superfluous import in cgi module

2012-12-24 Thread Michiel Holtkamp

Michiel Holtkamp added the comment:

Fair enough, I think I'm using 2.7 only. I wasn't sure about the patch format, 
so I added a unified diff. If you require a different format, please let me 
know.

--
keywords: +patch
Added file: http://bugs.python.org/file28420/patch-python2.7-cgi.py.diff

___
Python tracker 

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



[issue16764] Make zlib accept keyword-arguments

2012-12-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I don't think it worth to add support of keyword for the first mandatory 
argument. This can freeze the poor and inconsistent () names. For example 
compress()/decompress() methods of bz2 and lzma objects doesn't support keyword 
arguments. And why you use "string" name for decompress() argument?

Renaming of "memLevel" argument to "memlevel" is not backward compatible and 
can break third-part code (if anyone use it). This may require starting of 
deprecation process. Difference between a code and a documentation is a bug and 
should be fixed for all Python versions.

Note, that calling a function with keyword arguments is a little slower (a lot 
of slower for fast functions) than calling a function with positional-only 
arguments.

--
components: +Extension Modules -Library (Lib)
nosy: +serhiy.storchaka
stage:  -> patch review
type:  -> enhancement

___
Python tracker 

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



[issue16764] Make zlib accept keyword-arguments

2012-12-24 Thread Lukas Lueg

Lukas Lueg added the comment:

Nothing of what you mention is a problem of this patch.

The memLevel-keyword was not supported as of now, only the docstring 
("memLevel") and the documentation ("memlevel") mentioned it. There is no 
third-party code that could have used it.

The current docstring says that a "string"-keyword should be used with 
decompress(), the documentation talks about a "data"-keyword. Both are not 
supported, the patch adds support for a "data"-keyword and fixes the docstring.

--
components: +Library (Lib) -Extension Modules
type: enhancement -> 

___
Python tracker 

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



[issue16766] small disadvantage of htmlentitydefs

2012-12-24 Thread Al Korgun

New submission from Al Korgun:

>>> import htmlentitydefs
>>> htmlentitydefs.name2codepoint.get("quot")  # ok
34
>>> htmlentitydefs.name2codepoint.get("apos", "null")  # ' -> chr(39)
'null'

--
components: Library (Lib)
messages: 178060
nosy: WitcherGeralt
priority: normal
severity: normal
status: open
title: small disadvantage of htmlentitydefs
versions: Python 2.7

___
Python tracker 

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



[issue16766] small disadvantage of htmlentitydefs

2012-12-24 Thread Al Korgun

Changes by Al Korgun :


--
versions: +Python 2.6

___
Python tracker 

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



[issue16767] Cannot install Python 2.7 in Wine 1.4.1

2012-12-24 Thread Joe Borg

New submission from Joe Borg:

Trying to install Python 2.7 (in particular) under Wine 1.4.1, but keep getting 
the "Installer has ended prematurely" error.  I've also tried with 2.6 and 3.2 
and different versions of wine; same error.  Also tried with winetricks; again, 
same error.

I've used the msiexec command to log the output of the installer and will 
attach.

Thanks.

--
components: Windows
files: install.log
messages: 178061
nosy: Joe.Borg
priority: normal
severity: normal
status: open
title: Cannot install Python 2.7 in Wine 1.4.1
versions: Python 2.7
Added file: http://bugs.python.org/file28421/install.log

___
Python tracker 

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



[issue15302] Use argparse instead of getopt in test.regrtest

2012-12-24 Thread Chris Jerdonek

Chris Jerdonek added the comment:

> Do you like to apply Chris patch and wait for next step appear?

Just to clarify, I think this should read "apply Chris patch after 
updating/reviewing."  A couple file renames are needed, and I noticed a typo in 
a docstring.  Other changes may be needed since 5 months have elapsed.

--

___
Python tracker 

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



[issue16764] Make zlib accept keyword-arguments

2012-12-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Sorry, I missed, not decompress(), but compress(). Except this small error all 
of what I said *is* a problem of this patch.

--
components: +Extension Modules -Library (Lib)
type:  -> enhancement

___
Python tracker 

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



[issue16766] small disadvantage of htmlentitydefs

2012-12-24 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +ezio.melotti
versions: +Python 3.2, Python 3.3, Python 3.4 -Python 2.6

___
Python tracker 

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



[issue15302] Use argparse instead of getopt in test.regrtest

2012-12-24 Thread R. David Murray

R. David Murray added the comment:

Yes, I apologize for not getting around to a review previously.

Chris: why regrlib.py at all?  Why isn't the code in regrtest.py?  And I'm not 
clear on why there is a desire to have regrtest be a package.  Did I miss that 
discussion?

--

___
Python tracker 

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



[issue16768] CTRL-Y, yank, behaves as CTRL-Z with curses on OS X

2012-12-24 Thread Ziga

New submission from Ziga:

`getch()` interprets CTRL-Y as CTRL-Z on OS X 10.7.3.
Tested with python 2.5, 2.6, 2.7 32-bit and 64-bit.

How to recreate behavior:
>>> import curses
>>> stdscr = curses.initscr()
# CTRL-Y works as expected until now.

>>> stdscr.getch()
# press 
$ [1]  + 407 suspended  python

--
assignee: ronaldoussoren
components: Extension Modules, Library (Lib), Macintosh
messages: 178065
nosy: agiz, ronaldoussoren
priority: normal
severity: normal
status: open
title: CTRL-Y, yank, behaves as CTRL-Z with curses on OS X
type: behavior
versions: Python 2.6, Python 2.7

___
Python tracker 

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



[issue16757] Faster _PyUnicode_FindMaxChar()

2012-12-24 Thread STINNER Victor

STINNER Victor added the comment:

See issues #14687 and #14716 for benchmarks and information about the changes 
introducing and using _PyUnicodeWriter for str%args and str.format(args).

--

___
Python tracker 

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



[issue16757] Faster _PyUnicode_FindMaxChar()

2012-12-24 Thread STINNER Victor

STINNER Victor added the comment:

Avoid scanning a substring to compute the maximum character is a good thing, so 
+1 for the idea. Instead of modifying an existing function, it might be safer 
to rename it. Even if it is private, a third party module *can* use it outside 
Python. It is also surprising that you have to specifiy a "maxchar" argument 
whereas the purpose of the function is to compute the maximum character.

Ex: rename _PyUnicode_FindMaxChar() to _PyUnicode_FindMaxChar2(), and add 
_PyUnicode_FindMaxChar() as the macro:

#define _PyUnicode_FindMaxChar(str, start, length) _PyUnicode_FindMaxChar2(str, 
start, length, 127)

--

___
Python tracker 

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



[issue16767] Cannot install Python 2.7 in Wine 1.4.1

2012-12-24 Thread R. David Murray

R. David Murray added the comment:

Thanks for the report, however WINE is not an environment we support.  A quick 
google indicates people have occasionally succeeded in getting it to install 
and run (for some definition of run), but it sounds like you've read about 
those.

If you want to work out the problem, and if it proves to be an in issue in 
Python and not WINE, and if the patch to fix it isn't too complex, it will be 
considered.  You can probably get help with this on the python-list mailing 
list.

--
nosy: +r.david.murray
resolution:  -> wont fix
stage:  -> committed/rejected
status: open -> pending

___
Python tracker 

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



[issue16637] py-bt, py-locals, etc. GDB commands fail with output-radix 16

2012-12-24 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue16768] CTRL-Y, yank, behaves as CTRL-Z with curses on OS X

2012-12-24 Thread Ziga

Ziga added the comment:

Same behavior with:

>>> import sys
>>> sys.stdin.read(1)
# press 
[1]  + 1024 suspended  python

--

___
Python tracker 

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



[issue16672] improve tracing performances when f_trace is NULL

2012-12-24 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue15302] Use argparse instead of getopt in test.regrtest

2012-12-24 Thread Chris Jerdonek

Chris Jerdonek added the comment:

> why regrlib.py at all?  Why isn't the code in regrtest.py?

It was for a few related reasons.  It was primarily to make it easier to reason 
about testing regrtest, and to avoid at the outset any pitfalls that might 
arise from the circularity of regrtest testing itself.  For example, the 
regrtest module seems to carry a fair bit of state and top-level code, whereas 
the "library" module being added would be stateless.  It would also let us 
maintain an obvious line between what is tested and what is not.

There was no discussion of creating a package.  However, if we go this route I 
would foresee moving functionality from regrtest to the library module as we 
expand the amount of regrtest-support code under test.

--

___
Python tracker 

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



[issue812369] module shutdown procedure based on GC

2012-12-24 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue13863] import.c sometimes generates incorrect timestamps on Windows + NTFS

2012-12-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 002d5f3b240d by Mark Dickinson in branch '2.7':
Issue #13863: fix incorrect .pyc timestamps on Windows / NTFS (apparently due 
to buggy fstat)
http://hg.python.org/cpython/rev/002d5f3b240d

--
nosy: +python-dev

___
Python tracker 

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



[issue13863] import.c sometimes generates incorrect timestamps on Windows + NTFS

2012-12-24 Thread Mark Dickinson

Mark Dickinson added the comment:

Fixed for 2.7.  I don't think this is worth fixing to 3.2, given that it's not 
an issue for 3.3.

Thanks Brian and Serhiy for reviewing!

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

___
Python tracker 

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



[issue15302] Use argparse instead of getopt in test.regrtest

2012-12-24 Thread Chris Jerdonek

Chris Jerdonek added the comment:

By the way, I am in the process of cleaning up the patch a bit.

--

___
Python tracker 

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



[issue14470] Remove using of w9xopen in subprocess module

2012-12-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset deee9f0a4b98 by Brian Curtin in branch 'default':
Fix #14470. Remove mentions of w9xpopen on old versions of Visual Studio.
http://hg.python.org/cpython/rev/deee9f0a4b98

--

___
Python tracker 

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



[issue14470] Remove using of w9xopen in subprocess module

2012-12-24 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Thanks

On Mon, Dec 24, 2012 at 6:44 PM, Roundup Robot  wrote:
>
> Roundup Robot added the comment:
>
> New changeset deee9f0a4b98 by Brian Curtin in branch 'default':
> Fix #14470. Remove mentions of w9xpopen on old versions of Visual Studio.
> http://hg.python.org/cpython/rev/deee9f0a4b98
>
> --
>
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue16757] Faster _PyUnicode_FindMaxChar()

2012-12-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It is not more surprising that specify a "start" argument for sum().

I don't think we should worry about third party module which violate the API. 
It will crash in any case when the exported function will disappear and will be 
replaced by macros.

--

___
Python tracker 

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



[issue16769] Remove some old Visual Studio versions from PC/ directory

2012-12-24 Thread Brian Curtin

New submission from Brian Curtin:

While fixing #14470 to remove w9xpopen support, removing it from old Visual 
Studio projects came up.

1. I can't imagine anyone is attempting to use most of these.
2. Since we don't backport build changes to these older versions, some of them 
are very out of date and can't be that useful.

I propose to remove the following:
1. PC/VC6 - this version is from 1998 and is the last compiler to support 
Win9x, which we just removed support for with the w9xpopen change via PEP 11.
2. PC/VS7.1 - this version is from 2003 and still contains references to WISE 
installer, which IIRC has not been used since 2.3. On top of that, it's missing 
many of the current project files.

I'm skeptical of PC/VS8.0's use as Visual Studio 2005 is pretty old and it too 
is missing many current project files, but there is a conversion script that 
may help point someone in the right direction. I do remember Hirokazu Yamamoto 
mentioning using 2005 for some purposes, but this was years ago.

--
assignee: brian.curtin
components: Build, Windows
messages: 178077
nosy: brian.curtin, loewis
priority: normal
severity: normal
status: open
title: Remove some old Visual Studio versions from PC/ directory
type: behavior
versions: Python 3.4

___
Python tracker 

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



[issue16769] Remove some old Visual Studio versions from PC/ directory

2012-12-24 Thread Jeremy Kloth

Changes by Jeremy Kloth :


--
nosy: +jkloth

___
Python tracker 

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



[issue16769] Remove some old Visual Studio versions from PC/ directory

2012-12-24 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Do you want to keep VS9.0 only?
Sounds good to me.

--
nosy: +asvetlov

___
Python tracker 

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



[issue16769] Remove some old Visual Studio versions from PC/ directory

2012-12-24 Thread Brian Curtin

Brian Curtin added the comment:

Definitely keeping PC/VS9.0 as it's still fairly common and VS2008 is still 
used by us for 2.7.

I would like to remove PC/VS8.0 but if anyone speaks towards keeping it then I 
think it's fine.

--
nosy: +ocean-city

___
Python tracker 

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



[issue15302] Use argparse instead of getopt in test.regrtest

2012-12-24 Thread Anton Kasyanov

Anton Kasyanov added the comment:

So I see that there is no need in full refactoring now.

BTW, maybe someone should create an issue for full tests coverage of regrtest? 
Then it would be much easier to make a full refactoring.

--

___
Python tracker 

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



[issue16757] Faster _PyUnicode_FindMaxChar()

2012-12-24 Thread STINNER Victor

STINNER Victor added the comment:

> It is not more surprising that specify a "start" argument for sum().

Un pythin, the start attribute of sum is optional.

> I don't think we should worry about third party module which violate the
API. It will crash in any case when the exported function will disappear
and will be replaced by macros.

The compilation will fail, whereas it will crash with your patch.

--

___
Python tracker 

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



[issue16672] improve tracing performances when f_trace is NULL

2012-12-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1fb26db7d719 by Benjamin Peterson in branch 'default':
improve tracing performance when f_trace is NULL (closes #16672)
http://hg.python.org/cpython/rev/1fb26db7d719

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue16720] Get rid of os.error. Use OSError instead

2012-12-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6cfe2982de42 by Andrew Svetlov in branch 'default':
Use OESeeror instead of os.error (#16720)
http://hg.python.org/cpython/rev/6cfe2982de42

--
nosy: +python-dev

___
Python tracker 

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



[issue16720] Get rid of os.error. Use OSError instead

2012-12-24 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Thanks!

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue16650] Popen._internal_poll() references errno.ECHILD outside of the local scope

2012-12-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0cc4fe5634cf by Andrew Svetlov in branch '3.2':
Keep ref to ECHILD in local scope (#16650)
http://hg.python.org/cpython/rev/0cc4fe5634cf

New changeset 0b1a49f99169 by Andrew Svetlov in branch '3.3':
Keep ref to ECHILD in local scope (#16650)
http://hg.python.org/cpython/rev/0b1a49f99169

New changeset 8f30461395b1 by Andrew Svetlov in branch 'default':
Keep ref to ECHILD in local scope (#16650)
http://hg.python.org/cpython/rev/8f30461395b1

New changeset a963dd401a63 by Andrew Svetlov in branch '2.7':
Keep ref to ECHILD in local scope (#16650)
http://hg.python.org/cpython/rev/a963dd401a63

--
nosy: +python-dev

___
Python tracker 

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



[issue16650] Popen._internal_poll() references errno.ECHILD outside of the local scope

2012-12-24 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Close the issue.
For future improvements (like ChildProcessError using) please open new one.

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue15302] Use argparse instead of getopt in test.regrtest

2012-12-24 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Here is an updated, improved patch.

--
Added file: http://bugs.python.org/file28422/issue-15302-3.patch

___
Python tracker 

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



[issue16770] Selection in IDLE often skips first character

2012-12-24 Thread Irwin Jungreis

New submission from Irwin Jungreis:

Often, when selecting text in IDLE, the first character of the selected region 
does not get selected. The problem occurs because sometimes, not always, when 
clicking on the left half of a character the insertion point gets put after the 
character, while other times it gets put before the character, even when 
clicking in the exact same spot. This can be consistently reproduced as 
follows. In IDLE, File | New Window. In the new window type the two characters 
'M1' (without the quotes). Now position the cursor over the left half of the M. 
Slowly click several times without moving the cursor (with enough delay that it 
does not interpret it as a double-click). Note that after some clicks the 
insertion point is before the M and after others it is after the M, even though 
the cursor has not moved.

I am running Python 2.7.3, IDLE version 2.7.3, Tk version 8.5, on Mac OS X 
10.6.8 Snow Leopard, on a MacBook Pro. (Same problem occurs on laptop screen 
and external monitor, and with USB mouse or built in trackpad)

--
assignee: ronaldoussoren
components: IDLE, Macintosh
messages: 178088
nosy: jungreis, ronaldoussoren
priority: normal
severity: normal
status: open
title: Selection in IDLE often skips first character
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue16665] doc for builtin hex() is poor

2012-12-24 Thread rurpy

rurpy added the comment:

I would like to submit the following post made to c.l.p in support of my claim 
that a cross-reference to the string formatting "x" format specifier would be 
desireable in the documentation for the hex() builtin:

  Newsgroups: comp.lang.python
  Subject: Re: Integer as raw hex string?
  Date: Mon, 24 Dec 2012 11:21:15 -0500
  https://groups.google.com/group/comp.lang.python/msg/054706d112f6385d?hl=en

(In case the link goes away... the post asks how to get the same results as 
hex() but without the leading "0x".)

--

___
Python tracker 

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



[issue11939] Implement stat.st_dev and os.path.samefile on windows

2012-12-24 Thread Brian Curtin

Brian Curtin added the comment:

Here's a patch that fills st_dev, and while we're at it st_rdev (which is the 
same value).

I've moved the implementation of samefile/sameopenfile/samestat from 
Lib/posixpath.py over to Lib/genericpath.py and then removed the implementation 
from Lib/ntpath.py, so those functions are now common. The same goes for tests 
- I've rearranged tests towards test_genericpath. I also removed 
_getfileinformation from Modules/posixmodule.c because it's no longer being 
used.

--
keywords: +needs review, patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file28423/issue11939.diff

___
Python tracker 

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



[issue13000] unhandled exception at install

2012-12-24 Thread Brian Curtin

Changes by Brian Curtin :


--
status: open -> pending

___
Python tracker 

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



[issue16748] Ensure test discovery doesn't break for modules testing C and Python implementations

2012-12-24 Thread Éric Araujo

Éric Araujo added the comment:

I won’t be online for the next two weeks.

I think there is a bug with Michael Foord, RDM and I where we talk about this 
very issue.

--

___
Python tracker 

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



[issue16754] Incorrect shared library extension on linux

2012-12-24 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +barry
versions: +Python 3.2, Python 3.4

___
Python tracker 

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



[issue16755] Distutils2 incorrectly works with unicode package names

2012-12-24 Thread Éric Araujo

Éric Araujo added the comment:

Thanks, will check this when I come back online after the holidays.

--
versions: +3rd party -Python 3.3

___
Python tracker 

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



[issue16771] issuse

2012-12-24 Thread Nurhusien Hasen

New submission from Nurhusien Hasen:

No find bug python any issuse masseg
Please not  find you masseg or I am out bug python Account

--
messages: 178093
nosy: Nurhusien2
priority: normal
severity: normal
status: open
title: issuse

___
Python tracker 

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



[issue16771] issuse

2012-12-24 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue16720] Get rid of os.error. Use OSError instead

2012-12-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e2e5181b10f8 by Andrew Svetlov in branch 'default':
fix typo (#16720)
http://hg.python.org/cpython/rev/e2e5181b10f8

--

___
Python tracker 

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



[issue16772] int() accepts float number base

2012-12-24 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

I'm not sure this is a bug. In 2.7 int() and long() with float number base 
raises TypeError. But in 3.x int() accepts float number base and truncate it to 
int.

--
components: Interpreter Core
messages: 178095
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: int() accepts float number base
versions: Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue16772] int() accepts float number base

2012-12-24 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti
stage:  -> needs patch
type:  -> behavior

___
Python tracker 

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



[issue16773] int() half-accepts UserString

2012-12-24 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

In Python 3 int() accepts UserString argument without explicit base and reject 
it with explicit base.

>>> from collections import UserString
>>> int(UserString('100'))
100
>>> int(UserString('100'), 2)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: int() can't convert non-string with explicit base


In 2.7 the same behavior also for MutableString and bytearray.

--
components: Interpreter Core
messages: 178096
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: needs patch
status: open
title: int() half-accepts UserString
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue16773] int() half-accepts UserString

2012-12-24 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue16761] Fix int(base=X)

2012-12-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Patches updated to address Cris's  comments on Rietveld (thank you, Cris, for 
review). In additional new tests added. I think merging test_int and test_long 
is hard task and should be done in separated issue. Instead I have merged and 
simplified some test to make synchronization simpler.

Two new possible bugs were found during working on these tests (issue16772 and 
issue16773).

--
Added file: http://bugs.python.org/file28424/int_without_x-3.3_2.patch
Added file: http://bugs.python.org/file28425/int_without_x-3.2_2.patch
Added file: http://bugs.python.org/file28426/int_without_x-2.7_2.patch

___
Python tracker 

___diff -r 10656b0975b3 Lib/test/test_int.py
--- a/Lib/test/test_int.py  Mon Dec 24 13:16:47 2012 +0200
+++ b/Lib/test/test_int.py  Mon Dec 24 21:40:02 2012 +0200
@@ -74,8 +74,6 @@
 self.assertEqual(x >> 1, x//2)
 
 self.assertRaises(ValueError, int, '123\0')
-self.assertRaises(ValueError, int, '53', 40)
-
 # SF bug 1545497: embedded NULs were not detected with
 # explicit base
 self.assertRaises(ValueError, int, '123\0', 10)
@@ -85,7 +83,8 @@
 self.assertIsInstance(x, int)
 
 
-self.assertRaises(TypeError, int, 1, 12)
+self.assertRaises(TypeError, int, 1, 10)
+self.assertRaises(TypeError, int, 1, 0)
 
 self.assertEqual(int('0o123', 0), 83)
 self.assertEqual(int('0x123', 16), 291)
@@ -100,10 +99,6 @@
 self.assertRaises(ValueError, int, "0b", 2)
 self.assertRaises(ValueError, int, "0b", 0)
 
-# Bug #3236: Return small longs from PyLong_FromString
-self.assertTrue(int("10") is 10)
-self.assertTrue(int("-1") is -1)
-
 # SF bug 1334662: int(string, base) wrong answers
 # Various representations of 2**32 evaluated to 0
 # rather than 2**32 in previous versions
@@ -221,24 +216,22 @@
 self.assertEqual(int('2br45qc', 35), 4294967297)
 self.assertEqual(int('1z141z5', 36), 4294967297)
 
+@support.cpython_only
+def test_small_ints(self):
+# Bug #3236: Return small longs from PyLong_FromString
+self.assertIs(int("10"), 10)
+self.assertIs(int("-1"), -1)
+
 def test_no_args(self):
-self.assertEquals(int(), 0)
+self.assertEqual(int(), 0)
 
 def test_keyword_args(self):
 # Test invoking int() using keyword arguments.
-self.assertEquals(int(x=1.2), 1)
-self.assertEquals(int('100', base=2), 4)
-self.assertEquals(int(x='100', base=2), 4)
-
-# For example, PyPy 1.9.0 raised TypeError for these cases because it
-# expects x to be a string if base is given.
-@support.cpython_only
-def test_base_arg_with_no_x_arg(self):
-self.assertEquals(int(base=6), 0)
-# Even invalid bases don't raise an exception.
-self.assertEquals(int(base=1), 0)
-self.assertEquals(int(base=1000), 0)
-self.assertEquals(int(base='foo'), 0)
+self.assertEqual(int(x=1.2), 1)
+self.assertEqual(int('100', base=2), 4)
+self.assertEqual(int(x='100', base=2), 4)
+self.assertRaises(TypeError, int, base=10)
+self.assertRaises(TypeError, int, base=0)
 
 def test_non_numeric_input_types(self):
 # Test possible non-numeric types for the argument x, including
@@ -254,13 +247,36 @@
   CustomByteArray(b'100')]
 
 for x in values:
-msg = 'x has type %s' % type(x).__name__
-self.assertEquals(int(x), 100, msg=msg)
-self.assertEquals(int(x, 2), 4, msg=msg)
+msg = 'x has value %r and type %s' % (x, type(x).__name__)
+try:
+self.assertEqual(int(x), 100, msg=msg)
+self.assertEqual(int(x, 2), 4, msg=msg)
+except TypeError as err:
+raise AssertionError('For %s got TypeError: %s' %
+ (type(x).__name__, err))
+
+from collections import UserString
+values = [UserString('100')]
+for x in values:
+msg = 'x has value %r and type %s' % (x, type(x).__name__)
+try:
+self.assertEqual(int(x), 100, msg=msg)
+except TypeError as err:
+raise AssertionError('For %s got TypeError: %s' %
+ (type(x).__name__, err))
+self.assertRaises(TypeError, int, x, 2)
 
 def test_string_float(self):
 self.assertRaises(ValueError, int, '1.2')
 
+def test_invalid_base(self):
+for base in -1, 1, 37, 2**1000, -2**1000:
+self.assertRaises(ValueError, int, '100', base)
+for base in '10',:
+self.assertRaises(TypeError, int, '100', base)
+# XXX ?
+self.assertEqual(int('100', 10.5), 100)
+
 def te

[issue16772] int() accepts float number base

2012-12-24 Thread Chris Jerdonek

Changes by Chris Jerdonek :


--
nosy: +chris.jerdonek

___
Python tracker 

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



[issue16773] int() half-accepts UserString

2012-12-24 Thread Chris Jerdonek

Changes by Chris Jerdonek :


--
nosy: +chris.jerdonek

___
Python tracker 

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



[issue16774] Additional recipes for itertools docs

2012-12-24 Thread Alexey Kachayev

New submission from Alexey Kachayev:

Additional recipes for itertools documentation (widespread functions in other 
programming languages):
* drop
* split-at
* split-by

--
assignee: docs@python
components: Documentation
files: itertools.doc.diff
keywords: patch
messages: 178098
nosy: asvetlov, docs@python, kachayev
priority: normal
severity: normal
status: open
title: Additional recipes for itertools docs
versions: Python 3.4
Added file: http://bugs.python.org/file28427/itertools.doc.diff

___
Python tracker 

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



[issue16774] Additional recipes for itertools docs

2012-12-24 Thread Ezio Melotti

Changes by Ezio Melotti :


--
assignee: docs@python -> rhettinger
nosy: +ezio.melotti, rhettinger
stage:  -> patch review
type:  -> enhancement
versions: +Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

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



[issue16757] Faster _PyUnicode_FindMaxChar()

2012-12-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I think it is redundant and useless, but do as you want.

--
Added file: http://bugs.python.org/file28428/unicode_findmaxchar_2.patch

___
Python tracker 

___diff -r a7c9869a5114 Include/unicodeobject.h
--- a/Include/unicodeobject.h   Mon Dec 24 13:17:11 2012 +0200
+++ b/Include/unicodeobject.h   Mon Dec 24 22:52:17 2012 +0200
@@ -739,10 +739,15 @@
 #ifndef Py_LIMITED_API
 /* Compute the maximum character of the substring unicode[start:end].
Return 127 for an empty string. */
-PyAPI_FUNC(Py_UCS4) _PyUnicode_FindMaxChar (
+#define _PyUnicode_FindMaxChar(unicode, start, end) \
+_PyUnicode_FindMaxChar2((unicode), (start), (end), 127)
+/* Compute the maximum character of the substring unicode[start:end] and
+   maxchar. */
+PyAPI_FUNC(Py_UCS4) _PyUnicode_FindMaxChar2(
 PyObject *unicode,
 Py_ssize_t start,
-Py_ssize_t end);
+Py_ssize_t end,
+Py_UCS4 maxchar);
 #endif
 
 /* Copy the string into a UCS4 buffer including the null character if copy_null
diff -r a7c9869a5114 Objects/stringlib/unicode_format.h
--- a/Objects/stringlib/unicode_format.hMon Dec 24 13:17:11 2012 +0200
+++ b/Objects/stringlib/unicode_format.hMon Dec 24 22:52:17 2012 +0200
@@ -886,8 +886,9 @@
  &format_spec_needs_expanding)) == 2) {
 sublen = literal.end - literal.start;
 if (sublen) {
-maxchar = _PyUnicode_FindMaxChar(literal.str,
- literal.start, literal.end);
+maxchar = _PyUnicode_FindMaxChar2(literal.str,
+  literal.start, literal.end,
+  writer->maxchar);
 err = _PyUnicodeWriter_Prepare(writer, sublen, maxchar);
 if (err == -1)
 return 0;
diff -r a7c9869a5114 Objects/unicodeobject.c
--- a/Objects/unicodeobject.c   Mon Dec 24 13:17:11 2012 +0200
+++ b/Objects/unicodeobject.c   Mon Dec 24 22:52:17 2012 +0200
@@ -2002,24 +2002,31 @@
 }
 
 Py_UCS4
-_PyUnicode_FindMaxChar(PyObject *unicode, Py_ssize_t start, Py_ssize_t end)
+_PyUnicode_FindMaxChar2(PyObject *unicode, Py_ssize_t start, Py_ssize_t end,
+Py_UCS4 maxchar)
 {
 enum PyUnicode_Kind kind;
 void *startptr, *endptr;
+Py_UCS4 maxchar2;
 
 assert(PyUnicode_IS_READY(unicode));
 assert(0 <= start);
 assert(end <= PyUnicode_GET_LENGTH(unicode));
 assert(start <= end);
 
-if (start == 0 && end == PyUnicode_GET_LENGTH(unicode))
-return PyUnicode_MAX_CHAR_VALUE(unicode);
+if (start == 0 && end == PyUnicode_GET_LENGTH(unicode)) {
+maxchar2 = PyUnicode_MAX_CHAR_VALUE(unicode);
+return MAX_MAXCHAR(maxchar, maxchar2);
+}
 
 if (start == end)
-return 127;
+return maxchar;
 
 if (PyUnicode_IS_ASCII(unicode))
-return 127;
+return maxchar;
+
+if (maxchar >= PyUnicode_MAX_CHAR_VALUE(unicode))
+return maxchar;
 
 kind = PyUnicode_KIND(unicode);
 startptr = PyUnicode_DATA(unicode);
@@ -2027,15 +2034,19 @@
 startptr = (char *)startptr + start * kind;
 switch(kind) {
 case PyUnicode_1BYTE_KIND:
-return ucs1lib_find_max_char(startptr, endptr);
+maxchar2 = ucs1lib_find_max_char(startptr, endptr);
+break;
 case PyUnicode_2BYTE_KIND:
-return ucs2lib_find_max_char(startptr, endptr);
+maxchar2 = ucs2lib_find_max_char(startptr, endptr);
+break;
 case PyUnicode_4BYTE_KIND:
-return ucs4lib_find_max_char(startptr, endptr);
+maxchar2 = ucs4lib_find_max_char(startptr, endptr);
+break;
 default:
 assert(0);
 return 0;
 }
+return MAX_MAXCHAR(maxchar, maxchar2);
 }
 
 /* Ensure that a string uses the most efficient storage, if it is not the
@@ -13740,7 +13751,7 @@
 Py_ssize_t pindex;
 Py_UCS4 signchar;
 Py_ssize_t buflen;
-Py_UCS4 maxchar, bufmaxchar;
+Py_UCS4 bufmaxchar;
 Py_ssize_t sublen;
 _PyUnicodeWriter *writer = &ctx->writer;
 Py_UCS4 fill;
@@ -13793,7 +13804,7 @@
 arg->width = len;
 
 /* Prepare the writer */
-bufmaxchar = 127;
+bufmaxchar = writer->maxchar;
 if (!(arg->flags & F_LJUST)) {
 if (arg->sign) {
 if ((arg->width-1) > len)
@@ -13804,8 +13815,7 @@
 bufmaxchar = MAX_MAXCHAR(bufmaxchar, fill);
 }
 }
-maxchar = _PyUnicode_FindMaxChar(str, 0, pindex+len);
-bufmaxchar = MAX_MAXCHAR(bufmaxchar, maxchar);
+bufmaxchar = _PyUnicode_FindMaxChar2(str, 0, pindex+len, bufmaxchar);
 buflen = arg->width;
 if (arg->sign && len == arg->width)
 buflen++;
@@ -13975,8 +13985,9 @@
 ctx.writer.overallocate = 0;
 }
 sublen = ctx.fmtpos - nonfmtpos;
- 

[issue16761] Fix int(base=X)

2012-12-24 Thread Chris Jerdonek

Chris Jerdonek added the comment:

This is good work.  Thanks.

> I think merging test_int and test_long is hard task and should be done in 
> separated issue.

I meant "share" rather than "merge."  For the tests you're adding, isn't it 
simply a matter of putting the test cases into a separate mixin or TestCase 
class in a different module, and then importing and subclassing that (and 
setting the type to use as an attribute of the subclass)?  Or am I missing 
something?

--

___
Python tracker 

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



[issue11939] Implement stat.st_dev and os.path.samefile on windows

2012-12-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

What about macpath? I think test_macpath will fail.

--
nosy: +serhiy.storchaka
versions: +Python 3.4 -Python 3.3

___
Python tracker 

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



[issue11939] Implement stat.st_dev and os.path.samefile on windows

2012-12-24 Thread Brian Curtin

Brian Curtin added the comment:

Why do you think that? I don't have a mac so I can't test it.

--

___
Python tracker 

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



[issue11939] Implement stat.st_dev and os.path.samefile on windows

2012-12-24 Thread Brian Curtin

Brian Curtin added the comment:

Here is an updated patch addressing the sameopenfile that remained in 
Lib/ntpath.py, thanks to Sehriy's comment on the review.

--
Added file: http://bugs.python.org/file28429/issue11939_v2.diff

___
Python tracker 

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



[issue11939] Implement stat.st_dev and os.path.samefile on windows

2012-12-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Hmm. test_macpath will now run the tests for samefile etc. macpath doesn't 
contain os.path.samefile. But in Modules/posixmodule.c I don't see any special 
cases for classic MacOS. Actually, I don't know how tests behave on classic 
MacOS.

Please update the documentation (availability, versionchanged).

--

___
Python tracker 

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



[issue11939] Implement stat.st_dev and os.path.samefile on windows

2012-12-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

On other hand, you should add "samefile", "sameopenfile" and "samestat" back to 
__all__ in posixpath and ntpath. __all__ is a list of exported names, not a 
list of defined names.

--

___
Python tracker 

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



[issue16713] "tel" URIs should support params

2012-12-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d002a2e46383 by Senthil Kumaran in branch '3.2':
Fix issue16713 - tel url parsing with params
http://hg.python.org/cpython/rev/d002a2e46383

New changeset 727f26d1806f by Senthil Kumaran in branch '3.3':
Fix issue16713 - tel url parsing with params
http://hg.python.org/cpython/rev/727f26d1806f

New changeset e147d5f3c897 by Senthil Kumaran in branch 'default':
Fix issue16713 - tel url parsing with params
http://hg.python.org/cpython/rev/e147d5f3c897

New changeset ff0426b5d75e by Senthil Kumaran in branch '2.7':
Fix issue16713 - tel url parsing with params
http://hg.python.org/cpython/rev/ff0426b5d75e

--
nosy: +python-dev

___
Python tracker 

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



[issue16713] "tel" URIs should support params

2012-12-24 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Fixed in all codelines. Thank you!

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

___
Python tracker 

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



[issue11939] Implement stat.st_dev and os.path.samefile on windows

2012-12-24 Thread Brian Curtin

Brian Curtin added the comment:

Docs and the __all__ changes in V3 patch.

--
Added file: http://bugs.python.org/file28430/issue11939_v3.diff

___
Python tracker 

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



[issue16743] mmap accepts files > 1 GB, but processes only 1 GB

2012-12-24 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Windows memory-maps multi-gigabyte files just fine as long as one uses the 
proper build (64-bit), which we provide.

Given that mmap produces a finite-length sequence object, as documented, 
slicing is working as it should. Slicing beyond the length  returns an empty 
sequence. The is no different from 'abc'[4:6]==''.

Running Python with finite memory has many memory-associated limitations. They 
are mostly undocumented as the exact details may depend on hardware, OS, 
implementation, version, and build. One practical limitation is that mmap with 
a 32-bit build cannot completely map multi-gigabyte files.

The current doc says:
"class mmap.mmap(fileno, length, tagname=None, access=ACCESS_DEFAULT[, offset]) 
(Windows version) Maps length bytes from the file specified by the file handle 
fileno, and creates a mmap object. If length is larger than the current size of 
the file, the file is extended to contain length bytes. If length is 0, the 
maximum length of the map is the current size of the file, except that if the 
file is empty Windows raises an exception (you cannot create an empty mapping 
on Windows)."

It does not say what happens if the requested length is larger than the max 
possible on a particular system. In particular, there is no mention of 
exception raising. So failure to raise is not a bug for tracker purposes.

The two possibilities of what to do is such situations are best effort and 
bailout. The current choice (at least on Windows, and whether by us, Microsoft, 
or the original mmap authors, I don't know) is best effort. I think that is 
fine, but should be documented. Users who care can compare the mmap object 
length with the file length or needed length and raise or do whatever if the 
mmap length is too short.

So I think we should change this to a doc issue and add something like "If the 
requested length is larger than the limit for the current system, then that 
limit is used as the length."
or
"The length of the returned mmap object has a limit that depends on the details 
of the running system."

Or the header should say that there is a system limit and two of the sentences 
above revised. In the first, change 'length bytes' to 'min(length, system 
limit) bytes. (I am presuming this is true also when length is not given as 0.) 
In the last sentence, change 'current size' to 'min(current size, system 
limit)'.

The Unix version doc should also clarify behavior.
---

If we were to change mmap() (but only in a future release), then users who want 
the current behavior would have to discover, hard-code, and explicitly but 
conditionally pass the limit for each system their code might ever run on. I do 
not know that that is sensibly possible. I would not be surprised if the limit 
for a given 32-bit build varies for different windows versions and setups.

--

___
Python tracker 

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



[issue16743] mmap accepts files > 1 GB, but processes only 1 GB

2012-12-24 Thread Richard Oudkerk

Richard Oudkerk added the comment:

I suspect that the size of the 5GB file is originally a 64 bit quantity, but 
gets cast unsafely to a 32 bit size_t to give 1GB.  This is causing the 
miscalculations.

There is no way to map all of a 5GB file in a 32 bit process -- 4GB is the 
maximum -- so any such attempt should raise an error.  This does not prevent us 
from mapping *part* of a 5GB file.

--
nosy: +sbt

___
Python tracker 

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



[issue16743] mmap accepts files > 1 GB, but processes only 1 GB

2012-12-24 Thread Richard Oudkerk

Richard Oudkerk added the comment:

This bit looks wrong to me:

if (offset - size > PY_SSIZE_T_MAX)
/* Map area too large to fit in memory */
m_obj->size = (Py_ssize_t) -1;

Should it not be "size - offset" instead of "offset - size"?  (offset and size 
are Py_LONG_LONG.)  And there is no check that offset is non-negative.

--

___
Python tracker 

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



[issue16768] CTRL-Y, yank, behaves as CTRL-Z with curses on OS X

2012-12-24 Thread Ned Deily

Ned Deily added the comment:

What you are seeing is platform-specific behavior, a difference between 
BSD-based systems including OS X and other systems including Linux.  The 
difference is that the former systems support the DSUSP (suspend on reading 
input) terminal character in addition to the normal SUSP (suspend immediately) 
terminal character.  The default value for DSUSP is CTRL-Y which you can see in 
the output of stty(1):

$ stty -a
[..]
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = ;
eol2 = ; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;
min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T;
stop = ^S; susp = ^Z; time = 0; werase = ^W;

You should see the same CTRL-Y suspend behavior with other utilities reading 
from standard input, like cat(1), unless they handle that signal.  You can 
modify the behavior of CTRL-Y by disabling the DSUSP character, for example:

$ stty dsusp undef

See the OS X stty(1) man page and other references like:
http://www.gnu.org/software/libc/manual/html_node/Signal-Characters.html

--
nosy: +ned.deily
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



  1   2   >