[issue9543] 2.6.6 rc1 socket.py flush() calls del on unbound 'view' variable

2010-08-11 Thread Ezio Melotti

Ezio Melotti  added the comment:

Here is the patch.

--
keywords: +needs review, patch
stage: unit test needed -> patch review
Added file: http://bugs.python.org/file18474/issue9543.diff

___
Python tracker 

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



[issue9548] locale can be imported at startup but relies on too many library modules

2010-08-11 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Antoine Pitrou wrote:
> 
> Antoine Pitrou  added the comment:
> 
>> I said "warn about the use of non-builtin modules", not disallow
>> their use. AFAIK, the purpose of the exercise is to reduce the
>> number of non-builtin modules being loaded early on during
>> Python startup.
> 
> The purpose of the exercise is to avoid, as much as possible, the
> numerous issues that have already been encountered because of the
> startup procedure relying on locale in various conditions for
> initialization of the standard streams.
> 
> You are proposing that we commit a one-time fix to fix the current
> situation. Recent history shows that similar problems will arise again,
> and waste useful developer time for committing urgency fixes in order to
> fix the build (not to mention that the symptoms are sometimes difficult
> to diagnose, such as in this very issue). I am proposing a broader
> change which prevents, as much as possible, similar problems from
> reappearing and will relieve us from a dispensable burden.

No, what I'm proposing is to make "import locale" safe during
boot time. By separating out some functions into a separate
module which is then supposed to be used by the boot process,
you don't really solve the problem. Other code in the boot process
may very well still import the main locale module and thus
cause the same problems you were trying to solve by separating
out the problematic code - even if this is just code that gets
run via sitecustomize.py or other such hooks.

The changes I'm suggesting will be beneficial to all
standard uses of the module without any such workarounds
based on conventions.

--

___
Python tracker 

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



[issue9568] test_urllib2_localnet fails on OS X 10.3

2010-08-11 Thread Ned Deily

New submission from Ned Deily :

Issue8455 documents a problem which resulted in test_urllib2_libnet failing on 
OS X with "Connection refused" errors. r82150, r82280, r82281, and r82282 
eliminated the test failures for all active branches when running on OS X 10.4 
through 10.6.  However, the fixes overlooked a different code path which is 
only used on OS X 10.3.  The attached one-line patches for 2.6/2.7 and for 
py3k/3.1 correct that problem for 10.3 as well.

Since the patch is low-risk and corrects a failing test case, I recommend that 
it be applied for the 2.6.6 release.

--
assignee: ronaldoussoren
components: Macintosh
files: issue-proxy-10-3-27-26.txt
messages: 113592
nosy: barry, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: test_urllib2_localnet fails on OS X 10.3
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file18475/issue-proxy-10-3-27-26.txt

___
Python tracker 

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



[issue9568] test_urllib2_localnet fails on OS X 10.3

2010-08-11 Thread Ned Deily

Changes by Ned Deily :


Added file: http://bugs.python.org/file18476/issue-proxy-10-3-py3k-31.txt

___
Python tracker 

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



[issue8455] buildbot: test_urllib2_localnet failures (Connection refused) on Tiger buildbot

2010-08-11 Thread Ned Deily

Ned Deily  added the comment:

The problem still exists on OS X 10.3.  See Issue9568 for patches.

--

___
Python tracker 

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



[issue9568] test_urllib2_localnet fails on OS X 10.3

2010-08-11 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

Barry: I agree with Ned that this is low-risk patch.  

The patch changes a default return value in a code-path that is used on OSX 
10.3 to make it the same as the default value on the code-path for other OSX 
releases.

I'm therefore +1 on applying this for 2.6.6, but won't apply without explicit 
permission to do so.

--

___
Python tracker 

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



[issue8095] test_urllib2 crashes on OS X 10.3 attempting to retrieve network proxy configuration

2010-08-11 Thread Ned Deily

Ned Deily  added the comment:

The fix in r80243 for 27 and similar fixes for 26, 31, and py3k do prevent 
crashes on OS X 10.3 when using network proxies so this issue can be closed.  
However, the problem I mentioned above with changing the default sense which 
caused tests to fail was documented in Issue8455 and subsequently fixed for 
10.4+.  The fixes did not correct the 10.3 code paths; that is now documented 
in Issue9568 with tested patches.

--
status: open -> closed

___
Python tracker 

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



[issue9548] locale can be imported at startup but relies on too many library modules

2010-08-11 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> No, what I'm proposing is to make "import locale" safe during
> boot time. By separating out some functions into a separate
> module which is then supposed to be used by the boot process,
> you don't really solve the problem.

I do, and my experimentations show it.

Believe me, variations of this problem have been bothering us often
enough in recent times that I know your solution won't work for long.

"Trying to be careful with imports in a large stdlib module" doesn't cut
it, because we always need new imports when we make changes. The point
of _bootlocale (you might not like the name, in which case you can
suggest an alternative) is that it is restricted and static: we only
need getpreferredencoding() and its dependencies, and this code isn't
likely to change a lot.

(you might ask why this problem hasn't affected 2.x, and that's because
in 2.x standard streams are much simpler, built-in objects; in
particular, they don't need to choose an encoding for character
decoding; their initialization doesn't require executing stdlib code)

> Other code in the boot process
> may very well still import the main locale module

It doesn't. 
By "boot process" I really mean something very specific. It is all which
runs until site.py gets executed (if it isn't skipped). There isn't a
whole lot of code there. Mostly, it's initialization of standard
streams, where two stdlib functions can be invoked: os.device_encoding()
and locale.getpreferredencoding() (depending on the circumstances).

When sitecustomize.py gets run, everything is already set up and there's
no problem importing whatever module you want.

> The changes I'm suggesting will be beneficial to all
> standard uses of the module without any such workarounds
> based on conventions.

Standard uses of the module aren't problematic at all, and importing
functools or collections in that context is harmless (they will probably
be imported by other stdlib modules anyway).

--

___
Python tracker 

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



[issue2443] Define Py_VA_COPY macro as a cross-platform replacement for gcc __va_copy

2010-08-11 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Looks like a good idea. Don't other compilers have __va_copy equivalents?
Apparently, C99 defines va_copy(), which we could use conditionally.

--
nosy: +pitrou

___
Python tracker 

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



[issue9425] Rewrite import machinery to work with unicode paths

2010-08-11 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Actually, I'm not sure there's much point since the "name" attribute is 
currently read-only:

>>> f = open(1, "wb")
>>> f.name = "foo"
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: attribute 'name' of '_io.BufferedWriter' objects is not writable
>>> 
>>> g = open(1, "w")
>>> g.name = "bar"
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: attribute 'name' of '_io.TextIOWrapper' objects is not writable

--

___
Python tracker 

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



[issue9558] build_ext fails on VS8.0

2010-08-11 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
assignee: tarek -> eric.araujo
resolution:  -> accepted

___
Python tracker 

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



[issue3244] multipart/form-data encoding

2010-08-11 Thread Chris Waigl

Changes by Chris Waigl :


--
nosy: +Chris.Waigl

___
Python tracker 

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



[issue4708] os.pipe should return inheritable descriptors (Windows)

2010-08-11 Thread Daniel Goertzen

Changes by Daniel Goertzen :


--
nosy: +Daniel.Goertzen

___
Python tracker 

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



[issue9550] BufferedReader may issue additional read, may cause hang when backed by blocking socket

2010-08-11 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The original patch wasn't good for all cases. I corrected it, added some tests 
and committed in r83944 (py3k), r83945 (3.1) and r83946 (2.7). Thank you!

--
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
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



[issue6081] str.format_from_mapping()

2010-08-11 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue9553] test_argparse.py: 80 failures if COLUMNS env var set to a value other than 80

2010-08-11 Thread R. David Murray

R. David Murray  added the comment:

Your code is fine (though to my tastes a bit verbose...if it were me I'd just 
put the code in the setUp and tearDown methods and hardcode 'COLUMNS' (it isn't 
like the name COLUMNS is going to change)...but that's just personal style).

The EnviormentVarGuard version would look like this (untested):

   def setUp(self):
   self.guard = EnvironmentVarGuard()
   self.environ = self.guard.__enter__()
   # Current tests expect 80 column terminal width.
   self.environ['COLUMNS'] = 80

   def tearDown(self):
   self.guard.__exit__(None, None, None)

You could of course delete COLUMNS as you did, but I thought setting it to 80 
would be more explicit.

Another comment about the patch: by inspection it appears that adding setUp and 
tearDown to TestCase isn't enough, since subclasses and mixins define those 
without calling the superclass versions.

--

___
Python tracker 

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



[issue6186] test_thread occasionally reports unhandled exceptions on OS X

2010-08-11 Thread Ned Deily

Ned Deily  added the comment:

I've seen no further instances of this problem since the fixes for Issue7194 
have been checked in.  Let's call it 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



[issue7037] test_asynchat fails on os x 10.6

2010-08-11 Thread Ned Deily

Ned Deily  added the comment:

As Mark has ported the fix for Issue5798 to 2.6 (thanks!), this can be closed, 
too.

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue8457] buildbot: test_asynchat and test_smtplib failures on Tiger: [Errno 9] Bad file descriptor

2010-08-11 Thread Ned Deily

Ned Deily  added the comment:

As Mark has ported the fix for Issue5798 to 2.6, this can be closed, too.

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error

2010-08-11 Thread Michael Foord

Michael Foord  added the comment:

Output below, first without DISTUTILS_DEBUG (showing the not very useful 
default message) and second with. (The actual exception is "Access to the path 
'C:\Program Files\IronPython 2.7\Lib\site-packages\mock.py' is denied.")

This is with IronPython 2.7A1 which includes the Python 2.7 standard library.

> ipy setup.py build
running build
running build_py
warning: build_py: byte-compiling is disabled, skipping.

C:\compile\mock
> ipy setup.py install
running install
running build
running build_py
warning: build_py: byte-compiling is disabled, skipping.

running install_lib
copying build\lib\mock.py -> C:\Program Files\IronPython 2.7\Lib\site-packages
error: C:\Program Files\IronPython 2.7\Lib\site-packages\mock.py: None
C:\compile\mock
> set DISTUTILS_DEBUG=1

C:\compile\mock
> ipy setup.py install
options (after parsing config files):
options (after parsing command line):
option dict for 'install' command:
  {}
option dict for 'sdist' command:
  {'force_manifest': ('setup.cfg', '1')}
running install
Distribution.get_command_obj(): creating 'install' command object
pre-finalize_{unix,other}:
  prefix: None
  exec_prefix: None
  home: None
  user: 0
  install_base: None
  install_platbase: None
  root: None
  install_purelib: None
  install_platlib: None
  install_lib: None
  install_headers: None
  install_scripts: None
  install_data: None
  compile: None
  compile: True
  optimize: None
  force: None
  skip_build: 0
  record: None
post-finalize_{unix,other}():
  prefix: C:\Program Files\IronPython 2.7
  exec_prefix: None
  home: None
  user: 0
  install_base: C:\Program Files\IronPython 2.7
  install_platbase: C:\Program Files\IronPython 2.7
  root: None
  install_purelib: $base/Lib/site-packages
  install_platlib: $base/Lib/site-packages
  install_lib: None
  install_headers: $base/Include/$dist_name
  install_scripts: $base/Scripts
  install_data: $base
  compile: None
  compile: True
  optimize: None
  force: None
  skip_build: 0
  record: None
post-expand_basedirs():
  prefix: C:\Program Files\IronPython 2.7
  exec_prefix: None
  home: None
  user: 0
  install_base: C:\Program Files\IronPython 2.7
  install_platbase: C:\Program Files\IronPython 2.7
  root: None
  install_purelib: $base/Lib/site-packages
  install_platlib: $base/Lib/site-packages
  install_lib: None
  install_headers: $base/Include/$dist_name
  install_scripts: $base/Scripts
  install_data: $base
  compile: None
  compile: True
  optimize: None
  force: None
  skip_build: 0
  record: None
config vars:
{'base': 'C:\\Program Files\\IronPython 2.7',
 'dist_fullname': 'mock-0.7.0',
 'dist_name': 'mock',
 'dist_version': '0.7.0',
 'exec_prefix': 'C:\\Program Files\\IronPython 2.7',
 'platbase': 'C:\\Program Files\\IronPython 2.7',
 'prefix': 'C:\\Program Files\\IronPython 2.7',
 'py_version': '2.7.0',
 'py_version_nodot': '27',
 'py_version_short': '2.7',
 'sys_exec_prefix': 'C:\\Program Files\\IronPython 2.7',
 'sys_prefix': 'C:\\Program Files\\IronPython 2.7',
 'userbase': 'C:\\Users\\michael\\AppData\\Roaming\\Python',
 'usersite': 'C:\\Users\\michael\\AppData\\Roaming\\Python\\Python27\\site-packa
ges'}
post-expand_dirs():
  prefix: C:\Program Files\IronPython 2.7
  exec_prefix: None
  home: None
  user: 0
  install_base: C:\Program Files\IronPython 2.7
  install_platbase: C:\Program Files\IronPython 2.7
  root: None
  install_purelib: C:\Program Files\IronPython 2.7/Lib/site-packages
  install_platlib: C:\Program Files\IronPython 2.7/Lib/site-packages
  install_lib: None
  install_headers: C:\Program Files\IronPython 2.7/Include/mock
  install_scripts: C:\Program Files\IronPython 2.7/Scripts
  install_data: C:\Program Files\IronPython 2.7
  compile: None
  compile: True
  optimize: None
  force: None
  skip_build: 0
  record: None
after prepending root:
  prefix: C:\Program Files\IronPython 2.7
  exec_prefix: None
  home: None
  user: 0
  install_base: C:\Program Files\IronPython 2.7
  install_platbase: C:\Program Files\IronPython 2.7
  root: None
  install_purelib: C:\Program Files\IronPython 2.7\Lib\site-packages
  install_platlib: C:\Program Files\IronPython 2.7\Lib\site-packages
  install_lib: C:\Program Files\IronPython 2.7\Lib\site-packages\
  install_headers: C:\Program Files\IronPython 2.7\Include\mock
  install_scripts: C:\Program Files\IronPython 2.7\Scripts
  install_data: C:\Program Files\IronPython 2.7
  compile: None
  compile: True
  optimize: None
  force: None
  skip_build: 0
  record: None
Distribution.get_command_obj(): creating 'build' command object
running build
running build_py
Distribution.get_command_obj(): creating 'build_py' command object
warning: build_py: byte-compiling is disabled, skipping.

running install_lib
Distribution.get_command_obj(): creating 'install_lib' command object
copying build\lib\mock.py -> C:\Program Files\IronPython 2.7\Lib\site-packages
error: C:\Program Files\IronPython 2.7\Lib\site-packages\mock.py: None
Traceback (most recent call last):
  Fil

[issue8457] buildbot: test_asynchat and test_smtplib failures on Tiger: [Errno 9] Bad file descriptor

2010-08-11 Thread Mark Dickinson

Mark Dickinson  added the comment:

Thanks, Ned!

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



[issue7037] test_asynchat fails on os x 10.6

2010-08-11 Thread Mark Dickinson

Changes by Mark Dickinson :


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



[issue9516] sysconfig: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.3" but "10.5" during configure

2010-08-11 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

Assigning to myself because I intend to work on this.

More questions: does the error occur on the 10.6 machine you used to do the 
build or another machine?

Is MACOSX_DEPLOYMENT_TARGET set in the environment when you run the command 
that gives the error message?

--
assignee: tarek -> ronaldoussoren

___
Python tracker 

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



[issue9055] test_issue_8959_b fails when run from a service

2010-08-11 Thread Tim Golden

Tim Golden  added the comment:

In the interests of moving this forward, I've committed the one-line removal of 
the assertion in r83948. Hopefully that will bring this buildbot back to life.

--

___
Python tracker 

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



[issue2443] Define Py_VA_COPY macro as a cross-platform replacement for gcc __va_copy

2010-08-11 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

I updated the patch for 3.x.   I agree that using va_copy where available makes 
sense, but let's leave this type of improvements for the future.

--
Added file: http://bugs.python.org/file18477/issue2443-py3k.diff

___
Python tracker 

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



[issue9569] Add tests for posix.mknod() and posix.mkfifo()

2010-08-11 Thread David Watson

New submission from David Watson :

Attaching simple tests for these functions, which aren't currently tested.

--
components: Extension Modules
files: test-mknod-mkfifo-3.x.diff
keywords: patch
messages: 113609
nosy: baikie
priority: normal
severity: normal
status: open
title: Add tests for posix.mknod() and posix.mkfifo()
type: feature request
Added file: http://bugs.python.org/file18478/test-mknod-mkfifo-3.x.diff

___
Python tracker 

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



[issue9569] Add tests for posix.mknod() and posix.mkfifo()

2010-08-11 Thread David Watson

Changes by David Watson :


Added file: http://bugs.python.org/file18479/test-mknod-mkfifo-2.x.diff

___
Python tracker 

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



[issue9570] PEP 383: os.mknod() and os.mkfifo() do not accept surrogateescape arguments

2010-08-11 Thread David Watson

New submission from David Watson :

These functions still use the "s" format for their arguments; the attached 
patch fixes them to use PyUnicode_FSConverter() in 3.2.  Some simple tests for 
these functions (not for PEP 383 behaviour) are at issue #9569.

--
components: Extension Modules
files: mknod-mkfifo-pep383-3.2.diff
keywords: patch
messages: 113611
nosy: baikie
priority: normal
severity: normal
status: open
title: PEP 383: os.mknod() and os.mkfifo() do not accept surrogateescape 
arguments
type: behavior
versions: Python 3.1, Python 3.2
Added file: http://bugs.python.org/file18480/mknod-mkfifo-pep383-3.2.diff

___
Python tracker 

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



[issue6081] str.format_from_mapping()

2010-08-11 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

This can be done for Py3.2.  It completes needed functionality for string 
formatting which is something we all want to take hold and is necessary for the 
3.x series to succeed.

--
versions: +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



[issue9446] urllib2 tests fail when offline

2010-08-11 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Fixed in r83950 by adding a wrapper function for catching gaierror. It was 
already present in py3k. 

Thanks for the bug report.

--
resolution: accepted -> 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



[issue9570] PEP 383: os.mknod() and os.mkfifo() do not accept surrogateescape arguments

2010-08-11 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +haypo

___
Python tracker 

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



[issue1498363] Improve super() objects support for implicit method calls

2010-08-11 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Am rejecting this feature request because of the concerns mentioned in the post 
on 4/3.  The current requirement for explicit forwarding may be slightly 
inconvenient to type but it does add provide clarity that the method should be 
applied to the next-in-mro instead of the super object itself.

I appreciate the idea but think it would complicate an object that is already 
very difficult to understand and use correctly.

--
assignee: collinwinter -> rhettinger
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



[issue9569] Add tests for posix.mknod() and posix.mkfifo()

2010-08-11 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Can you qualify the OSError except by checking it's errno?

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue1479611] speed up function calls

2010-08-11 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger
priority: normal -> low

___
Python tracker 

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



[issue1173475] __slots__ for subclasses of variable length types

2010-08-11 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

ISTM the space saving of value of __slots__ isn't typically needed in the 
context of variable length built-in types.

Guido has long regarded __slots__ as a confusing hack.  That should warn us 
away for extending its functionality.

Unless there are some compelling use cases, a simple and clean patch, and a 
clear one sentence explanation for users, I recommend this feature request be 
closed.

Michael, do you still want this?

--
nosy: +rhettinger

___
Python tracker 

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



[issue9571] argparse: Allow the use of -- to break out of nargs and into subparser

2010-08-11 Thread Michael . Elsdörfer

New submission from Michael.Elsdörfer :

argparse already seems to support -- to indicate that what follows are 
positional arguments. However, I would like to parse something like:

./script.py --ignore one two -- COMMAND

I.e., --ignore is an nargs='+' argument, and I need a way to break out of 
--ignore and have argparse consider what follows on it's own merits. If COMMAND 
in the above example refers to a subparser, this won't work:

error: invalid choice: '--' (choose from 'command1', 'command2', 'command3')

I'm not sure what's the best solution here. Allowing -- here would change the 
semantics of forcing everything that follows to be positional arguments, since 
the subparser might have flags. I'm not sure if that is what is required by 
Unix conventions, but if not, then I think it makes sense to allow -- to be 
followed by a subparser.

--
components: Library (Lib)
messages: 113616
nosy: elsdoerfer
priority: normal
severity: normal
status: open
title: argparse: Allow the use of -- to break out of nargs and into subparser
type: behavior
versions: Python 2.7, Python 3.1, 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



[issue6081] str.format_from_mapping()

2010-08-11 Thread Eric Smith

Eric Smith  added the comment:

I'll work on cleaning this up for 3.2.

Any comments on the name of the method?

--

___
Python tracker 

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



[issue9570] PEP 383: os.mknod() and os.mkfifo() do not accept surrogateescape arguments

2010-08-11 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Applied in r83951. Thanks for the patch!

--
nosy: +benjamin.peterson
resolution:  -> accepted
status: open -> closed

___
Python tracker 

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



[issue6632] Include more fullwidth chars in the decimal codec

2010-08-11 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

The moratorium only includes builtins and certainly does not apply to pure 
python modules (other implementations see those benefits immediately and it 
does not interfere with their getting caught-up). 

FWIW, I'm +1 on the basic idea.

--
keywords:  -after moratorium
nosy: +rhettinger
versions: +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



[issue7951] Should str.format allow negative indexes when used for __getitem__ access?

2010-08-11 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Fixing-up str formatting idiosyncracies does not fall under the moratorium and 
is helpful in getting 3.x to be usable.

That being said, I'm not convinced that this is actually a helpful feature.  
Not all objects supporting __getitem__ offer support for negative indexing.  
Also, there's a case to be made that using negative indices in a formatting 
string is an anti-pattern, causing more harm than good.

--
keywords:  -after moratorium, patch
versions: +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



[issue1634034] Show "expected" token on syntax error

2010-08-11 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

+1 on the basic idea to make error messages more informative where possible, 
but am not sure how it would work in any but the more simple cases.  

How would work in cases where there are multiple possible "expected" tokens?

   >>> def f(x 3):  
   SyntaxError: invalid syntax

It chokes at the "3".  The expected token is either a comma, colon, or closing 
parenthesis.

Also, the most annoying and least obvious syntax errors are ones that are 
revealed many characters away from the original cause (i.e. unbalanced opening 
brackets or parentheses).  Am not sure how you can readily construct a helpful 
message in these cases.

--
nosy: +rhettinger

___
Python tracker 

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



[issue6081] str.format_from_mapping()

2010-08-11 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I understand now that new methods, as opposed to changed methods, are allowed.

I agree with Eric that this seems more like a convinience rather than absolute 
necessity, and that the doc should be augmented.

The doc for vformat (which I admit I had not noticed before) says it is exposed 
just for this case:

"vformat(format_string, args, kwargs) 
This function does the actual work of formatting. It is exposed as a separate 
function for cases where you want to pass in a predefined dictionary of 
arguments, rather than unpacking and repacking the dictionary as individual 
arguments using the *args and **kwds syntax."

'Dictionary' should be replaced with 'mapping'.

string.Formatter.format is documented as "just a wrapper that calls vformat(). 
Is the same effectively true of str.format also?

If .format_map (I prefer shorted names) is added as a convenience str method, 
particularly for matching current %-formatting use, I think it should take just 
one parameter, mapping. I presume it could implemented as a wrapper for 
.vformat (or whatever internal function .vformat calls).

str.format_map(map) == string.Format.vformat(formstring, (), map)

More complicated, mixed cases can use the explict lookup with map arg.

--

___
Python tracker 

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



[issue7094] Add alternate float formatting styles to new-style formatting.

2010-08-11 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

I do not believe that this is covered by the moratorium.  It's important for 
3.x success to get new string formatting to its highest state of usability.  
Matching published standards and practices(i.e. C99) and improving ability to 
convert from old-style to new style are both very helpful in this regard.

--
nosy: +rhettinger
versions: +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



[issue3489] add rotate{left,right} methods to bytearray

2010-08-11 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
priority: normal -> low
stage: unit test needed -> 

___
Python tracker 

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



[issue7951] Should str.format allow negative indexes when used for __getitem__ access?

2010-08-11 Thread Matthew Barnett

Matthew Barnett  added the comment:

I agree with Kamil and Germán. I would've expected negative indexes for 
sequences to work. Negative indexes for fields is a different matter.

--

___
Python tracker 

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



[issue1491804] Simple slice support for list.sort() and .reverse()

2010-08-11 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger
nosy: +rhettinger
priority: normal -> low
versions: +Python 3.3 -Python 3.2

___
Python tracker 

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



[issue1654367] [PATCH] Debuggers need a way to change the locals of a frame

2010-08-11 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

I think this falls under the language moratorium in that it requires core 
changes that make it more difficult for other implementations to catch-up.

--
nosy: +rhettinger
versions: +Python 3.3 -Python 3.2

___
Python tracker 

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



[issue9572] IOError in test_multiprocessing

2010-08-11 Thread Florent Xicluna

New submission from Florent Xicluna :

This error occurred on "x86 Ubuntu 3.x" buildbot.
This is the 1st test on this run.
http://www.python.org/dev/buildbot/all/builders/x86%20Ubuntu%203.x/builds/1699/steps/test/logs/stdio

./python -Wd -E -bb ./Lib/test/regrtest.py -uall -rwW -l 
== CPython 3.2a1+ (py3k:83951, Aug 11 2010, 15:26:40) [GCC 4.2.4 (Ubuntu 
4.2.4-1ubuntu4)]
==   Linux-2.6.31.5-linode21-i686-with-debian-lenny-sid little-endian
==   /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/build/test_python_8258
Using random seed 426296
[  1/346] test_multiprocessing
Process Process-22:
Traceback (most recent call last):
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/multiprocessing/process.py",
 line 233, in _bootstrap
self.run()
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/multiprocessing/process.py",
 line 88, in run
self._target(*self._args, **self._kwargs)
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_multiprocessing.py",
 line 1253, in _putter
manager.connect()
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/multiprocessing/managers.py",
 line 478, in connect
dispatch(conn, None, 'dummy')
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/multiprocessing/managers.py",
 line 79, in dispatch
kind, result = c.recv()
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/multiprocessing/connection.py",
 line 408, in recv
s = self._conn.recv_bytes()
EOFError
test test_multiprocessing failed -- Traceback (most recent call last):
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/importlib/_bootstrap.py", 
line 486, in set_data
with _closing(_io.FileIO(path, 'wb')) as file:
IOError: [Errno 2] No such file or directory: 
'/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/xmlrpc/__pycache__/__init__.cpython-32.pyc'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_multiprocessing.py",
 line 1266, in test_rapid_restart
queue = manager.get_queue()
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/multiprocessing/managers.py",
 line 644, in temp
token, exp = self._create(typeid, *args, **kwds)
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/multiprocessing/managers.py",
 line 542, in _create
conn = self._Client(self._address, authkey=self._authkey)
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/multiprocessing/connection.py",
 line 427, in XmlClient
import xmlrpc.client as xmlrpclib
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/importlib/_bootstrap.py", 
line 450, in load_module
return self._load_module(fullname)
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/importlib/_bootstrap.py", 
line 155, in decorated
return fxn(self, module, *args, **kwargs)
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/importlib/_bootstrap.py", 
line 344, in _load_module
code_object = self.get_code(name)
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/importlib/_bootstrap.py", 
line 437, in get_code
self.set_data(bytecode_path, data)
  File 
"/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/importlib/_bootstrap.py", 
line 498, in set_data
_os.mkdir(directory)
OSError: [Errno 17] File exists: 
'/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/xmlrpc/__pycache__'

Re-running test test_multiprocessing in verbose mode
...
--
Ran 127 tests in 34.091s

OK (skipped=9)

--
components: Library (Lib), Tests
keywords: buildbot
messages: 113626
nosy: flox
priority: normal
severity: normal
status: open
title: IOError in test_multiprocessing
type: behavior
versions: Python 3.2

___
Python tracker 

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



[issue1158231] string.Template does not allow step-by-step replacements

2010-08-11 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
priority: normal -> low

___
Python tracker 

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



[issue1590352] The "lazy strings" patch

2010-08-11 Thread Éric Araujo

Changes by Éric Araujo :


--
resolution:  -> out of date
stage:  -> committed/rejected
status: open -> closed
superseder:  -> Speed up using + for string concatenation

___
Python tracker 

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



[issue1730480] dict init/update accesses internal items of dict derivative

2010-08-11 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

I concur with Terry.
This is just a fact of life when subclassing builtins.
The objects are "open-for-extension, closed-for-modification".
If you want more direct control use UserDict.

--
nosy: +rhettinger

___
Python tracker 

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



[issue9572] IOError in test_multiprocessing

2010-08-11 Thread Florent Xicluna

Florent Xicluna  added the comment:

I succeeded to reproduce one time on Debian Lenny (64 bits).

~ $ make pycremoval
find . -name '*.py[co]' -exec rm -f {} ';'
find . -name '__pycache__' -exec rmdir {} '+'

~ $ ./python -Wd -E -bb ./Lib/test/regrtest.py -uall -rwW -l 
test_multiprocessing
Using random seed 8192992
[1/1] test_multiprocessing
Process Process-22:
Traceback (most recent call last):
  File "./Lib/multiprocessing/process.py", line 233, in _bootstrap
self.run()
  File "./Lib/multiprocessing/process.py", line 88, in run
self._target(*self._args, **self._kwargs)
  File "./Lib/test/test_multiprocessing.py", line 1253, in _putter
manager.connect()
  File "./Lib/multiprocessing/managers.py", line 478, in connect
dispatch(conn, None, 'dummy')
  File "./Lib/multiprocessing/managers.py", line 79, in dispatch
kind, result = c.recv()
  File "./Lib/multiprocessing/connection.py", line 408, in recv
s = self._conn.recv_bytes()
EOFError
test test_multiprocessing failed -- Traceback (most recent call last):
  File "./Lib/importlib/_bootstrap.py", line 486, in set_data
with _closing(_io.FileIO(path, 'wb')) as file:
IOError: [Errno 2] No such file or directory: 
'./Lib/email/__pycache__/__init__.cpython-32.pyc'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./Lib/test/test_multiprocessing.py", line 1266, in test_rapid_restart
queue = manager.get_queue()
  File "./Lib/multiprocessing/managers.py", line 644, in temp
token, exp = self._create(typeid, *args, **kwds)
  File "./Lib/multiprocessing/managers.py", line 542, in _create
conn = self._Client(self._address, authkey=self._authkey)
  File "./Lib/multiprocessing/connection.py", line 427, in XmlClient
import xmlrpc.client as xmlrpclib
  File "./Lib/xmlrpc/client.py", line 137, in 
import http.client
  File "./Lib/http/client.py", line 69, in 
import email.parser
  File "./Lib/importlib/_bootstrap.py", line 450, in load_module
return self._load_module(fullname)
  File "./Lib/importlib/_bootstrap.py", line 155, in decorated
return fxn(self, module, *args, **kwargs)
  File "./Lib/importlib/_bootstrap.py", line 344, in _load_module
code_object = self.get_code(name)
  File "./Lib/importlib/_bootstrap.py", line 437, in get_code
self.set_data(bytecode_path, data)
  File "./Lib/importlib/_bootstrap.py", line 498, in set_data
_os.mkdir(directory)
OSError: [Errno 17] File exists: './Lib/email/__pycache__'

...


But next attempts were successful.

--

___
Python tracker 

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



[issue5416] str.replace does strange things when given a negative count

2010-08-11 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

FWIW, we should be cautious about documenting all behaviors.  It is arguable 
that this was an implementation detail and not a guaranteed behavior.  As soon 
as you document it, people will rely on the API and all other implementations 
will need to change in order to comply.

Please consider whether this doc change should be reverted.

--
nosy: +rhettinger
status: closed -> open

___
Python tracker 

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



[issue9558] build_ext fails on VS8.0

2010-08-11 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +christian.heimes

___
Python tracker 

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



[issue1173475] __slots__ for subclasses of variable length types

2010-08-11 Thread Michael Hudson

Michael Hudson  added the comment:

Well, I can think of some counters to that -- surely it's _more_ confusing if 
slots only works some of the time? -- but realistically I'm not going to work 
on this any further.

--

___
Python tracker 

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



[issue1173475] __slots__ for subclasses of variable length types

2010-08-11 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Declaring YAGNI and closing.
Thanks Michael.

--
status: open -> closed

___
Python tracker 

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



[issue9516] sysconfig: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.3" but "10.5" during configure

2010-08-11 Thread Sridhar Ratnakumar

Sridhar Ratnakumar  added the comment:

Another machine.
> Is MACOSX_DEPLOYMENT_TARGET set in the environment when you run the command 
> that gives the error message?
I don't think I had this environment set when I saw the above error 
message. I had to set MACOSX_DEPLOYMENT_TARGET=10.5 in order to 
workaround it though.

BTW, I just figured that following command will reliably reproduce this 
issue:

$ MACOSX_DEPLOYMENT_TARGET=10.3 python2.7 -B -s -c "import 
sys;print('%d.%d' % tuple(sys.version_info)[:2])"
Traceback (most recent call last):
   File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", 
line 558, in 
 main()
   File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", 
line 540, in main
 known_paths = addusersitepackages(known_paths)
   File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", 
line 264, in addusersitepackages
 user_site = getusersitepackages()
   File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", 
line 239, in getusersitepackages
 user_base = getuserbase() # this will also set USER_BASE
   File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", 
line 229, in getuserbase
 USER_BASE = get_config_var('userbase')
   File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", 
line 518, in get_config_var
 return get_config_vars().get(name)
   File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", 
line 421, in get_config_vars
 _init_posix(_CONFIG_VARS)
   File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sysconfig.py", 
line 300, in _init_posix
 raise IOError(msg)
IOError: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.3" but "10.5" 
during configure

Though, I do recall seeing this error without having that environment 
set at all.

--
title: sysconfig: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.3" but "10.5" 
during configure -> sysconfig: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.3"   
but "10.5" during configure

___
Python tracker 

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



[issue9516] sysconfig: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.3" but "10.5" during configure

2010-08-11 Thread Sridhar Ratnakumar

Sridhar Ratnakumar  added the comment:

Looks like reply-by-email stripped some parts of the message.

> does the error occur on the 10.6 machine you used to do the build or another 
> machine?

Another 10.6 machine.

--

___
Python tracker 

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



[issue9516] sysconfig: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.3" but "10.5" during configure

2010-08-11 Thread Sridhar Ratnakumar

Sridhar Ratnakumar  added the comment:

Even simply invoking the interpreter raises this exception!

$ MACOSX_DEPLOYMENT_TARGET=10.3 python2.7
[...] 
IOError: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.3" but "10.5" during 
configure
$

--

___
Python tracker 

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



[issue2443] Define Py_VA_COPY macro as a cross-platform replacement for gcc __va_copy

2010-08-11 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Committed in r83949.

--
stage: commit 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



[issue1158231] string.Template does not allow step-by-step replacements

2010-08-11 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

FWIW, the $name $$ $(name) convention is used many other contexts and I don't 
think there is usually support provided to not substitute $$.  Even if there 
were, there is a usability issue where the final substitution needs to be 
applied differently to get the effect of escaping.  Since the final step needs 
to be different anyway, it is no burden to just use the current string.Template 
and write $(dollar_sign) in-place of $$ and apply that substitution on the 
final step.

Also, the current API for extending string.Template is already complex.  IMO, 
it is not a good idea to add more options to something that was supposed to 
provide a simpler alternative to templating.

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



[issue3482] re.split, re.sub and re.subn should support flags

2010-08-11 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

This request seems reasonable.

--
keywords: +easy
nosy: +rhettinger

___
Python tracker 

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



[issue8228] pprint, single/multiple items per line parameter

2010-08-11 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Am rejecting this request because it complicates pprint and makes it harder to 
extend.  Most use cases of pprint either don't need this or have output 
requirements more complicated than proposed (i.e. adding fixed width columns 
for tabular output, etc).

Also, the current design of pprint doesn't know in advance the width of 
objects, so a decision to start with multi-column may be invalidated when wider 
data is encountered later.

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



[issue9424] deprecate unittest.TestCase.assertEquals

2010-08-11 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

These synonyms have been around a very long time and many test suites have one 
or the other or both.  Nothing good can come from breaking those existing test 
suites.  We don't need to harm our users just to accommodate a stylistic 
preference.

--
assignee: ezio.melotti -> rhettinger
nosy: +rhettinger
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



[issue1626300] 'Installing Python Modules' does not work for Windows

2010-08-11 Thread Éric Araujo

Éric Araujo  added the comment:

My personal taste is that there is virtue in having such simple examples 
uncluttered by OS-specific variations, but since MvL does not want the python 
executable to be on the PATH per default, I defer to him and accept your 
solution. I’ll make a patch with a slightly different wording than the one you 
proposed.

--
assignee: d...@python -> eric.araujo

___
Python tracker 

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



[issue7511] msvc9compiler.py: ValueError: [u'path']

2010-08-11 Thread Éric Araujo

Éric Araujo  added the comment:

Sridhar, can you test with 3.2 and 3.1 and adjust versions?

--
nosy: +eric.araujo
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



[issue7511] msvc9compiler.py: ValueError: [u'path']

2010-08-11 Thread Christopher Paolini

Changes by Christopher Paolini :


--
nosy:  -Christopher.Paolini

___
Python tracker 

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



[issue9553] test_argparse.py: 80 failures if COLUMNS env var set to a value other than 80

2010-08-11 Thread Denver Coneybeare

Denver Coneybeare  added the comment:

Thanks for the input, r.david.murray.  I've updated my patch and attached it to 
take into consideration your comments: test_argparse.py.COLUMNS.update2.patch.  
The updated patch uses EnviormentVarGuard as suggested, except that it slightly 
tweaks EnviormentVarGuard so the context manager protocol methods don't have to 
be invoked directly.

It was also pointed out that "adding setUp and tearDown to TestCase isn't 
enough, since subclasses and mixins define those without calling the superclass 
versions", which is true.  However, the tests that override setUp() happen to 
be those that don't depend on the COLUMNS environment variable.

--
Added file: 
http://bugs.python.org/file18481/test_argparse.py.COLUMNS.update2.patch

___
Python tracker 

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



[issue9573] imporing a module that executes fork() raises RuntimeError

2010-08-11 Thread Alex Roitman

New submission from Alex Roitman :

Importing the module with the following contents results in RuntimeError:

==
import os
pid = os.fork()

if pid == 0:
print "In the child"
else:
print "In the parent"
print "Done\n"
==

Running the same module as main works just fine, so it seems to be a purely 
import issue.

I looked into the 2.6.6rc1 source.  This is what I think happens in 
Python/import.c file:

1. After the fork() call, _PyImport_ReInitLock() is run. It sets 
import_lock_thread to -1 in the child, line 310.

2. In _PyImport_ReleaseLock() line 290 compares import_loc_thread to the 
current thread id, and if they are not the same then -1 is returned, which 
results in RuntimeError in PyImport_ImportModuleLevel (line 2186-2189)

So this is guaranteed to happen in the child, every time fork() is executed 
inside the module being imported.  If I change line 290 to be:

if (import_lock_thread != me && import_lock_thread != -1)

then import proceeds fine, although I'm not sure this is a proper solution.

This happens on Linux, Darwin, and Cygwin, with python 2.6.5 and higher. I'd be 
happy to assist solving this, please let me know how I can help.

--
components: Interpreter Core
messages: 113643
nosy: Alex.Roitman
priority: normal
severity: normal
status: open
title: imporing a module that executes fork() raises RuntimeError
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



[issue9424] deprecate unittest.TestCase.assertEquals

2010-08-11 Thread Michael Foord

Michael Foord  added the comment:

We aren't talking about *removing* these methods from unittest - but now that 
we have standardised on assertEqual for the Python test suite it is annoying 
(particularly for Ezio who changes) when *new* tests are checked in using the 
old (deprecated-but-not-actually-deprecated) methods.

As deprecation warnings are now silent by default deprecating these old methods 
would only affect developers who run their tests specifically looking for 
information like this. Making the change is also a single "search and replace" 
across a code-base, so not a difficult change.

Actually whether or not we deprecate these methods in unittest itself is one 
question (I'm only +0 on that - I don't really care if they live for ever in 
general and Raymond's response can be read as a strong +1 for that). What Ezio 
*really* wants is to have these methods raise errors if used during *regrtest* 
runs, so that core-Python developers no longer use them. That I am fine with - 
although we would need some way for the tests for these methods themselves to 
actually run.

--
assignee: rhettinger -> ezio.melotti
resolution: rejected -> 
status: closed -> open

___
Python tracker 

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



[issue9424] Disable unittest.TestCase.assertEquals and assert_ during a regrtest run

2010-08-11 Thread Michael Foord

Changes by Michael Foord :


--
title: deprecate unittest.TestCase.assertEquals -> Disable 
unittest.TestCase.assertEquals and assert_ during a regrtest run

___
Python tracker 

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



[issue8688] distutils sdist is too laze w.r.t. recalculating MANIFEST

2010-08-11 Thread Éric Araujo

Éric Araujo  added the comment:

Attaching a patch to implement the marker idea. No doc changes yet.

It should work transparently: you don’t have to give an option to have 
automatic recalculation, you don’t have to give an option to have it leave your 
manual MANIFEST alone.

(For the curious, history is at 
http://beta.intuxication.org/hg/merwok/python-patches. Yay for TDD and 
Mercurial.)

--
nosy: +eric.araujo
stage: needs patch -> patch review
Added file: http://bugs.python.org/file18482/sdist-manifest-marker.diff

___
Python tracker 

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



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

2010-08-11 Thread Éric Araujo

Éric Araujo  added the comment:

I’m retitling the bug, given its broader scope.

Michael Foord added another stdlib example: IDLE config files.

Python-dev thread: 
http://mail.python.org/pipermail/python-dev/2010-August/103011.html

--
assignee: tarek -> 
components: +Library (Lib) -Distutils2
title: unify pydistutils.cfg and distutils.cfg and use .local -> Define a 
standard location and API for configuration files
versions:  -Python 2.5, Python 2.6, Python 2.7, Python 3.1

___
Python tracker 

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



[issue9571] argparse: Allow the use of -- to break out of nargs and into subparser

2010-08-11 Thread R. David Murray

R. David Murray  added the comment:

It looks like, if accepted, this would be a feature request,so I'm marking it 
as such and setting versions to 3.2.  You'd have to provide a patch pretty soon 
to get it in to 3.2, though.

However, I'm guessing that this is something better off implemented via 
subclassing in your code, since it sounds like a fairly unusual command 
pattern.  (I've only ever seen options after a -- in a unix comand when those 
options were being passed unparsed to some *other* command that the first 
command was a wrapper for.)

I've added Steven as nosy, we'll see what he thinks.

--
nosy: +bethard, r.david.murray
type: behavior -> feature request
versions:  -Python 2.7, Python 3.1, Python 3.3

___
Python tracker 

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



[issue9572] IOError in test_multiprocessing

2010-08-11 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +barry, brett.cannon

___
Python tracker 

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



[issue9573] imporing a module that executes fork() raises RuntimeError

2010-08-11 Thread R. David Murray

R. David Murray  added the comment:

This may be a case of "don't do that".  Starting a new thread or process during 
import (ie: while the import lock is held) is dangerous.  Nosying Brett, since 
he'll know the real story.

--
nosy: +brett.cannon, r.david.murray

___
Python tracker 

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



[issue9572] IOError in test_multiprocessing

2010-08-11 Thread Brett Cannon

Changes by Brett Cannon :


--
assignee:  -> brett.cannon

___
Python tracker 

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



[issue9573] imporing a module that executes fork() raises RuntimeError

2010-08-11 Thread Brett Cannon

Brett Cannon  added the comment:

Without looking closer at it, don't do that. =)

--

___
Python tracker 

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



[issue3937] platform.dist(): detect Linux distribution version in a robust, standard way

2010-08-11 Thread Zooko O'Whielacronx

Zooko O'Whielacronx  added the comment:

> Please check what platform.linux_distribution() returns on your platform 
> using Python 2.6rc2.

Here are the results of that. Summary: looks fine to me.

http://tahoe-lafs.org/buildbot/waterfall

Here are the scripts that are generating these results:

http://tahoe-lafs.org/trac/tahoe-lafs/browser/trunk/misc/build_helpers/show-tool-versions.py?rev=4643#L8

http://tahoe-lafs.org/trac/tahoe-lafs/browser/trunk/src/allmydata/__init__.py?rev=4687#L80

The relevant parts of the results are summarized below:

http://tahoe-lafs.org/buildbot/builders/Eugen lenny-amd64

platform: Linux-2.6.26-1-vserver-amd64-x86_64-with-debian-5.0.5

python: 2.5.2 (r252:60911, Jan 24 2010, 17:44:40)  [GCC 4.3.2]
maxunicode: 1114111

platform: Linux-debian_5.0.5-x86_64-64bit



http://tahoe-lafs.org/buildbot/builders/hardy-amd64

platform: Linux-2.6.32-24-server-x86_64-with-Ubuntu-10.04-lucid
linux_distribution: ('Ubuntu', '10.04', 'lucid')

python: 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)  [GCC 4.4.3]
maxunicode: 1114111

platform: Linux-Ubuntu_10.04-x86_64-64bit_ELF



http://tahoe-lafs.org/buildbot/builders/Shawn jaunty amd64

platform: Linux-2.6.32-24-generic-x86_64-with-Ubuntu-10.04-lucid
linux_distribution: ('Ubuntu', '10.04', 'lucid')

python: 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)  [GCC 4.4.3]
maxunicode: 1114111

platform: Linux-Ubuntu_10.04-x86_64-64bit_ELF



http://tahoe-lafs.org/buildbot/builders/Zooko ubuntu-amd64 yukyuk

platform: Linux-2.6.32.8yukyuk36-x86_64-with-Ubuntu-10.04-lucid

python: 2.6.4+ (r264:75706, Feb 16 2010, 02:54:39)  [GCC 4.4.3], maxunicode: 
1114111

platform: Linux-Ubuntu_10.04-x86_64-64bit_ELF



http://tahoe-lafs.org/buildbot/builders/Ruben Fedora

platform: Linux-2.6.33.5-rscloud-x86_64-with-fedora-15-Rawhide
linux_distribution: ('Fedora', '15', 'Rawhide')

python: 2.7 (r27:82500, Jul 26 2010, 18:19:48)  [GCC 4.5.0 20100716 (Red Hat 
4.5.0-3)]
maxunicode: 1114111

platform: Linux-fedora_15-x86_64-64bit_ELF



http://tahoe-lafs.org/buildbot/builders/Arthur lenny c7 32bit

platform: Linux-2.6.24dedibox-r8-c7-i686-with-debian-5.0.5

python: 2.5.2 (r252:60911, Jan 24 2010, 14:53:14)  [GCC 4.3.2]
maxunicode: 1114111

platform: Linux-debian_5.0.5-i686-32bit



http://tahoe-lafs.org/buildbot/builders/David A. OpenSolaris i386

platform: SunOS-5.11-i86pc-i386-32bit

python: 2.5.2 (r252:60911, Mar 11 2009, 04:50:47) [C]
maxunicode: 65535

platform: SunOS-5.11-i86pc-i386-32bit



http://tahoe-lafs.org/buildbot/builders/Randy FreeBSD-amd64

platform: FreeBSD-8.1-STABLE-amd64-64bit-ELF

python: 2.5.5 (r255:77872, Mar 12 2010, 08:40:28)  [GCC 4.2.1 20070719  
[FreeBSD]]
maxunicode: 1114111




http://tahoe-lafs.org/buildbot/builders/Kyle OpenBSD-4.6 amd64

platform: openbsd-4.6-amd64-genuine_intel-r-_cpu_0...@_2.93ghz-64bit-elf
linux_distribution: ('', '', '')

python: 2.6.2 (r262:71600, Jul  4 2009, 23:29:57)  [GCC 3.3.5 (propolice)]
maxunicode: 65535

platform: openbsd-4.6-amd64-genuine_intel-r-_cpu_0...@_2.93ghz-64bit-elf



http://tahoe-lafs.org/buildbot/builders/Ludo NixOS-amd64

platform: Linux-2.6.32.13-x86_64-with-glibc2.2.5
python: 2.6.5 (r265:79063, Mar 23 2010, 09:42:45)  [GCC 4.4.3] , maxunicode: 
65535 , stdout.encoding: None , stdin.encoding: None , filesystem.encoding: 
UTF-8



http://tahoe-lafs.org/buildbot/builders/MM netbsd5 i386 warp

platform: NetBSD-5.0.2-i386-32bit-ELF
linux_distribution: ('', '', '')

python: 2.6.5 (r265:79063, Jun 23 2010, 11:07:30)  [GCC 4.1.3 20080704 
prerelease (NetBSD nb2 20081120)] , maxunicode: 65535

platform: NetBSD-5.0.2-i386-32bit-ELF



http://tahoe-lafs.org/buildbot/builders/FranXois lenny-armv5tel

platform: Linux-2.6.32-trunk-iop32x-armv5tel-with-debian-squeeze-sid
linux_distribution: ('debian', 'squeeze/sid', '')

python: 2.6.5+ (release26-maint, Jul  7 2010, 00:21:05)  [GCC 4.4.4]
maxunicode: 1114111

platform: Linux-debian_squeeze/sid-armv5tel-32bit_ELF



http://tahoe-lafs.org/buildbot/builders/FreeStorm CentOS5-i386

platform: Linux-2.6.18-194.8.1.el5-i686-athlon-with-redhat-5.5-Final

python: 2.4.3 (#1, Sep  3 2009, 15:37:12)  [GCC 4.1.2 20080704 (Red Hat 
4.1.2-46)]
maxunicode: 1114111

platform: Linux-redhat_5.5-i686-32bit_ELF



http://tahoe-lafs.org/buildbot/builders/zooko ootles Mac-amd64 10.4

platform: Darwin-8.11.1-i386-32bit

python: 2.5.4 (release25-maint:72153M, Apr 30 2009, 12:28:20)  [GCC 4.0.1 
(Apple Computer, Inc. build 5367)]
maxunicode: 65535

platform: Darwin-8.11.1-i386-32bit



http://tahoe-lafs.org/buildbot/builders/Zooko zomp Mac-amd64 10.6 py2.6

platform: Darwin-10.4.0-i386-64bit
linux_distribution: ('', '', '')

python: 2.6.1 (r261:67515, Feb 11 2010, 00:51:29)  [GCC 4.2.1 (Apple Inc. build 
5646)]
maxunicode: 65535

platform: Darwin-10.4.0-i386-64bit



http://tahoe-lafs.org/buildbot/builders/FreeStorm WinXP-x86 py2.6

platform: Windows-XP-5.1.2600-SP3
linux_distribution: ('', '', '')

python: 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)]
maxunico

[issue9573] imporing a module that executes fork() raises RuntimeError

2010-08-11 Thread Alex Roitman

Alex Roitman  added the comment:

I guess I am missing something here.  In a complex program, everything will be 
executed in some module or another.  Consequently, the module that contains the 
fork() call will cause the interpreter to quit.

How can this be worked around, short of placing the fork() in the main module?

--

___
Python tracker 

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



[issue9573] imporing a module that executes fork() raises RuntimeError

2010-08-11 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

> How can this be worked around, short of placing the fork()
> in the main module?

Why wouldn't you place the fork() call in a function?

--
nosy: +belopolsky

___
Python tracker 

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



[issue9573] imporing a module that executes fork() raises RuntimeError

2010-08-11 Thread Alex Roitman

Alex Roitman  added the comment:

I can place it in a function.  But if I execute that function from anything 
other than main module, the fork() will be called while import lock is held, 
one way or another.  It will just happen in another module.  So what?

--

___
Python tracker 

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



[issue9573] imporing a module that executes fork() raises RuntimeError

2010-08-11 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

On Wed, Aug 11, 2010 at 10:56 PM, Alex Roitman  wrote:
>
> Alex Roitman  added the comment:
>
> I can place it in a function.  But if I execute that function from anything 
> other than main
> module, the fork() will be called while import lock is held, one way or 
> another.  It will just
> happen in another module.  So what?

This discussion is now off-topic for the python bug tracker.  Please
ask questions on how to use python in an appropriate  forum such as
python-list.

The problem you have uncovered only occurs if fork() is called
*during* module import.  If you place fork() in a function, it will
not be called when you import the module or the function, - only when
you call the function.

--

___
Python tracker 

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



[issue5416] str.replace does strange things when given a negative count

2010-08-11 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

I am fine with your proposal, Raymond. When I went about the change the 
docstrings, I did notice that it is not an intentional feature to provide 
negative values in the replace argument. The negative value (-1 as count) was 
being used somewhat as a sentinel value to denote replace-all.

I have no problem in reverting current documentation fix, but as a fix we can 
remove the existing reference of -1 in docstrings of str.replace so that it 
does not cause any confusing, which was the point of the original bug-report.

--

___
Python tracker 

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



[issue9573] importing a module that executes fork() raises RuntimeError

2010-08-11 Thread Alex Roitman

Alex Roitman  added the comment:

1. If fork should not be called during import, it could raise an exception when 
invoked from import.  But it does not.  Is that a bug then?  BTW, fork during 
import worked with python 2.4 just fine.

2. The whole issue7242 was devoted to work out import locks during forking. 5 
months ago r78527 was committed to to just that (although it is not perfect). 
If this is not the proper use case then had it been done in error?

3. belopolsky: Thanks for the advice to use the mailing list.  I'd appreciate 
it if instead you refrained from publishing my email address on this page.

--
title: imporing a module that executes fork() raises RuntimeError -> importing 
a module that executes fork() raises RuntimeError

___
Python tracker 

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



[issue9424] Disable unittest.TestCase.assertEquals and assert_ during a regrtest run

2010-08-11 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

What a tremendous waste of time and inane exercise. AFAICT, this is a zero 
value add.

Also, we try to avoid these sort of search-and-replace exercises because 1) 
they are not part of holistic refactoring (Guido's term for making changes 
while you're working on a particular module, not whole-sale sweep), 2) they 
risk getting it wrong and 3) it obfuscates the "svn ann" output making it more 
difficult to tell who did the original work.

The goal is of "have these methods raise errors if used during *regrtest* runs, 
so that core-Python developers no longer use them" is a worthless one.  Raising 
errors for this sort of thing wastes the time of developers who are trying to 
get real work done.

-1

--
priority: normal -> low

___
Python tracker 

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



[issue9424] Disable unittest.TestCase.assertEquals and assert_ during a regrtest run

2010-08-11 Thread Ezio Melotti

Ezio Melotti  added the comment:

It's not really a waste of time, since it's just a find and replace and I 
already have a patch ready. I also believe that there are valid reasons to do 
it.

When I started learning about unittest, I clearly remember asking myself if I 
should have used "assertEqual" or "assertEquals" and thought that two different 
methods with two different names probably did two different things (TMBOOWTDI). 
 I also remember thinking that "assertEquals" must have been a "plural" version 
of "assertEqual" able to accept more than two argument at once (i.e. 
assertEquals(a, b, c, d) -> a == b == c == d).

I can imagine people finding it in some code (possibly in the Python test 
suite), thinking that is a typo, being confused because the documentation 
doesn't mention it, wonder how the test can pass if they use a "ghost" method, 
asking themselves if the code is really executed and so on.

Since we are moving away from these methods, it's annoying seeing people using 
them and reintroduce them in the Python test suite and that wastes time during 
the commit reviews for the reviewer and for the committer that has to fix it 
and merge the fix.

This said, it could be enforced both in regrtest or with a commit hook.

--

___
Python tracker 

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