[issue9026] [argparse] Subcommands not printed in the same order they were added

2010-06-21 Thread Javier Collado

Javier Collado javier.coll...@gmail.com added the comment:

Working on it.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9026
___
___
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-21 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

You will need to delete TCL_LIBRARY and TK_LIBRARY in your environment settings.

--
nosy: +loewis

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9039
___
___
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-21 Thread Enrico Sartori

New submission from Enrico Sartori enry...@gmail.com:

To send an email with a PDF attachment the following code should work:

msg = MIMEMultipart()
msg['From'] = from
msg['To'] = to
msg['Subject'] = 'test'
fp = open('/path/to/file.pdf', 'rb')
attach = MIMEApplication(fp.read(), 'pdf')
fp.close()
attach.add_header('Content-Disposition', 'attachment', filename = 'file.pdf')
msg.attach(attach)
server = smtplib.SMTP('smtp.example.com')
server.login('username', 'password')
server.sendmail(from, to, msg.as_string())
server.quit()

But an exception is raised:

TypeError: string payload expected: class 'bytes'

To work around the problem the code above can be rewritten as follows:

msg = MIMEMultipart()
msg['From'] = from
msg['To'] = to
msg['Subject'] = 'test'
fp = open('/path/to/file.pdf', 'rb')
attach = MIMENonMultipart('application', 'pdf')
payload = base64.b64encode(fp.read()).decode('ascii')
attach.set_payload(payload)
attach['Content-Transfer-Encoding'] = 'base64'
fp.close()
attach.add_header('Content-Disposition', 'attachment', filename = 'file.pdf')
msg.attach(attach)
server = smtplib.SMTP('smtp.example.com')
server.login('username', 'password')
server.sendmail(from, to, msg.as_string())
server.quit()

This works, but explicit encoding should not be necessary.

--
components: Library (Lib)
messages: 108256
nosy: Enrico.Sartori
priority: normal
severity: normal
status: open
title: using MIMEApplication to attach a PDF raises a TypeError exception
type: behavior
versions: Python 3.1

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



[issue8854] msvc9compiler.py: find_vcvarsall() doesn't work with VS2008 on Windows x64

2010-06-21 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

Tarek Ziadé wrote:
 
 Tarek Ziadé ziade.ta...@gmail.com added the comment:
 
 The patch looks good but I am not comfortable with this change until it's 
 tested under other windows/VC flavors.

The patch is really trivial, but I'll test it on a Windows x86
installation as well today.

Would be great if we could get someone else test it on their
Windows x64 system.

It's strange that noone has noticed this problem while Python 2.6
was out. I know that Martin uses a cross-compiling setup to create
the 64-bit installers, so he wouldn't have noticed, but others
should have seen similar problems, trying to compile extensions
on Windows x64.

I guess most people still use the 32-bit Python installers on Windows
x64 systems.

--

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



[issue8854] msvc9compiler.py: find_vcvarsall() doesn't work with VS2008 on Windows x64

2010-06-21 Thread Tarek Ziadé

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

I am adding srid in the nosy list. I believe he can test those platforms as 
well if he's around

--
nosy: +srid

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



[issue8340] bytearray undocumented on trunk

2010-06-21 Thread Mark Dickinson

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

This affects 2.6 as well, doesn't it?

--
nosy: +mark.dickinson
versions: +Python 2.6

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



[issue8340] bytearray undocumented on trunk

2010-06-21 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
assignee: georg.brandl - d...@python
nosy: +d...@python

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



[issue8854] msvc9compiler.py: find_vcvarsall() doesn't work with VS2008 on Windows x64

2010-06-21 Thread Konstantin Zemlyak

Konstantin Zemlyak z...@zartsoft.ru added the comment:

Win2003 x64, VS2008, vanilla python 2.7rc1 amd64 from python.org.
Building python packages with C extensions works fine. Tested on simplejson, 
jinja2 (with enabled speedups) and PIL.

--
nosy: +zart

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



[issue8854] msvc9compiler.py: find_vcvarsall() doesn't work with VS2008 on Windows x64

2010-06-21 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

Konstantin Zemlyak wrote:
 
 Konstantin Zemlyak z...@zartsoft.ru added the comment:
 
 Win2003 x64, VS2008, vanilla python 2.7rc1 amd64 from python.org.
 Building python packages with C extensions works fine. Tested on simplejson, 
 jinja2 (with enabled speedups) and PIL.

I assume that you built without the patch applied. Does it also work
with the patch ?

This is the relevant section from the KB article:


When you install a new program or when you run a program on a Windows x64 
Edition computer, registry
calls made by 64-bit programs access the HKEY_LOCAL_MACHINE\Software registry 
sub key without
redirection. WOW64 intercepts registry calls to HKEY_LOCAL_MACHINE\Software 
that are made by 32-bit
programs, and then redirects them to the 
HKEY_LOCAL_MACHINE\Software\WOW6432node sub key.


Since VS2008 is a 32-bit application, the registry keys are written
to the HKEY_LOCAL_MACHINE\Software\WOW6432node branch.

64-bit applications such as Python AMD64 don't see this indirection,
so they have to explicitly look in that branch to find VS2008 settings.

I checked the registry on the machine and indeed the VS2008 keys are
only available under the HKEY_LOCAL_MACHINE\Software\WOW6432node branch.

--

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



[issue8340] bytearray undocumented on trunk

2010-06-21 Thread Mark Dickinson

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

Ideally, there should be documentation of 'bytes' and 'bytearray' in the 
'Built-in Types' section of the library manual, too.  (library/stdtypes.rst).

--

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



[issue8854] msvc9compiler.py: find_vcvarsall() doesn't work with VS2008 on Windows x64

2010-06-21 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

I checked this again using Python 2.7rc1 AMD64 on Windows Vista x64
using VS2008 and get the same error:

error: Unable to find vcvarsall.bat

Here's an updated patch for Python 2.7rc1.

--
Added file: http://bugs.python.org/file17727/msvc9compiler-py27.patch

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



[issue8854] msvc9compiler.py: find_vcvarsall() doesn't work with VS2008 on Windows x64

2010-06-21 Thread Konstantin Zemlyak

Konstantin Zemlyak z...@zartsoft.ru added the comment:

64-bit Windows, 64-bit cmd.exe, 64-bit python, not patched::

D:\c:\Program Files\Python27\python.exe
Python 2.7rc1 (r27rc1:81787, Jun  6 2010, 20:03:36) [MSC v.1500 64 bit 
(AMD64)]
on win32
Type help, copyright, credits or license for more information.
 import distutils.msvc9compiler
 distutils.msvc9compiler.get_build_version()
9.0
 distutils.msvc9compiler.find_vcvarsall(9.0)
'c:\\Program Files (x86)\\Microsoft Visual Studio 
9.0\\VC\\vcvarsall.bat'


How did you test? Maybe it's some difference in setup.

--

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



[issue9041] raised exception is misleading

2010-06-21 Thread Pauli Rikula

New submission from Pauli Rikula pauli.rik...@gmail.com:

Python 2.6.4 (r264:75706, Dec  7 2009, 18:45:15) 
[GCC 4.4.1] on linux2
Type help, copyright, credits or license for more information.
 import ctypes
 ctypes.c_double(-10L)
c_double(-10.0)
 ctypes.c_double(-1615850303565550365035743834433497598022205133485774201606517271376232756943394544659860070576145673184435898046094900974705977957524546054754407619322414156031543868365049804587509887519482605339802881919203378413839610932130987808091904716923808523529082292601815252144378794577053290430377619956196519276104705135157728700572895265282173598410898686661027635767561787024437943425698063864148353509329232637353185879916662535762857046055803126344827252193638068450635075403914139728774215976701177253424872306256754071372279583622974579667610358402093946751697566057918099861246342266493808947395028086687786041L)
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError:  float expected instead of long instance

.. vs:

 float(-1615850303565550365035743834433497598022205133485774201606517271376232756943394544659860070576145673184435898046094900974705977957524546054754407619322414156031543868365049804587509887519482605339802881919203378413839610932130987808091904716923808523529082292601815252144378794577053290430377619956196519276104705135157728700572895265282173598410898686661027635767561787024437943425698063864148353509329232637353185879916662535762857046055803126344827252193638068450635075403914139728774215976701177253424872306256754071372279583622974579667610358402093946751697566057918099861246342266493808947395028086687786041L)
Traceback (most recent call last):
  File stdin, line 1, in module
OverflowError: long int too large to convert to float

--
assignee: theller
components: ctypes
messages: 108265
nosy: kumma, theller
priority: normal
severity: normal
status: open
title: raised exception is misleading
type: behavior
versions: Python 2.6

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



[issue8854] msvc9compiler.py: find_vcvarsall() doesn't work with VS2008 on Windows x64

2010-06-21 Thread Konstantin Zemlyak

Konstantin Zemlyak z...@zartsoft.ru added the comment:

Tried msvc9compiler-py27.patch. find_vcvarsall() still works with the same 
result, while distutils.msvc9compiler.VS_BASE has been changed.

:: 
 distutils.msvc9compiler.find_vcvarsall(9.0)
u'c:\\Program Files (x86)\\Microsoft Visual Studio 
9.0\\VC\\vcvarsall.bat'
 distutils.msvc9compiler.VS_BASE
'Software\\Wow6432Node\\Microsoft\\VisualStudio\\%0.1f'

Checked registry, 9.0 is only under Wow6432Node.

--

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



[issue8854] msvc9compiler.py: find_vcvarsall() doesn't work with VS2008 on Windows x64

2010-06-21 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

Konstantin Zemlyak wrote:
 
 Konstantin Zemlyak z...@zartsoft.ru added the comment:
 
 64-bit Windows, 64-bit cmd.exe, 64-bit python, not patched::
 
   D:\c:\Program Files\Python27\python.exe
   Python 2.7rc1 (r27rc1:81787, Jun  6 2010, 20:03:36) [MSC v.1500 64 bit 
 (AMD64)]
   on win32
   Type help, copyright, credits or license for more information.
import distutils.msvc9compiler
distutils.msvc9compiler.get_build_version()
   9.0
distutils.msvc9compiler.find_vcvarsall(9.0)
   'c:\\Program Files (x86)\\Microsoft Visual Studio 
 9.0\\VC\\vcvarsall.bat'
   
 
 How did you test? Maybe it's some difference in setup.

I'm running the build process using a batch file which is
invoked through a remote shell.

Trying the same build from within a cmd.exe started locally on
the machine does not cause the error messages, so I guess this
does indeed have to do with the way the Python interpreter
is invoked.

Further inspection shows that in case the registry key is not
found, the find_vcvarsall() function uses the OS environment
to find the installation.

With the local cmd.exe, the OS environment does indeed have the
entry that points the function to the installation:

VS90COMNTOOLS

Using the remote shell, those VS2008 env vars are not set and
so the build fails.

Could you check the registry keys on your installation ?

I put these extra log lines into the find_vcvarsall() function to
see what the registry has stored:

vsbase = VS_BASE % version
try:
productdir = Reg.get_value(r%s\Setup\VC % vsbase,
   productdir)
except KeyError:
productdir = None

log.info('VS2008 product dir: %s - %s' % (productdir, vsbase))

# trying Express edition
if productdir is None:
vsbase = VSEXPRESS_BASE % version
try:
productdir = Reg.get_value(r%s\Setup\VC % vsbase,
   productdir)
except KeyError:
productdir = None
log.debug(Unable to find productdir in registry)

log.info('VS2008 product dir: %s - %s' % (productdir, vsbase))

The output is:

VS2008 product dir: None - Software\Microsoft\VisualStudio\9.0
VS2008 product dir: None - Software\Microsoft\VCExpress\9.0

--

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



[issue8854] msvc9compiler.py: find_vcvarsall() doesn't work with VS2008 on Windows x64

2010-06-21 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

Konstantin Zemlyak wrote:
 
 Konstantin Zemlyak z...@zartsoft.ru added the comment:
 
 Tried msvc9compiler-py27.patch. find_vcvarsall() still works with the same 
 result, while distutils.msvc9compiler.VS_BASE has been changed.
 
 :: 
distutils.msvc9compiler.find_vcvarsall(9.0)
   u'c:\\Program Files (x86)\\Microsoft Visual Studio 
 9.0\\VC\\vcvarsall.bat'
distutils.msvc9compiler.VS_BASE
   'Software\\Wow6432Node\\Microsoft\\VisualStudio\\%0.1f'
 
 Checked registry, 9.0 is only under Wow6432Node.

Thanks for confirming that. So at least my setup is not special and the
keys do indeed have to be updated fir Win64 platforms.

--

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



[issue9011] ast_for_factor unary minus optimization changes AST

2010-06-21 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
nosy: +minge

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



[issue8854] msvc9compiler.py: find_vcvarsall() doesn't work with VS2008 on Windows x64

2010-06-21 Thread Konstantin Zemlyak

Konstantin Zemlyak z...@zartsoft.ru added the comment:

 Using the remote shell, those VS2008 env vars are not set and
 so the build fails.

Seems it doesn't load user profile.

 The output is:
 
 VS2008 product dir: None - Software\Microsoft\VisualStudio\9.0
 VS2008 product dir: None - Software\Microsoft\VCExpress\9.0

Same for me. Your patch fixes registry lookup.

--

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



[issue9042] Gettext cache and classes

2010-06-21 Thread v_peter

New submission from v_peter leanmeandonothingmach...@gmail.com:

If you pass gettext.translation a class_ but the mo file you are trying to open 
already exists in the _translations cache the instance that is returned is an 
instance of whatever was in the cache and not the class that you requested.

I think that if a class is requested it should return that class. If others 
agree then I'd be happy to work on a patch.

--
components: Library (Lib)
messages: 108270
nosy: v_peter
priority: normal
severity: normal
status: open
title: Gettext cache and classes
versions: Python 2.6

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



[issue6931] dreadful performance in difflib: ndiff and HtmlDiff

2010-06-21 Thread Daniel Bengtsson

Changes by Daniel Bengtsson dan...@bengtssons.info:


--
nosy: +zitrax

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



[issue9005] Year range in timetuple

2010-06-21 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

I raised this issue on python-dev and Guido said OK.  See [Python-Dev] Year 
0 and year 10,000 in timetuple, 
http://mail.python.org/pipermail/python-dev/2010-June/100682.html

I am attaching a commit ready patch which contains a few more test cases and 
a NEWS entry.  I don't think there is a need to mention this in documentation, 
but at some point I would like to be able to write that dt.utctimetuple() is 
equivalent to dt.astimezone(timezone.utc).timetuple(), but at the moment it is 
not quite so.  See issue 9004.

--
resolution:  - accepted
stage: patch review - commit review
Added file: http://bugs.python.org/file17728/issue9005a.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9005
___
___
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-21 Thread Virgil Dupras

New submission from Virgil Dupras hs...@hardcoded.net:

If we run 2to3 on the following code:

s = b' '
print s[0] == s

we end up with this:

s = b' '
print(s[0] == s)

However, the first code, under python2 prints True while the converted code, 
under python3 prints False.

Shouldn't 2to3 convert this code to:

s = b' '
print s[0:1] == s

instead?

--
components: 2to3 (2.x to 3.0 conversion tool)
messages: 108272
nosy: vdupras
priority: normal
severity: normal
status: open
title: 2to3 doesn't handle byte comparison well
type: behavior
versions: Python 2.7

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



[issue9005] Year range in timetuple

2010-06-21 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


Added file: http://bugs.python.org/file17729/issue9005b.diff

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



[issue9005] Year range in timetuple

2010-06-21 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Committed in r82128.

--
stage: commit review - committed/rejected
status: open - closed

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



[issue9026] [argparse] Subcommands not printed in the same order they were added

2010-06-21 Thread Javier Collado

Javier Collado javier.coll...@gmail.com added the comment:

Finally I had to use an OrderedDict as suggested by R. David Murray because it 
wasn't safe to rely on _choices_actions in HelpFormatter class (i.e. previous 
patch wasn't valid):
- _choices_actions attribute is only present in _SubParsersAction class
- Even if action object is an instance of _SubParsersAction, _choices_actions 
only contains data for for subparsers that contain a help description.

Regarding the test cases:
- TestHelpSubparsersOrdering and TestHelpSubparsersWithHelpOrdering have been 
added
- TestHelpFormattingMetaClass has been modified:
  - New subparsers_signatures tester attribute added to test subparsers help.
  - If a 'signatures attribute' isn't present in tester object, then isn't 
consumed
  - assertMultilineEqual used instead of assertEqual to make it easier to debug 
test case failures.

--
Added file: http://bugs.python.org/file17730/trunk.diff

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



[issue8854] msvc9compiler.py: find_vcvarsall() doesn't work with VS2008 on Windows x64

2010-06-21 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

Applied patch in r82130. Thanks!

--
resolution:  - fixed
status: open - closed

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



[issue9026] [argparse] Subcommands not printed in the same order they were added

2010-06-21 Thread Javier Collado

Changes by Javier Collado javier.coll...@gmail.com:


Removed file: http://bugs.python.org/file17705/ordered_subcommands.diff

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



[issue9026] [argparse] Subcommands not printed in the same order they were added

2010-06-21 Thread Javier Collado

Javier Collado javier.coll...@gmail.com added the comment:

Despite trunk.diff can be successfully applied to py3k branch, please find 
attached the patch generated from py3k branch.

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

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



[issue9004] datetime.utctimetuple() should not set tm_isdst flag to 0

2010-06-21 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

With timezone.utc available in datetime module, users should be encouraged to 
use dt.astimezone(timezone.utc).timetuple() instead of dt.utctimetuple().  Note 
that the later will set tm_isdst to -1.  This observation can be used to argue 
for either of two ways to resolve this issue:

1. Since utctimetuple() is no longer necessary, and the alternative works 
correctly, there is no need to fix it.  Just recommend the astimezone use in 
the docs and explain the subtle difference.

2. Having two ways to do the same thing which have a subtle difference is not a 
good idea.

I am leaning towards #1, but would like to hear from others.

--

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



[issue8959] WINFUNCTYPE wrapped ctypes callbacks not functioning correctly in Python 2.7

2010-06-21 Thread Thomas Heller

Thomas Heller thel...@ctypes.org added the comment:

Fixed in rev. 82127 (trunk) and rev 82138 (py3k).
Added test for the  issues reported here so that it doen't happen again.

--
resolution:  - fixed
status: open - closed

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



[issue9044] [optparse] confusion over an option and its value without any space in between

2010-06-21 Thread Krzysztof Szawala

New submission from Krzysztof Szawala kszaw...@slb.com:

Currently optparse library supports the following option definitions:
-e value,
-e=value,
-e:value,
-evalue.

Having said that let's consider the following option definition:
-e string_value.

Based on the above syntax the following statement will be correct:
-exclusive
and will be parsed into -e xclusive.
The fact that no caracter is required in between the option itself and its 
value leads to confusion.

My suggestion is to restrict the syntax to the following:
-e value,
-e=value,
-e:value.

Thanks,
Krzysztof

--
components: Library (Lib)
messages: 108280
nosy: kszawala
priority: normal
severity: normal
status: open
title: [optparse] confusion over an option and its value without any space in 
between
type: feature request
versions: Python 2.6

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



[issue9042] Gettext cache and classes

2010-06-21 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Thanks for your report. Unfortunately, 2.6 and 3.1 are stable releases, they 
only get security and documentation fixes. 2.7 is nearly in the same state, 
since it’s at the release candidate stage. If your bug still applies to 3.2 
(branch named “py3k”), please propose a patch. I have added the maintainer of 
the gettext module and another developer expert in i18n to the nosy list (they 
are listed in Misc/maintainers.rst). Thanks again!

--
nosy: +lemburg, loewis, merwok
type:  - behavior

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



[issue3326] py3k shouldn't use -fno-strict-aliasing anymore

2010-06-21 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment:

I think that this change could be backported to 3.1 branch. It doesn't cause 
any additional warnings, which are absent in py3k branch (see issue #8623). 
r79499 doesn't merge cleanly, so I'm attaching the patch for 3.1 branch.

--
nosy: +Arfrever
Added file: http://bugs.python.org/file17732/python-3.1-issue3326.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3326
___
___
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-21 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
stage:  - committed/rejected

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



[issue8623] Aliasing warnings in socketmodule.c

2010-06-21 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue8854] msvc9compiler.py: find_vcvarsall() doesn't work with VS2008 on Windows x64

2010-06-21 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

Benjamin Peterson wrote:
 
 Benjamin Peterson benja...@python.org added the comment:
 
 Applied patch in r82130. Thanks!

Thanks, Benjamin.

--

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



[issue9026] [argparse] Subcommands not printed in the same order they were added

2010-06-21 Thread Javier Collado

Javier Collado javier.coll...@gmail.com added the comment:

Just for the record, please find attached an uglier patch for python  2.7 that 
doesn't have the same problems as the first one I uploaded and passes all the 
test cases (tested with python 2.6).

--
Added file: http://bugs.python.org/file17733/pre27.diff

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



[issue9041] raised exception is misleading

2010-06-21 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Thanks for your report. Unfortunately, 2.6 and 3.1 are stable releases, they 
only get security and documentation fixes. 2.7 is nearly in the same state, 
since it’s at the release candidate stage. Can you check if your bug still 
applies to 3.2 (branch named “py3k”) and propose a patch? Thanks again.

--
nosy: +merwok

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



[issue9044] [optparse] confusion over an option and its value without any space in between

2010-06-21 Thread Brian Curtin

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

I wouldn't say that is confusing -- it is a common usage to have an option 
immediately followed by it's value (see gcc output after running make, -Wall, 
etc).

--
nosy: +brian.curtin
versions: +Python 3.2 -Python 2.6

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



[issue8636] enumerate() test cases do not cover optional start argument

2010-06-21 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
stage: patch review - committed/rejected

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



[issue3326] py3k shouldn't use -fno-strict-aliasing anymore

2010-06-21 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

2010/6/21 Arfrever Frehtes Taifersar Arahesis rep...@bugs.python.org:

 Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the 
 comment:

 I think that this change could be backported to 3.1 branch. It doesn't cause 
 any additional warnings, which are absent in py3k branch (see issue #8623). 
 r79499 doesn't merge cleanly, so I'm attaching the patch for 3.1 branch.

Thanks for the patch. Backported to in r82141.

--

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



[issue9041] raised exception is misleading

2010-06-21 Thread Brian Curtin

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

they only get security and documentation fixes

2.6 does receive bug fixes. 2.5 is the version in security fix only mode.

--
nosy: +brian.curtin

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



[issue9041] raised exception is misleading

2010-06-21 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Thanks Brian, I’ll note that somewhere and be exact in the future.
*has to check the bugs he’s nosy on now to correct comments*

--

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



[issue5468] urlencode does not handle bytes, and could easily handle alternate encodings

2010-06-21 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

The question of whether % escape should be limited to utf-8 or not was 
discussed and decided in favor of 'not' in #3300, quote and unquote.

Last December, a websig post (referenced yesterday on pydev) reported a 
'problem' that would be solved by Miles' suggestion to include parse_qs and 
parse_qsl.

--
nosy: +tjreedy
stage:  - patch review
versions:  -Python 3.0, Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5468
___
___
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-21 Thread Yoda_Uchiha

Yoda_Uchiha mmpyr...@gmail.com added the comment:

But I need those to make windows and screens.

--

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



[issue9045] 2.7rc1: 64-bit OSX installer is not built with 64-bit tkinter

2010-06-21 Thread Sridhar Ratnakumar

New submission from Sridhar Ratnakumar sridh...@activestate.com:

It appears that we are building 64-bit mac installer starting 2.7. For 
http://python.org/ftp/python/2.7/python-2.7rc1-macosx10.5-2010-06-07.dmg

$ file 
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_tkinter.so
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_tkinter.so:
 Mach-O universal binary with 2 architectures
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_tkinter.so
 (for architecture ppc7400): Mach-O bundle ppc
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_tkinter.so
 (for architecture i386):Mach-O bundle i386

$ python2.7 -c import _tkinter
Traceback (most recent call last):
  File string, line 1, inmodule
ImportError: 
dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_tkinter.so,
 2): no suitable image found.  Did find:

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_tkinter.so:
 no matching architecture in universal wrapper
$

--
assignee: ronaldoussoren
components: IDLE, Macintosh, Tkinter
messages: 108292
nosy: ronaldoussoren, srid
priority: normal
severity: normal
status: open
title: 2.7rc1: 64-bit OSX installer is not built with 64-bit tkinter
type: crash
versions: Python 2.7

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



[issue8340] bytearray undocumented on trunk

2010-06-21 Thread Antoine Pitrou

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

'bytes' is an alias for 'str' in 2.x, so it shouldn't be documented 
separately.
As for bytearray, yes, it should be added if not present.

--
nosy: +pitrou

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



[issue9046] Python 2.7rc2 doesn't build on Mac OS X 10.3

2010-06-21 Thread Marc-Andre Lemburg

New submission from Marc-Andre Lemburg m...@egenix.com:

The RC2 builds fine on Mac OS X 10.6 (Snow Leopard), but fails to build any of 
the required extension modules on 10.3:

Python build finished, but the necessary bits to build these modules were not 
found:
_bsddb gdbm   linuxaudiodev
ossaudiodevreadline   spwd
sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the 
module's name.


Failed to build these modules:
_AE_AH_App
_bisect_CarbonEvt _CF
_CG_Cm_codecs_cn
_codecs_hk _codecs_iso2022_codecs_jp
_codecs_kr _codecs_tw _collections
_csv   _Ctl   _ctypes
_ctypes_test   _curses_curses_panel
_Dlg   _Drag  _elementtree
_Evt   _File  _Fm
_Folder_functools _hashlib
_heapq _Help  _hotshot
_IBCarbon  _Icn   _io
_json  _Launch_List
_locale_lsprof_Menu
_Mlte  _multibytecodec_multiprocessing
_OSA   _Qd_Qdoffs
_Qt_random_Res
_Scrap _sha256_sha512
_Snd   _socket_sqlite3
_ssl   _struct_TE
_testcapi  _tkinter   _weakref
_Win   array  audioop
autoGILbinascii   bsddb185
bz2cmath  ColorPicker
cPicklecrypt  cStringIO
datetime   dbmdl
fcntl  future_builtinsgestalt
grpicglue imageop
itertools  MacOS  math
mmap   Navnis
operator   OSATerminology parser
pyexpatresource   select
strop  syslog termios
time   unicodedatazlib

Example:

building '_struct' extension
gcc-4.0 -fno-strict-aliasing -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch 
ppc -arch i386 -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes 
-I/usr/local/src/egenix-build-environment/Python-2.7rc2-ucs2/Mac/Include -I. 
-IInclude -I./Include -I/usr/local/include 
-I/usr/local/src/egenix-build-environment/Python-2.7rc2-ucs2/Include 
-I/usr/local/src/egenix-build-environment/Python-2.7rc2-ucs2 -c _struct.c -o 
build/temp.macosx-10.4-fat-2.7/_struct.o
powerpc-apple-darwin8-gcc-4.0.1: _struct.c: No such file or directory
powerpc-apple-darwin8-gcc-4.0.1: no input files
i686-apple-darwin8-gcc-4.0.1: _struct.c: No such file or directory
i686-apple-darwin8-gcc-4.0.1: no input files
lipo: can't figure out the architecture type of: /var/tmp//cckP7ZEq.out
...

These were the used configure options:

./configure  --prefix=/usr/local/python-2.7-ucs2 --enable-unicode=ucs2 
--enable-universalsdk MACOSX_DEPLOYMENT_TARGET=10.4

--
assignee: ronaldoussoren
components: Build
messages: 108294
nosy: lemburg, ronaldoussoren
priority: normal
severity: normal
status: open
title: Python 2.7rc2 doesn't build on Mac OS X 10.3
versions: Python 2.7

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



[issue9047] Python 2.7rc2 includes -isysroot twice on each gcc command line

2010-06-21 Thread Marc-Andre Lemburg

New submission from Marc-Andre Lemburg m...@egenix.com:

A typical build line looks like this:

gcc-4.0 -c -fno-strict-aliasing -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch 
ppc -arch i386 -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes  -I. 
-IInclude -I./Include -isysroot /Developer/SDKs/MacOSX10.4u.sdk   
-DPy_BUILD_CORE -o Python/codecs.o Python/codecs.c

With older Xcode releases, the above is known not to work at all: gcc simply 
gives up and raises an error. With the latest Xcode available for 10.3 (last 
release + all patches), gcc accepts the extra options, but it's not clear 
whether the resulting code will work... mostly due to #9046: Python 2.7rc2 
doesn't build on Mac OS X 10.3.

The two issues could also be connected.

--
assignee: ronaldoussoren
components: Build
messages: 108295
nosy: lemburg, ronaldoussoren
priority: normal
severity: normal
status: open
title: Python 2.7rc2 includes -isysroot twice on each gcc command line
versions: Python 2.7

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



[issue9047] Python 2.7rc2 includes -isysroot twice on each gcc command line

2010-06-21 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

Note that the duplicate insertion of -isysroot happens because CPPFLAGS was 
changed to include this extra option. 

Since PY_CFLAGS includes both CFLAGS and CPPFLAGS, you get the duplicate 
occurrence.

In Python 2.6, the extra option did appear in CPPFLAGS.

--

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



[issue9046] Python 2.7rc2 doesn't build on Mac OS X 10.3

2010-06-21 Thread Marc-Andre Lemburg

Changes by Marc-Andre Lemburg m...@egenix.com:


--
nosy: +benjamin.peterson

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



[issue9018] os.path.normcase(None) does not raise an error on linux and should

2010-06-21 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

On Sat, Jun 19, 2010 at 08:00:55PM +, Shashwat Anand wrote:
 Why on Mac OS X, it should return s.lower() ?

That is is because some file systems on Mac OS X are case-sensitive.

 def normcase(s):
 Normalize case of pathname.  Has no effect under Posix
 if s is None:  
 raise AttributeError
 return s

It should be a TypeError, not AttributeError. (Attached Test cases
checks it properly)

--
nosy: +orsenthil

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



[issue9046] Python 2.7rc2 doesn't build on Mac OS X 10.3

2010-06-21 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

Some debugging shows that the ext.sources list in setup.py does not include the 
Modules/ prefix for the source files:

*** 
moddirlist=['/usr/local/src/egenix-build-environment/Python-2.7rc2-ucs2/Modules',
 '/usr/local/src/egenix-build-environment/Python-2.7rc2-ucs2/Mac/Modules']

but:

*** Extension _struct: ext.sources=['_struct.c']
*** Extension _ctypes_test: ext.sources=['_ctypes/_ctypes_test.c']
*** Extension _weakref: ext.sources=['_weakref.c']
*** Extension array: ext.sources=['arraymodule.c']
...

--

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



[issue9021] no copy.copy problem description

2010-06-21 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

The intro paragraph currently (3.2a) consists of
This module provides generic (shallow and deep) copying operations.

This could be expanded to '''
Assignment statements create bindings between a target and an object. They 
never duplicate or copy an existing object. For collections that are mutable or 
contain mutable items, a copy is sometimes needed so one can change one copy 
without changing the other. Sequences can be shallow copied by slicing the 
entire sequence(s[:]). (See below for the meaning of 'shallow'.) Some objects 
can be shallow copied with their class constructors (tuple, list, set, dict). 
This module provides generic shallow *and* deep copying operations. The latter 
is not otherwise available in an single operation or call.'''

--
nosy: +tjreedy
versions: +Python 3.1

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



[issue9046] Python 2.7rc2 doesn't build on Mac OS X 10.3

2010-06-21 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

Turns out that find_file() always returns None for the shared mods:

*** module _struct.c in 
['/usr/local/src/egenix-build-environment/Python-2.7rc2-ucs2/Modules', 
'/usr/local/src/egenix-build-environment/Python-2.7rc2-ucs2/Mac/Modules']: 
find_file returned None
*** Extension _struct: ext.sources=['_struct.c']

--

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



[issue9021] no copy.copy problem description

2010-06-21 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Shorter and better version.

Assignment statements create bindings between a target and an object. They 
never duplicate or copy an existing object. For collections that are mutable or 
contain mutable items, a copy is sometimes needed so one can change one copy 
without changing the other. This module provides generic shallow and deep copy 
operations (explained below). Shallow copies can also be obtained by whole 
sequence slicing (s[:]) and some class constructors (tuple, list, set, dict).

--

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



[issue9048] no OS X buildbots in the stable list

2010-06-21 Thread Bill Janssen

New submission from Bill Janssen bill.jans...@gmail.com:

Considering the number of OS X machines running Python programs, it would be 
good idea to get this platform into the stable list of buildbots so that 
releases are checked against it.

--
messages: 108302
nosy: janssen
priority: normal
severity: normal
status: open
title: no OS X buildbots in the stable list
versions: Python 2.7

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



[issue9048] no OS X buildbots in the stable list

2010-06-21 Thread Bill Janssen

Changes by Bill Janssen bill.jans...@gmail.com:


--
components: +None
keywords: +buildbot
versions:  -Python 2.7

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



[issue9046] Python 2.7rc2 doesn't build on Mac OS X 10.3

2010-06-21 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

Instrumenting find_file() a bit:

if sys.platform == 'darwin':
# Honor the MacOSX SDK setting when one was specified.
# An SDK is a directory with the same structure as a real
# system, but with only header files and libraries.
sysroot = macosx_sdk_root()

# Check the standard locations
for dir in std_dirs:
f = os.path.join(dir, filename)

if sys.platform == 'darwin' and is_macosx_sdk_path(dir):
f = os.path.join(sysroot, dir[1:], filename)

print '*** checking standard location %s' % f
if os.path.exists(f): return []

this gives:

*** checking additional location 
/Developer/SDKs/MacOSX10.4u.sdk/usr/local/src/egenix-build-environment/Python-2.7rc2-ucs2/Modules/_struct.c
*** checking additional location 
/Developer/SDKs/MacOSX10.4u.sdk/usr/local/src/egenix-build-environment/Python-2.7rc2-ucs2/Mac/Modules/_struct.c
*** module _struct.c in 
['/usr/local/src/egenix-build-environment/Python-2.7rc2-ucs2/Modules', 
'/usr/local/src/egenix-build-environment/Python-2.7rc2-ucs2/Mac/Modules']: 
find_file returned None
*** Extension _struct: ext.sources=['_struct.c']

So the reason for the failure is that is_macosx_sdk_path(dir) doesn't do what 
it's probably supposed to do, or the code assumes that it's getting relative 
paths in moddirslist rather the absolute paths it is getting.

--

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



[issue9046] Python 2.7rc2 doesn't build on Mac OS X 10.3

2010-06-21 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

Note that I've not checked whether an SDK build works on Mac OS X 10.6. The 
regular build does work.

The problem appears to be related to SDK builds only, e.g. if you plan to build 
Universal binary on Mac OS X 10.3.

--

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



[issue8959] WINFUNCTYPE wrapped ctypes callbacks not functioning correctly in Python 2.7

2010-06-21 Thread Thomas Heller

Thomas Heller thel...@ctypes.org added the comment:

Thanks, Michael, for reporting this issue.

--

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



[issue9049] UnboundLocalError in nested function

2010-06-21 Thread Andreas Hofmeister

New submission from Andreas Hofmeister andreas.hofmeis...@yahoo.de:

Description:
An unexpected UnboundLocalError is produced when assigning a value to a 
variable inside a nested function. The first assignment to the variable is in 
the enclosing function.

Example:
def x():
 a = False
 def y():
 print a
 a = True
 return y

Calling x()() produces an UnboundLocalError on the 'print a' line.
If the 'a = True' line is removed, no error occurs.

Tested with:
  - 2.5.1
  - 2.6.5

Keywords: 
Nested function, UnboundLocalError, variable assignment

Thank you for your attention

--
components: Interpreter Core
messages: 108306
nosy: Andreas Hofmeister
priority: normal
severity: normal
status: open
title: UnboundLocalError in nested function
type: behavior
versions: Python 2.5, Python 2.6

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



[issue9050] UnboundLocalError in nested function

2010-06-21 Thread Andreas Hofmeister

New submission from Andreas Hofmeister andreas.hofmeis...@yahoo.de:

Description:
An unexpected UnboundLocalError is produced when assigning a value to a 
variable inside a nested function. The first assignment to the variable is in 
the enclosing function.

Example:
def x():
 a = False
 def y():
 print a
 a = True
 return y

Calling x()() produces an UnboundLocalError on the 'print a' line.
If the 'a = True' line is removed, no error occurs.

Tested with:
  - 2.5.1
  - 2.6.5

Keywords: 
Nested function, UnboundLocalError, variable assignment

Thank you for your attention

--
components: Interpreter Core
messages: 108307
nosy: Andreas Hofmeister
priority: normal
severity: normal
status: open
title: UnboundLocalError in nested function
type: behavior
versions: Python 2.5, Python 2.6

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



[issue9050] UnboundLocalError in nested function

2010-06-21 Thread Andreas Hofmeister

Andreas Hofmeister andreas.hofmeis...@yahoo.de added the comment:

Duplicate of 9049.

Sorry for the inconvenience.

--
status: open - closed

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



[issue9050] UnboundLocalError in nested function

2010-06-21 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
resolution:  - duplicate
stage:  - committed/rejected

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



[issue9049] UnboundLocalError in nested function

2010-06-21 Thread Mark Dickinson

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

This isn't a bug;  it's by design.

Because there's an assignment to 'a' in the function 'y', 'a' is considered 
local to that function.  (It doesn't matter where the assignment happens within 
the function;  the presence of an assignment anywhere is enough to make 'a' 
local for the entirety of 'y'.)

This is described in the reference manual at:

http://docs.python.org/reference/executionmodel.html#naming-and-binding

See the paragraph beginning:

If a name binding operation occurs anywhere within a code block, 

--
nosy: +mark.dickinson
resolution:  - invalid
status: open - closed

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



[issue9049] UnboundLocalError in nested function

2010-06-21 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
stage:  - committed/rejected

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



[issue9025] Non-uniformity in randrange for large arguments.

2010-06-21 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

'Random', without qualification, is commonly taken to mean 'with uniform 
distribution'. Otherwise it has no specific meaning and could well be a synonym 
for 'arbitrary' or 'haphazard'.

The behavior reported is buggy and in my opinion should be fixed if possible. I 
have done simulation research in the past and do not consider them minor. If I 
had results that depended on these functions, I might want to rerun with the 
fixed versions to make sure the end results were not affected. I would 
certainly want the fixed behavior for any future work.

I do not see any promise of reproducibility of sequences from version to 
version. I do not really see the point as one can rerun with the old Python 
version or copy the older random.py.

The old versions could be kept with with an 'old_' prefix and documented in a 
separate subsection that starts with Do not use these buggy old versions of x 
and y in new code. They are only present for those who want to reproduce old 
sequences. But I wonder how many people would use them.

--
nosy: +tjreedy

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



[issue8949] PyArg_Parse*(): z should not accept bytes

2010-06-21 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

STINNER Victor wrote:
 
 STINNER Victor victor.stin...@haypocalc.com added the comment:
 
 @lemburg: So what is your opinion on this issue?

You're probably right: it's too late to change s to accept buffer
interface compatible objects as well.

In that case, symmetry is more important, so +1 on rejecting bytes
for z as well.

Please add a note to the NEWS file for this change.

--

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



[issue8990] array constructor and array.fromstring should accept bytearray.

2010-06-21 Thread Thomas Jollans

Thomas Jollans tho...@jollans.com added the comment:

Thanks for the input. I'm going to re-work the patch a bit (releasing buffers 
and such) and add a test within the next few days. 

The question remains whether or not to accept other buffers with itemsize == 1. 
The way I understand it, fromstring already accepted any read-only buffer 
object, no matter the item size / whether it actually makes sense to call it a 
string. I don't think accepting a hypothetical read-only buffer with items 
wider than 1 in fromstring (yes, bad naming) is desirable behaviour - I see a 
few options on how to deal with input validation:

1. ignore the item size. This'd be similar to current behaviour, plus r/w 
buffers

2. only accept byte-based buffers. (things that look like 'const char*') - 
this is what I've been aiming at.

3. only accept bytes and bytearray, and let the user think about how to deal 
with other objects. Question is - shouldn't array('B') be treated like 
bytearray in this respect?

--

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



[issue9051] Cannot pickle timezone instances

2010-06-21 Thread Alexander Belopolsky

New submission from Alexander Belopolsky belopol...@users.sourceforge.net:

 s = pickle.dumps(timezone.utc)
 pickle.loads(s)
Traceback (most recent call last):
 ..
TypeError: (Required argument 'offset' (pos 1) not found, class 
'datetime.timezone', ())

--
assignee: belopolsky
messages: 108313
nosy: belopolsky
priority: normal
severity: normal
stage: unit test needed
status: open
title: Cannot pickle timezone instances
type: behavior
versions: Python 3.2

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



[issue9052] 2.7rc2 fails test_urllib_localnet tests on OS X

2010-06-21 Thread Bill Janssen

New submission from Bill Janssen bill.jans...@gmail.com:

% ./python.exe -Wd -3 -E -tt ./Lib/test/regrtest.py -v test_urllib2_localnet
== CPython 2.7rc2 (r27rc2:82137, Jun 21 2010, 12:50:22) [GCC 4.0.1 (Apple Inc. 
build 5493)]
==   Darwin-9.8.0-i386-32bit little-endian
==   /private/tmp/Python-2.7rc2/build/test_python_58063
test_urllib2_localnet
test_proxy_qop_auth_int_works_or_throws_urlerror 
(test.test_urllib2_localnet.ProxyAuthTests) ... ok
test_proxy_qop_auth_works (test.test_urllib2_localnet.ProxyAuthTests) ... ok
test_proxy_with_bad_password_raises_httperror 
(test.test_urllib2_localnet.ProxyAuthTests) ... FAIL
test_proxy_with_no_password_raises_httperror 
(test.test_urllib2_localnet.ProxyAuthTests) ... FAIL
test_200 (test.test_urllib2_localnet.TestUrlopen) ... ok
test_200_with_parameters (test.test_urllib2_localnet.TestUrlopen) ... ok
test_404 (test.test_urllib2_localnet.TestUrlopen) ... ok
test_bad_address (test.test_urllib2_localnet.TestUrlopen) ... ok
test_basic (test.test_urllib2_localnet.TestUrlopen) ... ok
test_geturl (test.test_urllib2_localnet.TestUrlopen) ... ok
test_info (test.test_urllib2_localnet.TestUrlopen) ... ok
test_redirection (test.test_urllib2_localnet.TestUrlopen) ... ok
test_sending_headers (test.test_urllib2_localnet.TestUrlopen) ... ok

==
FAIL: test_proxy_with_bad_password_raises_httperror 
(test.test_urllib2_localnet.ProxyAuthTests)
--
Traceback (most recent call last):
  File /private/tmp/Python-2.7rc2/Lib/test/test_urllib2_localnet.py, line 
264, in test_proxy_with_bad_password_raises_httperror
self.URL)
AssertionError: HTTPError not raised

==
FAIL: test_proxy_with_no_password_raises_httperror 
(test.test_urllib2_localnet.ProxyAuthTests)
--
Traceback (most recent call last):
  File /private/tmp/Python-2.7rc2/Lib/test/test_urllib2_localnet.py, line 
270, in test_proxy_with_no_password_raises_httperror
self.URL)
AssertionError: HTTPError not raised

--
Ran 13 tests in 9.050s

FAILED (failures=2)
test test_urllib2_localnet failed -- multiple errors occurred
1 test failed:
test_urllib2_localnet
/tmp/Python-2.7rc2 397 %

--
messages: 108314
nosy: janssen
priority: high
severity: normal
stage: needs patch
status: open
title: 2.7rc2 fails test_urllib_localnet tests on OS X
type: behavior
versions: Python 2.7

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



[issue9046] Python 2.7rc2 doesn't build on Mac OS X 10.4

2010-06-21 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

Sorry, my bad. The system in question is a 10.4 Tiger system.

--
title: Python 2.7rc2 doesn't build on Mac OS X 10.3 - Python 2.7rc2 doesn't 
build on Mac OS X 10.4

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



[issue9048] no OS X buildbots in the stable list

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

Martin v. Löwis mar...@v.loewis.de added the comment:

stable is also meant to mean typically passes test suite without errors. I 
don't think OSX meets this criterion.

--
nosy: +loewis

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



[issue9045] 2.7rc1: 64-bit OSX installer is not built with 64-bit tkinter

2010-06-21 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

I believe the issue was that there was no supported 64-bit non-X Tk available 
for 10.5. Has that changed?  Otherwise, the build process and Tkinter need to 
be modified to dynamically link with more than one version of Tk, something 
that has been discussed but, AFAIK, not implemented.

--
nosy: +ned.deily

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



[issue9018] os.path.normcase(None) does not raise an error on linux and should

2010-06-21 Thread Ezio Melotti

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

ntpath and macpath raise an AttributeError, so we could:
1) change them all to accept only bytes/str and raise a TypeError for other 
wrong types (correct, consistent, non-backward-compatible);
2) change only posixpath to raise a TypeError for wrong types (partially 
correct, inconsistent, backward-compatible);
3) change only posixpath to raise an AttributeError for wrong types (wrong, 
consistent, backward-compatible);

The option 2 is still an improvement over the current situation, but it would 
be better to find a backward-compatible way to also obtain option 1 (assuming 
that backward compatibility is a concern here -- and I think it is (even though 
people could just change the code to catch (AttributeError, TypeError) and 
eventually get rid of the AttributeError)).

--

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



[issue9018] os.path.normcase(None) does not raise an error on linux and should

2010-06-21 Thread Antoine Pitrou

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

 ntpath and macpath raise an AttributeError, so we could:
 1) change them all to accept only bytes/str and raise a TypeError for
 other wrong types (correct, consistent, non-backward-compatible);

Sounds like the best thing to do.

 The option 2 is still an improvement over the current situation, but
 it would be better to find a backward-compatible way to also obtain
 option 1 (assuming that backward compatibility is a concern here --
 and I think it is (even though people could just change the code to
 catch (AttributeError, TypeError) and eventually get rid of the
 AttributeError)).

This isn't an exception you catch at runtime. It's an exception you get
when your code is wrong, and then you fix your code. Therefore I don't
think backwards compatibility is important.

--

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



[issue9053] distutils compiles extensions so that Python.h cannot be found

2010-06-21 Thread Jean-Paul Calderone

New submission from Jean-Paul Calderone exar...@twistedmatrix.com:

With a checkout of the py3k branch, building an extension module using 
distutils fails:

  error: Python.h: No such file or directory

This is clearly because the wrong -I option is being supplied:

  gcc -pthread -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC 
-I/home/exarkun/Projects/python-signalfd/trunk/Include 
-I/home/exarkun/Projects/python/branches/py3k -c signalfd/_signalfd.c -o 
build/temp.linux-i686-3.2/signalfd/_signalfd.o

Building the extension with Python 3.1 all the way back through Python 2.3 does 
work, though.

--
assignee: tarek
components: Distutils
messages: 108321
nosy: exarkun, tarek
priority: critical
severity: normal
status: open
title: distutils compiles extensions so that Python.h cannot be found
versions: Python 3.1

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



[issue3439] create a numbits() method for int and long types

2010-06-21 Thread Zooko O'Whielacronx

Zooko O'Whielacronx zo...@zooko.com added the comment:

There is a small mistake in the docs:

def bit_length(x):
'Number of bits necessary to represent self in binary.'
s = bin(x)  # binary representation:  bin(-37) -- '-0b100101'
s = s.lstrip('-0b') # remove leading zeros and minus sign
return len(s)   # len('100101') -- 6

is probably supposed to be:

def bit_length(x):
'Number of bits necessary to represent x in binary.'
s = bin(x)  # binary representation:  bin(-37) -- '-0b100101'
s = s.lstrip('-0b') # remove leading zeros and minus sign
return len(s)   # len('100101') -- 6

--
nosy: +zooko

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



[issue9054] pyexpat configured with --with-system-expat is incompatible with expat 2.0.1

2010-06-21 Thread Dave Malcolm

New submission from Dave Malcolm dmalc...@redhat.com:

pyexpat configured with --with-system-expat segfaults in one selftest when 
built against expat 2.0.1

SVN trunk:
$ ./configure --with-system-expat
(with expat-2.0.1)
$ make
$ ./python Lib/test/test_pyexpat.py
[snip]
test_parse_only_xml_data (__main__.sf1296433Test) ... Segmentation fault (core 
dumped)

The issue occurs when an exception happens within a character handler.

When a Python exception is raised inside pyexpat.c:call_character_handler(), it 
invokes pyexpat.c:flag_error() which clears the pyexpat object's handlers, and 
it then sets the expat structure's handler to a no-op handler:
XML_SetCharacterDataHandler(self-itself,
noop_character_data_handler);

The reason why appears to be that python's copy of that code in 
xmlparse.c:doContent() looks like this:
characterDataHandler(handlerArg, dataBuf,
 (int)(dataPtr - (ICHAR *)dataBuf));

(see
http://svn.python.org/view/python/trunk/Modules/expat/xmlparse.c?annotate=77680pathrev=77680#l2544
)

i.e. using:
  #define characterDataHandler (parser-m_characterDataHandler)
to look up the handler each time, thus picking up on the newly installed noop 
handler, whereas the corresponding code in expat 2.0.1 looks like this:

XML_CharacterDataHandler charDataHandler = characterDataHandler;
if (charDataHandler) {
...
for (;;) {
  ...
=charDataHandler(handlerArg, dataBuf,
  (int)(dataPtr - (ICHAR *)dataBuf));
  ...
}
  }

i.e. keeping the old function pointer cached

(gdb) p self-itself-m_characterDataHandler 
$30 = (XML_CharacterDataHandler) 0xf8b370 noop_character_data_handler

(gdb) p charDataHandler
$31 = (XML_CharacterDataHandler) 0xf8daf0 my_CharacterDataHandler

So when the exception is raised and the handler is changed, the local in the 
loop doesn't change, and we're calling the old handler which doesn't allow for 
being in the error-recovery state, and self-handlers[3] is NULL, leading to an 
eventual segfault.

This is with expat-2.0.1-10.fc13.i686 on a Fedora 13 box.

expat's xmlparse.c's caching of the character handler appears to be this
change:
http://expat.cvs.sourceforge.net/viewvc/expat/expat/lib/xmlparse.c?r1=1.157r2=1.158

 Revision 1.158 - (view) (download) (annotate) - [select for diffs] 
 Mon Jul 10 18:59:52 2006 UTC (3 years, 10 months ago) by kwaclaw 
 Branch: MAIN 
 Changes since 1.157: +39 -37 lines 
 Diff to previous 1.157
 Improved fix for issues # 1515266 and # 1515600. Will now preserve the
 failover to default handler logic. Note: clearing the character data handler
 does not take effect immediately anymore.

which is almost 4 years old (2006-07-10)

For reference the issues referred to above are:
http://sourceforge.net/tracker/?func=detailaid=1515266group_id=10127atid=110127
http://sourceforge.net/tracker/?func=detailaid=1515600group_id=10127atid=110127

expat CVS R_2_0_0 has xmlparse.c r1.151 from 2005-12-23
expat CVS R_2_0_1 has xmlparse.c r1.161 from 2007-05-08

So it appears that this clearing the character data handler does not take
effect immediately anymore. is in expat 2.0.1 onwards, but not in 2.0.0

Running:
$ diff -rup ~/coding/python-svn/trunk-clean/Modules/expat
/usr/src/debug/expat-2.0.1/lib/|less
to show the difference between system expat and latest python SVN code
indicates that we're using 2.0.1 as the system copy, and latest Python SVN code
is using a copy of 2.0.0

Looking at http://bugs.python.org/issue1296433 (as per the test name), this was 
fixed in r47191 (see http://svn.python.org/view?view=revrevision=47191 ) on 
2006-07-01, adding a termination clause to the loop within its copy of 
xmlparse.c but this was followed five days later (2006-07-06) with:
http://svn.python.org/view?view=revrevision=47253
which had the log:
 - back out Expat change; the final fix to Expat will be different
 - change the pyexpat wrapper to not be so sensitive to this detail of the
  Expat implementation (the ex-crasher test still passes)

though this change happened before the change in expat on 2006-07-10

So, _if_ I'm reading this right, it appears that Python's pyexpat.c module is 
incompatible with expat 2.0.1: pyexpat expects that when it sets:
XML_SetCharacterDataHandler(self-itself,
noop_character_data_handler);
that my_CharacterDataHandler will no longer be called, but it is, and it 
segfaults during the test.

Working around it appears trivial; I will attach a patch.

--
components: XML
messages: 108323
nosy: dmalcolm
priority: normal
severity: normal
status: open
title: pyexpat configured with --with-system-expat is incompatible with expat 
2.0.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9054
___

[issue9054] pyexpat configured with --with-system-expat is incompatible with expat 2.0.1

2010-06-21 Thread Dave Malcolm

Dave Malcolm dmalc...@redhat.com added the comment:

With the attached patch all of Lib/test/test_pyexpat.py passes.

--
keywords: +patch
Added file: http://bugs.python.org/file17734/fix-issue-9054.patch

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



[issue9054] pyexpat configured with --with-system-expat is incompatible with expat 2.0.1

2010-06-21 Thread Dave Malcolm

Changes by Dave Malcolm dmalc...@redhat.com:


--
stage:  - patch review
type:  - crash
versions: +Python 2.7

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



[issue9054] pyexpat configured with --with-system-expat is incompatible with expat 2.0.1

2010-06-21 Thread Dave Malcolm

Dave Malcolm dmalc...@redhat.com added the comment:

For reference, I'm tracking this downstream here: 
https://bugzilla.redhat.com/show_bug.cgi?id=583931

--

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



[issue8621] uuid.uuid4() generates non-unique values on OSX

2010-06-21 Thread Stefan Krah

Stefan Krah stefan-use...@bytereef.org added the comment:

Reopening since test failures are reported on python-dev:

[...]
test_uuid
test test_uuid failed -- Traceback (most recent call last):
  File /private/tmp/Python-2.7rc2/Lib/test/test_uuid.py, line 472, in 
testIssue8621
self.assertNotEqual(parent_value, child_value)
AssertionError: '8395a08e40454895be537a180539b7fb' == 
'8395a08e40454895be537a180539b7fb'

[...]

--
nosy: +skrah
status: closed - open

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



[issue9052] 2.7rc2 fails test_urllib_localnet tests on OS X

2010-06-21 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Looks like a duplicate of issue 8455.  Leaving open so that someone else could 
sort out the priority.

--
nosy: +belopolsky
superseder:  - buildbot: test_urllib2_localnet failures (Connection refused) 
on Tiger buildbot

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



[issue9055] test_issue_8959_b fails when run from a service

2010-06-21 Thread Paul Moore

New submission from Paul Moore p.f.mo...@gmail.com:

test_issue_8959_b fails when run from a service (in this case, from a 
buildslave running as a service).

It appears to count the number of open windows, expecting a non-zero value. But 
when run as a service, it looks like the return count is (correctly) zero.

FAIL: test_issue_8959_b (ctypes.test.test_callbacks.SampleCallbacksTestCase)
--
Traceback (most recent call last):
 File 
C:\buildslave\trunk.moore-windows\build\lib\ctypes\test\test_callbacks.py,
line 208, in test_issue_8959_b
   self.assertFalse(windowCount == 0)
AssertionError: True is not False

--
assignee: theller
components: ctypes
keywords: buildbot
messages: 108328
nosy: pmoore, theller
priority: normal
severity: normal
status: open
title: test_issue_8959_b fails when run from a service
versions: Python 2.7

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



[issue9018] os.path.normcase(None) does not raise an error on linux and should

2010-06-21 Thread Ezio Melotti

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

Here is the patch.

--
assignee:  - ezio.melotti
components: +Library (Lib)
keywords: +patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file17735/issue9018-2.diff

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



[issue9042] Gettext cache and classes

2010-06-21 Thread v_peter

Changes by v_peter leanmeandonothingmach...@gmail.com:


--
keywords: +patch
versions: +Python 3.2 -Python 2.6
Added file: http://bugs.python.org/file17736/class_cache.diff

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



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

2010-06-21 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Apparently, the failure on OSX is due to the fact that 
urllib.proxy_bypass('localhost') returns True.  This makes the opener to bypass 
the ProxyHandler that is explicitly set up to use the correct server port:

def setUp(self):
..
proxy_url = http://127.0.0.1:%d; % self.server.port
handler = urllib2.ProxyHandler({http : proxy_url})
self.proxy_digest_handler = urllib2.ProxyDigestAuthHandler()
self.opener = urllib2.build_opener(handler, self.proxy_digest_handler)

instead, the opener skips to the default HTTPHandler which attempts to connect 
on port 80 with sad results.

Interestingly,

 urllib.proxy_bypass('127.0.0.1')
False

So the simplest fix is s/localhost/127.0.0.1/ as done in the attached patch 
(issue8455.diff).

--
keywords: +patch
nosy: +belopolsky
Added file: http://bugs.python.org/file17737/issue8455.diff

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



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

2010-06-21 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

In fact, urllib.proxy_bypass() returns True for any simple host name (i.e. any 
string without '.' in it):

 proxy_bypass('xyz')
True
 proxy_bypass('')
True
 proxy_bypass('whatever')
True

I think the fix I am proposing makes sense regardless of platform because 
proxy_url is set up numerically:

proxy_url = http://127.0.0.1:%d; % self.server.port

Maybe the above should be changed to

proxy_url = %s:%d % (self.URL, self.server.port)

once URL is changed to numerical form.

--

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



[issue8621] uuid.uuid4() generates non-unique values on OSX

2010-06-21 Thread Bill Janssen

Bill Janssen bill.jans...@gmail.com added the comment:

This is on an Intel machine running OS X 10.5.8.  I downloaded and built 2.7rc2 
from source with ./configure ; make.  I then ran the tests with make test.  
test_uuid fails with this output:


test test_uuid failed -- Traceback (most recent call last):
  File /private/tmp/Python-2.7rc2/Lib/test/test_uuid.py, line 472, in 
testIssue8621
self.assertNotEqual(parent_value, child_value)
AssertionError: '751ca85de22f4450b7f95dd3f82c7e5f' == 
'751ca85de22f4450b7f95dd3f82c7e5f'

However, when I run the test standalone with this command-line, it passes:

% ./python.exe -Wd -3 -E -tt ./Lib/test/regrtest.py -l test_uuid
test_uuid
1 test OK.

Not sure what's going on.

--
nosy: +janssen

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



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

2010-06-21 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


--
stage:  - patch review

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



[issue9052] 2.7rc2 fails test_urllib_localnet tests on OS X

2010-06-21 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


--
resolution:  - duplicate
status: open - closed

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



[issue3439] create a numbits() method for int and long types

2010-06-21 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

 There is a small mistake in the docs:

Yes there was. Fixed in 82146.

--
nosy: +orsenthil

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



[issue9056] Adding additional level of bookmarks and section numbers in python pdf documents.

2010-06-21 Thread pengyu.ut

New submission from pengyu.ut pengyu...@gmail.com:

Current pdf version of python documents don't have bookmarks for
sussubsection. For example, there is no bookmark for the following
section in python_2.6.5_reference.pdf. Also the bookmarks don't have
section numbers in them. I suggest to include the section numbers.
Could these features be added in future release of python document.

3.4.1 Basic customization

--
assignee: d...@python
components: Documentation
messages: 108334
nosy: d...@python, pengyu.ut
priority: normal
severity: normal
status: open
title: Adding additional level of bookmarks and section numbers in python pdf 
documents.
versions: Python 2.6

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



[issue9051] Cannot pickle timezone instances

2010-06-21 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


--
keywords: +easy, patch
nosy: +mark.dickinson
stage: unit test needed - patch review
Added file: http://bugs.python.org/file17738/issue8455.diff

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



[issue9051] Cannot pickle timezone instances

2010-06-21 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


Removed file: http://bugs.python.org/file17738/issue8455.diff

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



[issue9051] Cannot pickle timezone instances

2010-06-21 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


Added file: http://bugs.python.org/file17739/issue9051.diff

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



[issue9018] os.path.normcase(None) does not raise an error on linux and should

2010-06-21 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

Nice patch. I like the use of new string formating. It can be applied.
 
BTW, do you think that TODO of s.lower() for MAC OS X should be addressed along 
with this. It might require some research as how much of a desirable behavior 
it would be.

--

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



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

2010-06-21 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

Replacing 'http://localhost' with 'http://127.0.0.1' for this test is fine. 

But, urllib.proxy_bypass returning for True for any string, is not correct. In 
the code, I see that Proxy Settings from Mac OSX system configuration is 
obtained by calling _get_proxy_settings().
proxy_settings = _get_proxy_settings()

The is the check to to see if proxy_settings['exclude_simple'] is set.
It seems that, it is set under conditions, which either might be a wrong 
behavior, or we should not rely on this property.

--
nosy: +orsenthil

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



  1   2   >