[issue1565525] tracebacks eat up memory by holding references to locals and globals when they are not wanted

2010-06-25 Thread Greg Hazel

Greg Hazel  added the comment:

It depends on how you look at it. Those two issues describe the surprising 
behavior of the same references I'm talking about here, when the lifetime of 
the traceback reference is only inside the same frame. This ticket describes 
the surprising behavior of those references when the lifetime of the traceback 
is any number of frames. My example eat_memory.py is much closer to the issue 
described in those links - the lifetime of the traceback object is 
insignificantly one frame higher, not the lifetime of the application.

Either way, a feature to discard those references would resolve both.

--

___
Python tracker 

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



[issue9024] PyDateTime_IMPORT macro incorrectly marked up

2010-06-25 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Should also add :cvar: tag to PyDateTimeAPI.

 http://docs.python.org/documenting/markup.html#information-units

Thanks, Ezio.

--
assignee: d...@python -> belopolsky
status: closed -> open

___
Python tracker 

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



[issue762963] timemodule.c: Python loses current timezone

2010-06-25 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
nosy: +belopolsky

___
Python tracker 

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



[issue5516] equality not symmetric for subclasses of datetime.date and datetime.datetime

2010-06-25 Thread Nick Coghlan

Nick Coghlan  added the comment:

If you can articulate the benefits of splitting them apart, it would be worth 
making the case for doing so on python-dev. I'm having a hard time picturing 
what anyone could be doing such that it would break their code, but it's still 
definitely a backwards incompatible change.

--

___
Python tracker 

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



[issue5109] array.array constructor very slow when passed an array object.

2010-06-25 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
stage:  -> patch review

___
Python tracker 

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



[issue5109] array.array constructor very slow when passed an array object.

2010-06-25 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
assignee:  -> belopolsky
nosy: +belopolsky, mark.dickinson -Alexander.Belopolsky

___
Python tracker 

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



[issue9084] vimrc: use matchall() instead of ":match" to allow multiple matches

2010-06-25 Thread daniel hahler

Changes by daniel hahler :


--
keywords: +patch
Added file: http://bugs.python.org/file17773/python-vimrc-use-matchadd.diff

___
Python tracker 

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



[issue9084] vimrc: use matchall() instead of ":match" to allow multiple matches

2010-06-25 Thread daniel hahler

New submission from daniel hahler :

This patch fixes the vimrc example file to use matchadd() instead of ":match", 
so that the second "match" does not overwrite the first one.

This resulted in leading tabs not highlighted as BadWhitespace.

--
components: Demos and Tools
messages: 108683
nosy: blueyed
priority: normal
severity: normal
status: open
title: vimrc: use matchall() instead of ":match" to allow multiple matches

___
Python tracker 

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



[issue7989] Add pure Python implementation of datetime module to CPython

2010-06-25 Thread Tim Peters

Tim Peters  added the comment:

> What would be your opinion on adding
> datetime.py to the main python tree
> today?

The funny thing is I can't remember why we bothered creating the C version - I 
would have been happiest leaving it all in Python.

Provided the test suite ensures the versions remain bug-compatible ;-), +0 from 
me for adding the Python version to the distro.

--

___
Python tracker 

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



[issue5146] threading via uid method doesn't work in imaplib

2010-06-25 Thread R. David Murray

R. David Murray  added the comment:

A test suite skeleton was recently contributed; it's in the standard location 
(Lib/test/test_imaplib).

--
nosy: +r.david.murray
stage: needs patch -> unit test needed

___
Python tracker 

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



[issue1520662] support all of strftime(3)

2010-06-25 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

time.strftime does support all of the platform strftime(3) format codes.

--
assignee:  -> belopolsky
nosy: +belopolsky
resolution:  -> out of date
stage:  -> committed/rejected
status: open -> pending

___
Python tracker 

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



[issue5054] CGIHTTPRequestHandler.run_cgi() HTTP_ACCEPT improperly parsed

2010-06-25 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +orsenthil

___
Python tracker 

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



[issue5053] http.client.HTTPMessage.getallmatchingheaders() always returns []

2010-06-25 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +orsenthil

___
Python tracker 

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



[issue9024] PyDateTime_IMPORT macro incorrectly marked up

2010-06-25 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Committed in r82236 - r82239.

--
nosy: +belopolsky
resolution:  -> accepted
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue9040] using MIMEApplication to attach a PDF raises a TypeError exception

2010-06-25 Thread R. David Murray

R. David Murray  added the comment:

This is a duplicate of #4768, which has already been fixed.

--
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed
superseder:  -> email.generator.Generator object bytes/str crash - b64encode() 
bug?

___
Python tracker 

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



[issue1565525] tracebacks eat up memory by holding references to locals and globals when they are not wanted

2010-06-25 Thread R. David Murray

R. David Murray  added the comment:

Those two references have nothing to do with your request.  They are talking 
about cycles that get created by grabbing the traceback variable, and the fact 
that it may take a while before garbage collection reclaims them *after you 
have let go of the traceback reference*.  You are talking about wanting to 
release the locals in the stack frame and still hold on to the traceback.  
Completely different issue.

Note that while the standard traceback print doesn't reference the locals in 
the frame, extended tracebacks such as cgitb do.  There is also a proposal to 
add such locals printing to the standard traceback.

I'm pretty sure this issue isn't going to go anywhere without a patch proposal, 
but before you work on that you might want to raise the idea on python-ideas 
and see if a wider audience thinks it is a good idea.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue9077] argparse does not handle arguments correctly after --

2010-06-25 Thread R. David Murray

R. David Murray  added the comment:

Optparse left you to parse the arguments:

>>> import optparse
>>> p = optparse.OptionParser()
>>> p.add_option('--test', action="store_true")

>>> p.parse_args(['--test', 'foo', '--', 'foo2'])
(, ['foo', 'foo2'])

As you can see, the 'foo' before the '--' is one of the returned arguments.  So 
argparse is behaving exactly the same way as optparse in this instance, except 
that, as I said, it is *parsing* the arguments.

--

___
Python tracker 

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



[issue4775] Incorrect documentation - UTC time

2010-06-25 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

"""
The gmtime() function shall convert the time in seconds since the Epoch pointed 
to by timer into a broken-down time, expressed as Coordinated Universal Time 
(UTC).
"""

In a technical sense, this is correct.  The result of gmtime() is UTC time, but 
it fails to mention that gmtime() will never produce tm_sec=60.

--

___
Python tracker 

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



[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2010-06-25 Thread R. David Murray

R. David Murray  added the comment:

I can't reproduce this either, and without a reproducer we might as well close 
it.

Antoine it is possible that your fix for #5853 inadvertently fixed this, but I 
don't feel like untangling the logic of the module enough to figure it out :)  
So I'm going to close it 'works for me'.  If S Arrowsmith can reproduce it with 
2.7r2, we can reopen.

By the way, it produced 'jpe' for me, too...but, then, my system (Gentoo) 
/etc/mime.types file has 'jpe' as the first filetype for jpeg, so I don't think 
that association is Python's bug, per se. Though I may eventually have to 
address it in email6.  (Also by the way, I tried switching the order and 
passing in the modified file explicitly on the explicit init, but that didn't 
change the behavior).

--
nosy: +r.david.murray
resolution:  -> works for me
status: open -> closed

___
Python tracker 

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



[issue4775] Incorrect documentation - UTC time

2010-06-25 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Python implementation of time functions certainly has nothing to do with UT1, 
which is the time as measured by (modern) sun dials.  The correct name would be 
POSIX time.  As explained in POSIX rationale,

"""
Coordinated Universal Time (UTC) includes leap seconds. However, in POSIX time 
(seconds since the Epoch), leap seconds are ignored (not applied) to provide an 
easy and compatible method of computing time differences. Broken-down POSIX 
time is therefore not necessarily UTC, despite its appearance.
""" -- http://www.opengroup.org/onlinepubs/9699919799/xrat/V4_xbd_chap04.html

Nevertheless, UTC time is used throughout the standard.  For example,

"""
The gmtime() function shall convert the time in seconds since the Epoch pointed 
to by timer into a broken-down time, expressed as Coordinated Universal Time 
(UTC).
""" -- http://www.opengroup.org/onlinepubs/9699919799/functions/gmtime.html


I don't think there is much that can be improved in the Python documentation 
other than to stop referring to UTC as if it was a geographical location.

--
nosy: +belopolsky

___
Python tracker 

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



[issue1565525] tracebacks eat up memory by holding references to locals and globals when they are not wanted

2010-06-25 Thread Greg Hazel

Greg Hazel  added the comment:

It seems this is partially addressed in a big red "Warning" section of the docs 
on sys.exc_info: 
http://docs.python.org/release/3.1/library/sys.html#sys.exc_info
and is captured in the "Open Issue: Garbage Collection" section for PEP-3134: 
http://www.python.org/dev/peps/pep-3134/

Bug or feature request, this a well understood and real issue.

--

___
Python tracker 

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



[issue5147] MozillaCookieJar should not store leading whitespace in Magic header

2010-06-25 Thread Ajith Antony

Ajith Antony  added the comment:

ok. Patch attached.  I think.

--
Added file: http://bugs.python.org/file17772/5147.dif

___
Python tracker 

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



[issue1519638] Unmatched Group issue - workaround

2010-06-25 Thread Ezio Melotti

Ezio Melotti  added the comment:

It would be nice if you could port 'pieces' of #2636 to Python, in order to fix 
this and other bugs (and possibly add more features too).

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue1519638] Unmatched Group issue - workaround

2010-06-25 Thread Matthew Barnett

Matthew Barnett  added the comment:

Issue #2636 resulted in the new regex module (also available on PyPI), so this 
issue is addressed by that, but there's no patch for the re module.

--

___
Python tracker 

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



[issue1565525] tracebacks eat up memory by holding references to locals and globals when they are not wanted

2010-06-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

To call this a bug for tracker purposes, there would have to be a specific 
discrepancy between doc promise and observed behavior. Every feature request 
fixes a 'design bug' ;-).

--
resolution: wont fix -> 
stage:  -> needs patch
type:  -> feature request

___
Python tracker 

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



[issue5212] Incorrect note about md5 in hmac module documentation

2010-06-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Are you proposing that the note be removed entirely (and ignore the results it 
is based on) or just reworded? If it were removed, I could imagine complaints. 
If reword, specifically how?

--
assignee: georg.brandl -> d...@python
nosy: +d...@python, tjreedy

___
Python tracker 

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



[issue7989] Add pure Python implementation of datetime module to CPython

2010-06-25 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

> For io, we find this quite manageable indeed, although it is quite more
> complex and quirkier than datetime.

I don't understand how something being "more complex and quirkier," can make it 
more "manageable."

While admittedly simple, datetime has it's share of quirks.  (See issue 5516, 
for example.)  Most algorithms are simple, but ord2ymd, for one is quite 
instructional.  Another example is datetime.fromutc.  If there is a person 
other than Tim who understands how it works, I have not met him or her yet!

Note that we are not talking about writing something from scratch or bringing a 
3rd party module to python library.  Tim's prototype needed almost no changes 
to pass 2.7 test suit and very few to get ported to 3.x.  The sandbox version 
is currently at r82218, a dozen small changesets from Tim's version of 6 years 
ago.

The only remaining task is to make the test suit run tests on both modules.  
This is not entirely trivial, but it appears that test_datetime was originally 
designed to make tested classes replaceable.  Some housecleaning is needed to 
make it work, but I think it is doable.

I have not checked the C code coverage yet, but python code has 100% coverage 
as reported by trace module.  (Well, almost - there is exactly one line not 
covered and it actually contains a bug introduced by pypy!)

In any case, I do intend to maintain datetime.py while I am maintaining 
datetimemodule.c.  I will use it to prototype new features before implementing 
them in C.  I think having it in the main tree will increase its visibility and 
lower the barriers for future contributors.

Let's get back to this discussion after 2.7 is out and more developers can 
focus on 3.2.

--

___
Python tracker 

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



[issue5212] Incorrect note about md5 in hmac module documentation

2010-06-25 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5, Python 3.0

___
Python tracker 

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



[issue1565525] tracebacks eat up memory by holding references to locals and globals when they are not wanted

2010-06-25 Thread Greg Hazel

Greg Hazel  added the comment:

The objects I do want in the traceback are the objects necessary to print a 
traceback, but not the locals and globals of each frame.

For example:

def bar():
  x = "stuff"
  raise Exception("example!")
bar()

prints: 
Traceback (most recent call last):
  Line 4, in 
bar()
  Line 3, in bar
raise Exception("example!")
Exception: example!

There is no reason in that example to have a reference to "x" in the traceback, 
since it's not used in the output. This becomes important when I try to save a 
reference to the traceback object and raise it later:

import sys
def bar():
  x = "stuff"
  raise Exception("example!")
try:
  bar()
except:
  exc_info = sys.exc_info()
def foo(e):
  raise e[0], e[1], e[2]
# sometime possibly much later...
foo(exc_info)

Traceback (most recent call last):
  Line 12, in 
foo(exc_info)
  Line 6, in 
bar()
  Line 4, in bar
raise Exception("example!")
Exception: example!


During that "sometime possibly much later..." comment, a reference to "x" is 
held, when it will not be used in printing the traceback later. So, I would not 
like to keep a reference to "x", and currently there is no way to do that 
without also dropping a reference to the data needed to print the traceback.

--

___
Python tracker 

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



[issue1035576] Add New RPM-friendly record option to setup.py

2010-06-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

This appears to be a feature request. That would normally now mean applicable 
to 3.2 only. Or are the rule different for disutils?

Should #755286 and #1035576 both remain open?

Tarek, does distutils2 work supercede these?

--
nosy: +tjreedy
versions: +Python 2.7 -Python 2.4

___
Python tracker 

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



[issue755286] Generate rpm filelist including directories

2010-06-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

This appears to be a feature request. That would normally now mean this issue 
is applicable to 3.2 only. Or is the rule different for disutils?

Should #755286 and #1035576 both remain open?

Tarek, does distutils2 work supercede these?

Nijel, could at least some of the earlier versions of the patch be removed 
(people normally do this when submitting better versions)?

--
nosy: +tjreedy
versions: +Python 2.7 -Python 2.5

___
Python tracker 

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



[issue4804] Python on Windows disables all C runtime library assertions

2010-06-25 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions: +Python 3.2 -Python 2.5, Python 3.0

___
Python tracker 

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



[issue1519638] Unmatched Group issue - workaround

2010-06-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

If I understand "This has been addressed in issue #2636.", this issue should be 
closed as, perhaps, out-of-date or duplicate, with 2636 as superceder. Correct?

--
nosy: +tjreedy
versions:  -Python 2.5, Python 3.0

___
Python tracker 

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



[issue1718574] build_clib --build-clib/--build-temp option bugs

2010-06-25 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions: +Python 2.7 -Python 2.5

___
Python tracker 

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



[issue2942] mingw/cygwin do not accept asm file as extension source

2010-06-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Roumen, does your patch in #3871 supercede this issue? Or is it impossible to 
tell without more info from the OP?

--
nosy: +tjreedy
status: open -> pending
versions: +Python 2.7 -Python 2.5

___
Python tracker 

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



[issue5146] threading via uid method doesn't work in imaplib

2010-06-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I confirmed that 3.1.2 has same 'old' text that the OP proposes to change. I 
cannot comment on the substance. Stage 'needs patch' means it needs a diff 
file. I do not know whether or how the imaplib is unit tested.

--
keywords: +easy
nosy: +tjreedy
stage:  -> needs patch
versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 -Python 2.4, Python 
2.5

___
Python tracker 

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



[issue5147] MozillaCookieJar should not store leading whitespace in Magic header

2010-06-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

To apply this patch, it needs to be uploaded as a file xxx.dif.

Removing the idents looks correct even if trivial.

--
keywords: +easy
nosy: +tjreedy
versions: +Python 3.2 -Python 2.4, Python 2.5, Python 3.0

___
Python tracker 

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



[issue1565525] tracebacks eat up memory by holding references to locals and globals when they are not wanted

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

Martin v. Löwis  added the comment:

I still don't understand the issue. You say that you want a traceback, but then 
you say you don't want the objects in the traceback. So what *precisely* is it 
that you want, and what is it that you don't want?

In any case, whatever the solution, it is likely a new feature, which aren't 
acceptable anymore for 2.x release. So please don't target this report for any 
2.x version.

--
versions: +Python 3.2 -Python 2.5, Python 2.6, Python 2.7

___
Python tracker 

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



[issue5054] CGIHTTPRequestHandler.run_cgi() HTTP_ACCEPT improperly parsed

2010-06-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I hope that someone who knows more than me on this subject takes a look at this.

--
nosy: +tjreedy
versions: +Python 3.2 -Python 2.4, Python 2.5, Python 3.0

___
Python tracker 

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



[issue5053] http.client.HTTPMessage.getallmatchingheaders() always returns []

2010-06-25 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions: +Python 3.2 -Python 3.0

___
Python tracker 

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



[issue5026] [reopening] native build of python win32 using msys under both wine and native win32

2010-06-25 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue4640] optparse - dosn't distinguish between '--option' and '-option'

2010-06-25 Thread R. David Murray

R. David Murray  added the comment:

I thought the OP might be saying that -debug didn't throw an error in 2.6.  
test_optparse doesn't seem to have a test for this, so I wrote one.  But as far 
as I can see the correct error (invalid option -e, given that 'd' is defined) 
is thrown.  In 2.5, as well.

Rereading the initial post I understand the problem: his 'd' option takes an 
argument.  So 'ebug' becomes the option value, and thus no error is thrown.  
Which is working as designed (that's how single letter options that take 
arguments usually work in Unix)

So, it is correct that this is not a bug.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue5045] imaplib should remove length of literal strings

2010-06-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

While IMAP is very much a live protocol, I do not know that any of the 
currently active core developers know much about it. Imaplib is based on the 
obsolete RFC2060 of Dev 1996, superseded by 3501 in March 2003, with 6 later 
updates. (I just found all this out to respond here.)

It is written in Python. If you take a look at the code, you will see that 7 
people have contributed additions after the initial writing (and others may 
have contributed unlisted patches). Feel free to submit another by yourself.

--
nosy: +tjreedy
type: behavior -> feature request
versions: +Python 3.2 -Python 2.4, Python 2.5, Python 2.6

___
Python tracker 

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



[issue9040] using MIMEApplication to attach a PDF raises a TypeError exception

2010-06-25 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +r.david.murray

___
Python tracker 

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



[issue9069] test_float failure on Solaris

2010-06-25 Thread David Kirkby

David Kirkby  added the comment:

Hi,
I had hoped to devote more time to this, but have been able to. I will do at 
the weekend. 

I would add I was building 64-bit, so adding the compiler flag -m64 on 'hawk' 
at least some of the time. Depending on your hardware, assuming you have 
installed !OpenSolaris as a Virtual machine in VirtualBox, it may be a 32 or 
64-bit version of OpenSolaris. You need specific instructions from the 
processor for a 64-bit version and Sony in their infinite wisdom have disabled 
it on my Vaio laptop, so whilst I can install OpenSolaris as a 64-bit host 
operating system, any attempt to install a 64-bit guest will fail. 

If I don't chose to compile C99, then I need to add the compiler flag 
-DHAVE_DECL_ISFINITE=0. 

Otherwise I see:

Objects/object.c:1036: warning: implicit declaration of function 'isinf'

Undefined   first referenced
 symbol in file
isfinite./libpython2.6.so
ld: fatal: symbol referencing errors. No output written to python

Again, the Solaris man page says:

Mathematical Library Functions   isfinite(3M)

NAME
 isfinite - test for finite value

SYNOPSIS
 c99 [ flag... ] file... -lm [ library... ]
 #include 

 int isfinite(real-floating x);

implying this is a C99 function. 

This conflicting behavior could be the result of what linker or assembler is 
being used. On SPARC, I use Sun linker and assembler. On OpenSolaris I use  the 
Sun linker, but the GNU assembler. 

I would have thought it was better to test this out with small bits of test 
code like I posted, rather than the complete Python source code. 

It might be better if I just create you an account on 'hawk'. Drop me an email 
at david  kirkby {at} onetel |dot| net if you want. 

I can also get you an account at the University of Washington if you want on a 
Sun T5240 SPARC. I've not verified the problem on that machine, but I can do 
so. Just drop me an email with a preferred user name and I'll sort it out. 

The SPARC is very slow - despite it being a current model of a high end server. 
It is designed for a different sort of task to developing software. The CPUs 
are pretty slow (1167 MHz) and pretty dumb, but there are 128 hardware threads. 
In order to get any useful performance from the T5240, the code needs to be 
highly parallel or have lots of processes like on busy web servers. That is 
what 't2' is designed for - a high end web server. 

But 'hawk' is a pretty high spec PC which I run 24/7. 

Dave

--

___
Python tracker 

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



[issue1565525] tracebacks eat up memory by holding references to locals and globals when they are not wanted

2010-06-25 Thread Greg Hazel

Greg Hazel  added the comment:

This is still an issue.

The bug I'm reporting had been explained well, I thought, but I'll repeat it in 
summary:
There is no way to pass around traceback objects without holding references to 
an excessive number of objects.

Traceback raising typically does not use these references at all, so having 
some way to discard them would be very valuable. This allows storing and 
passing tracebacks between threads (or coroutines or async tasks) without dying 
quickly due to memory bloat. The simple-minded way to fix this is to allow the 
user to break the reference themselves.

Fixing this bug would invalidate the need for hacks like the one Twisted has 
come up with in their twisted.python.Failure object which stringifies the 
traceback object, making it impossible to re-raise the exception. Failure has a 
lot of re-implementations of Exceptions and traceback objects as a result.

--
status: closed -> open
title: gc allowing tracebacks to eat up memory -> tracebacks eat up memory by 
holding references to locals and globals when they are not wanted
versions: +Python 2.6, Python 2.7

___
Python tracker 

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



[issue9077] argparse does not handle arguments correctly after --

2010-06-25 Thread Domen Kožar

Domen Kožar  added the comment:

Optparse behaved like that, how would one get the same results with argparse? 
That is by having variable positional parameters to command. And at the same 
time stop at --.

--

___
Python tracker 

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



[issue9083] At least some Tools utilities are still Python 2

2010-06-25 Thread Guido van Rossum

Guido van Rossum  added the comment:

Webchecker is so old, it should be deleted.

--
nosy: +gvanrossum

___
Python tracker 

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



[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2010-06-25 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Can't reproduce under Mandriva Linux:

>>> import mimetypes
>>> print(mimetypes.guess_extension('image/jpeg'))
.jpe
>>> mimetypes.init()
>>> print(mimetypes.guess_extension('image/jpeg'))
.jpe

The fact that it returns ".jpe" rather than ".jpg", however, could be a bug in 
itself (since the latter will really be expected by everyone, not the former).

--
nosy: +pitrou

___
Python tracker 

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



[issue7989] Add pure Python implementation of datetime module to CPython

2010-06-25 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> It is hard for me to judge the significance of maintenance burden, but
> others reported that having parallel versions of the io module was
> helpful.  I believe that with proper support in the regression test
> suit, it should be quite manageable.

For io, we find this quite manageable indeed, although it is quite more
complex and quirkier than datetime.

--

___
Python tracker 

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



[issue7989] Add pure Python implementation of datetime module to CPython

2010-06-25 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Tim, thanks for your prompt reply.

What would be your opinion on adding datetime.py to the main python tree today?

There is momentum behind several features to be added to datetime module and 
having easily accessible prototype would give similar benefits to those you had 
during original design.

It is hard for me to judge the significance of maintenance burden, but others 
reported that having parallel versions of the io module was helpful.  I believe 
that with proper support in the regression test suit, it should be quite 
manageable.  If contributors are encouraged to do python version of new 
features first, get full test coverage and then do C implementation, it may 
lead to higher quality contributions.

--

___
Python tracker 

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



[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2010-06-25 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions: +Python 2.7 -Python 2.4, Python 2.5

___
Python tracker 

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



[issue9038] test_distutils failure

2010-06-25 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +michael.foord

___
Python tracker 

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



[issue9081] test_sysconfig failure

2010-06-25 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Hurray, I'm not the only one!

--
nosy: +pitrou
resolution:  -> duplicate
status: open -> closed
superseder:  -> test_distutils failure

___
Python tracker 

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



[issue4943] trace.CoverageResults.write_results can't write results file for modules loaded by __path__ manipulation

2010-06-25 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
keywords: +easy
stage:  -> patch review
type:  -> behavior
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.4, Python 2.5

___
Python tracker 

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



[issue9082] warnings.filterwarnings doesn't work with -O

2010-06-25 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
assignee:  -> brett.cannon
nosy: +brett.cannon
priority: normal -> high
versions: +Python 2.6, Python 3.1

___
Python tracker 

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



[issue1565525] gc allowing tracebacks to eat up memory

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

Changes by Martin v. Löwis :


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

___
Python tracker 

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



[issue9083] At least some Tools utilities are still Python 2

2010-06-25 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +gpolo
stage: unit test needed -> needs patch
type: feature request -> behavior
versions: +Python 3.2

___
Python tracker 

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



[issue1565525] gc allowing tracebacks to eat up memory

2010-06-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Given comments like "I'm still having problems figuring out what the bug is 
that you are reporting. (Martin)" and "I must repeat that there is no 
simple-minded way to 'repair' this. (Tim)", and subsequent changes to Python, 
should this still be open? If so, for which version(s)?

--
nosy: +tjreedy
status: open -> pending

___
Python tracker 

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



[issue7989] Add pure Python implementation of datetime module to CPython

2010-06-25 Thread Tim Peters

Tim Peters  added the comment:

> It would be great if you could shed
> some light on the history behind pure
> python implementation.  Why was it
> developed in the first place?

It was rapid prototyping - design decisions were changing daily, and it goes a 
lot faster to change Python code than C code.

> What was the reason not to ship it
> with python?

Didn't want to create new ongoing maintenance burdens.  Multiple 
implementations eventually drift out of synch, and at the time we had had 
enough of that already wrt, e.g., pickle vs cPickle.

Sorry, nothing deep here ;-)

--

___
Python tracker 

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



[issue4925] Improve error message of subprocess when cannot open

2010-06-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Improved error messages are feature requests because 1) there is no particular 
guarantee in the doc and 2) changes can break existing code, so should only 
happen in an new x.y version.

When reporting behavior, it is helpful to give *minimal* code that will 
reproduce, either in the message if small, or attached. For example, with 3.1.2 
on WixXP

>>> import subprocess
>>> subprocess.Popen("xyz")
gives
WindowsError: [Error 2] The system cannot find the file specified

Although in this case the literal name is in the traceback, it is not always. 
So I am leaving this open. Given that

>>> open('xyx')
gives the more helpful
IOError: [Errno 2] No such file or directory: 'xyx'

it seems it might be possible by using the io code.

--
nosy: +tjreedy
title: Improve error message of subprocess -> Improve error message of 
subprocess when cannot open
type: behavior -> feature request
versions: +Python 3.2 -Python 2.5

___
Python tracker 

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



[issue7989] Add pure Python implementation of datetime module to CPython

2010-06-25 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Adding tim_one to the nosy list.

Tim,

It would be great if you could shed some light on the history behind pure 
python implementation.  Why was it developed in the first place?  What was the 
reason not to ship it with python?

Thanks.

--
nosy: +tim_one

___
Python tracker 

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



[issue3383] ctypes.util fails to find libc in some environments

2010-06-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Given the patch applied for #4861, I think this should be closed until someone 
finds that there is still a bug in a current version of Python and determines 
that there is something to be done.

--
nosy: +tjreedy
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue9083] At least some Tools utilities are still Python 2

2010-06-25 Thread Steve Holden

New submission from Steve Holden :

C:\Users\sholden>\python31\python \python31\Tools\webchecker\wcgui.py
Traceback (most recent call last):
  File "\python31\Tools\webchecker\wcgui.py", line 63, in 
from Tkinter import *
ImportError: No module named Tkinter

This makes is seem pretty clear that not even minimal effort has been expended 
to ensure that this Tools is functional. It's not a priority, so that's 
understandable. Maybe I am the only person who ever tried to use this under 
Python 3.

Perhaps we need a test that will fail if these things don't at least run to 
completion (and no, I don't know how I would test wcgui, but I'd be interested 
in discussing test strategies)?

--
assignee: holdenweb
components: 2to3 (2.x to 3.0 conversion tool), Demos and Tools
messages: 108641
nosy: holdenweb
priority: high
severity: normal
stage: unit test needed
status: open
title: At least some Tools utilities are still Python 2
type: feature request
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



[issue4872] Python will not co-exist with MFC (memory leak)

2010-06-25 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
resolution:  -> invalid
status: open -> pending
versions:  -Python 2.5, Python 3.0

___
Python tracker 

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



[issue1222721] tk + setlocale problems...

2010-06-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

The backspace issue seems to have been fixed.

I modified bug.py for 3.1 by removing the coding cookie, changing 
unicode("Ïðîáà", "KOI8-R") to just "Ïðîáà", and fixing print. Running from 
IDLE, it ran and displayed a tk window with text entry and labelled button that 
printed "Friday" in the shell window.

On the other hand, "I also found that the problem only appears when the 
LC_NUMERIC setting is different to en_US. (for example if it is de_AT)" 
suggests that other might have a problem (I am in the US).

Sidenote: Since the obscure koi8-R encoding (no longer valid in 3.x, the 
interpreter said) is not described as part of the bug, it should not be part of 
a minimal example.

--
nosy: +tjreedy
versions: +Python 2.7 -Python 2.5
Added file: http://bugs.python.org/file17771/nobug.py

___
Python tracker 

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



[issue9069] test_float failure on Solaris

2010-06-25 Thread Stefan Krah

Stefan Krah  added the comment:

Mark Dickinson  wrote:
> Now that I've finally managed to get gcc 4.4.4 installed on OpenSolaris...
>
> .. I'm still failing to reproduce this bug. :(
>
>
> dicki...@eratosthenes:~/release26-maint$ uname -a
> SunOS eratosthenes 5.11 snv_134 i86pc i386 i86pc Solaris
> dicki...@eratosthenes:~/release26-maint$ cat /etc/release
>OpenSolaris Development snv_134 X86
>Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
> Use is subject to license terms.
>  Assembled 01 March 2010
> dicki...@eratosthenes:~/release26-maint$ ./python
> Python 2.6.4 (release26-maint:75706, Jun 25 2010, 21:44:19)
> [GCC 4.4.4] on sunos5
> Type "help", "copyright", "credits" or "license" for more information.
> >>> float.hex(-0.0)
> '-0x0.0p+0'
> >>> import sys; sys.maxint
> 2147483647
>
> As far as I can tell, this setup is almost identical to David's 'hawk' 
> machine (same gcc version, same OpenSolaris build, same Python source
+revision).
>
> I'm not really sure where I can go from here.
>
> Stefan, you're not able to reproduce this by any chance, are you?

No, I'm getting the same results as you (OpenSolaris/qemu/32-bit/gcc). I wonder
if it's somehow related to issue 7281, which was resolved by changing 
float_repr_style.

But as I said, I cannot reproduce it with either gcc or suncc. On the other 
hand,
who knows how the FPU is emulated in qemu.


The C standard is diplomatic as usual:

"On implementations that represent a signed zero but do not treat negative zero
 consistently in arithmetic operations, the copysign functions regard the sign
 of zero as positive."


David, one of your comments implied for me that you have managed to compile
Python with -std=c99. For me, this fails instantly. What options did you use?

--

___
Python tracker 

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



[issue1322] platform.dist() has unpredictable result under Linux

2010-06-25 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +merwok

___
Python tracker 

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



[issue1322] platform.dist() has unpredictable result under Linux

2010-06-25 Thread Éric Araujo

Changes by Éric Araujo :


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

___
Python tracker 

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



[issue4640] optparse - dosn't distinguish between '--option' and '-option'

2010-06-25 Thread Éric Araujo

Éric Araujo  added the comment:

optparse specifically supports only GNU-style two-dashes long argument. Victor 
is right, optparse will always understand -thing as -t -h -i -n -g.

--
nosy: +merwok
resolution: works for me -> invalid
stage:  -> committed/rejected

___
Python tracker 

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



[issue4775] Incorrect documentation - UTC time

2010-06-25 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 -Python 2.5

___
Python tracker 

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



[issue4640] optparse - dosn't distinguish between '--option' and '-option'

2010-06-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Victor, I am interpreting your comment as saying that this is not a bug. If I 
am wrong, someone can re-open.

In any case, the bug would have to be in 2.6 or more realistically, 2.7, since 
2.6.final will be out soon.

--
nosy: +tjreedy
resolution:  -> works for me
status: open -> closed
versions: +Python 2.6, Python 2.7 -Python 2.5

___
Python tracker 

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



[issue7673] audioop: check that length is a multiple of the size

2010-06-25 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue4726] doctest gets line numbers wrong due to quotes in comments

2010-06-25 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
resolution:  -> works for me
status: open -> pending
versions:  -Python 2.4, Python 2.5

___
Python tracker 

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



[issue1524639] Fix Tkinter Tcl-commands memory-leaks

2010-06-25 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
stage:  -> patch review
versions: +Python 3.2 -Python 2.5, Python 3.0

___
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-06-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

This appears to be one of at least three duplicate issues: #1528074, #2986, and 
#4622. I am closing two, leaving 2986 open, and merging the nearly disjoint 
nosy lists. (If no longer interested, you can delete yourself from 2986.) 
#1711800 appears to be slightly different (if not, it could be closed also.)

Whether or not a new feature is ever added (earliest, now, 3.2), it appears 
that the docs need improvement to at least explain the current behavior. If 
someone who understands the issue could open a separate doc issue (for 
2.6/7/3.1/2) with a suggested addition, that would be great.

--
nosy: +LambertDW, eliben, gagenellina, janpf, jimjjewett, rtvd, sjmachin, 
tjreedy
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



[issue4622] SequenceMatcher bug with long sequences

2010-06-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

This appears to be one of at least three duplicate issues: #1528074, #2986, and 
#4622. I am closing two, leaving 2986 open, and merging the nearly disjoint 
nosy lists. (If no longer interested, you can delete yourself from 2986.) 
#1711800 appears to be slightly different (if not, it could be closed also.)

Whether or not a new feature is ever added (earliest, now, 3.2), it appears 
that the docs need improvement to at least explain the current behavior. If 
someone who understands the issue could open a separate doc issue (for 
2.6/7/3.1/2) with a suggested addition, that would be great.

--
nosy: +tjreedy
resolution:  -> duplicate
status: open -> closed
superseder:  -> difflib.SequenceMatcher not matching long sequences

___
Python tracker 

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



[issue1528074] difflib.SequenceMatcher.find_longest_match() wrong result

2010-06-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

This appears to be one of at least three duplicate issues: #1528074, #2986, and 
#4622. I am closing two, leaving 2986 open, and merging the nearly disjoint 
nosy lists. (If no longer interested, you can delete yourself from 2986.) 
#1711800 appears to be slightly different (if not, it could be closed also.)

Whether or not a new feature is ever added (earliest, now, 3.2), it appears 
that the docs need improvement to at least explain the current behavior. If 
someone who understands the issue could open a separate doc issue (for 
2.6/7/3.1/2) with a suggested addition, that would be great.

--
nosy: +tjreedy
resolution:  -> duplicate
status: open -> closed
superseder:  -> difflib.SequenceMatcher not matching long sequences

___
Python tracker 

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



[issue9043] 2to3 doesn't handle byte comparison well

2010-06-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Replacing string indexes with length-1 slices in the 2.x codebase, whether or 
not one one is running 2to3, seems to be a 'known' technique for Python3 
portability and unicode-bytes inter-operability. (It was discussed this week on 
py-dev list .) But I do not see it mentioned in PyWiki, such as on
http://wiki.python.org/moin/PortingPythonToPy3k

--
nosy: +tjreedy

___
Python tracker 

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



[issue9082] warnings.filterwarnings doesn't work with -O

2010-06-25 Thread Michael Foord

Changes by Michael Foord :


--
nosy: +rhettinger

___
Python tracker 

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



[issue2516] Instance methods are misreporting the number of arguments

2010-06-25 Thread R. David Murray

R. David Murray  added the comment:

I presume Benjamin meant he fixed the special case Alexander reported.

--

___
Python tracker 

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



[issue9039] IDLE and module Doc

2010-06-25 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Try making an idle.bat file on your desktop.

--
nosy: +tjreedy

___
Python tracker 

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



[issue9069] test_float failure on Solaris

2010-06-25 Thread Mark Dickinson

Mark Dickinson  added the comment:

Now that I've finally managed to get gcc 4.4.4 installed on OpenSolaris...

.. I'm still failing to reproduce this bug. :(


dicki...@eratosthenes:~/release26-maint$ uname -a
SunOS eratosthenes 5.11 snv_134 i86pc i386 i86pc Solaris
dicki...@eratosthenes:~/release26-maint$ cat /etc/release 
   OpenSolaris Development snv_134 X86
   Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
Use is subject to license terms.
 Assembled 01 March 2010
dicki...@eratosthenes:~/release26-maint$ ./python
Python 2.6.4 (release26-maint:75706, Jun 25 2010, 21:44:19) 
[GCC 4.4.4] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> float.hex(-0.0)
'-0x0.0p+0'
>>> import sys; sys.maxint
2147483647

As far as I can tell, this setup is almost identical to David's 'hawk' machine 
(same gcc version, same OpenSolaris build, same Python source revision).

I'm not really sure where I can go from here.

Stefan, you're not able to reproduce this by any chance, are you?

--
nosy: +skrah

___
Python tracker 

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



[issue9082] warnings.filterwarnings doesn't work with -O

2010-06-25 Thread Michael Foord

Michael Foord  added the comment:

A third (and better) option, but a deeper change, would be to allow the 
enabling of asserts on a per-module basis even when Python is run with -O/-OO. 
This would be great for testing.

--

___
Python tracker 

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



[issue9082] warnings.filterwarnings doesn't work with -O

2010-06-25 Thread Michael Foord

New submission from Michael Foord :

warnings.filterwarnings is mostly a bunch of asserts, so it doesn't work when 
Python is run with -O or -OO. This also means that a bunch of tests fail when 
run with -O or -OO.

Two options are skip the tests or fix filterwarnings.

--
components: Library (Lib)
messages: 108628
nosy: michael.foord
priority: normal
severity: normal
status: open
title: warnings.filterwarnings doesn't work with -O
versions: Python 2.7, Python 3.2

___
Python tracker 

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



[issue1776674] glob.glob inconsistent

2010-06-25 Thread Mark Lawrence

Mark Lawrence  added the comment:

Hardly a show stopper. It's actually a problem(?) with ntpath.py.  It could be 
patched but is it worth it, as this would be yet more work for you guys doing 
the build/release process?  I'd close this on the grounds that it's not worth 
the effort.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue9077] argparse does not handle arguments correctly after --

2010-06-25 Thread R. David Murray

R. David Murray  added the comment:

Still looks like it is working as designed to me.  Argpase is *parsing* the 
arguments, that's part of the whole point.  What you are observing is what I 
would expect from a well behaved unix command (*arguments* before the -- are 
just arguments, only the interpretation of options is stopped by --).

--
nosy: +r.david.murray

___
Python tracker 

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



[issue1789] assumption about unsigned long byte size in struct module usage

2010-06-25 Thread Mark Dickinson

Changes by Mark Dickinson :


--
assignee: gregory.p.smith -> mark.dickinson
status: closed -> open

___
Python tracker 

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



[issue1789] assumption about unsigned long byte size in struct module usage

2010-06-25 Thread Joseph Turian

Joseph Turian  added the comment:

That patch gives good clarification.

--

___
Python tracker 

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



[issue7989] Add pure Python implementation of datetime module to CPython

2010-06-25 Thread R. David Murray

R. David Murray  added the comment:

Victor: that was exactly the point of my post that you partially quoted :)

--

___
Python tracker 

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



[issue2516] Instance methods are misreporting the number of arguments

2010-06-25 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

Maybe I'm misunderstanding what issue we're talking about here, but wasn't this 
supposed to be fixed?


giampa...@ubuntu:~/svn/python-3.2$ python3.2
Python 3.2a0 (py3k:82220M, Jun 25 2010, 21:38:56) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> class A:
... def foo(self, x):
... pass
... 
>>> A().foo()
Traceback (most recent call last):
  File "", line 1, in 
TypeError: foo() takes exactly 2 arguments (1 given)
>>>

--

___
Python tracker 

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



[issue1789] assumption about unsigned long byte size in struct module usage

2010-06-25 Thread Mark Dickinson

Mark Dickinson  added the comment:

Here's a proposed doc clarification.

--
keywords: +patch
Added file: http://bugs.python.org/file17770/issue1789_doc.patch

___
Python tracker 

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



[issue1789] assumption about unsigned long byte size in struct module usage

2010-06-25 Thread Mark Dickinson

Mark Dickinson  added the comment:

> This documentation (http://docs.python.org/library/struct.html)
> claims that an unsigned long is 4 bytes.

I don't think it does, if you read it closely.  Of course, patches to improve 
the docs are always welcome. :)

If you're looking at the table of format codes, note that it refers to the 
*standard* size, which is the size used when standard size and alignment are in 
effect (i.e., when the struct format string starts with '<', '>', etc.).  That 
standard size is indeed 4 bytes for the 'l' and 'L' codes.

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue2516] Instance methods are misreporting the number of arguments

2010-06-25 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Fixed in r82220.

--

___
Python tracker 

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



[issue9051] Improve pickle format for aware datetime instances

2010-06-25 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

I am attaching a python prototype implementing interned UTC instance pickling.  
The patch is against sandbox revision r82218 of datetime.py.

Note that the pickling protocol requires that an instance or factory function 
is defined at the module level.

The pickle size saving is substantial:


>>> len(dumps(datetime.now(timezone.utc)))
61
>>> len(dumps(datetime.now(timezone.min)))
163

but there is still room for improvement:

>>> len(dumps(datetime.now()))
44

I do feel, however, that further improvements will see diminishing returns.

--
keywords: +patch
Added file: http://bugs.python.org/file17769/issue9051-utc-pickle-proto.diff

___
Python tracker 

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



[issue1789] assumption about unsigned long byte size in struct module usage

2010-06-25 Thread Joseph Turian

Joseph Turian  added the comment:

I just got bit by this bug. This documentation 
(http://docs.python.org/library/struct.html) claims that an unsigned long is 4 
bytes. On my machine, it's 8.

--
nosy: +Joseph Turian

___
Python tracker 

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



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

2010-06-25 Thread Germán L . Osella Massa

Germán L. Osella Massa  added the comment:

Well, using negative indexes for fields can be thought as a new feature with 
all the consequences mentioned before BUT negative indexes for accessing 
elements from a sequence, IMHO, is something that anyone would expected to 
work. That's why at first I thought it was a bug and I fill an issue about it.

The code that parses the fields and the indexes is the same, so when I change 
it to accept negative indexes, it worked for both cases. I'm attaching a patch 
that checks if a negative index is used in a field and reverts to the old 
behavior in that case, allowing only negative indexes for accessing sequences ( 
"{-1}" will raise KeyError because it will be threated as '-1').

Perhaps in this way this issue could be partially fixed.

--
keywords: +patch
Added file: 
http://bugs.python.org/file17768/format_no_fields_with_negative_indexes-2.7.diff

___
Python tracker 

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



[issue2516] Instance methods are misreporting the number of arguments

2010-06-25 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--

___
Python tracker 

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



[issue2516] Instance methods are misreporting the number of arguments

2010-06-25 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--

___
Python tracker 

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



[issue2516] Instance methods are misreporting the number of arguments

2010-06-25 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--

___
Python tracker 

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



  1   2   >