[issue7763] (C API) PyUnicode_Tailmatch documentation

2010-01-23 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Duplicate of #7762.

--
resolution:  - duplicate
status: open - closed
superseder:  - (C API) PyUnicode_Tailmatch documentation

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



[issue7762] (C API) PyUnicode_Tailmatch documentation

2010-01-23 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Thanks, fixed in r77702.

--
resolution:  - fixed
status: open - closed

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



[issue7725] '-s' option in The Python Profiles Instant User's Manual linked incorrectly

2010-01-23 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Thanks, fixed in r77703.

--
resolution:  - fixed
status: open - closed

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



[issue7748] unicode supported in distutils register but not distutils upload

2010-01-23 Thread Tarek Ziadé

Changes by Tarek Ziadé ziade.ta...@gmail.com:


--
resolution:  - accepted
type:  - crash
versions: +Python 2.7, Python 3.1, Python 3.2

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



[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-23 Thread Chris Withers

Chris Withers ch...@simplistix.co.uk added the comment:

Please can you write a test for your patch?

--
nosy: +cjw296
stage:  - test needed

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



[issue7741] Allow multiple statements in code.InteractiveConsole.push

2010-01-23 Thread Chris Withers

Chris Withers ch...@simplistix.co.uk added the comment:

Please can you starts a small test suite for the code module that tests the fix 
you are proposing and include it as another patch?

--
nosy: +cjw296

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



[issue7743] Additional potential string - float conversion issues.

2010-01-23 Thread Chris Withers

Chris Withers ch...@simplistix.co.uk added the comment:

Out of curiosity, is it possible to write unit tests for any/all of this?

 I haven't yet found any examples that cause this crash without bigcomp 
 enabled.

I presume you meant *with* bigcomp enabled?

Forgive my lack of knowledge, but why would you disable bigcomp?

--
nosy: +cjw296

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



[issue7744] Allow site.addsitedir insert to beginning of sys.path

2010-01-23 Thread Chris Withers

Chris Withers ch...@simplistix.co.uk added the comment:

This sounds like something best taken to the python-ideas mailing list.
Can you do that and update the issue with the outcome of any discussion?

--
nosy: +cjw296

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



[issue7743] Additional potential string - float conversion issues.

2010-01-23 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

 Out of curiosity, is it possible to write unit tests for any/all of this?

There are some tests in Lib/test/test_strtod.py, that I added around two weeks 
ago and have been updating since;  I don't have mechanism for running tests 
with the altered STRTOD_DIGLIM value, though.

 I presume you meant *with* bigcomp enabled?
I did.  Thanks!

 Forgive my lack of knowledge, but why would you disable bigcomp?

Just as a stress test, really:  a failure that occurs with bigcomp disabled 
might indicate a problem that could also occur with bigcomp enabled.  Or 
someone might want to alter the value of the STRTOD_DIGLIM threshold at some 
later point based on performance tests;  if the code is correct then it ought 
to be safe to do so.

--

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



[issue7743] Additional potential string - float conversion issues.

2010-01-23 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

I forgot to mention:  the other reason one might want to disable the bigcomp 
stuff is that it seems less reliable than the rest of the code:  of the 11-12 
independent bugs that I found in dtoa.c recently, around 9 of them were related 
to the bigcomp code.

--

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



[issue7764] Doc for itertools recipe consume is complicated and less efficient

2010-01-23 Thread Muhammad Alkarouri

New submission from Muhammad Alkarouri malkaro...@gmail.com:

Based on the discussion at:
http://groups.google.co.uk/group/comp.lang.python/browse_thread/thread/c1ae3513a31eb63e/d0701a9902732c67?hl=en#d0701a9902732c67

In the documentation of itertools, one of the functions provided in the recipes 
section (10.7.3) is consume:

def consume(iterator, n):
Advance the iterator n-steps ahead. If n is none, consume entirely.
collections.deque(islice(iterator, n), maxlen=0)

A clearer implementation is:

def consume(n, items):
if n == 0:
return
next(islice(items, n-1, None), None)

It uses no fancy tricks and is thus more suitable for a documentation. 
Moreover, the second implementation is actually more efficient. Some timings 
are provided in the thread linked above. As an example, here are the timings on 
my machine (Python 2.6.1, x86_64, OS X 10.6:

consume_deque #old implementation
10: 1.2913839817
   100: 3.18093585968
  1000: 21.6316840649

consume_forloop #using a straight for loop
10: 0.658184051514
   100: 2.85271406174
  1000: 24.6730420589

consume_islice #the suggested implementation
10: 0.688861131668
   100: 1.15058612823
  1000: 5.52356886864

The script computing these timings is attached. Thanks to Peter Otten for 
coming up both with the function and the timing script.

--
assignee: georg.brandl
components: Documentation
files: consume_timeit.py
messages: 98187
nosy: Muhammad.Alkarouri, georg.brandl
severity: normal
status: open
title: Doc for itertools recipe consume is complicated and less efficient
type: performance
Added file: http://bugs.python.org/file15978/consume_timeit.py

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



[issue7764] Doc for itertools recipe consume is complicated and less efficient

2010-01-23 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +rhettinger
priority:  - normal
stage:  - needs patch
versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2

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



[issue7748] unicode supported in distutils register but not distutils upload

2010-01-23 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
priority:  - normal
stage:  - needs patch
type: crash - behavior

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



[issue7764] Doc for itertools recipe consume is complicated and less efficient

2010-01-23 Thread Georg Brandl

Changes by Georg Brandl ge...@python.org:


--
assignee: georg.brandl - rhettinger

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



[issue7751] urllib.urlopen(///C|/foo/bar/spam.foo) IOError: [Errno 22]

2010-01-23 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +orsenthil

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



[issue7761] telnetlib Telnet.interact fails on Windows but not Linux

2010-01-23 Thread Brian Curtin

Changes by Brian Curtin cur...@acm.org:


--
nosy: +brian.curtin
priority:  - normal
stage:  - test needed
type:  - behavior

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



[issue7744] Allow site.addsitedir insert to beginning of sys.path

2010-01-23 Thread Brian Curtin

Changes by Brian Curtin cur...@acm.org:


--
priority:  - normal
stage:  - test needed
status: open - pending
versions: +Python 2.7, Python 3.2

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



[issue7760] use_errno=True does not work

2010-01-23 Thread Marcin Bachry

Marcin Bachry hegel...@gmail.com added the comment:

In the libc case you shouldn't give absolute path in CDLL: CDLL('libc.so.6') is 
better. You use /lib/libc.so.6 path, but Python (and ctypes.so) actually uses 
something like /lib/tls/i686/cmov/libc.so.6 - these are two separate 
libraries with separate errno variables, mapped to different memory regions. 
Your call to getxattr modifies errno in the former library, but ctypes 
get_errno() fetches value from the latter library.

If I fix CDLL() call, the test works ok for me.

--
nosy: +marcin.bachry

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



[issue7764] Doc for itertools recipe consume is complicated and less efficient

2010-01-23 Thread Peter Otten

Peter Otten __pete...@web.de added the comment:

As noted on comp.lang.python the implementation can be simplified to

def consume(items, n):
next(islice(items, n, n), None)

When I suggested the above I wasn't aware that 

consume(items, None)

should exhaust the entire iterator. Unfortunately I've not found an elegant way 
to add that functionality.

--
nosy: +potten

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



[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-23 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

The documentation mentions that mhlib is deprecated and mailbox should be used 
instead. Is there any point in trying to fix it?

--
nosy: +pitrou

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



[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-23 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
stage: test needed - patch review
versions: +Python 2.6 -Python 3.2

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



[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-23 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +akuchling

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



[issue7753] newgil backport

2010-01-23 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

As for your other comments, Marc-Andre:

 * Please check whether you can move these variable declarations inside
 the main loop function (as statics):
 [snip]

They are used in other functions than in the main loop, so it's not possible.

 * Please add the fallback solutions from the time module in case 
 gettimeofday() is not available. You cannot assume that all modern
 POSIX systems implement that API - it was introduced in POSIX 2001
 and Python 2.x still supports OSes that were released prior to that
 year.

I didn't know about that. In the context of py3k, I'm not sure it is really 
annoying, but you're right that for 2.x a fallback might be needed.

By the way, the new GIL only works with POSIX and Windows NT threading APIs. 
Perhaps it can't be backported at all to 2.x, given that 2.x supports more 
threading APIs than py3k does?

 I haven't looked at the timing details of the implementation, but
 please make sure that it works even if the clock interval is a few ms

Well, since it works under Windows (I don't have any really reliable 
benchmarks, since I've tested under a VM which is not an ideal condition), I 
assume it's robust against poor timing precisions.
(under Windows, WaitForMultipleObjects() is used which according to the MSDN 
docs has worse than microsecond precision)

But, yes, testing would be welcome on such platforms.

--

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



[issue7753] newgil backport

2010-01-23 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

I meant worse than milliseconds, sorry.

--

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



[issue7764] Doc for itertools recipe consume is complicated and less efficient

2010-01-23 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

Will switch to the version using next() instead of deque().

--

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



[issue5423] Exception raised when attempting to call set_charset on an email.mime.multipart once sub-parts have been attached

2010-01-23 Thread John Edmonds

John Edmonds pocketcooki...@gmail.com added the comment:

It looks like set_charset's documentation says that it assumes you are calling 
it on a message with a mimetype of text/*.  This case calls it on a message of 
type multipart/mixed.  Nonetheless, I am attaching a patch that catches this 
earlier and prints a more relevant and consistent error message.

--
keywords: +patch
nosy: +pocketcookies
Added file: http://bugs.python.org/file15979/issue5423.patch

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



[issue7760] use_errno=True does not work

2010-01-23 Thread Nikolaus Rath

Nikolaus Rath nikol...@rath.org added the comment:

I can confirm that without the path it works for me too.

But I have to admit that I don't really understand your explanation. Should I 
generally not use full paths with CDLL? Or just in the case of libc?

In either case, I think the ctypes dokumentation could be more explicit about 
this.

--

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



[issue7765] 'unittest' documentation misprints

2010-01-23 Thread July Tikhonov

New submission from July Tikhonov july.t...@gmail.com:

Errors in command line examples.

One missed space (only in py3k version), and one not so obvious misprint (in 
both py3k and trunk).

--
assignee: georg.brandl
components: Documentation
files: unittest-doc-py3k.diff
keywords: patch
messages: 98196
nosy: georg.brandl, july
severity: normal
status: open
title: 'unittest' documentation misprints
versions: Python 2.7, Python 3.2
Added file: http://bugs.python.org/file15980/unittest-doc-py3k.diff

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



[issue7765] 'unittest' documentation misprints

2010-01-23 Thread July Tikhonov

Changes by July Tikhonov july.t...@gmail.com:


Added file: http://bugs.python.org/file15981/unittest-doc-trunk.diff

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



[issue7766] sys.getwindowsversion as PyStructSequence

2010-01-23 Thread Brian Curtin

New submission from Brian Curtin cur...@acm.org:

I always find myself wishing sys.getwindowsversion() utilized the named tuple 
concept, so here it is against trunk. sys.version_info was also changed in this 
manner for 2.7.

Because it is a PyStructSeq/named tuple, it is still accessible like a regular 
old tuple, but can now be accessed by named attributes.

One thing I don't like is that this is a function, unlike sys.version_info. I 
think something like sys.windows_version would be better...is there sense in 
making that an additional API and starting to phase out the getwindowsversion 
function in py3k?

The patch includes doc and test changes.

--
components: Library (Lib)
files: winver_as_structseq.diff
keywords: needs review, patch, patch
messages: 98197
nosy: brian.curtin
priority: normal
severity: normal
stage: patch review
status: open
title: sys.getwindowsversion as PyStructSequence
type: feature request
versions: Python 2.7, Python 3.2
Added file: http://bugs.python.org/file15982/winver_as_structseq.diff

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



[issue5423] Exception raised when attempting to call set_charset on an email.mime.multipart once sub-parts have been attached

2010-01-23 Thread John Edmonds

Changes by John Edmonds pocketcooki...@gmail.com:


Added file: http://bugs.python.org/file15983/issue5423.patch

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



[issue5423] Exception raised when attempting to call set_charset on an email.mime.multipart once sub-parts have been attached

2010-01-23 Thread John Edmonds

Changes by John Edmonds pocketcooki...@gmail.com:


Removed file: http://bugs.python.org/file15979/issue5423.patch

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



[issue7766] sys.getwindowsversion as PyStructSequence

2010-01-23 Thread Eric Smith

Eric Smith e...@trueblade.com added the comment:

I like this. I've visually reviewed the patch, but haven't tested it yet. I'm 
willing to commit this.

Could you add to the tests to assert that .major is equal to [0], etc.?

Also, the documentation says that element [4] is text, but you've referred to 
it as service_pack. I don't think service_pack is documented anywhere, but 
is clearly a better name than text. The documentation of OSVERSIONINFO 
describes this as szCSDVersion, with the description of 'A null-terminated 
string, ..., that indicates the latest Service Pack installed on the system 
...', so service_pack is okay with me. Can you change the documentation to 
refer to this field as service_pack?

Another idea would be to expose OSVERSIONINFOEX. I've personally wanted to get 
access to wProductType in the past. Any thoughts on that? I think 
OSVERSIONINFOEX would be available on any version of Windows that we care about 
going forward.

I don't see any point in changing it from a function to a property at this 
point. There's the hassle of migrating to the new version, and it's wrapping a 
Win32 API call anyway.

--
nosy: +eric.smith

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



[issue7743] Additional potential string - float conversion issues.

2010-01-23 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

First bug fixed (in the trunk) in r77713.

--
resolution:  - fixed
status: open - closed

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



[issue7766] sys.getwindowsversion as PyStructSequence

2010-01-23 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

Good point about OSVERSIONINFOEX. I've actually wanted some of that info as 
well, and according to MSDN the minimum supported client to get that structure 
is Windows 2000 - same as OSVERSIONINFO.

Attached is a patch updated with your comments plus the use of OSVERSIONINFOEX.

--
Added file: http://bugs.python.org/file15984/winver_as_structseq_ex.diff

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



[issue1068268] subprocess is not EINTR-safe

2010-01-23 Thread Nir Soffer

Changes by Nir Soffer nir...@gmail.com:


--
nosy: +nirs

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



[issue5423] Exception raised when attempting to call set_charset on an email.mime.multipart once sub-parts have been attached

2010-01-23 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
priority:  - normal
stage: test needed - patch review
versions: +Python 2.7

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



[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-23 Thread Neil Schemenauer

Neil Schemenauer nas-pyt...@arctrix.com added the comment:

On Sat, Jan 23, 2010 at 06:09:33PM +, Antoine Pitrou wrote:
 The documentation mentions that mhlib is deprecated and mailbox
 should be used instead. Is there any point in trying to fix it?

It looks like Btrfs will eventually conform to traditional st_nlink
behavior. However, that still leaves HFS+.  Perhaps the easiest fix
would be to have the unit test check for weird st_nlink behavior by
creating a directory with a subdirectory.  If something is weird,
skip testing mhlib.  The downside to that solution is that someone
might use mhlib on a HFS+ filesystem and encounter buggy behavior.

I can imagine that removing the optimization can make mhlib much
slower for large mail boxes.  Maybe that would be better than
risking lost mail though.  On modern machines maybe it doesn't
matter much.

  Neil

--

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



[issue7737] Patch all tests to change assertTrue(a [not] in b [, c]) - assert[Not]In(a, b [, c])

2010-01-23 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

I fixed more in r77111 and then backported everything to trunk in r77715.

--
keywords:  -needs review
nosy: +ezio.melotti
stage: patch review - committed/rejected

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



[issue7767] Add PyLong_AsLongLongAndOverflow

2010-01-23 Thread Case Van Horsen

New submission from Case Van Horsen cas...@gmail.com:

There are Long and LongLong variants for most of the C API functions that 
work with PyLong. This patch adds a LongLong version of 
PyLong_AsLongAndOverflow.

This function will be helpful on 64-bit Windows platforms to quickly get a 
64-bit integer or detect the need for multiple precision (or overflow). 

I can use this functionality for gmpy.

--
components: Extension Modules
files: patch_longlong.diff
keywords: patch
messages: 98203
nosy: casevh
severity: normal
status: open
title: Add PyLong_AsLongLongAndOverflow
type: feature request
versions: Python 2.7
Added file: http://bugs.python.org/file15985/patch_longlong.diff

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



[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-23 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

  The documentation mentions that mhlib is deprecated and mailbox
  should be used instead. Is there any point in trying to fix it?
 
 It looks like Btrfs will eventually conform to traditional st_nlink
 behavior. However, that still leaves HFS+.

That wasn't really my question. What I ask is: since mhlib is
deprecated, why do we need to fix it while people are encouraged to use
mailbox instead?
And, besides, does mailbox show the same problem?

--

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



[issue7748] unicode supported in distutils register but not distutils upload

2010-01-23 Thread Tarek Ziadé

Tarek Ziadé ziade.ta...@gmail.com added the comment:

fixed in r77717, r77719 

Under Py3, we will just use utf8 strings.

Thanks!

--
status: open - closed
versions:  -Python 3.1, Python 3.2

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



[issue7767] Add PyLong_AsLongLongAndOverflow

2010-01-23 Thread Brian Curtin

Changes by Brian Curtin cur...@acm.org:


--
components: +Interpreter Core -Extension Modules
keywords: +needs review
priority:  - normal
stage:  - patch review
versions: +Python 3.2

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



[issue6651] Py3k's posixpath.relpath not compatible with ntpath.relpath

2010-01-23 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

After thinking about this, I don't see a need for any change. 

Although it _looks_ like the relpath implementations aren't compatible based on 
their start default parameters, they do work the same. My code change isn't 
really necessary. All it does is rearrange things to make the signatures look 
the same, but it doesn't change the actual functionality.

--
resolution:  - invalid
status: open - closed

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



[issue7764] Doc for itertools recipe consume is complicated and less efficient

2010-01-23 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

See r77721

--

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



[issue7768] raw_input should encode unicode prompt with std.stdout.encoding.

2010-01-23 Thread Naoki INADA

New submission from Naoki INADA songofaca...@gmail.com:

raw_input and input should take unicode prompt and encode with 
sys.stdout.encoding like print or input in py3k.

 u = uあいう
 print u
あいう
 x = raw_input(u)
Traceback (most recent call last):
  File stdin, line 1, in module
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: 
ordinal not in range(128)
 import sys
 sys.stdout.encoding
'cp932'

--
components: IO, Unicode
messages: 98208
nosy: naoki
severity: normal
status: open
title: raw_input should encode unicode prompt with std.stdout.encoding.
versions: Python 2.6, Python 2.7

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