[issue7028] Add int.hex for symmetry with float.hex

2009-10-02 Thread Mark Dickinson

Mark Dickinson  added the comment:

> Can int.hex() and int.fromhex() be added for symmetry?

On the face of it, adding int.hex (and presumably also long.hex for 2.x)
seems reasonable:  in general, integers should be acceptable where-ever
floats are, and by that argument x.hex() should work regardless of
whether x is an integer or a float.

However, I'm opposed to adding int.hex, for a few reasons:

  - the problem that float.hex solves is special to floats, namely that
the usual representation of a float (via repr) doesn't show the
*exact* value of that float clearly.  This isn't a problem for
integers, Fractions, Decimals, etc.

  - there's no danger of silent errors here:  x.hex() will raise an
exception if x is an integer, giving the programmer an opportunity
to correct this to e.g.  'float(x).hex()', or perhaps
'x.hex() if isinstance(x, float) else hex(x)'.  But which one?
Which leads me to:

  - it's not clear what the output of n.hex() would be:  e.g., should
(3).hex() match (3.0).hex(), or hex(3)?  Or should it be something
else again? I'd suggest that different use-cases would need
different choices here.

  - TSBO---APOO---OWTDI  (see 'import this')

  - I just don't see a real usecase for int.hex.  float.hex is a
little-used but nice-to-have convenience function.  When it's
used, it's almost certainly being used on a float.  Feel free
to give examples of code that would benefit from int.hex.

The case for adding int.fromhex is even weaker: float.fromhex is a class
method, and will usually be called in the form
'float.fromhex(mystring)'.  If you already know you want a hex_string to
int conversion, what's wrong with int(my_string, 16)?

In short, PBP (see 'import this' again).

If you really care about this, you could take the discussion to the
python-ideas mailing list and try to persuade people there; if everyone
feels that int.hex() *should* be added then I'll happily eat my words
and agree to add it.

Raymond, care to offer a second opinion?

--
components: +Interpreter Core -Library (Lib)
nosy: +rhettinger
resolution: out of date -> 
status: closed -> open
title: hex function should work with floats -> Add int.hex for symmetry with 
float.hex
versions: +Python 2.7, Python 3.2 -Python 3.1

___
Python tracker 

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



[issue5097] asyncore.dispatcher_with_send undocumented

2009-10-02 Thread Kandalintsev Alexandre

Kandalintsev Alexandre  added the comment:

Please don't keep this bug open :(

--

___
Python tracker 

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



[issue7028] Add int.hex for symmetry with float.hex

2009-10-02 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

[Josh]
> As in why does neither int.hex() or hex(float) work?

I believe the answer to this is that Guido wanted hex() to be a purely
integer concept.  This was part of a broader effort relating to the
__index__ magic method.  The intent of that method is to be able to
designate functions or methods as taking only integer arguments and
flagging float arguments as errors.  Indexing was a typical example
where arr[3.1] would have gotten coerced to arr[3], possibly hiding an
error in logic.

The current situation represents a trade-off between parallel/consistent
APIs across numeric types versus catching errors for integral functions
that are erroneously fed a real valued argument.

While I personally wished for the consistent API (i.e. hex() supporting
ints and floats), in reality, I've found no real-world use cases where I
needed to map a hexlifying function to mixed input containing both ints
and floats.  That suggests that the use cases are orthogonal and nothing
was really lost by having two different APIs.

--

___
Python tracker 

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



[issue5500] tarfile: path problem in arcname under windows

2009-10-02 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

> The archive is created, and the path in the archive is 
> 'C:\\testtarfile\\testtarfile.py', not 'test/testtarfile.py' 
> as I would expect.

I don't see the path you mention. Which archive manager do you use?
I tried with 7-zip, and it shows that I can browse to a path named
C:\testtarfile\tarfiletst.tar.gz\C:\testtarfile\tarfiletst.tar\test\
which contains testtarfile.py.

C:\testtarfile\tarfiletst.tar.gz contains
"C:\testtarfile\tarfiletst.tar", which itselfs contains
"test\testtarfile.py"

IOW, 7-zip simply fails to understand the .tar.gz format as a single
compressed archive.
To extract it properly, it's easy enough to browse the content until you
open the content of the .tar.

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue7032] Make assertMultilineEqual default for unicode string comparison in

2009-10-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Why only unicode strings?

--
nosy: +pitrou

___
Python tracker 

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



[issue7024] webbrowser : Could not open ftp server using webbrowser.open()

2009-10-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

No problem here, with Firefox 3.0.13 and Python 2.6.3.

--
assignee:  -> georg.brandl
nosy: +georg.brandl, pitrou

___
Python tracker 

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



[issue7024] webbrowser : Could not open ftp server using webbrowser.open()

2009-10-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

If you are under GNOME, you might fire gconf-editor and check the value
of the keys in /desktop/gnome/url-handlers/ftp.

--

___
Python tracker 

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



[issue7032] Make assertMultilineEqual default for unicode string comparison in

2009-10-02 Thread Michael Foord

Michael Foord  added the comment:

Because diffing binary data isn't useful...

This is the reason that assertMultilineEqual isn't already the default
for comparing strings - because in Python 2 when you have strings you
don't know if the intention is for them to contain textual information
or binary information.

--

___
Python tracker 

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



[issue7032] Make assertMultilineEqual default for unicode string comparison in

2009-10-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Because diffing binary data isn't useful...

But often it's non-binary data ;)

> This is the reason that assertMultilineEqual isn't already the default
> for comparing strings - because in Python 2 when you have strings you
> don't know if the intention is for them to contain textual information
> or binary information.

You could have a heuristic which counts the number of "\n" bytes and, if
there are more than 1/80th of them, you're likely to have some text.

(80 being the typical max line length)

--

___
Python tracker 

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



[issue7032] Make assertMultilineEqual default for unicode string comparison in

2009-10-02 Thread Michael Foord

Michael Foord  added the comment:

Heh - all ascii would be a better heuristic, or zero null characters
perhaps. But 2.X is destined to die anyway so I'm happy for it to only
be the default for unicode strings without implementing potentially
complex, wrong and slow heuristics.

Users can always register it themselves using addTypeEqualityFunc if
they want.

--

___
Python tracker 

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



[issue2986] difflib.SequenceMatcher not matching long sequences

2009-10-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The popularity heuristic could be tuned to depend on the number N of
distinct elements in the sequence, and kick in if an element appears say
more than 1/(N**0.5) of the time.

--
nosy: +pitrou

___
Python tracker 

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



[issue7033] C/API - Document exceptions

2009-10-02 Thread lekma

New submission from lekma :

It would be nice to have an obvious/simple way to document C exceptions
(especially when using the autoexception feature from Sphinx).

Something along:

PyObject *PyErr_Create(char *name, const char *doc)
Creates and returns a new exception object.
This behaves like PyErr_Create2() with base set to NULL.

PyObject *PyErr_Create2(char *name, const char *doc, PyObject *base)
Creates and returns a new exception object.
The name argument must be the name of the new exception, a C string
of the form module.class.
If doc is non-NULL, it will be used to define the docstring for the
exception.
if base is NULL, it creates a class object derived from Exception
(accessible in C as PyExc_Exception).

for py3k the signatures would be:
PyObject *PyErr_Create(const char *name, const char *doc)
PyObject *PyErr_Create2(const char *name, const char *doc, PyObject *base)

Internally, these functions would pass a dict to PyErr_NewException with
the key '__doc__' set to doc.

If there is support for this, I can provide patches for trunk and py3k.

--
components: Interpreter Core
messages: 93439
nosy: lekma
severity: normal
status: open
title: C/API - Document exceptions
type: feature request
versions: Python 2.7, Python 3.2

___
Python tracker 

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



[issue4120] Do not embed manifest files in *.pyd when compiling with MSVC

2009-10-02 Thread Koen van de Sande

Koen van de Sande  added the comment:

Could msvc9compiler_stripruntimes.diff still be considered for 
inclusion in Python 2.6.3 (high priority?)?
A lot of .pyd's of third-party extensions are getting dependencies on 
MSVCR90 added to the .pyd, which makes them not work if the runtimes 
are not installed into the WinSxS folder and/or when embedding into 
other applications. For example, PIL encountered this problem recently. 
In essence, all Windows Python extensions built using setup.py 
build_ext encounter this problem.
What the patch does is edit the manifest file to remove only the 
dependency on Microsoft.VC90.CRT.

--

___
Python tracker 

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



[issue4120] Do not embed manifest files in *.pyd when compiling with MSVC

2009-10-02 Thread Koen van de Sande

Koen van de Sande  added the comment:

It probably won't make 2.6.3 as the final is just out. But can we have 
it for 2.6.4?
Here's a link to the relevant discussion on ImageSIG: http://
mail.python.org/pipermail/image-sig/2009-October/005918.html

Looking at my local extensions installed, Matplotlib has applied this 
patch, but PyGame and PIL have embedded manifests with dependencies on 
the runtime in their .pyd's.

The patch now does a text search/replace on an XML file, if you think 
this is bad style I could rewrit it to use proper XML parsing and 
writing.

--

___
Python tracker 

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



[issue7034] While Loop Bug on a game of 21, help!

2009-10-02 Thread Nathan Ball

New submission from Nathan Ball :

I'm learning Python in Computer Class... and I've gone nuts trying to 
figure out why my code for a 2-player game of 21 (blackjack without the 
gambling connotation, I guess... not to mention my innacuracy of 
dealing only one card to start (which I know isn't affecting my 
glitched code)) has a glitched While loop...

my while loop has a lot within it... which is what's making it so hard 
to debug...

If you can tell me why my code is so bugged, I beg of you, let me 
know...

(Oh, and my classmate is saying my code is too long for it... when I 
want it to look like a decent game and not a crapshoot. >.>)

--
components: IDLE
files: 21-2Player.py
messages: 93442
nosy: PixelHead777
severity: normal
status: open
title: While Loop Bug on a game of 21, help!
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file15019/21-2Player.py

___
Python tracker 

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



[issue7034] While Loop Bug on a game of 21, help!

2009-10-02 Thread Ezio Melotti

Ezio Melotti  added the comment:

The bug tracker is for Python bugs, not for helping people to find bugs
in their programs.

--
nosy: +ezio.melotti
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue7034] While Loop Bug on a game of 21, help!

2009-10-02 Thread PixelHead777

PixelHead777  added the comment:

(New to the site, sorry...)

--

___
Python tracker 

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



[issue7035] codecs error handlers lack documentation

2009-10-02 Thread Ole Laursen

New submission from Ole Laursen :

import codecs
help(codecs.replace_errors)

results in 

replace_errors(...)
(END)

in Python 2.6. Interestingly, http://docs.python.org/library/codecs
actually says "Implements the replace error handling." Which is pretty
useless, though. :) Suggest at least copying the parenthesized notes in
the next-to-last paragraph under codecs.register to the docstrings.

I was looking for docs in the hope of finding something fancy ala
converting æ to ae, alas no cigar.

--
assignee: georg.brandl
components: Documentation
messages: 93445
nosy: georg.brandl, olau
severity: normal
status: open
title: codecs error handlers lack documentation
type: feature request

___
Python tracker 

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



[issue5097] asyncore.dispatcher_with_send undocumented

2009-10-02 Thread R. David Murray

R. David Murray  added the comment:

Oh, we sometimes keep bugs open for years around here, until someone
finds time to deal with them.  It's our collective memory...thanks for
taking a crack at the wording.  If you feel like turning it into a patch
against the documentation (which is in the Doc directory of a CVS
checkout, see http://www.python.org/dev for more info on how to generate
a patch), someone might get to it sooner.

--
nosy: +r.david.murray
priority:  -> normal
stage:  -> needs patch
versions: +Python 3.2 -Python 2.4, Python 2.5, Python 3.0

___
Python tracker 

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



[issue5097] asyncore.dispatcher_with_send undocumented

2009-10-02 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue3786] _curses, _curses_panel & _multiprocessing can't be build in 2.6b3 w/ SunStudio 12

2009-10-02 Thread noon

Changes by noon :


--
nosy: +noon

___
Python tracker 

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



[issue7036] Doc/reference/datamodel: Slots description needs update

2009-10-02 Thread Sebastian Thiel

New submission from Sebastian Thiel :

The section starting with:
"If a class defines a slot also defined in a base class, the instance
variable
  defined by the base class slot is inaccessible rendering the meaning
of the
  program undefined. [...]"

would need to be revisited as it claims that a check for this issue
might be added in future. As far as I can tell, it has been added in
Python 2.4 or earlier as I get a TypeError in that case.

The attached diff is my attempt to fix this issue.

Kind Regards, 
Sebastian

--
assignee: georg.brandl
components: Documentation
files: docfix.diff
keywords: patch
messages: 93447
nosy: Byron, georg.brandl
severity: normal
status: open
title: Doc/reference/datamodel: Slots description needs update
type: behavior
versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 
3.1, Python 3.2
Added file: http://bugs.python.org/file15020/docfix.diff

___
Python tracker 

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



[issue7033] C/API - Document exceptions

2009-10-02 Thread lekma

lekma  added the comment:

First attempt at implementing this.
Diff is against trunk.

--
keywords: +patch
Added file: http://bugs.python.org/file15021/issue7033_trunk.diff

___
Python tracker 

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



[issue7033] C/API - Document exceptions

2009-10-02 Thread lekma

lekma  added the comment:

The same against py3k

--
Added file: http://bugs.python.org/file15022/issue7033_py3k.diff

___
Python tracker 

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



[issue7036] Doc/reference/datamodel: Slots description needs update

2009-10-02 Thread Sebastian Thiel

Sebastian Thiel  added the comment:

Additional Information:

"multiple bases have instance lay-out conflict"

This happens only if I add __slots__ to the bases so that there is no
dict. I can reproduce this easily by indirectly deriving a class from
two bases that both define the same slot. 
It only happens if all classes define __slots__ so there is no dict.

class ac( object ):
__slots__ = "a"

class bc( ac ):
__slots__ = "b"

class cc( ac ):
__slots__ = "c"

class cannotbecreated( bc,cc ):
 pass
 # raises an error.

Actually I don't know whether this is intended or if it is related to
the documentation section I pointed at.

--

___
Python tracker 

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



[issue7037] test_asynchat fails on os x 10.6

2009-10-02 Thread Jan Hosang

New submission from Jan Hosang :

Loads of outputs like
test_string_producer (test.test_asynchat.TestAsynchat_WithPoll) ... 
error: uncaptured python exception, closing channel 
 (:[Errno 9] Bad file descriptor 
[/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/asyncor
e.py|readwrite|107] 
[/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/asyncor
e.py|handle_expt_event|441] [|getsockopt|1] 
[/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/socket.
py|_dummy|165])

Test says it passes, though. Complete output is attached.

--
files: test_asynchat.fail
messages: 93452
nosy: chuck
severity: normal
status: open
title: test_asynchat fails on os x 10.6
versions: Python 2.6
Added file: http://bugs.python.org/file15023/test_asynchat.fail

___
Python tracker 

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



[issue7037] test_asynchat fails on os x 10.6

2009-10-02 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
assignee:  -> josiahcarlson
components: +Library (Lib), Tests
nosy: +josiahcarlson
priority:  -> normal
stage:  -> needs patch
type:  -> behavior

___
Python tracker 

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



[issue7038] test_curses fails on os x 10.6

2009-10-02 Thread Jan Hosang

New submission from Jan Hosang :

test_curses
test test_curses crashed -- : endwin() returned 
ERR
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/test/re
grtest.py", line 549, in runtest_inner
the_package = __import__(abstest, globals(), locals(), [])
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/test/te
st_curses.py", line 279, in 
curses.endwin()
error: endwin() returned ERR
1 test failed:
test_curses

--
messages: 93453
nosy: chuck
severity: normal
status: open
title: test_curses fails on os x 10.6
versions: Python 2.6

___
Python tracker 

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



[issue7039] test_distutils fails on os x 10.6

2009-10-02 Thread Jan Hosang

New submission from Jan Hosang :

FAIL: test_get_python_inc 
(distutils.tests.test_sysconfig.SysconfigTestCase)
--
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distuti
ls/tests/test_sysconfig.py", line 54, in test_get_python_inc
self.assert_(os.path.isdir(inc_dir), inc_dir)
AssertionError: /Users/ronald/Projects/python/r263/Include

--

--
components: Library (Lib), Tests
messages: 93454
nosy: chuck
severity: normal
status: open
title: test_distutils fails on os x 10.6
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue7040] test_smtplib fails on os x 10.6

2009-10-02 Thread Jan Hosang

New submission from Jan Hosang :

Output like:
testAUTH_PLAIN (test.test_smtplib.SMTPSimTests) ... error: uncaptured 
python exception, closing channel  (:[Errno 9] Bad file 
descriptor 
[/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/asyncor
e.py|readwrite|107] 
[/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/asyncor
e.py|handle_expt_event|441] [|getsockopt|1] 
[/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/socket.
py|_dummy|165])

Probably related to #7037 . Complete output attached.

--
components: Library (Lib), Tests
files: test_smtplib.fail
messages: 93455
nosy: chuck
severity: normal
status: open
title: test_smtplib fails on os x 10.6
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file15024/test_smtplib.fail

___
Python tracker 

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



[issue7041] test_macostools fails on os x 10.6

2009-10-02 Thread Jan Hosang

New submission from Jan Hosang :

test_macostools
test_copy (test.test_macostools.TestMacostools) ... ERROR
test_mkalias (test.test_macostools.TestMacostools) ... ERROR
test_mkalias_relative (test.test_macostools.TestMacostools) ... ERROR
test_touched (test.test_macostools.TestMacostools) ... ok

==
ERROR: test_copy (test.test_macostools.TestMacostools)
--
Traceback (most recent call last):
  File "/Users/jan/src/python26/Lib/test/test_macostools.py", line 65, 
in test_copy
macostools.copy(test_support.TESTFN, TESTFN2)
  File "/Users/jan/src/python26/Lib/plat-mac/macostools.py", line 114, 
in copy
srcfss = File.FSSpec(src)
AttributeError: 'module' object has no attribute 'FSSpec'

==
ERROR: test_mkalias (test.test_macostools.TestMacostools)
--
Traceback (most recent call last):
  File "/Users/jan/src/python26/Lib/test/test_macostools.py", line 73, 
in test_mkalias
macostools.mkalias(test_support.TESTFN, TESTFN2)
  File "/Users/jan/src/python26/Lib/plat-mac/macostools.py", line 46, in 
mkalias
dstfsr, dstfss = Res.FSCreateResourceFile(dstdirfsr, 
unicode(dstname),
AttributeError: 'module' object has no attribute 'FSCreateResourceFile'

==
ERROR: test_mkalias_relative (test.test_macostools.TestMacostools)
--
Traceback (most recent call last):
  File "/Users/jan/src/python26/Lib/test/test_macostools.py", line 88, 
in test_mkalias_relative
macostools.mkalias(test_support.TESTFN, TESTFN2, sys.prefix)
  File "/Users/jan/src/python26/Lib/plat-mac/macostools.py", line 46, in 
mkalias
dstfsr, dstfss = Res.FSCreateResourceFile(dstdirfsr, 
unicode(dstname),
AttributeError: 'module' object has no attribute 'FSCreateResourceFile'

--
Ran 4 tests in 0.006s

FAILED (errors=3)
test test_macostools failed -- errors occurred; run in verbose mode for 
details
1 test failed:
test_macostools

--
components: Library (Lib), Tests
messages: 93456
nosy: chuck
severity: normal
status: open
title: test_macostools fails on os x 10.6
versions: Python 2.6

___
Python tracker 

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



[issue7042] test_signal fails on os x 10.6

2009-10-02 Thread Jan Hosang

New submission from Jan Hosang :

==
FAIL: test_itimer_virtual (test.test_signal.ItimerTest)
--
Traceback (most recent call last):
  File "/Users/jan/src/python26/Lib/test/test_signal.py", line 368, in 
test_itimer_virtual
self.assertEquals(signal.getitimer(self.itimer), (0.0, 0.0))
AssertionError: (0.179936001, 0.20001) != (0.0, 0.0)

--

Complete output attached.

--
components: Library (Lib), Tests
files: test_signal.fail
messages: 93457
nosy: chuck
severity: normal
status: open
title: test_signal fails on os x 10.6
versions: Python 2.6
Added file: http://bugs.python.org/file15025/test_signal.fail

___
Python tracker 

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



[issue4120] Do not embed manifest files in *.pyd when compiling with MSVC

2009-10-02 Thread Christoph Gohlke

Christoph Gohlke  added the comment:

There are two easy to fix issues with the
msvc9compiler_stripruntimes.diff patch: 1) the dependency for 64-bit
VC90.CRT is not removed and 2) the VC90.CRT dependency is removed also
from executables, which will fail to run. A revised patch is attached.
This is used to build the Matplotlib binaries for Windows and also works
for numpy, pygame and PIL.

--
nosy: +cgohlke
Added file: 
http://bugs.python.org/file15026/msvc9compiler_stripruntimes_revised.diff

___
Python tracker 

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



[issue7039] test_distutils fails on os x 10.6

2009-10-02 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

What version of Python are you running precisely ?

--
assignee:  -> tarek
components: +Distutils -Library (Lib), Tests
nosy: +tarek

___
Python tracker 

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



[issue7037] test_asynchat fails on os x 10.6

2009-10-02 Thread Ned Deily

Ned Deily  added the comment:

This is a duplicate of Issue5798, the fix for which has not been 
backported to 2.6.  It is also not limited to OS X 10.6.

--
nosy: +ned.deily

___
Python tracker 

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



[issue7038] test_curses fails on os x 10.6

2009-10-02 Thread Ned Deily

Ned Deily  added the comment:

Running the test standalone works for me running under Terminal.app:

$ echo $TERM
xterm-color
$ cd /Library/Frameworks/Python.framework/Versions/2.6
$ bin/python2.6 lib/python2.6/test/regrtest.py -u curses test_curses
test_curses
1 test OK.

It's probably failing because of your terminal type or some other 
environment issue.  How are you running it?

--
nosy: +ned.deily

___
Python tracker 

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



[issue6516] reset owner/group to root for distutils tarballs

2009-10-02 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

done in r75192 and r75194. Thanks Till !

--
status: open -> closed

___
Python tracker 

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



[issue7043] test_urllib: constructLocalFileUrl returns invalid URLs on Windows

2009-10-02 Thread Sridhar Ratnakumar

New submission from Sridhar Ratnakumar :

This error happens on Windows. The culprit seems to be the
`constructLocalFileUrl` method that is constructing invalid URLs.

Traceback (most recent call last):
  File "C:\Python26\lib\test\test_urllib.py", line 241, in test_copy
test_support.TESTFN), second_temp)
  File "C:\Python26\lib\urllib.py", line 94, in urlretrieve
return _urlopener.retrieve(url, filename, reporthook, data)
  File "C:\Python26\lib\urllib.py", line 238, in retrieve
fp = self.open(url, data)
  File "C:\Python26\lib\urllib.py", line 206, in open
return getattr(self, name)(url)
  File "C:\Python26\lib\urllib.py", line 468, in open_file
return self.open_local_file(url)
  File "C:\Python26\lib\urllib.py", line 482, in open_local_file
raise IOError(e.errno, e.strerror, e.filename)
IOError: [Errno 22] The filename, directory name, or volume label syntax
is incorrect: '\\C|\\docume~1\\apy\\locals~1\\temp\\autotes...@test'

--
components: Tests
messages: 93463
nosy: srid
severity: normal
status: open
title: test_urllib: constructLocalFileUrl returns invalid URLs on Windows
type: behavior
versions: Python 2.6

___
Python tracker 

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



[issue7039] test_distutils fails on os x 10.6

2009-10-02 Thread Ned Deily

Ned Deily  added the comment:

I don't know how it works on other platforms but test_get_python_inc is 
incorrect when run, as in this case, from a user-installed python rather 
than as part of a build of python.

The relevant code in test_sysconfig.py:

>>> (srcdir,) = sysconfig.get_config_vars('srcdir')
>>> srcdir
'/Users/ronald/Projects/python/r263'
>>> inc_dir = sysconfig.get_python_inc()
>>> inc_dir
'/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6'

That's where Python.h exists in an OS X framework install.  The srcdir 
captured is useless on other than the build machine; there is none.  
(People who build OS X python installers don't see this problem when 
they run the tests on a machine which happens to have a build directory 
in the same location.)

--
nosy: +ned.deily, ronaldoussoren

___
Python tracker 

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



[issue7040] test_smtplib fails on os x 10.6

2009-10-02 Thread Ned Deily

Ned Deily  added the comment:

Appears to be a duplicate of Issue3620.  It is also not limited to 10.6.

--
nosy: +ned.deily

___
Python tracker 

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



[issue7039] test_distutils fails on os x 10.6

2009-10-02 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

Ok thanks,

--
priority:  -> normal
resolution:  -> accepted
versions: +Python 2.6, Python 3.1, Python 3.2

___
Python tracker 

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



[issue7041] test_macostools fails on os x 10.6

2009-10-02 Thread Ned Deily

Ned Deily  added the comment:

This test works for me using the 2.6.3 installer which is 32-bit only.

It will fail, though, on a 64-bit build since Apple does not supply 64-bit 
versions of the Carbon frameworks used by these modules.  That's why they 
are deprecated and have been removed in python 3.  You can see the same 
failure using Apple's 64-bit python 2.6 in 10.6. You'll also see it on 
10.5 with 64-bit.

--
nosy: +ned.deily, ronaldoussoren

___
Python tracker 

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



[issue7039] test_distutils fails on os x 10.6

2009-10-02 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

done in r75199 Thanks ! (this problem was fixed in trunk/py3k earlier,
so only concerns 2.6 branch)

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

___
Python tracker 

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



[issue6845] Restart support in binary upload for ftplib

2009-10-02 Thread Pablo Mouzo

Pablo Mouzo  added the comment:

I attached some tests.

--
Added file: http://bugs.python.org/file15027/issue6845.diff

___
Python tracker 

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



[issue7042] test_signal fails on os x 10.6

2009-10-02 Thread Ned Deily

Ned Deily  added the comment:

test_signal does not fail for me on 10.6 using the python.org 2.6.3 
installer (which is 32-bit).  The test hangs (presumably in the wait 
loop) with a 10.6 64-bit build of Python 2.6.3rc1.  FWIW, the 2.6.3 
test_signal seems to run OK with Apple's 64-bit python2.6.2 in 10.6. 
What kind of build and on what kind of machine were you running this?

There are other issues open that report similar problems running 
test_signal on other OS's: http://bugs.python.org/issue5972, which was 
reported against Red Hat Linux 4.1.2, and possibly 
http://bugs.python.org/issue3864 on FreeBSD.  Perhaps there's a common 
thread here.

--
nosy: +ned.deily, ronaldoussoren

___
Python tracker 

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



[issue7039] test_distutils fails on os x 10.6

2009-10-02 Thread Ned Deily

Ned Deily  added the comment:

Thanks, I should have looked in trunk first.  I thought you had fixed this 
already.

--

___
Python tracker 

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



[issue7028] Add int.hex for symmetry with float.hex

2009-10-02 Thread Josh Cogliati

Josh Cogliati  added the comment:

Well, I think think I would at least like the sections in the Library
reference documentation should mention the other functions.  I.e. the
following should have cross references:

A. 2. Built-in Functions hex() should cross reference float.hex()
B. 2. Built-in Functions float() should cross reference float.fromhex()
C. 5.4.3. Additional Methods on Float float.hex() should cross reference
hex()
D. 5.4.3. Additional Methods on Float float.fromhex() should cross
reference int(x,16)

As well, the documentation strings for hex, float.hex and float.fromhex
should mention the alternative functions. 

I am not sure about B, but I think in the documentation the alternative
functions should be mentioned.  

I can prepare a documentation patch, if you think it would be useful (it
may take a week or two). I would not have filed this bug if A. had
existed since the hex documentation was the first place I looked.  

Thank you.

--

___
Python tracker 

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



[issue7044] urllib.urlopen crashes when used on Mac OS 10.6.1 through a proxy

2009-10-02 Thread jweber

New submission from jweber :

In Python 2.6.3 on Mac OS 10.6.1, there is a bug in 
lib/python2.6/urllib.py, line 1367. The variable hostIP is used before 
it's defined. You can fix it by adding "hostIP = None" at around line 
1355. I got the following exception when calling urllib.urlopen using a 
proxy:

  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.
py", line 87, in urlopen
return opener.open(url)
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.
py", line 206, in open
return getattr(self, name)(url)
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.
py", line 317, in open_http
if proxy_bypass(realhost):
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.
py", line 1398, in proxy_bypass
return proxy_bypass_macosx_sysconf(host)
  File 
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib.
py", line 1367, in proxy_bypass_macosx_sysconf
if hostIP is None:
UnboundLocalError: local variable 'hostIP' referenced before assignment

--
assignee: ronaldoussoren
components: Macintosh
messages: 93473
nosy: jweber, ronaldoussoren
severity: normal
status: open
title: urllib.urlopen crashes when used on Mac OS 10.6.1 through a proxy
type: crash
versions: Python 2.6

___
Python tracker 

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



[issue7044] urllib.urlopen crashes when used on Mac OS 10.6.1 through a proxy

2009-10-02 Thread jweber

jweber  added the comment:

Let me know if you need me to create a test caseit doesn't seem to 
happen in all situations.

--

___
Python tracker 

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



[issue7045] utf-8 encoding error

2009-10-02 Thread Arc Riley

New submission from Arc Riley :

The following is a minimal example which does not work under Python
3.1.1 but functions as expected on Pyhton 2.6 and 3.0.

Python 3.1.1 believes the single UTF-8 glyph is two entirely different
(and illegal) unicode characters:

Traceback (most recent call last):
  File "t.py", line 2, in 
print('𐑛')
UnicodeEncodeError: 'utf-8' codec can't encode character '\ud801' in
position 0: surrogates not allowed

Test system is Ubuntu 9.10-beta 32-bit

--
components: Interpreter Core
files: t.py
messages: 93475
nosy: ArcRiley
severity: normal
status: open
title: utf-8 encoding error
type: behavior
versions: Python 3.1
Added file: http://bugs.python.org/file15028/t.py

___
Python tracker 

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



[issue7045] utf-8 encoding error

2009-10-02 Thread Arc Riley

Arc Riley  added the comment:

While t.py only bugs on 3.1, the following happens with 3.0 as well:

>>> line = '𐑑𐑧𐑕𐑑𐑦𐑙'
>>> first = '𐑑'
>>> first
'𐑑'
>>> line[0]
'\ud801'
>>> line[0] == first
False

And with 2.6:
>>> line = u'𐑑𐑧𐑕𐑑𐑦𐑙'
>>> first = u'𐑑'
>>> first
u'\ud801\udc51'

--
versions: +Python 2.6, Python 3.0

___
Python tracker 

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



[issue7043] test_urllib: constructLocalFileUrl returns invalid URLs on Windows

2009-10-02 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
assignee:  -> orsenthil
nosy: +orsenthil

___
Python tracker 

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



[issue7006] The replacement suggested for callable(x) in py3k is not equivalent

2009-10-02 Thread Nick Coghlan

Nick Coghlan  added the comment:

hasattr(type(x), "__call__") is technically a more valid replacement due
to the usual matter of metaclass confusion.

(Although putting special methods on instance objects is a recipe for
trouble in more ways than just this one).

--
nosy: +ncoghlan

___
Python tracker 

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



[issue7006] The replacement suggested for callable(x) in py3k is not equivalent

2009-10-02 Thread Nick Coghlan

Nick Coghlan  added the comment:

Although we should seriously consider properly exposing special method
lookup at the Python level...

--

___
Python tracker 

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



[issue7006] The replacement suggested for callable(x) in py3k is not equivalent

2009-10-02 Thread Ezio Melotti

Ezio Melotti  added the comment:

Benjamin already replaced hasattr(x, "__call__") with hasattr(type(x),
"__call__") in the Python 3.0 "What's New" in r75090 and r75094, but
this still doesn't match completely the behavior of callable():

>>> class Foo(object): pass
...
>>> foo = Foo()
>>> callable(foo)
False
>>> hasattr(type(foo), '__call__')
True
>>> foo()
Traceback (most recent call last):
  File "", line 1, in 
TypeError: 'Foo' object is not callable

There are also other places where hasattr(x, "__call__") is still
suggested/used (e.g. PEP3100).

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue7042] test_signal fails on os x 10.6

2009-10-02 Thread Jan Hosang

Jan Hosang  added the comment:

This is a 64 bit machine and the test failed for the checkout of the 
python26-maint branch. I just configured and made it without any flags. 
(Does that produce a 64 bit build?)

--

___
Python tracker 

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