[issue6715] xz compressor support

2010-11-25 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

> While I realize Python extension modules are pretty much the norm in
> CPython, it'd be pretty cool if xz support could be written overtop
> of ctypes.  ctypes seems to be emerging as the way of doing FFI
> across different python implementations.

There is a clear policy in CPython that ctypes must not be used
to implement library modules.

--

___
Python tracker 

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



[issue6715] xz compressor support

2010-11-25 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Careful: the ctypes module is much slower with pypy than with cpython.

In any case, a C extension module is preferred because the (platform-dependent) 
details of the liblzma library are defined in a .h header file, not as a ctypes 
description.  Future versions of the library are likely to be 
source-compatible, but may change some struct member for example; this would 
break a ctypes-based interface.

--

___
Python tracker 

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



[issue10122] Documentation typo fix and a side question

2010-11-25 Thread Boštjan Mejak

Boštjan Mejak  added the comment:

The change is still not reflected. Why not? It's been more than a
month now. What is going on?

--

___
Python tracker 

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



[issue10537] IDLE crashes when you paste something.

2010-11-25 Thread Richard

New submission from Richard :

Whenever I paste anything into the IDLE shell, the program freezes, and then 
crashes.

I'm using Python 2.7.1rcl with a Version 10.6.4 Mac OSX

--
components: IDLE
messages: 122441
nosy: 5ragar5
priority: normal
severity: normal
status: open
title: IDLE crashes when you paste something.
type: crash
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



[issue10528] argparse uses %s in gettext calls

2010-11-25 Thread Éric Araujo

Changes by Éric Araujo :


--
assignee:  -> eric.araujo
stage:  -> needs patch

___
Python tracker 

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



[issue10510] distutils upload/register should use CRLF in HTTP requests

2010-11-25 Thread Éric Araujo

Éric Araujo  added the comment:

I am convinced.  Do you want to work on a patch?  Guidelines are found at 
http://www.python.org/dev/patches/

--
stage:  -> needs patch
title: distutils.command.upload/register HTTP message headers: bad line 
termination -> distutils upload/register should use CRLF in HTTP requests

___
Python tracker 

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



[issue2504] Add gettext.pgettext() and variants support

2010-11-25 Thread Éric Araujo

Éric Araujo  added the comment:

I have ported the patch to py3k, without tests errors but with test failures.  
What is left to do:

1) Carefully assess bytes/str issues.  Decide to change the tests or the code.

2) Re-read over the new docs.

3) Exercise the updated msgfmt.py tool, which has no tests.

4) Add support in pygettext.py.

David, Mitar, nh2, David D., Olivier, Bernie, Wil, Wichert: Do you want to help 
with one of those tasks?

--
resolution: accepted -> 
stage: needs patch -> patch review
Added file: http://bugs.python.org/file19822/pgettext-3.2.diff

___
Python tracker 

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



[issue10535] Enable warnings by default in unittest

2010-11-25 Thread Ezio Melotti

Ezio Melotti  added the comment:

Here's a working patch (without docs and tests).
I managed to filter the warnings by message without introducing a new type of 
warning. As it is, all the warnings related to deprecated unittest methods are 
printed only once per module, regardless of what methods are used and how many 
times.
I'm also thinking that it might be better to include the name of the deprecated 
method in the message and use three filters for fail* methods, assert* methods, 
and the assert*Regexp* methods that will be deprecated. This will show at worst 
3 warnings per module, but the assert*Regexp* and the fail* methods are not so 
common, so it shouldn't be too nosy.
One "limitation" of the patch is that the per-module special-casing for 
unittest is not affect by the `warnings` argument, but it can be changed when 
-W is used and no `warnings` arg is passed.

Regrtest doesn't seem to use unittest, so it should be fixed separately 
(probably needs another issue).

--
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file19821/issue10535.diff

___
Python tracker 

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



[issue1059244] distutil bdist hardcodes the python location

2010-11-25 Thread Éric Araujo

Éric Araujo  added the comment:

Let me add that we welcome suggestions about making bdist better in distutils2.

--

___
Python tracker 

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



[issue1059244] distutil bdist hardcodes the python location

2010-11-25 Thread Éric Araujo

Éric Araujo  added the comment:

If the distribution is pure Python, you can upload an sdist to PyPI.

bdist’s behavior is certainly not very useful, but we’re bound by 
compatibility.  Closing as wontfix.

--
resolution:  -> wont fix
stage: needs patch -> 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



[issue6715] xz compressor support

2010-11-25 Thread Dan Stromberg

Dan Stromberg  added the comment:

I agree that ctypes is a bit more brittle - both ctypes and c extension modules 
can yield segfaults, but at least the c extension module is likely to give an 
error or warning when you rebuild it.

However, I'm getting the impression that:
1) In pypy, the C extension module layer isn't a complete emulation
2) In pypy, the C extension module is a bit disfavored compared to ctypes
3) In pypy, there's a performance expense for CPyExt compared to ctypes
3) (less important) In pypy, the C extension module layer is still too young to 
do much with at this time

I've been wondering if maybe there should be a way to check ctypes use against 
.h's at build time.  That way, the brittleness should be about the same.

--

___
Python tracker 

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



[issue10535] Enable warnings by default in unittest

2010-11-25 Thread Éric Araujo

Changes by Éric Araujo :


--
components: +Library (Lib)
nosy: +eric.araujo
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



[issue2399] Patches for Tools/msi

2010-11-25 Thread Éric Araujo

Changes by Éric Araujo :


--
components: +Demos and Tools -Distutils, Windows
stage:  -> needs patch
type: behavior -> feature request
versions: +Python 3.2 -Python 2.6

___
Python tracker 

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



[issue8730] Spurious test failure in distutils

2010-11-25 Thread Éric Araujo

Changes by Éric Araujo :


--
components:  -Distutils2
versions:  -3rd party

___
Python tracker 

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



[issue8730] Spurious test failure in distutils

2010-11-25 Thread Éric Araujo

Changes by Éric Araujo :


--
components: +Distutils2
nosy: +eric.araujo
versions: +3rd party, Python 3.1, Python 3.2

___
Python tracker 

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



[issue8891] sort files before archiving for consistency

2010-11-25 Thread Éric Araujo

Changes by Éric Araujo :


--
components: +Distutils2 -Distutils
stage:  -> unit test needed
type:  -> feature request
versions: +3rd party -Python 3.2

___
Python tracker 

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



[issue10273] Clean-up Unittest API

2010-11-25 Thread Ezio Melotti

Ezio Melotti  added the comment:

If I implement what I suggested in #10535, it will be possible to deprecate 
them without too much trouble. I offer to do it after #10535.

--

___
Python tracker 

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



[issue10299] Add index with links section for built-in functions

2010-11-25 Thread Ezio Melotti

Ezio Melotti  added the comment:

I don't think it's worth changing it. The table still provides a good overview, 
and having them at the end won't prevent people to find their doc.
Both the table and the page could be divided in sections though, if we find a 
way to group all the functions that makes enough sense (e.g. put together 
int/dict/list/set/etc, getattr/setattr/delattr, but then it's difficult to add 
more groups without maxing them too small).

--

___
Python tracker 

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



[issue5211] Fix complex type to avoid coercion in 2.7.

2010-11-25 Thread Blair

Blair  added the comment:

Hi Mark,

I thought that this had all been fixed, but it seems not.

Consider the following:

class xcomplex( complex ):
def __new__(cls,*args,**kwargs):
return complex.__new__(cls,*args,**kwargs)
def __add__(self,x):
return xcomplex( complex.__add__(self,x) )
def __radd__(self,x):
print "larg: ", type(x),"returning: ",
return xcomplex( complex.__radd__(self,x) )

class xfloat(float):
def __new__(cls,*args,**kwargs):
return float.__new__(cls,*args,**kwargs)
def __add__(self,x):
return xfloat( float.__add__(self,x) )
def __radd__(self,x):
print "larg: ", type(x),"returning: ",
return xfloat( float.__radd__(self,x) )

z = 1j
xz = xcomplex(1j)
f = 1.0
xf = xfloat(1.0)

print
print "---"
print "expect xcomplex:", type(z + xz)
print "expect xcomplex:", type(f + xz)
print "expect xfloat:", type(f + xf)
print "expect ???:", type(z + xf)

When this runs, the first three conversions are fine, the last is not: there
is no call to xfloat.__radd__. It seems that the builtin complex type simply
thinks it is dealing with a float. Here is the output

---
expect xcomplex: larg:   returning:  
expect xcomplex: larg:   returning:  
expect xfloat: larg:   returning:  
expect ???: 

The last line shows that no call to __radd__ occurred.

Is there anything that can be done now about this now, or is it just too
late?

Regards

Blair

At 01:13 a.m. 31/05/2010, you wrote:

Mark Dickinson  added the comment:

r78280 didn't remove the implicit coercion for rich comparisons;  that's now
been done in r81606.

--

___
Python tracker 

___Python tracker <
rep...@bugs.python.org>

--
Added file: http://bugs.python.org/file19820/unnamed

___
Python tracker 

___Hi Mark,
I thought that this had all been fixed, but it seems not.
Consider the following:
class xcomplex( complex ):
    def __new__(cls,*args,**kwargs):
        return complex.__new__(cls,*args,**kwargs)
    def __add__(self,x):
        return xcomplex( complex.__add__(self,x) )
    def __radd__(self,x):
        print "larg: ", type(x),"returning: ",
        return xcomplex( complex.__radd__(self,x) )

class xfloat(float):
    def __new__(cls,*args,**kwargs):
        return float.__new__(cls,*args,**kwargs)
    def __add__(self,x):
        return xfloat( float.__add__(self,x) )
    def __radd__(self,x):
        print "larg: ", type(x),"returning: ",
        return xfloat( float.__radd__(self,x) )

z = 1j
xz = xcomplex(1j)
f = 1.0
xf = xfloat(1.0)

print
print "---"
print "expect xcomplex:", type(z + xz) 
print "expect xcomplex:", type(f + xz) 
print "expect xfloat:", type(f + xf)
print "expect ???:", type(z + xf)
When this runs, the first three conversions are fine, the last is not: 
there is no call to xfloat.__radd__. It seems that the builtin complex type 
simply thinks it is dealing with a float. Here is the output

---
expect xcomplex: larg:   returning:  
expect xcomplex: larg:   returning:  
expect xfloat: larg:   returning:  
expect ???: 
The last line shows that no call to __radd__ occurred. 
Is there anything that can be done now about this now, or is it just too 
late?
RegardsBlair
At 01:13 a.m. 31/05/2010, you wrote:
Mark Dickinson dicki...@gmail.com> added the 
comment:
r78280 didn't remove the implicit coercion for rich comparisons;  
that's now been done in r81606.
--
___
Python tracker rep...@bugs.python.org>
http://bugs.python.org/issue5211>
___Python tracker rep...@bugs.python.org>
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6983] Add specific get_platform() for freebsd

2010-11-25 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo
versions: +Python 3.2 -Python 2.7

___
Python tracker 

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



[issue8027] distutils fail to determine c++ linker with unixcompiler if using ccache

2010-11-25 Thread Éric Araujo

Changes by Éric Araujo :


--
Removed message: http://bugs.python.org/msg113050

___
Python tracker 

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



[issue8027] distutils fail to determine c++ linker with unixcompiler if using ccache

2010-11-25 Thread Éric Araujo

Éric Araujo  added the comment:

Hello Alexander, thanks for the report and patch.  Could you add a test for the 
fixed behavior?

--
assignee: tarek -> eric.araujo
components: +Distutils2
nosy: +eric.araujo -terry.reedy
versions: +3rd party

___
Python tracker 

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



[issue6466] duplicate get_version() code between cygwinccompiler and emxccompiler

2010-11-25 Thread Éric Araujo

Éric Araujo  added the comment:

To be more precise: the duplication is still present (and harmless) in 
distutils but fixed in distutils2.

--

___
Python tracker 

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



[issue6466] duplicate get_version() code between cygwinccompiler and emxccompiler

2010-11-25 Thread Éric Araujo

Éric Araujo  added the comment:

This is done.

--
components:  -Distutils
resolution:  -> fixed
stage: needs patch -> 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



[issue7918] distutils always ignores compile errors

2010-11-25 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks for the report.  distutils is feature-frozen now and we’re building its 
successor at https://bitbucket.org/tarek/distutils2/

Would you like to work on a patch?

--
components: +Distutils2 -Distutils
nosy: +eric.araujo
stage:  -> needs patch
versions: +3rd party -Python 3.2

___
Python tracker 

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



[issue5747] knowing the parent command

2010-11-25 Thread Éric Araujo

Changes by Éric Araujo :


--
components: +Distutils2 -Distutils
stage:  -> needs patch
versions: +3rd party -Python 3.2

___
Python tracker 

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



[issue6040] bdist_msi does not deal with pre-release version

2010-11-25 Thread Éric Araujo

Changes by Éric Araujo :


--
components: +Distutils2 -Distutils
nosy: +eric.araujo
versions: +3rd party -Python 3.2

___
Python tracker 

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



[issue5235] distutils seems to only work with VC++ 2008 (9.0)

2010-11-25 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



[issue5235] distutils seems to only work with VC++ 2008 (9.0)

2010-11-25 Thread Éric Araujo

Changes by Éric Araujo :


Removed file: http://bugs.python.org/file13060/unnamed

___
Python tracker 

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



[issue8772] sysconfig: _get_default_scheme can be made public?

2010-11-25 Thread Éric Araujo

Changes by Éric Araujo :


--
components: +Library (Lib) -Distutils

___
Python tracker 

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



[issue5616] Distutils 2to3 support doesn't have the doctest_only flag.

2010-11-25 Thread Éric Araujo

Éric Araujo  added the comment:

This feature is implemented in distutils2.

--
components:  -Distutils
resolution:  -> out of date
stage: unit test needed -> committed/rejected
status: open -> closed
versions:  -Python 3.1, Python 3.2

___
Python tracker 

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



[issue4015] Make installed scripts executable on windows

2010-11-25 Thread Éric Araujo

Changes by Éric Araujo :


--
assignee:  -> tarek
components: +Distutils2 -Distutils
versions: +3rd party -Python 3.2

___
Python tracker 

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



[issue6715] xz compressor support

2010-11-25 Thread Éric Araujo

Éric Araujo  added the comment:

I’m afraid ctypes is too insecure for stdlib code.  Even using it in some tests 
had to be discussed and decided at EuroPython.

I’m told that PyPy has CPyExt now, so this may solved your compat concern :)

--

___
Python tracker 

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



[issue10273] Clean-up Unittest API

2010-11-25 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Yes, all the variants of RegexpMatches --> Regex 
No, on deprecations.  Just add a new alias and note in the docs that the 
oldname is obsolete.  Naming deprecations cause too much trouble for too little 
benefit.

--

___
Python tracker 

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



[issue6715] xz compressor support

2010-11-25 Thread Dan Stromberg

Dan Stromberg  added the comment:

While I realize Python extension modules are pretty much the norm in CPython, 
it'd be pretty cool if xz support could be written overtop of ctypes.  ctypes 
seems to be emerging as the way of doing FFI across different python 
implementations.

I've been working on a backup engine in my spare time, and I'd very much like 
to use a Python xz module in it.  However, the code I have so far runs about 4x 
faster on pypy than CPython, even if I turn on psyco in CPython.

IOW, I'd be pretty pleased to see an xz module that works equally well on 
CPython, pypy (seems to have pretty good ctypes), jython (has the beginnings of 
ctypes in 2.5.2rc*), iron python (supposedly included recently)...

--
nosy: +strombrg

___
Python tracker 

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



[issue10299] Add index with links section for built-in functions

2010-11-25 Thread Éric Araujo

Éric Araujo  added the comment:

It’s fine to have them at the end of the page, but I think people want things 
to be sorted in an index.

--

___
Python tracker 

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



[issue10453] Add -h/--help option to compileall

2010-11-25 Thread Éric Araujo

Éric Araujo  added the comment:

Revision 86758, thanks.

--

___
Python tracker 

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



[issue8879] Implement os.link on Windows

2010-11-25 Thread Hirokazu Yamamoto

Changes by Hirokazu Yamamoto :


--
Removed message: http://bugs.python.org/msg122421

___
Python tracker 

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



[issue8879] Implement os.link on Windows

2010-11-25 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

Or, use GetFileInformationByHandleEx on Vista or above, and
NtQueryInformationFile under Vista. NtQueryInformationFile
is windows internal function and MS may change its behavior,
but probably we can think it won't happen on WinXP.

# These functions are needed to get real filename from
# open handle to set S_IEXEC.

And provide windows specific functions
  os._open/os._lopen: open windows handle same as
  CreateFile in os.stat/os.lstat
  os._osfstat: stat for windows handle
  os._close: close windows handle

and if the file is hard link, store windows handle anywhere
in TarFile object. (I created branch for it, but I'm not sure
I can do it)

--

___
Python tracker 

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



[issue10536] Enhancements to gettext docs

2010-11-25 Thread Éric Araujo

New submission from Éric Araujo :

A patch made for #2504 revealed a bug in gettext.rst, and I’ve found a number 
of other things to change in the file.  This is the first patch of a series of 
two or three.

Barry, as the original author of the module and doc, I’d like your opinion on 
points 3, a, and b particularly.

Patch is also uploaded to Rietveld for greater convenience: 
http://codereview.appspot.com/042/ (upload.py rocks)

Summary:

1) Markup: Use modern class/method directives combo (yay DRY).  Mark up 
variable parts in :file: constructs (e.g. :file:`{domain}.mo` will cause the 
HTML output to use var to indicate replaceable text).  Also change some 
``gettext`` to :program:`gettext` for consistency.

2) Fix a typo in lngettext doc (originally included in patch by Franz Glasner 
for #2504).

3) I had started to remove information about private attributes (_info, 
_charset), advertising public getter methods instead.  Then I read the 
description of NullTranslations and realized the information was needed for 
subclasses.  I’ve reverted my removals, but I still think the private 
attributes should be listed in a specific section for people writing subclasses 
and not in the rest of the text.  If you’re okay, I’ll make a second patch.

4) Assorted wording changes, missing periods and hyphens, and other very small 
touch-ups: Turned a broken bare link into a working link with nice text; used 
the with statement in an example (we all love the with statement!); used two 
spaces after periods throughout (hello Fred Drake).

Final note: lines have not been rewrapped, for diff clarity.  When I commit 
part or all of this patch, I’ll make another commit to rewrap.


Not addressed:
a) The current docs is currently POSIX-specific.

b) The docs take great care to explain that Unicode strings will be returned in 
different places, but this should not be so accented in 3.x docs IMO.  I would 
just put a note somewhere near the top that all strings are str and remove the 
redundant sentences.  Following that line of thought, I could group all 
l*gettext variants at the end of the list of methods, explaining that regular 
usage should just be happy with str objects and that l*gettext are available if 
people really want bytes.

c) The file uses “built-in namespace” and “builtins namespace”, sometimes in 
neighbor paragraphs.  :mod:`builtins` is not used, even in explanations of the 
install function/method.  I don’t know if I should change that.

d) Some capitalization patterns look strange to me: I have seen “I18N” and 
“L10N” in upper case nowhere else.  Similarly, lower-case “id” looks stranger 
than “ID”.  The latter is used for example in official GNU gettext docs.  Am I 
going into foolish consistency territory or not?


Thanks in advance for reviews and opinions.

--
assignee: eric.araujo
components: Documentation
files: gettext-docs-1.diff
keywords: needs review, patch
messages: 122420
nosy: barry, d...@python, eric.araujo
priority: normal
severity: normal
stage: patch review
status: open
title: Enhancements to gettext docs
versions: Python 2.7, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file19819/gettext-docs-1.diff

___
Python tracker 

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



[issue2562] Cannot use non-ascii letters in disutils if setuptools is used.

2010-11-25 Thread Jakub Wilk

Changes by Jakub Wilk :


--
nosy: +jwilk

___
Python tracker 

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



[issue10299] Add index with links section for built-in functions

2010-11-25 Thread Ezio Melotti

Ezio Melotti  added the comment:

The last 4 functions are "Non-essential Built-in Functions"[0] so I kept them 
at the end of the list to match the order they have in the page.

[0]: 
http://docs.python.org/library/functions.html#non-essential-built-in-functions

--

___
Python tracker 

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



[issue10299] Add index with links section for built-in functions

2010-11-25 Thread Éric Araujo

Éric Araujo  added the comment:

In 2.7, the functions are not sorted alphabetically.  I think they should, and 
I offer to do the boring work.

--

___
Python tracker 

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



[issue10453] Add -h/--help option to compileall

2010-11-25 Thread Michele Orrù

Michele Orrù  added the comment:

Thank you Stefan, these days I was a little busy and I hadn't the time to 
review my patch. I really appreciate you help.

--

___
Python tracker 

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



[issue10273] Clean-up Unittest API

2010-11-25 Thread Ezio Melotti

Ezio Melotti  added the comment:

> * Moving the docs for type specific equality methods inside the docs for 
> assertEqual to emphasize that those get dispatched automatically and need not 
> be called directly.

I already fixed this on py3k, adding a section where the type-specific methods 
are described[0] and added a reference in the assertEqual description[1].  I 
also clarified that usually there's no need to call them directly even thought 
I don't see why they shouldn't do it if they want to use a specific test.

> * Changing assertRegexpMatches to assertRegex

And assertNotRegexpMatches -> assertNotRegex,  assertRaisesRegexp -> 
assertRaisesRegex,  assertWarnsRegexp -> assertWarnRegex?
Will the *Regexp forms be deprecated too?

[0]: http://docs.python.org/dev/py3k/library/unittest.html#type-specific-methods
[1]: 
http://docs.python.org/dev/py3k/library/unittest.html#unittest.TestCase.assertEqual

--

___
Python tracker 

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



[issue8879] Implement os.link on Windows

2010-11-25 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

Umm, I'm not sure how to fix this yet, but
if we create the function like os._stat_with_open_handle()
which returns stat struct and open handle on windows,
I think we can set/use st_ino. (Because FileID won't change
while file is opened) I'm not sure if it is appropriate API
change or not, though. :-(

--

___
Python tracker 

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



[issue10442] Please by default enforce ssl certificate checking in modules that can have user's which *depend* on the security of the ssl connection.

2010-11-25 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
nosy: +orsenthil

___
Python tracker 

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



[issue10441] some stdlib modules need to be updated to handle SSL certificate validation

2010-11-25 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
nosy: +orsenthil

___
Python tracker 

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



[issue10453] Add -h/--help option to compileall

2010-11-25 Thread Stefan Krah

Stefan Krah  added the comment:

Yes, the patch is tested on Windows. Feel free to commit it if you have
a chance.

--

___
Python tracker 

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



[issue10273] Clean-up Unittest API

2010-11-25 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

After discussion with Michael and Guido, am limiting this to:

* Fixing assertItemsEqual as described in issue10242

* Moving the docs for type specific equality methods inside the docs for 
assertEqual to emphasize that those get dispatched automatically and need not 
be called directly.

* Changing assertRegexpMatches to assertRegex

--

___
Python tracker 

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



[issue10242] unittest's assertItemsEqual() method makes too many assumptions about its input

2010-11-25 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: michael.foord -> rhettinger

___
Python tracker 

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



[issue9424] Deprecate assertEquals, assertNotEquals, assert_, assertAlmostEquals, assertNotAlmostEquals

2010-11-25 Thread Ezio Melotti

Ezio Melotti  added the comment:

See #10535.

--

___
Python tracker 

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



[issue10535] Enable warnings by default in unittest

2010-11-25 Thread Ezio Melotti

New submission from Ezio Melotti :

Warnings should be on by default in unittest so that developers can see them 
while running the tests even if they are silenced by default in Python.

The plan is to add a "warnings" argument to TestProgram and the default 
TextTestRunner:
  * if the argument is passed always use it as a filter (e.g. default, ignore, 
all, ...) for warnings;
  * if the argument is not passed and sys.warnoptions is not [] (i.e. python 
has been called with "-W something") don't do anything (i.e. use the warnings 
specified by -W);
  * if the argument is not passed and sys.warnoptions is [], use 'default' 
(i.e. show warnings).

In order to prevent floods of warnings when the deprecated assertEquals, 
assert_, etc. are used (see #9424), a new type of warning could be created 
(e.g. _UnittestDeprecationWarning) and filtered so that these warnings are 
printed only once.

--
assignee: ezio.melotti
messages: 122411
nosy: brett.cannon, ezio.melotti, michael.foord
priority: normal
severity: normal
stage: needs patch
status: open
title: Enable warnings by default in unittest
type: feature request

___
Python tracker 

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



[issue9424] Deprecate assertEquals, assertNotEquals, assert_, assertAlmostEquals, assertNotAlmostEquals

2010-11-25 Thread Ezio Melotti

Ezio Melotti  added the comment:

Instead of turning warnings on by default in regrtest, it would be better to do 
it directly in unittest. I'll close this and open a new issue for that.

--
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
title: Disable unittest.TestCase.assertEquals and assert_ during a regrtest run 
-> Deprecate assertEquals, assertNotEquals, assert_, assertAlmostEquals, 
assertNotAlmostEquals

___
Python tracker 

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



[issue10533] Need example of using __missing__

2010-11-25 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

[Łukasz Langa]

> __missing__ didn't appear to be the one obvious way to anyone.

Two thoughts:

* There is part of the Zen that says that way may not be obvious unless your 
Dutch.  In this case,  __missing__ was the API designed by Guido to handle the 
problem.  If it isn't obvious, it is up to us to popularize the idiom in talks, 
in tutorials, in newsgroup discussions, etc.  And FWIW, it is not unprecedented 
-- Lua's dicts have a similar hook and most of the interesting programming in 
Lua relies on it.

* The __missing__ method should not be considered a dark corner of Python.  
Unlike the copy module, pickling, of weakrefs, it is not tucked away in the 
library.  The missing method is part of the basic API for one of Python's most 
fundamental objects.  If someone is going to be a Python programmer, they must 
at least learn about dicts, lists, strings, and tuples.

> then again I've used "", [] and set() numerous times. 
> Adding zerodict, stringdict, listdict, setdict is 
> obviously absurd.

Looking at those examples, you're probably already aware that the list and set 
versions are already served by defaultdict(), and that it would be basic (and 
probably common) mistake to accidentally use [] in your proposed constant dict.

A constant version of the defaultdict only makes sense with immutables such as 
numbers, strings, and tuples.  The common case would be the number zero and we 
have Counter() for that.  So, you're left with very few use cases and with a 
hazard for users who may write: f = fallback_dict([]).   

> 4. I cannot come up with another typical integer value 
> that would be useful

FWIW, the Counter class *is* a ZeroDict.  It has a few extra methods but is 
basically a dict with __missing__ set to return zero.

> ... then I'm +1 on correcting the docs in terms of 
> __missing__ and leaving the implementation as is.

Thank you.  Will reclassify this as a doc issue.



[Éric Araujo]
> 2) Add examples of giving dict or int to 
> collections.defaultdict to get {} or 0 as default value.

Those examples have been there since day one.

[Michael Foord]
> I'm sure the documentation could be improved to highlight
> __missing__ though.

I'll add another example and perhaps include on in the tutorial.

> It's almost always the case that documentation can be improved. :-)

Getting people to read it is another story ;-)

--

___
Python tracker 

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



[issue2650] re.escape should not escape underscore

2010-11-25 Thread Matthew Barnett

Matthew Barnett  added the comment:

Re the regex module (issue #2636), would a good compromise be:

regex.escape(user_input, special_only=True)

to maintain compatibility?

--
nosy: +mrabarnett

___
Python tracker 

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



[issue10527] multiprocessing.Pipe problem: "handle out of range in select()"

2010-11-25 Thread Jesse Noller

Changes by Jesse Noller :


--
nosy: +asksol

___
Python tracker 

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



[issue10520] Build with --enable-shared fails

2010-11-25 Thread Roumen Petrov

Roumen Petrov  added the comment:

It is wort to fix regression if all directories are absolute. 

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -54,7 +54,8 @@
 for i, path in enumerate(dirlist):
 if not os.path.isabs(path):
 dirlist.insert(i + 1, dir)
-break
+return
+dirlist.insert(0, dir)

--
nosy: +rpetrov

___
Python tracker 

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



[issue10518] Bring back callable()

2010-11-25 Thread Daniel Urban

Changes by Daniel Urban :


--
nosy: +durban

___
Python tracker 

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



[issue10528] argparse uses %s in gettext calls

2010-11-25 Thread Steven Bethard

Steven Bethard  added the comment:

I think it's fine to fix this in 3.2 by switching to mappings where necessary.

--

___
Python tracker 

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



[issue10533] Need example of using __missing__

2010-11-25 Thread Michael Foord

Michael Foord  added the comment:

Well, I was perfectly aware of __missing__ - it's just a three liner to do it 
when using a lambda isn't *that* bad... I'm sure the documentation could be 
improved to highlight __missing__ though. It's almost always the case that 
documentation can be improved. :-)

--

___
Python tracker 

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



[issue10533] Need example of using __missing__

2010-11-25 Thread Éric Araujo

Éric Araujo  added the comment:

> 4. I cannot come up with another typical integer value that would be
> useful, then again I've used "", [] and set() numerous times.
You can get '' with str as default factory and [] with list.

I think we agree on reclassifying this as a doc problem.  Proposal:

1) Add a small example in stdtypes.rst:dict section.

2) Add examples of giving dict or int to collections.defaultdict to get {} or 0 
as default value.

3) Find a way to link to that example from the index.  It is not currently 
indexed because there is no dict.__missing__ method, hence no method markup 
that would trigger indexing.

4) Cross-link collections.rst:defaultdict, collections.rst:Counter and 
stdtypes.rst:__missing__ example.

--
components: +Documentation -Library (Lib)
nosy: +d...@python
stage:  -> needs patch
title: defaultdict constructor with a concrete value -> Need example of using 
__missing__
versions: +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



[issue10533] defaultdict constructor with a concrete value

2010-11-25 Thread Alex

Alex  added the comment:

I agree with Łukasz, it's more clutter than is worth for what amounts to: 
fallbackdict = lambda c, **kwargs: defaultdict(lambda c, **kwargs)

I will note, however, that almost all my use cases are with factories, 
primarily list set or int, and it was only this week that I first needed 
something else!

--
nosy: +alex

___
Python tracker 

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



[issue10533] defaultdict constructor with a concrete value

2010-11-25 Thread Steve Holden

Steve Holden  added the comment:

On 11/25/2010 1:44 PM, Łukasz Langa wrote:
> To sum up: if you don't find the idea of adding `fallbackdict'
> (possibly with an different *short* name) worth it, then I'm +1 on
> correcting the docs in terms of __missing__ and leaving the
> implementation as is.

+1

regards
 Steve
-- 
Steve Holden   +1 571 484 6266   +1 800 494 3119
PyCon 2011 Atlanta March 9-17   http://us.pycon.org/
See Python Video!   http://python.mirocommunity.org/
Holden Web LLC http://www.holdenweb.com/

--

___
Python tracker 

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



[issue2986] difflib.SequenceMatcher not matching long sequences

2010-11-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Agreed. #10534. This is really a 'follow-on' rather than 'superseder',
but the forward reference should be easy for anyone to find.

--
resolution:  -> fixed
status: open -> closed
superseder:  -> difflib.SequenceMatcher: expose junk sets, deprecate 
undocumented isb... functions.
type: feature request -> behavior
versions: +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



[issue10534] difflib.SequenceMatcher: expose junk sets, deprecate undocumented isb... functions.

2010-11-25 Thread Terry J. Reedy

New submission from Terry J. Reedy :

Expose and document the junk and popular sets as attributes of the 
SequenceMatcher object.

self.junk = junk
self.popular = popular

Deprecate the then unneeded and undocumented isbjunk and isbpopular functions, 
currently defined as
self.isbjunk = junk.__contains__
self.isbpopular = popular.__contains__
(and slightly modify the matcher function that localizes and uses one of the 
above).

Question, (how) do we  document deprecation/removal of undocumented function?

In discussions that included Tim Peters, the idea of exposing the tuning 
parameters of the heuristic was discussed. Now that the heuristic can be turned 
off, I think this is YAGNI until someone specifically requests it.

--
assignee: terry.reedy
messages: 122400
nosy: eli.bendersky, hodgestar, terry.reedy
priority: normal
severity: normal
stage: unit test needed
status: open
title: difflib.SequenceMatcher: expose junk sets, deprecate undocumented isb... 
functions.
type: feature request
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



[issue10531] write tilted text in turtle

2010-11-25 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +belopolsky, gregorlingl

___
Python tracker 

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



[issue10464] netrc module not parsing passwords containing #s.

2010-11-25 Thread Ned Deily

Changes by Ned Deily :


--
stage:  -> patch review
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



[issue10527] multiprocessing.Pipe problem: "handle out of range in select()"

2010-11-25 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +jnoller
stage:  -> patch review

___
Python tracker 

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



[issue10533] defaultdict constructor with a concrete value

2010-11-25 Thread Łukasz Langa

Łukasz Langa  added the comment:

A couple of points:

1. Eric's proposal is what I had in mind with the `fallbackdict' idea.
2. I'm also reluctant to add more variants to the standard library. Then again 
if it contained a `fallbackdict' I wouldn't probably ever use `defaultdict' 
again. How often do you need to provide a factory?
3. Naming the other variant `defaultdict_const', `defaultdict_value', 
`defaultdict_whatever' beats the purpose because it's actually more characters 
to type than `defaultdict(lambda:', especially when you count the longer import 
name.
4. I cannot come up with another typical integer value that would be useful, 
then again I've used "", [] and set() numerous times. Adding zerodict, 
stringdict, listdict, setdict is obviously absurd.
5. The discussion started on Twitter amongst a couple of core devs and 
__missing__ didn't appear to be the one obvious way to anyone.
6. Of course I'm in no position to reject Guido's design on anything. Then 
again even `defaultdict(lambda:' is simply so much shorter than subclassing 
dict.

To sum up: if you don't find the idea of adding `fallbackdict' (possibly with 
an different *short* name) worth it, then I'm +1 on correcting the docs in 
terms of __missing__ and leaving the implementation as is.

--

___
Python tracker 

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



[issue6166] encoding error for 'setup.py --author' when read via subprocess pipe

2010-11-25 Thread Éric Araujo

Éric Araujo  added the comment:

I agree with Tarek this is not a bug, and there is a workaround, so I’m closing 
this.

--
resolution:  -> works for me
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



[issue10453] Add -h/--help option to compileall

2010-11-25 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks for the patch Stefan.  I can’t test on Windows now; can you/have you?

--

___
Python tracker 

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



[issue10533] defaultdict constructor with a concrete value

2010-11-25 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

> It would be very handy to allow for concrete values as well.

Do you have use cases for a concrete integer value that isn't zero?

Since we can currently use defaultdict(int) or defaultdict(tuple), is the 
purpose just to create a more direct spelling of the same thing?  The docs for 
defaultdict also show a general purpose way to generate any default constant 
(though that way isn't obvious if you haven't seen it in the docs).

I'm reluctant to add yet another variant.  We already have __missing__, 
defaultdict, Counter, dict.get, and dict.setdefault().

The docs for dictionaries need to make clear that Guido has already provided an 
idiom to be the one obvious way to do it:

class MyConst(dict):
def __missing__(self, key):
return myconst

That was really the whole point of adding __missing__ in the first place.  The 
OP's proposal amounts to rejecting Guido's design which provides a very good 
general purpose solution.

--
keywords:  -easy
type:  -> feature request

___
Python tracker 

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



[issue10533] defaultdict constructor with a concrete value

2010-11-25 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: lukasz.langa -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue10524] Patch to add Pardus to supported dists in platform

2010-11-25 Thread Éric Araujo

Changes by Éric Araujo :


--
versions: +Python 3.1

___
Python tracker 

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



[issue1649329] Extract file-finding and language-handling code from gettext.find

2010-11-25 Thread Shannon -jj Behrens

Shannon -jj Behrens  added the comment:

I've never managed to get a patch into Python, but I wouldn't mind trying ;)

--

___
Python tracker 

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



[issue1649329] Extract file-finding and language-handling code from gettext.find

2010-11-25 Thread Éric Araujo

Éric Araujo  added the comment:

Would you like to propose a patch?

--

___
Python tracker 

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



[issue1649329] Extract file-finding and language-handling code from gettext.find

2010-11-25 Thread Shannon -jj Behrens

Shannon -jj Behrens  added the comment:

Although, perhaps this bug is going away.  It seems like using zip files for 
eggs is going out of vogue.

--

___
Python tracker 

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



[issue4111] Add Systemtap/DTrace probes

2010-11-25 Thread John Levon

John Levon  added the comment:

configure.in has:

AC_MSG_RESULT([$with_dtrace])
...
AC_MSG_RESULT($with_dtrace)

Why twice? It looks confusing.

--

___
Python tracker 

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



[issue10533] defaultdict constructor with a concrete value

2010-11-25 Thread Éric Araujo

Éric Araujo  added the comment:

Like three-liners?  whatsnew/2.5 gives us this one:

class zerodict(dict):
def __missing__(self, key):
return 0

I don’t think it’s too painful to have to use defaultdict with a lambda.  We 
can’t use a keyword argument and I’m -0.5 on changing behavior depending on the 
type of the first argument.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue1649329] Extract file-finding and language-handling code from gettext.find

2010-11-25 Thread Shannon -jj Behrens

Shannon -jj Behrens  added the comment:

> OTOH maybe a lightweight ABC with mixin methods and a concrete implementation 
> of the full gettext logic may be clear and educational here.  Shannon, if 
> you’re still getting those emails, what do you think?

Yep, that'd be fine.

--

___
Python tracker 

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



[issue10533] defaultdict constructor with a concrete value

2010-11-25 Thread Steve Holden

Steve Holden  added the comment:

On 11/25/2010 11:48 AM, Eric Smith wrote:
> 
> Eric Smith  added the comment:
> 
> How about:
> 
> from collections import defaultdict
> 
> class defaultdict_value(defaultdict):
> def __init__(self, value):
> defaultdict.__init__(self, lambda : value)
> 
> x = defaultdict_value(3)
> print(x[1])
> 
> --

+1

But I'd call it defaultdict_const().

regards
 Steve
-- 
Steve Holden   +1 571 484 6266   +1 800 494 3119
PyCon 2011 Atlanta March 9-17   http://us.pycon.org/
See Python Video!   http://python.mirocommunity.org/
Holden Web LLC http://www.holdenweb.com/

--

___
Python tracker 

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



[issue10533] defaultdict constructor with a concrete value

2010-11-25 Thread Eric Smith

Eric Smith  added the comment:

How about:

from collections import defaultdict

class defaultdict_value(defaultdict):
def __init__(self, value):
defaultdict.__init__(self, lambda : value)

x = defaultdict_value(3)
print(x[1])

--

___
Python tracker 

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



[issue10533] defaultdict constructor with a concrete value

2010-11-25 Thread Łukasz Langa

Łukasz Langa  added the comment:

Both arguments are true and definitive. Last possibility would be to introduce 
a factory function for defaultdicts that would only accept concrete values:

  from collections import fallbackdict

Then this factory could produce defaultdict instances like this:

  fallbackdict(0, some_key=1) --> defaultdict(lambda: 0, some_key=1)

That would be safe for future type changes as well.

If this version does not sound appealing, I can't see any other way of reliably 
introducing this shortcut.

--

___
Python tracker 

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



[issue10533] defaultdict constructor with a concrete value

2010-11-25 Thread Eric Smith

Eric Smith  added the comment:

-1 from me. You can't use keywords, and if you make the value callable at a 
later date then suddenly you'll change the behavior of seemingly unrelated 
code. Is a lambda so bad?

--
nosy: +eric.smith

___
Python tracker 

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



[issue10493] test_strptime failures under OpenIndiana

2010-11-25 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

I have made several experiments to get the minimal patch. It is committed in 
r86752.

It is trivial enough, and risk-free enough, to commit even in RC state (In my 
opinion).

Python 2.7 and 3.2 are not affected. They don't look for "SunOS/5.10" in their 
configure script.

The buildslave is now green. Finally. 
http://www.python.org/dev/buildbot/all/builders/x86%20OpenIndiana%203.1/builds/36

--
assignee:  -> jcea
resolution:  -> accepted
stage: needs patch -> 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



[issue10532] A bug related to matching the empty string

2010-11-25 Thread Matthew Barnett

Matthew Barnett  added the comment:

The spans say this:

>>> for m in re.finditer('((.d.)*)*', 'adb'):
print(m.span())


(0, 3)
(3, 3)

There's an non-empty match followed by an empty match.

IHMO, not a bug.

--
nosy: +mrabarnett

___
Python tracker 

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



[issue10533] defaultdict constructor with a concrete value

2010-11-25 Thread Michael Foord

Michael Foord  added the comment:

I would love this functionality (I almost always initialise defaultdict with a 
lambda that just returns a concrete value).

Unfortunately it seems like adding a keyword argument isn't possible because 
defaultdict takes arbitrary keyword args (and populates the dict with them).

defaultdict(lambda: 1, foo=1, bar=2, baz=3)

--

___
Python tracker 

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



[issue10533] defaultdict constructor with a concrete value

2010-11-25 Thread Łukasz Langa

New submission from Łukasz Langa :

Currently the constructor in defaultdict only accepts factories. It would be 
very handy to allow for concrete values as well. It's implementable either by 
checking if the argument is callable or by a new keyword argument.

--
assignee: lukasz.langa
components: Library (Lib)
keywords: easy
messages: 122382
nosy: holdenweb, lukasz.langa, michael.foord
priority: low
severity: normal
status: open
title: defaultdict constructor with a concrete value
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



[issue10532] A bug related to matching the empty string

2010-11-25 Thread Yingjie

Changes by Yingjie :


--
type:  -> behavior

___
Python tracker 

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



[issue10524] Patch to add Pardus to supported dists in platform

2010-11-25 Thread Marc-Andre Lemburg

Changes by Marc-Andre Lemburg :


--
stage:  -> commit review
type: feature request -> 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



[issue10524] Patch to add Pardus to supported dists in platform

2010-11-25 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Eric Smith wrote:
> 
> Eric Smith  added the comment:
> 
> The patch name has 2.7 in it, although "Versions" says 3.2. As this is a 
> feature request, it can't be added to 2.7.

I consider missing distros in the list of supported dists
a bug, not a feature request.

--

___
Python tracker 

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



[issue10532] A bug related to matching the empty string

2010-11-25 Thread Yingjie

New submission from Yingjie :

Here are some puzzling results I have got (I am using Python 3, I suppose 
similar results for python 2).

When I do the following, I got an exception:
>>> re.findall('(d*)*', 'adb')
>>> re.findall('((d)*)*', 'adb')

When I do this, I am fine but the result is wrong:
>>> re.findall('((.d.)*)*', 'adb')
[('', 'adb'), ('', '')]

Why is it wrong?

The first mactch of groups:
('', 'adb')
indicates the outer group ((.d.)*) captured
the empty string, while the inner group (.d.)
captured 'adb', so the outer group must have
captured the empty string at the end of the
provided string 'adb'.

Once we have matched the final empty string '',
there should be no more matches, but we got
another match ('', '')!!!

So, findall matched the empty string in
the end of the string twice!!!

Isn't this a bug?

Yingjie

--
components: Regular Expressions
messages: 122380
nosy: lanyjie
priority: normal
severity: normal
status: open
title: A bug related to matching the empty string
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



[issue10531] write tilted text in turtle

2010-11-25 Thread Yingjie

New submission from Yingjie :

First of all, I'd like to express my deep gratidute to the author of this 
module, it is such a fun module to work with and to teach python as a first 
programming language.

Secondly, I would like to request a feature if it is not too hard to achieve. 
Currently, you can only write texts horizontally, no matter what is the current 
orientation of the turtle pen. I wonder if it is possible to write text in any 
direction when we control the heading of the turtle? For example, the following 
code would write a vertically oriented text:

>>> setheading(90) #turtle facing up
>>> write("vertical text!")

Thanks a lot!

Yingjie

--
components: Library (Lib)
messages: 122379
nosy: lanyjie
priority: normal
severity: normal
status: open
title: write tilted text in turtle
type: feature request
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



[issue10493] test_strptime failures under OpenIndiana

2010-11-25 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

> The fix was ported from trunk (2.7) to py3k branch, but it was not
> applied to 3.1 branch, though. I don't know why, but seems to be an
> oversight.

No, it was deliberate: it was not backported all, neither to 3.1, nor
to 2.6. I was concerned that doing so may break stuff that currently
works.

> Since the patch has been "tested" in py3k branch since late May, it
> is simple and solves the problem in 3.1 branch, I request this patch
> to be applied to 3.1 too.
> 
> Martin, do you have an opinion?.

I remain skeptical. The test on the 3k branch is irrelevant; the

> Must the release manager to be involved?.

At this point: definitely. After the 3.1.3 release: the test in the
2.7 release may not give significant insight yet.

> The issue is that we have checks for "SunOS/5.10", but OpenIndiana
> and the new Solaris 11 Express are "SunOS/5.11". We have to add
> them.

That is fine.

--

___
Python tracker 

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



[issue10493] test_strptime failures under OpenIndiana

2010-11-25 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

I verified that the bug was present too in the py3k patch sometime ago, but not 
currently. So I have spend some time doing bisection in the py3k branch to know 
WHEN the problem was solved.

If was solved in r81583:

"""

r81583 | martin.v.loewis | 2010-05-28 17:44:20 +0200 (Fri, 28 May 2010) | 9 
lines

Merged revisions 81582 via svnmerge from 
svn+ssh://python...@svn.python.org/python/trunk


  r81582 | martin.v.loewis | 2010-05-28 17:28:47 +0200 (Fr, 28 Mai 2010) | 2 
lines
  
  Issue #1759169: Drop _XOPEN_SOURCE on Solaris.



"""

The fix was ported from trunk (2.7) to py3k branch, but it was not applied to 
3.1 branch, though. I don't know why, but seems to be an oversight.

Since the patch has been "tested" in py3k branch since late May, it is simple 
and solves the problem in 3.1 branch, I request this patch to be applied to 3.1 
too.

Martin, do you have an opinion?.

Must the release manager to be involved?.

PS: I have verified that with the change, the buildslave in OpenIndiana passes 
the test.

The issue is that we have checks for "SunOS/5.10", but OpenIndiana and the new 
Solaris 11 Express are "SunOS/5.11". We have to add them.

--

___
Python tracker 

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



[issue10524] Patch to add Pardus to supported dists in platform

2010-11-25 Thread Eric Smith

Eric Smith  added the comment:

The patch name has 2.7 in it, although "Versions" says 3.2. As this is a 
feature request, it can't be added to 2.7.

--
nosy: +eric.smith

___
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-11-25 Thread Eric Smith

Eric Smith  added the comment:

Checked in r86751. I'm leaving this open until I fix the remaining issue with 
'#g' for Decimal.

--
components: +Library (Lib)

___
Python tracker 

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



[issue10154] locale.normalize strips "-" from UTF-8, which fails on Mac

2010-11-25 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Mandriva and Debian also work fine with both "UTF8" and "UTF-8". For the 
record, the canonical spelling inside /usr/share/locale is "UTF-8". I suppose 
glibc does its own normalization.

--
nosy: +pitrou

___
Python tracker 

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



[issue1759169] clean up Solaris port and allow C99 extension modules

2010-11-25 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



  1   2   >