[issue1367711] Remove usage of UserDict from os.py

2008-01-12 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I don't think the point of this patch is worth doing.  The existing 
code is not buggy and runs fine.  Subclassing from dict increases the 
likelihood that an error will be introduced either now or in the future 
as the dict object evolves.  Recommend this be closed.

--
nosy: +rhettinger

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1367711
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1746] ZIP files with archive comments longer than 4k not recognized as valid by zipfile module

2008-01-12 Thread Alan McIntyre

Alan McIntyre added the comment:

A fix for this is included in the patch for issue 1622.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1746
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1570672] qtsupport.py mistake leads to bad _Qt module

2008-01-12 Thread Georg Brandl

Georg Brandl added the comment:

But qtsupport.py is in the Python distribution.

--
nosy: +georg.brandl
resolution: invalid - 
status: closed - open

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1570672
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1720595] Allow T_BOOL in PyMemberDef definitions

2008-01-12 Thread Georg Brandl

Georg Brandl added the comment:

The question is also what C type to assume for boolean fields -- char or
int?

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1720595
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1678668] fix a bug mixing up 0.0 and-0.0

2008-01-12 Thread Georg Brandl

Georg Brandl added the comment:

ITYM #1729014. :)

--
nosy: +georg.brandl

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1678668
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1622] zipfile hangs on certain zip files

2008-01-12 Thread Alan McIntyre

Alan McIntyre added the comment:

Here's an updated patch (zipfile-unsigned-fixes2.diff) that contains
Eric's fixes.  I also changed the structure for the Zip64 extension data
to be unsigned.  I think this should cover all the deficiencies caused
by the improper use of unsigned values.

Note: if this patch is committed, then issue 1746 should be closed since
it is fixed with this patch.

Added file: http://bugs.python.org/file9139/zipfile-unsigned-fixes2.diff

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1622
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1622] zipfile hangs on certain zip files

2008-01-12 Thread Alan McIntyre

Alan McIntyre added the comment:

I just noticed that my changes for issue 1526 are included in this
patch.  Eric, if you have time could you have a look at that issue and
see if you think I addressed it properly?  If not I can back them out
into a separate patch for that issue.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1622
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1526] DeprecationWarning in zipfile.py while zipping 113000 files

2008-01-12 Thread Alan McIntyre

Alan McIntyre added the comment:

I just noticed that my changes for this issue are included in the patch
for issue 1622; if that gets committed then this issue should be closed.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1526
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1809] docs for os.symlink(src, dst) doesn't mention exceptions

2008-01-12 Thread Georg Brandl

Georg Brandl added the comment:

Most of the os functions don't specify that they raise OSError in the
case of invalid or inaccessible paths.

I've now added a general note to that effect in r59930.

--
resolution:  - fixed
status: open - closed

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1809
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1810] Partial AST compile() patch

2008-01-12 Thread Georg Brandl

Georg Brandl added the comment:

This is great work!

The problem is that ast2obj_object translates NULL values to Py_None,
but obj2ast_object doesn't translate that back. This definition fixes
your testcase:

static int obj2ast_object(PyObject* obj, PyObject** out, PyArena* arena)
{
if (obj == Py_None)
obj = NULL;
Py_XINCREF(obj);
*out = obj;
return 0;
}

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1810
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1367711] Remove usage of UserDict from os.py

2008-01-12 Thread Andrew Dalke

Andrew Dalke added the comment:

I was optimization tuning and wondered why UserDict was imported by os.  
Replacing 
UserDict with dict passes all existing regression tests.

I see the concerns that doing that replacement is not future proof.  Strange 
then 
that Cookie.py is acceptable.  There are three places in Lib which derive from 
dict, 
and two are in Cookie.py and in both cases it's broken because set_default does 
not 
go through the same checks that __setitem__ goes through.

(The other place is an internal class in _strptime.)

In looking over existing third-party code, I see this nuance of when to use 
UserDict 
vs. dict isn't that well known.  The documentation says The need for this 
class has 
been largely supplanted by the ability to subclass directly from dict, but 
that 
isn't true if anyone is worried about future-proofing and where the subclass 
changes 
one of the standard methods.

--
nosy: +dalke

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1367711
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1367711] Remove usage of UserDict from os.py

2008-01-12 Thread Andrew Dalke

Andrew Dalke added the comment:

I should have added my preference.  I would like to see UserDict replaced with 
dict.  I didn't like seeing the extra import when I was doing my performance 
testing, through truthfully it's not a bit overhead.

As for future-proofing, of course when there's a change in a base class then 
there can be problems with derived classes.  When that happens, change all of 
the affected classes in the code base, and make sure to publish the change so 
third parties know about it.

Yes, there's a subtlety here that most people don't know about.  But it's not 
going to go away.

As for the evil that is 'exec':

  exec locals().data['MACHTYPE']=1; print MACHTYPE in {}, os.environ

gives me another way to mess things up.

A point of unit tests is to allow changes like this without worry about code 
breakage.  And it's not like other non-buggy code wasn't updated over time to 
reflect changing style and best practices.

If it's not compatible with Jython or IronPython or PyPy then ignore what I 
said, but fix Cookie and update the docs to make that clear as people do think 
that it's better to derived from dict for things like this than to derive from 
UserDict or UserDictMixin.

I can give a lightning talk about this at PyCon.  :)

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1367711
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1685986] Method cache

2008-01-12 Thread Georg Brandl

Georg Brandl added the comment:

Superseded by #1700288, which is updated for 2.6.

--
resolution:  - duplicate
status: open - closed
superseder:  - Armin's method cache optimization updated for Python 2.6

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1685986
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1339] smtplib starttls() should ehlo() if it needs to

2008-01-12 Thread James Henstridge

James Henstridge added the comment:

From RFC 2487 section 5.2: The client MUST discard any knowledge
obtained from the server, such as the list of SMTP service extensions,
which was not obtained from the TLS negotiation itself. The client
SHOULD send an EHLO command as the first command after a successful TLS
negotiation.

So the starttls() method should probably also be clearing helo_resp and
ehlo_resp (and maybe anything else discovered by ehlo()).

There are servers in the wild that will (a) refuse to talk to you unless
you issue another EHLO after TLS is negotiated and (b) offer a different
set of ESMTP features (such as only supporting SMTP AUTH after TLS). 
This patch isn't enough to talk to such servers.

--
nosy: +jamesh

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1339
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1700288] Armin's method cache optimization updated for Python 2.6

2008-01-12 Thread Georg Brandl

Georg Brandl added the comment:

Committed to trunk as r59931. Leaving open if you want to make more
adjustments, Raymond.

--
nosy: +georg.brandl

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1700288
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1568] PATCH: Armin's attribute lookup caching for 3.0

2008-01-12 Thread Georg Brandl

Georg Brandl added the comment:

#1700288's patch has been committed. Leaving this open as a guide to
whoever has to merge it to Py3k.

--
nosy: +georg.brandl

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1568
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1472] Small bat files to build docs on Windows

2008-01-12 Thread Georg Brandl

Georg Brandl added the comment:

Ideally, yes. The case of the doc build is a bit more complicated
because it relies on external libraries which may or may not work with
the tree version.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1472
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1492] BaseHTTPServer hard-codes Content-Type for error messages

2008-01-12 Thread Georg Brandl

Changes by Georg Brandl:


--
keywords: +easy

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1492
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1813] Codec lookup failing under turkish locale

2008-01-12 Thread Árni Már Jónsson

New submission from Árni Már Jónsson:

When switching to a turkish locale, the codecs registry fails on a codec
lookup which worked before the locale change.

This happens when the codec name contains an uppercase 'I'. What
happens, is just before doing a cache lookup, the string is normalized,
which includes a call to ctype.h's tolower. tolower is locale
dependant, and the turkish locale handles 'I's different from other
locales. Thus, the lookup fails, since the normalization behaves
differently then it did before.

Replacing the tolower() call with this made the lookup work:

int my_tolower(char c)
{
if ('A' = c  c = 'Z')
c += 32;

return c;
}

PS: If the turkish locale is not supported, this here will enable it to
an Ubuntu system

a) sudo cp /usr/share/i18n/SUPPORTED /var/lib/locales/supported.d/local
   (or just copy the lines with tr in them)
b) sudo dpkg-reconfigure locales

--
components: Interpreter Core
files: verify_locale.py
messages: 59821
nosy: arnimar
severity: normal
status: open
title: Codec lookup failing under turkish locale
type: behavior
versions: Python 2.5
Added file: http://bugs.python.org/file9140/verify_locale.py

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1813
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1367711] Remove usage of UserDict from os.py

2008-01-12 Thread Raymond Hettinger

Raymond Hettinger added the comment:

 it's better to derived from dict for things like
 this than to derive from UserDict or UserDictMixin

That's true for UserDict but not DictMixin.  IIRC, 
the latter will continue to exist in Py3.0 and it
has a purpose that is much different than UserDict
or dict, namely to build-out objects with a mapping
interface but are *not* dicts under the hood.

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1367711
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1570672] qtsupport.py mistake leads to bad _Qt module

2008-01-12 Thread Christian Heimes

Christian Heimes added the comment:

Oh, it's a Mac module :)
I'm sorry

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1570672
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1811] True division of integers could be more accurate

2008-01-12 Thread Christian Heimes

Christian Heimes added the comment:

How fast is your algorithm compared to the current algorithm and where
starts the break even zone? Most users use only small integers so it
might be a good idea to use a simpler algorithm for longs with Py_SIZE()
== 1. This is important for py3k.

--
nosy: +tiran
priority:  - normal

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1811
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2008-01-12 Thread Christian Heimes

Changes by Christian Heimes:


--
priority:  - normal

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1812
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2008-01-12 Thread Christian Heimes

Changes by Christian Heimes:


--
keywords: +easy

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1812
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue936813] fast modular exponentiation

2008-01-12 Thread Christian Heimes

Christian Heimes added the comment:

Mark, as the second math guru in our team, you are probably interested
in these patches. Trevor has written an interesting patch to optimize
longs for cryptographic problems. In fact it might be two patches now,
one for the Montgomery Reduction and one containing other optimizations.
The 2005 patch applies almost cleanly.

--
nosy: +marketdickinson
versions: +Python 3.0


Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue936813

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



[issue1472] Small bat files to build docs on Windows

2008-01-12 Thread Martin v. Löwis

Martin v. Löwis added the comment:

 Would all things in the tree ideally work
 with the version that was built from checkout?

It's more important that it works with many old versions,
than with its own version. python should be on the path,
and ideally, whatever you get there should work.

The documentation, unfortunately, requires 2.5 as a minimum.
It should stay that way for a long time, so that at some
point, it works with whatever people typically have on their
machines.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1472
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue923643] long - byte-string conversion

2008-01-12 Thread Christian Heimes

Christian Heimes added the comment:

Here is another integer related optimization patch from Trev. I've no
opinion on the matter but you might be interested in it as well.

--
assignee:  - marketdickinson
nosy: +marketdickinson, tiran
versions: +Python 2.6 -Python 2.4


Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue923643

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



[issue1814] Victor Stinner's GMP patch for longs

2008-01-12 Thread Christian Heimes

New submission from Christian Heimes:

A while ago Victor Stinner has spend several weeks in porting PyLongs to
GMP:

http://mail.python.org/pipermail/python-3000/2007-September/010718.html
http://mail.python.org/pipermail/python-3000/2007-October/010755.html

Although his patch didn't give the speedup he hoped for, the patch might
be interesting someday in the future. He never submitted it to our bug
tracker. I'm posting it to conserve it for the future.

--
components: Interpreter Core
files: py3k-long_gmp-v2.patch
messages: 59828
nosy: marketdickinson, tim_one, tiran
priority: normal
severity: normal
status: open
title: Victor Stinner's GMP patch for longs
type: rfe
versions: Python 3.0
Added file: http://bugs.python.org/file9141/py3k-long_gmp-v2.patch

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1814
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1222] locale.format bug if thousand separator is space (french separator as example)

2008-01-12 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Just tried on 2.5.1 and on trunk, I can't reproduce it. On both I get:

 import locale
 locale.setlocale(locale.LC_NUMERIC, fr_FR.UTF-8)
'fr_FR.UTF-8'
 locale.format(%9.2f, 12345.67, True)
' 12345,67'
 locale.format(%.2f, 12345.67, True)
'12345,67'
 locale.localeconv()['thousands_sep']
''

Which means that there is no thousands separator for the French locale
on my system (a Mandriva Linux box).

--
nosy: +pitrou

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1222
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1811] True division of integers could be more accurate

2008-01-12 Thread Mark Dickinson

Mark Dickinson added the comment:

It would be easy and safe to just use a/b = float(a)/float(b) if both a and b 
are less 
than 2**53 (assuming IEEE doubles).  Then there wouldn't be any loss of speed 
for 
small integers.

For large integers the algorithm I posted should run in time linear in the 
number of 
digits of max(a, b), at least in the worst case (though with appropriate 
optimizations 
it could be made much faster for 'random' inputs).  The current algorithm has 
essentially O(1) runtime.  

To get proper timings I'd have to code this up properly.  I'll do this, unless 
there's 
a consensus that it would be a waste of time :)

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1811
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1779] int(- 1) is valud, but float(- 1) isn't. Which is right?

2008-01-12 Thread Mark Dickinson

Mark Dickinson added the comment:

For Python 3.0, this is a trivial fix:  two lines need to be removed 
from PyLong_FromString in longobject.c, and then the tests in 
test_builtin need to be fixed up.

(For Python 2.6, the fix would be a bit more involved:  PyOS_strtol 
would also need fixing.)

A good candidate for the bug day?

--
keywords: +easy
nosy: +marketdickinson

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1779
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1616] compiler warnings (gcc 2.96)

2008-01-12 Thread Guido van Rossum

Guido van Rossum added the comment:

With a newer compiler (GCC 4.0.1 on OSX 10.5.1) I still get some warnings:

/Users/guido/p25/Modules/_ctypes/libffi/src/x86/ffi_darwin.c:220:
warning: function declaration isn’t a prototype

/Users/guido/p25/Modules/readline.c: In function ‘flex_complete’:
/Users/guido/p25/Modules/readline.c:681: warning: implicit declaration
of function ‘completion_matches’
/Users/guido/p25/Modules/readline.c:681: warning: return makes pointer
from integer without a cast

This is with GNU readline 5.2.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1616
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1616] compiler warnings (gcc 2.96)

2008-01-12 Thread Guido van Rossum

Changes by Guido van Rossum:


--
status: pending - open

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1616
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1814] Victor Stinner's GMP patch for longs

2008-01-12 Thread Guido van Rossum

Guido van Rossum added the comment:

Since this keeps coming up, I think it would make sense to turn this
into an optional extension module.

PS. The licensing concerns are another reason not to use this for the
core long (or int in Py3k) type.

--
keywords: +patch
nosy: +gvanrossum
priority: normal - low

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1814
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2008-01-12 Thread Peter Donis

Peter Donis added the comment:

I've uploaded a revised diff with two small improvements:

(1) Removed a redundant os.isfile check in 
PackageLoaderTestImporter.get_data() in doctest_testfile.py. (The 
open() builtin already raises IOError if the file can't be opened.)

(2) Added doctest.master = None in three places in doctest_testfile.py 
so the expected output is now nothing instead of three lines of

*** DocTestRunner.merge: 'doctest_testfile.txt' in both testers; 
summing outcomes.

Changed the expected output in test_doctest.py to correspond.

Added file: http://bugs.python.org/file9142/doctest-fixes1.diff

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1812
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1798] Add ctypes calling convention that allows safe access of errno

2008-01-12 Thread Thomas Heller

Thomas Heller added the comment:

 But this thread-local attribute on the function seems bizarre to me.
 I would prefer another way to get the errno. I can see two alternatives:
 - the function returns a tuple (normalresult, errno) on each call.
 - when errno is not zero, EnvironmentError (or WindowsError) is raised.

I'd stronly prefer NOT to add errno to the function return value.
Raising an Exception when errno or LastError != zero is wrong.
There are functions that set the errno or LastError value even
if they actually succeed.

The recommended way to check for errors that I had in mind is in
the 'errcheck' result checker:

  func = CDLL(..., errno=True)
  func.argtypes = [...]
  func.restype = ...
  def errcheck(result, func, args):
  if result == -1: # function failed
  raise EnvironmentError(func.errno)
  func.errcheck = errcheck

Of course, an alternative to a thread local storage
attribute would be to pass the error value to the errcheck
function. I just felt it would be better not to change
the signature, but maybe I was wrong.

Anyway, this patch should be extended so that it is also possible
to create a foreign function using the descibed calling convention
from a prototype created by CFUNCTYPE or WINFUNCTYPE.

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1798
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1815] Distutils add ability to skip build [Feature Request]

2008-01-12 Thread Daniel Eloff

New submission from Daniel Eloff:

There seems to be no way to skip the build step when running setup.py
install The behavior in such a case should be to skip build and use the
existing binaries as created in a separate build step or else print an
error. That way you can do setup.py build followed by setup.py
install --skip-build and you only have one build taking place.

The purpose of this would be to allow build to take place on a separate
computer to install. Currently I do this on Vista because MSVC 2003 is
not recommended or supported, and distutils won't use the installed MSVC
2005. So I do the build on a (virtual) XP machine and then install by
hand for lack of this option. I think Vista is a strong enough use case
to justify adding this feature.

--
components: Distutils
messages: 59836
nosy: Eloff
severity: normal
status: open
title: Distutils add ability to skip build [Feature Request]
versions: Python 3.0

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1815
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1811] True division of integers could be more accurate

2008-01-12 Thread Christian Heimes

Christian Heimes added the comment:

Mark Dickinson wrote:
 To get proper timings I'd have to code this up properly.  I'll do this, 
 unless there's 
 a consensus that it would be a waste of time :)

Why don't you ask Tim? He is the right person for the discussion. I'm
only an interested amateur mathematician.

Christian

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1811
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1815] Distutils add ability to skip build [Feature Request]

2008-01-12 Thread Christian Heimes

Christian Heimes added the comment:

Python 2.5's distutils has a --skip-build option for the install
command. In which way doesn't it solve your use case?


For Windows I recommend MinGW32 as compiler. It's sufficient for most users.

--
nosy: +tiran
priority:  - low
type:  - rfe

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1815
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1811] True division of integers could be more accurate

2008-01-12 Thread Mark Dickinson

Mark Dickinson added the comment:

Tim:  is this worth fixing?

--
nosy: +tim_one

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1811
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1816] sys.cmd_flags patch

2008-01-12 Thread Christian Heimes

New submission from Christian Heimes:

The output should be self explaining:
./python -tt -E -OO -Qnew -c import sys; print sys.cmd_flags
('Qnew', 'O', 'OO', 'E', 't', 'tt')

I'll provide doc updates and a mini test if the patch wanted.

--
components: Interpreter Core
files: trunk_sys_cmd_flags.patch
keywords: patch
messages: 59840
nosy: tiran
priority: normal
severity: normal
status: open
title: sys.cmd_flags patch
versions: Python 2.6
Added file: http://bugs.python.org/file9143/trunk_sys_cmd_flags.patch

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1816
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1710703] zipfile.ZipFile behavior inconsistent.

2008-01-12 Thread Alan McIntyre

Alan McIntyre added the comment:

Here's a quick patch that covers the issues mentioned in my post from
2007-05-09.

Added file: http://bugs.python.org/file9144/empty-zipfile.diff

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1710703
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1215] Python hang when catching a segfault

2008-01-12 Thread Ralf Schmitt

Ralf Schmitt added the comment:

If you replace your call segfault.segfault() with os.kill(os.getpid(),
signal.SIGSEGV) everything works as expected. The problem is that the
signal is just caught in the c handler (and a flag is set) and then the
program continues with the offending *c = 'a'; statement, which again
ends with a SIGSEGV and the handler being called.
The documentation explicitly states Because the C signal handler always
returns, it makes little sense to catch synchronous errors like SIGFPE
or SIGSEGV.
I think raising that InvalidArgument exception is most probably the
right thing to do (or at least printing a warning). Those that really
want to handle SIGSEGV should do it from C anyway.

--
nosy: +schmir

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1215
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue919238] Recursive variable definition causes sysconfig infinite loop

2008-01-12 Thread Ralf Schmitt

Ralf Schmitt added the comment:

This is still applies for trunk.

I've added the following lines to Makefile (in the top level directory).

SELF=$(SELFA)
SELFA=$(SELF)

Running make then hangs.
I'm attaching a patch, which fixes this issue (against trunk). Running
make now prints:

~/python-trunk/ make 
[EMAIL PROTECTED] ok
sysconfig.py: warning: could not resolve names from makefile (recursive
definition?): {'SELFA': '$(SELF)', 'SELF': '$(SELFA)'}
running build
running build_ext
INFO: Can't locate Tcl/Tk libs and/or headers

Failed to find the necessary bits to build these modules:
_bsddb_tkinter  bsddb185   
dbm   dlgdbm   
imageop   sunaudiodev  
To find the necessary bits, look in setup.py in detect_modules() for the
module's name.

running build_scripts

--
nosy: +schmir
versions: +Python 2.4, Python 2.5, Python 2.6


Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue919238

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



[issue919238] Recursive variable definition causes sysconfig infinite loop

2008-01-12 Thread Ralf Schmitt

Changes by Ralf Schmitt:


Added file: 
http://bugs.python.org/file9145/issue919238_sysconfig_recursive_definition.txt


Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue919238

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



[issue1215] Python hang when catching a segfault

2008-01-12 Thread Adam Olsen

Adam Olsen added the comment:

The warning in the documentation should be strengthened.  Python simply
does not and cannot support synchronously-generated signals.

It is possible to send a normally synchronous signal asynchronously,
such as the os.kill() Ralf mentioned, so it's theoretically possible to
use custom handlers for them.  However, I can't think of any real use
cases, and having such a handler would be asking for trouble if a real
synchronously-generated signal was produced.  I guess that's an argument
for not allowing custom handlers. ;)

Suggested documentation:
Because of the precarious nature of how synchronously-generated signals
must be handled, the signal module does not allow installing handlers
for them.  This includes SIGSEGV, SIGFPE, SIGBUS, SIGILL, SIGABRT...

I haven't been able to find a canonical list if synchronously-generated
signals.  Furthermore, I've seen conflicting claims about SIGABRT.

--
nosy: +Rhamphoryncus

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1215
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1811] True division of integers could be more accurate

2008-01-12 Thread Raymond Hettinger

Changes by Raymond Hettinger:


--
assignee:  - tim_one

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1811
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1816] sys.cmd_flags patch

2008-01-12 Thread Guido van Rossum

Guido van Rossum added the comment:

I like the idea of exposing Python's command line flags, but I think
this API is a bit odd.  I'd rather see it be a struct with members named
after the various arguments and values that are ints or bools -- or
simply a bunch of new flags directly in the sys module if making it a
string is too much work.

It also looks like the patch includes a few unrelated changes to
install.py and site.py.

--
nosy: +gvanrossum

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1816
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue919238] Recursive variable definition causes sysconfig infinite loop

2008-01-12 Thread Ralf Schmitt

Changes by Ralf Schmitt:


Added file: 
http://bugs.python.org/file9146/issue919238_sysconfig_recursive_definition.txt


Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue919238

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



[issue1623] Implement PEP-3141 for Decimal

2008-01-12 Thread Jeffrey Yasskin

Jeffrey Yasskin added the comment:

The discussion on issue 1682 concluded that Decimal should not implement
Real at all.

--
resolution:  - rejected
status: open - closed

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1623
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1810] AST compile() patch

2008-01-12 Thread Thomas Lee

Thomas Lee added the comment:

I knew it would be a simple one for somebody who knew what to look for
:) Thanks Georg! r02 is the updated patch. Changing the title of the
tracker issue to reflect that this *should* be a complete patch now.

Any further recommendations?

--
title: Partial AST compile() patch - AST compile() patch
Added file: http://bugs.python.org/file9147/ast-r02.patch

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1810
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1817] module-cgi: handling GET and POST together

2008-01-12 Thread Alexandre Fiori

New submission from Alexandre Fiori:

It looks like module-cgi cannot handle GET and POST together when using
FieldStorage. For instance, a form action=script.py?key=value
action=post is available through cgi.FormContent but not
cgi.FieldStorage when there are other input in the html form.
Very strange.

--
messages: 59848
nosy: alef13
severity: normal
status: open
title: module-cgi: handling GET and POST together
versions: Python 2.5

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1817
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1817] module-cgi: handling GET and POST together

2008-01-12 Thread Guido van Rossum

Guido van Rossum added the comment:

Well, what are you waiting for? Submit a patch!

--
keywords: +easy
nosy: +gvanrossum

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1817
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1817] module-cgi: handling GET and POST together

2008-01-12 Thread Alexandre Fiori

Alexandre Fiori added the comment:

Here it is, babe. I've made appropriate changes to make it read
QUERY_STRING when it's available within POST method. It's currently
being parsed by parse_qsl() in read_urlencoded() as it should be in
regular GET or POST. I didn't touch CONTENT_LENGTH since it has the size
of the POST data without QUERY_STRING's size. That would affect read()
of such POST data. It's working. Thanks for the incentive, it's my first
patch for python.

Added file: http://bugs.python.org/file9148/cgi.py.patch

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1817
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com