[issue5954] PyFrame_GetLineNumber

2009-05-07 Thread Jeffrey Yasskin

New submission from Jeffrey Yasskin :

Most uses of PyCode_Addr2Line
(http://www.google.com/codesearch?q=PyCode_Addr2Line) are just trying to
get the line number of a specified frame, but there's no way to do that
directly. Forcing people to go through the code object makes them know
more about the guts of the interpreter than they should need. The
proposed PyFrame_GetLineNumber provides a more obvious and direct way to
do the same thing.

If this goes in, we might be able to deprecate PyCode_Addr2Line
entirely. The uses of PyCode_Addr2Line that don't get the line of a
particular frame seem to be getting the line from a traceback (for
example,
http://www.google.com/codesearch/p?hl=en#u_9_nDrchrw/pygame-1.7.1release/src/base.c&q=PyCode_Addr2Line),
which is replaced by the tb_lineno field.

--
components: Interpreter Core
files: PyFrame_GetLineNumber.patch
keywords: needs review, patch
messages: 87360
nosy: collinwinter, jyasskin
severity: normal
stage: patch review
status: open
title: PyFrame_GetLineNumber
type: feature request
versions: Python 2.7
Added file: http://bugs.python.org/file13909/PyFrame_GetLineNumber.patch

___
Python tracker 

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



[issue1731717] race condition in subprocess module

2009-05-07 Thread djc

Changes by djc :


--
nosy: +djc

___
Python tracker 

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



[issue5846] Deprecate obsolete functions in unittest

2009-05-07 Thread Georg Brandl

Georg Brandl  added the comment:

I'm sure Gerhard wouldn't say no to changing the sqlite3 test prefix to
"test_"...

--

___
Python tracker 

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



[issue3992] removed custom log from distutils

2009-05-07 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

I still don't see the need to :

- rename Log to Logger
- remove DEBUG, INFO, WARN, ERROR, FATAL from the module

In the next version of python we will have to keep them 
in any case and add a deprecation warning
because third party tools might use them.

The only thing we have to add is the "logger" global variable that
will let us use the logging module (protected as you said by the 
ImportError


so basically:

try:
  import logging
  logger = _global_log = logging.getLogger('distutils')
except ImportError:
  logger = _global_log = Log()

--

___
Python tracker 

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



[issue5918] test_parser crashes when run after some other tests

2009-05-07 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

It's actually an array bounds read error in parsermodule.c::validate_try.
Purify detects it, if you disable pymalloc; distutils is innocent. 

Patch attached.

--
keywords: +patch
nosy: +amaury.forgeotdarc
Added file: http://bugs.python.org/file13910/parser.patch

___
Python tracker 

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



[issue5952] AttributeError exception in urllib.urlopen

2009-05-07 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Sorry, we need more information to diagnose the problem.
What did you try? Can you provide a minimal example?

Does this reproduce with newer python versions? 2.4 is quite an old
version and will not be corrected.

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue5955] aifc: close() does not close the underlying file

2009-05-07 Thread Amaury Forgeot d'Arc

New submission from Amaury Forgeot d'Arc :

Seen on Windows buildbot:
'test_aifc' left behind file '@test' and it couldn't be removed: [Error
32] The process cannot access the file because it is being used by
another process: '@test'

This is because Aifc_read.close() does not close the underlying file.

--
assignee: r.david.murray
messages: 87365
nosy: amaury.forgeotdarc, benjamin.peterson, r.david.murray
severity: normal
status: open
title: aifc: close() does not close the underlying file

___
Python tracker 

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



[issue5442] [3.1alpha1, 2, beta1] test_importlib fails on Mac OSX 10.5.6

2009-05-07 Thread Ismail Donmez

Ismail Donmez  added the comment:

Fails in beta1.

--
title: [3.1alpha1,2] test_importlib fails on Mac OSX 10.5.6 -> 
[3.1alpha1,2,beta1] test_importlib fails on Mac OSX 10.5.6

___
Python tracker 

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



[issue5941] customize_compiler broken

2009-05-07 Thread Cournapeau David

Cournapeau David  added the comment:

Ok, here is a patch which fixes the issue while retaining the AR
customization. Here is what it does:

 - configure defines both AR and ARFLAGS in the configure script, and
those are used in the Makefile
 - ARFLAGS is used instead of the harcoded rc (rc is the default value
for ARFLAGS in configure)
 - Both AR and ARFLAGS are used in customize_compiler in distutils. If
any of them is customized from the environment, they are overriden.

Some examples:
 - default: nothing changes, except that archiver is set to ar rc
instead of ar in customize_compiler, thus build_clib is not broken anymore
 - setting AR/ARFLAGS in configure: those are used in the python build
 - ARFLAGS=cru python setup.py build_clib will use ar cru instead of ar
cr for libraries.

The only thing I am a bit unsure is that instead of ar -cr, we have ar
cr used as archiver in distutils. Since ac cr is currently used in the
python makefile, I guess most unixes understand ar cr, though.

--
keywords: +patch
Added file: http://bugs.python.org/file13911/bug_5941.diff

___
Python tracker 

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



[issue5798] test_asynchat fails on Mac OSX

2009-05-07 Thread Ismail Donmez

Ismail Donmez  added the comment:

Still fails in 3.1 beta1.

--

___
Python tracker 

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



[issue5955] aifc: close() does not close the underlying file

2009-05-07 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Fixed in r72422.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue5955] aifc: close() does not close the underlying file

2009-05-07 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Sorry, but the problem still exists.
self._file is a chunk.Chunk object, and its close() method does nothing.

Adding "self.file = None" at the end of chunk.Chunk.close() helps, even
if this relies on reference counting to close the file.

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue5798] test_asynchat fails on Mac OSX

2009-05-07 Thread Mark Dickinson

Mark Dickinson  added the comment:

I tried to track this down, but ran out of time.  Here's
the little that I discovered;  maybe someone else with
access to OS X (which I have) and an understanding of
poll (which I lack) can build on this.

The failure has to do with select.poll differences between Linux
and OS X.  It seems that OS X can return POLLIN | POLLPRI | POLLHUP
in situations where Linux just returns POLLIN, and this combination
of flags causes the code in asyncore to first close the socket and
then try to read from it.  The relevant code is at around line 440
of Lib/asyncore.py.

--

___
Python tracker 

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



[issue5951] email.message : get_payload args's documentation is confusing

2009-05-07 Thread Loic Jaquemet

Loic Jaquemet  added the comment:

Ok, I understand.
Thx

+ -> I need to learn python 
:/

--

___
Python tracker 

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



[issue5951] email.message : get_payload args's documentation is confusing

2009-05-07 Thread R. David Murray

R. David Murray  added the comment:

No fault of yours, it's a real doc bug.  I've been programming in python
since 1997 or so, and I had to read the source code to figure it out
when I went to use get_payload a couple months ago.  That's why your bug
report caught my eye.  And even then I misremembered the answer and had
to look at the source code again to get it right.

--

___
Python tracker 

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



[issue3992] removed custom log from distutils

2009-05-07 Thread Antonio Cavallo

Antonio Cavallo  added the comment:

Hi Tarek,

there is a new patch.

  - Logger is now back to Log
  - put back INFO/DEBUG etc.
  - Wrapped the code inside a try/except 

I removed the _global_logger/logger variables, because they're
superfluous: so the cound of the module exported symbols should be 
greatly reduced (debug, info, warn, warning, error and fatal).
The warning has been put to match the Logger warning method.

I'm waiting for the suse build server to rebuild the whole python 
interpreter: the system looks very busy so I can confirm later if 
there's been any issue during the build and with the smoke tests.

--
Added file: http://bugs.python.org/file13912/issue3992.remove-custom-log.diff

___
Python tracker 

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



[issue3992] removed custom log from distutils

2009-05-07 Thread Antonio Cavallo

Changes by Antonio Cavallo :


Removed file: http://bugs.python.org/file13908/issue3992.remove-custom-log.diff

___
Python tracker 

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



[issue5798] test_asynchat fails on Mac OSX

2009-05-07 Thread Mark Dickinson

Mark Dickinson  added the comment:

r56632 looks relevant:

"""When running asynchat tests on OS X (darwin), the test client now
overrides asyncore.dispatcher.handle_expt to do nothing, since
select.poll gives a POLLHUP error at the completion of these tests.
Added timeout & count arguments to several asyncore.loop calls to
avoid the possibility of a test hanging up a build. [GSoC - Alan
McIntyre]"""

Adding Facundo Batista and Alan McIntyre to the nosy list.  Does either of 
you know what's going on with this issue?

--
nosy: +alanmcintyre, facundobatista

___
Python tracker 

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



[issue5955] aifc: close() does not close the underlying file

2009-05-07 Thread R. David Murray

R. David Murray  added the comment:

Fixed in r72425.

--
components: +Library (Lib)
priority:  -> normal
resolution:  -> fixed
stage:  -> committed/rejected
type:  -> behavior

___
Python tracker 

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



[issue5798] test_asynchat fails on Mac OSX

2009-05-07 Thread Jean Brouwers

Jean Brouwers  added the comment:

Here is a (new?) failure of test_asynchat with Python 3.1b1 on MacOS X 
10.4.11 (Intel).

% make test

test test_asynchat produced unexpected output:
**
*** lines 2-16 of actual output doesn't appear in expected output after 
line 1:
+ error: uncaptured python exception, closing channel 
 (:[Errno 9] Bad file descriptor [../Python-
3.1b1/Lib/asyncore.py|readwrite|106] [../Python-3
.1b1/Lib/asyncore.py|handle_expt_event|440])
+ error: uncaptured python exception, closing channel 
 (:[Errno 9] Bad file descriptor [../Python-
3.1b1/Lib/asyncore.py|readwrite|106] [../Python-3
.1b1/Lib/asyncore.py|handle_expt_event|440])
+ error: uncaptured python exception, closing channel 
 (:[Errno 9] Bad file descriptor [../Python-
3.1b1/Lib/asyncore.py|readwrite|106] [../Python-3
.1b1/Lib/asyncore.py|handle_expt_event|440])
+ error: uncaptured python exception, closing channel 
 (:[Errno 9] Bad file descriptor [../Python-
3.1b1/Lib/asyncore.py|readwrite|106] [../Python-3
.1b1/Lib/asyncore.py|handle_expt_event|440])
+ error: uncaptured python exception, closing channel 
 (:[Errno 9] Bad file descriptor [../Python-
3.1b1/Lib/asyncore.py|readwrite|106] [../Python-3
.1b1/Lib/asyncore.py|handle_expt_event|440])
+ error: uncaptured python exception, closing channel 
 (:[Errno 9] Bad file descriptor [../Python-
3.1b1/Lib/asyncore.py|readwrite|106] [../Python-3
.1b1/Lib/asyncore.py|handle_expt_event|440])
+ error: uncaptured python exception, closing channel 
 (:[Errno 9] Bad file descriptor [../Python-
3.1b1/Lib/asyncore.py|readwrite|106] [../Python-3
.1b1/Lib/asyncore.py|handle_expt_event|440])
+ error: uncaptured python exception, closing channel 
 (:[Errno 9] Bad file descriptor [../Python-
3.1b1/Lib/asyncore.py|readwrite|106] [../Python-3
.1b1/Lib/asyncore.py|handle_expt_event|440])
+ error: uncaptured python exception, closing channel 
 (:[Errno 9] Bad file descriptor [../Python-
3.1b1/Lib/asyncore.py|readwrite|106] [../Python-3
.1b1/Lib/asyncore.py|handle_expt_event|440])
+ error: uncaptured python exception, closing channel 
 (:[Errno 9] Bad file descriptor [../Python-
3.1b1/Lib/asyncore.py|readwrite|106] [../Python-3
.1b1/Lib/asyncore.py|handle_expt_event|440])
+ error: uncaptured python exception, closing channel 
 (:[Errno 9] Bad file descriptor [../Python-
3.1b1/Lib/asyncore.py|readwrite|106] [../Python-3
.1b1/Lib/asyncore.py|handle_expt_event|440])
+ error: uncaptured python exception, closing channel 
 (:[Errno 9] Bad file descriptor [../Python-
3.1b1/Lib/asyncore.py|readwrite|106] [../Python-3
.1b1/Lib/asyncore.py|handle_expt_event|440])
+ error: uncaptured python exception, closing channel 
 (:[Errno 9] Bad file descriptor [../Python-
3.1b1/Lib/asyncore.py|readwrite|106] [../Python-3
.1b1/Lib/asyncore.py|handle_expt_event|440])
+ error: uncaptured python exception, closing channel 
 (:[Errno 9] Bad file descriptor [../Python-
3.1b1/Lib/asyncore.py|readwrite|106] [../Python-3
.1b1/Lib/asyncore.py|handle_expt_event|440])
+ error: uncaptured python exception, closing channel 
 (:[Errno 9] Bad file descriptor [../Python-
3.1b1/Lib/asyncore.py|readwrite|106] [../Python-3
.1b1/Lib/asyncore.py|handle_expt_event|440])
**


% ./python.exe Lib/test/test_asynchat.py
test_close_when_done (__main__.TestAsynchat) ... ok
test_empty_line (__main__.TestAsynchat) ... ok
test_line_terminator1 (__main__.TestAsynchat) ... ok
test_line_terminator2 (__main__.TestAsynchat) ... ok
test_line_terminator3 (__main__.TestAsynchat) ... ok
test_none_terminator (__main__.TestAsynchat) ... ok
test_numeric_terminator1 (__main__.TestAsynchat) ... ok
test_numeric_terminator2 (__main__.TestAsynchat) ... ok
test_simple_producer (__main__.TestAsynchat) ... ok
test_string_producer (__main__.TestAsynchat) ... ok
test_close_when_done (__main__.TestAsynchat_WithPoll) ... ok
test_empty_line (__main__.TestAsynchat_WithPoll) ... error: uncaptured 
python exception, closing channel <__main__.echo_client at 0x107cf30> 
(:[Errno 9] Bad file descriptor [../Python-
3.1b1/Lib/asyncore.py|readwrite|106] [../Python-
3.1b1/Lib/asyncore.py|handle_expt_event|440])
ok
test_line_terminator1 (__main__.TestAsynchat_WithPoll) ... error: 
uncaptured python exception, closing channel <__main__.echo_client at 
0x107c3f0> (:[Errno 9] Bad file descriptor 
[../Python-3.1b1/Lib/asyncore.py|readwrite|106] [../Python-
3.1b1/Lib/asyncore.py|handle_expt_event|440])
error: uncaptured python exception, closing channel 
<__main__.echo_client at 0x107ceb0> (:[Errno 9] 
Bad file descriptor [../Python-3.1b1/Lib/asyncore.py|readwrite|106] 
[../Python-3.1b1/Lib/asyncore.py|handle_expt_event|440])
error: uncaptured python exception, closing channel 
<__main__.echo_client at 0x107cf50> (:[Errno 9] 
Bad file descriptor [../Python-3.1b1/Lib/asyncore.py|readwrite|106] 
[../Python-3.1b1/Lib/asyncore.py|handle_expt_event|440]

[issue5956] test_distutils fails for Python 3.1b1 on MacOS X

2009-05-07 Thread Jean Brouwers

New submission from Jean Brouwers :

% make test

test_distutils
test test_distutils failed -- Traceback (most recent call last):
  File "../Python-3.1b1/Lib/distutils/tests/test_bdist_wininst.py", line 
23, in test_get_exe_bytes
exe_file = cmd.get_exe_bytes()
  File "../Python-3.1b1/Lib/distutils/command/bdist_wininst.py", line 
343, in get_exe_bytes
return open(filename, "rb").read()
IOError: [Errno 21] Is a directory: '../Python-
3.1b1/Lib/distutils/command/wininst-6.0.exe'


% ./python.exe Lib/test/test_distutils.py
test_formats (distutils.tests.test_bdist.BuildTestCase) ... ok
test_simple_built (distutils.tests.test_bdist_dumb.BuildDumbTestCase) 
... ok
test_no_optimize_flag (distutils.tests.test_bdist_rpm.BuildRpmTestCase) 
... ok
test_quiet (distutils.tests.test_bdist_rpm.BuildRpmTestCase) ... ok
test_get_exe_bytes 
(distutils.tests.test_bdist_wininst.BuildWinInstTestCase) ... ERROR
... 

==
ERROR: test_get_exe_bytes 
(distutils.tests.test_bdist_wininst.BuildWinInstTestCase)
--
Traceback (most recent call last):
  File "../Python-3.1b1/Lib/distutils/tests/test_bdist_wininst.py", line 
23, in test_get_exe_bytes
exe_file = cmd.get_exe_bytes()
  File "../Python-3.1b1/Lib/distutils/command/bdist_wininst.py", line 
343, in get_exe_bytes
return open(filename, "rb").read()
IOError: [Errno 21] Is a directory: '../Python-
3.1b1/Lib/distutils/command/wininst-6.0.exe'

--
Ran 97 tests in 0.948s

FAILED (errors=1)
Traceback (most recent call last):
  File "Lib/test/test_distutils.py", line 17, in 
test_main()
  File "Lib/test/test_distutils.py", line 13, in test_main
test.support.run_unittest(distutils.tests.test_suite())
  File "../Python-3.1b1/Lib/test/support.py", line 878, in run_unittest
_run_suite(suite)
  File "../Python-3.1b1/Lib/test/support.py", line 861, in _run_suite
raise TestFailed(err)
test.support.TestFailed: Traceback (most recent call last):
  File "../Python-3.1b1/Lib/distutils/tests/test_bdist_wininst.py", line 
23, in test_get_exe_bytes
exe_file = cmd.get_exe_bytes()
  File "../Python-3.1b1/Lib/distutils/command/bdist_wininst.py", line 
343, in get_exe_bytes
return open(filename, "rb").read()
IOError: [Errno 21] Is a directory: '../Python-
3.1b1/Lib/distutils/command/wininst-6.0.exe'

% ./python.exe
Python 3.1b1 (r31b1:72412, May  7 2009, 09:16:22) 
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

--
components: Tests
messages: 87378
nosy: MrJean1
severity: normal
status: open
title: test_distutils fails for Python 3.1b1 on MacOS X
type: behavior
versions: Python 3.1

___
Python tracker 

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



[issue5798] test_asynchat fails on Mac OSX

2009-05-07 Thread R. David Murray

R. David Murray  added the comment:

See also issue 1161031, especially Giampaolo's suggestion near the end.
 Seems like it might be relevant.  I was the one who merged Josiah's
trunk fix into othe other branches, to get things back into sync, but I
don't claim to understand the code at any deep level.  From the review I
did at my level of knowledge it seems like the change to the behavior of
when handle_expt_event is called is correct, but I was a little worried
about backward compatibility.  I now wonder if that fix should be backed
out of 2.6 and 3.0, and advertised in What's New for 2.7 and 3.1.

--
nosy: +giampaolo.rodola, josiahcarlson, r.david.murray
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



[issue5909] Segfault in typeobject.c

2009-05-07 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

This is a bug in pygobject, which has been already corrected btw:

http://git.gnome.org./cgit/pygobject/commit/?id=84706c9a73ad8b2e1dbd3eada09e4425a01d4d05

The "corrupted base object" is actually an old-style class...

[the gdb trace shows that you don't have this version: in
pyg_type_add_interfaces(), the variable 'base' was a PyTypeObject*, the
bug fix changed it to a PyObject*]

--
nosy: +amaury.forgeotdarc
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue5957] Possible mistake regarding writeback in documentation of shelve.open()

2009-05-07 Thread Mitchell Model

New submission from Mitchell Model :

The documentation of shelve.open() states (paragraph 3) that "By
default, mutations to persistent-dictionary mutable entries are not
automatically written back." It then goes on to describe what happens if
the writeback parameter is True, which involves caching the entire
dictionary of objects in memory and writing the whole thing back on close.

But what happens if writeback is False, the default? The statement that
the mutable entires are not automatically written back leaves open the
question of how to write them back. shelf.sync() is documented as being
used only when writeback is true. Also, for a user unfamiliar with the
nuances of persistence the sentence quoted above is somewhat mysterious
-- "persistent-dictionary mutable entries"? "written back"?

--
assignee: georg.brandl
components: Documentation
messages: 87381
nosy: MLModel, georg.brandl
severity: normal
status: open
title: Possible mistake regarding writeback in documentation of shelve.open()
versions: Python 3.0, Python 3.1

___
Python tracker 

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



[issue5958] Typo in documentation of shelve.sync

2009-05-07 Thread Mitchell Model

New submission from Mitchell Model :

In the documentation of shelve.sync, 'shelf' is mispelled 'Shelf' --
both the word and case are wrong.

--
assignee: georg.brandl
components: Documentation
messages: 87382
nosy: MLModel, georg.brandl
severity: normal
status: open
title: Typo in documentation of shelve.sync
versions: Python 3.0, Python 3.1

___
Python tracker 

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



[issue5952] AttributeError exception in urllib.urlopen

2009-05-07 Thread Sergey Prigogin

Sergey Prigogin  added the comment:

The problem is pretty obvious from the code.

URLopener.open_http contains the following code:

if data is not None:
h.send(data)
errcode, errmsg, headers = h.getreply()
fp = h.getfile()
if errcode == 200:
return addinfourl(fp, headers, "http:" + url)
else:
if data is None:
return self.http_error(url, fp, errcode, errmsg, headers)
else:
return self.http_error(url, fp, errcode, errmsg,
headers, data)

In case of an error h.getfile() may return None. self.http_error (line
322) is called with None fp. http_error calls self.http_error_default
(line 339). FancyURLopener.http_error_default calls addinfourl(fp,
headers, "http:" + url) (line 579), which expects fp to be not None.

For variety of reasons I cannot run this test case with a newer Python
version.

--

___
Python tracker 

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



[issue5957] Possible mistake regarding writeback in documentation of shelve.open()

2009-05-07 Thread Mitchell Model

Mitchell Model  added the comment:

OK, I've figured out from the comments in the example later on in the
shelf documentation what the paragraph is supposed to mean. I still
think it should be stated clearly. The distinction to be made is that
modifications to the dictionary immediately change the file contents --
d[key] = data and del d[key] are, I think, the only actions that fall
under this category -- but getting a value from the shelf then modifying
that value does NOT affect the underlying dictionary. Ever. It's not a
matter of WHEN, but WHETHER. (when writeback is False)

--

___
Python tracker 

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



[issue5959] PyCode_NewEmpty

2009-05-07 Thread Jeffrey Yasskin

New submission from Jeffrey Yasskin :

Most uses of PyCode_New found by
http://www.google.com/codesearch?q=PyCode_New are trying to build an
empty code object, usually to put it in a dummy frame object. This patch
adds a PyCode_NewEmpty wrapper which lets the user specify just the
filename, function name, and first line number, instead of also
requiring lots of code internals.

--
components: Interpreter Core
files: PyCode_NewEmpty.patch
keywords: needs review, patch
messages: 87385
nosy: collinwinter, jyasskin
severity: normal
stage: patch review
status: open
title: PyCode_NewEmpty
type: feature request
versions: Python 2.7
Added file: http://bugs.python.org/file13913/PyCode_NewEmpty.patch

___
Python tracker 

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



[issue5798] test_asynchat fails on Mac OSX

2009-05-07 Thread Josiah Carlson

Josiah Carlson  added the comment:

Looking at trunk, it seems like one reasonable option is to swap the 
order of handle_close() and handle_expt_event() testing and calls.  That 
would keep all reading/writing before handle_close(), which should be 
correct.

--

___
Python tracker 

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



[issue5960] Windows Installer Error 1722 when opting for compilation at install time - once again

2009-05-07 Thread Eric Devolder

New submission from Eric Devolder :

Hi,

Same problem as issue 4407, but on release 3.1b1 this time.

Guessing the same cure would apply...


for reference, here is the updated text, taken from event viewer:

Product: Python 3.1b1 -- Error 1722. There is a problem with this
Windows Installer package. A program run as part of the setup did not
finish as expected. Contact your support personnel or package vendor. 
Action CompilePyc, location: L:\Python31\python.exe, command: -Wi
"L:\Python31\Lib\compileall.py" -f -x
bad_coding|badsyntax|site-packages|py2_ "L:\Python31\Lib" 

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

--
components: Installation
messages: 87387
nosy: keldonin
severity: normal
status: open
title: Windows Installer Error 1722 when opting for compilation at install time 
- once again
versions: Python 3.1

___
Python tracker 

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



[issue5961] Missing labelside option for Tix option menu (fix included)

2009-05-07 Thread Cary R.

New submission from Cary R. :

The Tix Optionmenu is documented to support a labelside option that is
used to specify where the label should be relative to the selection.

I have verified that adding 'labelside' to the static_options when
calling the base constructor (TixWidget.__init__) located in Tix.py line
1185 (for both 2.5.4 and 2.6.2) fixes the problem.

TixWidget.__init__(self, ... ,['labelside', 'options'], ... )

I am currently using 2.5.4, but a fix only for the 2.6 branch is
acceptable for all but my personal machine (which I can patch by hand).

I am not very familiar with how all this works, so if there is something
I can do from my code to add this option that would be nice to know.

--
components: Tkinter
messages: 87388
nosy: caryr
severity: normal
status: open
title: Missing labelside option for Tix option menu (fix included)
type: feature request
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



[issue5442] [3.1alpha1, 2, beta1] test_importlib fails on Mac OSX 10.5.6

2009-05-07 Thread Brett Cannon

Changes by Brett Cannon :


Removed file: http://bugs.python.org/file13622/tester.py

___
Python tracker 

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



[issue5962] Ambiguity about the semantics of sys.exit() and os._exit() in multithreaded program

2009-05-07 Thread Pascal Chambon

New submission from Pascal Chambon :

Hello

I once was rather confused, because nothing in the sys and os modules
mentionned the behaviours that the exit() and _exit() functions were
supposed to have when called inside a non-main thread.
I've eventually found in multithreading-related docs that sys.exit()
made only the calling thread exit (without affecting the other threads
and the application), and I've eventually guessed that on the other
side, os._exit() always terminated the application wthout caring about
other threads or open files etc.
But I don't know if this will always be the case, or if using other
threading libraries than the standard one might change this semantics.

And concerning return code, I've found nothing indicating what happened
when different threads returned different codes. My experiments show
that only the main thread's return code is taken into account, but maybe
it's platform dependent (I'm on windows vista) ? 

So well, maybe we should add in the doc of sys and os some comments
about multithreading and returning codes, even if it is to say that
those are implementation details or platform dependant B-)

Regards, 
pascal

--
assignee: georg.brandl
components: Documentation
messages: 87389
nosy: georg.brandl, pakal
severity: normal
status: open
title: Ambiguity about the semantics of sys.exit() and os._exit() in 
multithreaded program
type: feature request
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1

___
Python tracker 

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



[issue5442] [3.1alpha1, 2, beta1] test_importlib fails on Mac OSX 10.5.6

2009-05-07 Thread Brett Cannon

Brett Cannon  added the comment:

Bloody OS X and its default case-insensitivity.

Ismail, please try the attached patch to double-check this solves the
issue ASAP so this doesn't hold up Python 3.1 rc1.

--
keywords: +patch
priority: low -> release blocker
stage:  -> patch review
status: open -> pending
Added file: http://bugs.python.org/file13914/case_sensitivity_tests.diff

___
Python tracker 

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



[issue5442] [3.1alpha1, 2, beta1] test_importlib fails on Mac OSX 10.5.6

2009-05-07 Thread Ismail Donmez

Ismail Donmez  added the comment:

Tested with: ./python -m test.regrtest -v test_importlib


3 failures:

==
FAIL: test_case_insensitivity 
(importlib.test.extension.test_case_sensitivity.ExtensionModuleCaseSensi
tivityTest)
--
Traceback (most recent call last):
  File "/Users/cartman/Python-
3.1b1/Lib/importlib/test/extension/test_case_sensitivity.py", line 29, 
in test_case_insensitivity
self.assert_(hasattr(loader, 'load_module'))
AssertionError: False is not True

==
FAIL: test_lacking_parent 
(importlib.test.source.test_abc_loader.PyPycLoaderTests)
--
Traceback (most recent call last):
  File "/Users/cartman/Python-
3.1b1/Lib/importlib/test/source/test_abc_loader.py", line 271, in 
test_lacking_parent
self.verify_bytecode(mock, name)
  File "/Users/cartman/Python-3.1b1/Lib/importlib/test/source/util.py", 
line 18, in wrapper
to_return = fxn(*args, **kwargs)
  File "/Users/cartman/Python-
3.1b1/Lib/importlib/test/source/test_abc_loader.py", line 253, in 
verify_bytecode
self.assert_(name in mock.module_bytecode)
AssertionError: False is not True

==
FAIL: test_insensitive 
(importlib.test.source.test_case_sensitivity.CaseSensitivityTest)
--
Traceback (most recent call last):
  File "/Users/cartman/Python-
3.1b1/Lib/importlib/test/source/test_case_sensitivity.py", line 49, in 
test_insensitive
self.assert_(hasattr(insensitive, 'load_module'))
AssertionError: False is not True

--
Ran 166 tests in 0.133s

FAILED (failures=3)

--
status: pending -> open

___
Python tracker 

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



[issue5798] test_asynchat fails on Mac OSX

2009-05-07 Thread Mark Dickinson

Mark Dickinson  added the comment:

Josiah, that solution isn't working for me;  it looks as though there's 
a deeper weirdness:  what I'm seeing is that on OS X, in e.g. 
test_emptyline, we end up calling the readwrite function in asyncore.py 
with flags = POLLIN | POLLPRI | POLLHUP.  The first thing that gets 
called is obj.handle.read_event, and bizarrely it seems to be the 
read_event call that has the effect of closing the socket.  So the 
socket's already closed by the time we get to obj.handle_expt_event and 
the same error as before occurs.

I'm still trying to figure out why.

--

___
Python tracker 

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



[issue5798] test_asynchat fails on Mac OSX

2009-05-07 Thread Mark Dickinson

Mark Dickinson  added the comment:

So the sequence of events seems to be:
  asyncore.readwrite calls obj.handle_read_event
  ... which calls obj.handle_read (3rd branch of handle_read_event)
  ... which is defined in asynchat.py;  it calls obj.recv
  ... (back in asyncore now): recv calls obj.socket.recv
  ... and gets no data, so it then calls obj.handle_close
  ... which calls obj.close(), and so closes obj.socket as well.

and now obj.handle_expt_event gets confused because the socket is 
closed.

Now what?

--

___
Python tracker 

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



[issue5963] Doc error: integer precision in formats

2009-05-07 Thread Terry J. Reedy

New submission from Terry J. Reedy :

String Services / Format Specification Mini-Language (7.1.3.1 in 3.1)

"The precision is ignored for integer values."
in 3.0.1 and 3.1.b1 and, I presume in 2.6/7 doc

should be "A precision is not allowed for integer values."

(3.0.1)
>> format(10, '3x')
'  a'
>>> format(10, '.3x')
Traceback (most recent call last):
  File "", line 1, in 
format(10, '.3x')
ValueError: Precision not allowed in integer format specifier

(I assume but cannot check that 2.6/7 behave the same.)

--
assignee: georg.brandl
components: Documentation
messages: 87394
nosy: georg.brandl, tjreedy
severity: normal
status: open
title: Doc error: integer precision in formats
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1

___
Python tracker 

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



[issue5963] Doc error: integer precision in formats

2009-05-07 Thread Mark Dickinson

Mark Dickinson  added the comment:

This may be a format error rather than a doc error.  Eric?

--
nosy: +eric.smith, marketdickinson

___
Python tracker 

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



[issue5963] Doc error: integer precision in formats

2009-05-07 Thread Mark Dickinson

Mark Dickinson  added the comment:

Sorry;  ignore me.  I should have read more carefully, and paid
attention to what was going on on python-dev as well.

--

___
Python tracker 

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



[issue5963] Doc error: integer precision in formats

2009-05-07 Thread Eric Smith

Eric Smith  added the comment:

PEP 3101 says it's ignored. I chose to be strict. I don't see the
advantage of allowing but ignoring it.

--

___
Python tracker 

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



[issue5963] Doc error: integer precision in formats

2009-05-07 Thread Eric Smith

Changes by Eric Smith :


--
assignee: georg.brandl -> eric.smith

___
Python tracker 

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



[issue5963] Doc error: integer precision in formats

2009-05-07 Thread Eric Smith

Eric Smith  added the comment:

I updated the docs to say precision is not allowed for integers.

--
resolution:  -> accepted
status: open -> closed

___
Python tracker 

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



[issue5753] CVE-2008-5983 python: untrusted python modules search path

2009-05-07 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

re: gedit

"""I'm by no means an expert (I did not design the original python module 
extension), we simply copied from vim at the beginning. That said, it 
seems there are issues if you embed the python interpreter and do not 
explicitly set sys.argv to something.""" - jesse

--

___
Python tracker 

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



[issue5798] test_asynchat fails on Mac OSX

2009-05-07 Thread Josiah Carlson

Josiah Carlson  added the comment:

It would seem that we need to be more defensive in our calls.  We need 
to check to make sure that the socket isn't closed before calling 
read/write/expt events.

--

___
Python tracker 

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



[issue5442] test_importlib fails on Mac OSX 10.5.6 w/ case-sensitive file system

2009-05-07 Thread Brett Cannon

Brett Cannon  added the comment:

Damn, that patch should have caused those case-sensitivity tests to be
skipped. I will dig into this later today and hopefully have another
patch to test some time tonight.

--
resolution: fixed -> 
title: [3.1alpha1,2,beta1] test_importlib fails on Mac OSX 10.5.6 -> 
test_importlib fails on Mac OSX 10.5.6 w/ case-sensitive file system

___
Python tracker 

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



[issue5798] test_asynchat fails on Mac OSX

2009-05-07 Thread Josiah Carlson

Josiah Carlson  added the comment:

Mark, try this:

if flags & select.POLLIN and (obj.connected or obj.accepting):
obj.handle_read_event()
if flags & select.POLLOUT and obj.connected:
obj.handle_write_event()
if flags & select.POLLPRI and obj.connected:
obj.handle_expt_event()
if flags & (select.POLLHUP | select.POLLERR | select.POLLNVAL):
obj.handle_close()

--

___
Python tracker 

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



[issue5798] test_asynchat fails on Mac OSX

2009-05-07 Thread Mark Dickinson

Mark Dickinson  added the comment:

That fixes test_empty_line (in test_asynchat.py), but now I get a hang in 
test_close_when_done.

By the way, here's an interesting site that goes some way to explaining 
what to expect from select.poll and EOF.

http://www.greenend.org.uk/rjk/2001/06/poll.html

--

___
Python tracker 

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



[issue5798] test_asynchat fails on Mac OSX

2009-05-07 Thread Josiah Carlson

Josiah Carlson  added the comment:

Try getting rid of the "and" clause in the select.POLLIN .

--

___
Python tracker 

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



[issue5798] test_asynchat fails on Mac OSX

2009-05-07 Thread Josiah Carlson

Josiah Carlson  added the comment:

To be clear, make the first test read...
if flags & select.POLLIN:
obj.handle_read_event()

--

___
Python tracker 

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



[issue5798] test_asynchat fails on Mac OSX

2009-05-07 Thread Mark Dickinson

Mark Dickinson  added the comment:

Getting rid of the and ... on the handle_read_event didn't make a 
difference:  I still get the hang in test_close_when_done.

But if I get rid of the and clause on the handle_write_event branch then
all the test_asynchat tests pass.  So that block now looks like:

if flags & select.POLLIN and (obj.connected or obj.accepting):
obj.handle_read_event()
if flags & select.POLLOUT:
obj.handle_write_event()
if flags & select.POLLPRI and obj.connected:
obj.handle_expt_event()
if flags & (select.POLLHUP | select.POLLERR | select.POLLNVAL):
obj.handle_close()

in my code.  So we're making progress (maybe). Unfortunately, 
test_asyncore now fails with:

==
FAIL: test_readwrite (__main__.HelperFunctionTests)
--
Traceback (most recent call last):
  File "Lib/test/test_asyncore.py", line 161, in test_readwrite
self.assertEqual(getattr(tobj, attr), attr==expectedattr)
AssertionError: False != True

--

___
Python tracker 

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



[issue5952] AttributeError exception in urllib.urlopen

2009-05-07 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Thanks for the info.
This problem is a duplicate of issue767111, which was corrected two 
years ago.
I suggest you to upgrade to 2.5 at least.

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

___
Python tracker 

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



[issue5798] test_asynchat fails on Mac OSX

2009-05-07 Thread Josiah Carlson

Josiah Carlson  added the comment:

I went ahead and plugged my mac in (which reminded me of why I unplugged 
it in the first place), and I'm able to reproduce your error in the test 
after my proposed modifications.

One thing to remember is that the test is broken; we rely on a 
.connected attribute, which the test objects lack.

The attached patch fixes the test on my OS X machine, which you should 
test.

--
keywords: +patch
Added file: http://bugs.python.org/file13915/asyncore_fix_mac.patch

___
Python tracker 

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



[issue5941] customize_compiler broken

2009-05-07 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

Fixed in r72445 and r72446

Thanks David !

--
status: open -> closed
versions:  -Python 3.0

___
Python tracker 

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



[issue5949] IMAP4_SSL spin because of SSLSocket.suppress_ragged_eofs

2009-05-07 Thread Kevin Watters

Kevin Watters  added the comment:

I wasn't sure--the docs for SSLSocket.read 
(http://docs.python.org/library/ssl.html#ssl.SSLSocket.read) say

  "Reads up to nbytes bytes from the SSL-encrypted channel and returns 
them."

With that "up to" I wasn't sure that an empty string would necessarily 
mean EOF--I'm not familiar enough with _ssl.c to say either way.

--

___
Python tracker 

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



[issue3992] removed custom log from distutils

2009-05-07 Thread Tarek Ziadé

Changes by Tarek Ziadé :


Removed file: http://bugs.python.org/file11650/remove-custom-log.diff

___
Python tracker 

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



[issue3992] removed custom log from distutils

2009-05-07 Thread Tarek Ziadé

Changes by Tarek Ziadé :


Removed file: http://bugs.python.org/file13260/remove-custom-log-revised.diff

___
Python tracker 

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



[issue3992] removed custom log from distutils

2009-05-07 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

> I removed the _global_logger/logger variables, because they're
> superfluous

Yes but by adding "log" instead, and removing "log = _global_log.log"
you are breaking Distutils because its uses "log.log"

Besides, the rest seem OK.

I'll work on your patch, and add a few tests with it and let you know
when it's up, thanks !

--

___
Python tracker 

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



[issue5924] When setting complete PYTHONPATH on Python 3.x, paths in the PYTHONPATH are ignored

2009-05-07 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

After some attempts, it seems that PYTHONPATH is completely ignored if 
it is longer than 256 characters

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue5924] When setting complete PYTHONPATH on Python 3.x, paths in the PYTHONPATH are ignored

2009-05-07 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Confirmed in PC/getpathp.c:
size_t r = mbstowcs(wenvpath, _envpath, MAXPATHLEN+1);
envpath = wenvpath;
if (r == (size_t)-1 || r >= MAXPATHLEN)
envpath = NULL;

--
nosy: +loewis
priority:  -> critical

___
Python tracker 

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



[issue5442] test_importlib fails on Mac OSX 10.5.6 w/ case-sensitive file system

2009-05-07 Thread Brett Cannon

Changes by Brett Cannon :


Removed file: http://bugs.python.org/file13914/case_sensitivity_tests.diff

___
Python tracker 

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



[issue5442] test_importlib fails on Mac OSX 10.5.6 w/ case-sensitive file system

2009-05-07 Thread Brett Cannon

Brett Cannon  added the comment:

OK, Ismail, here is another patch. Revert the last one and try this.
Looks like I was being stupid by forgetting to remove the 'darwin'
platform check. But I also made the check simpler.

--
status: open -> pending
Added file: http://bugs.python.org/file13916/case_sensitivity_tests.diff

___
Python tracker 

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



[issue3992] removed custom log from distutils

2009-05-07 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

I have reworked your patch a little bit so it works for Distutils. But I
still need to digg on the initialization problem to see if we can get
rid of the problem  : the new logging will not get imported as well
during tests so it is not what we want yet

--
Added file: http://bugs.python.org/file13917/custom-log.diff

___
Python tracker 

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



[issue5798] test_asynchat fails on Mac OSX

2009-05-07 Thread Jean Brouwers

Jean Brouwers  added the comment:

I reran the test_synchat.py test after patching to the Lib/asyncore.py 
and Lib/test/test-asynchat.py files of Python-3.1b1 on MacOS X 10.4.11 
(Intel).

The test now hangs in
...
test_string_producer (__main__.TestAsynchat) ... ok
test_close_when_done (__main__.TestAsynchat_WithPoll) ...

The test also hangs, after removing the patches from the 
Lib/test/test_asynchat.py file but keeping the patched Lib/asyncore.py 
file.

--

___
Python tracker 

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



[issue5798] test_asynchat fails on Mac OSX

2009-05-07 Thread Josiah Carlson

Josiah Carlson  added the comment:

As an aside, I was testing against trunk, not 3.1b1 .

--

___
Python tracker 

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



[issue3992] removed custom log from distutils

2009-05-07 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

ok the problem occurs because site.py calls distutils.util.get_platform
in addbuilddir. I'll see what we can do in there.

--

___
Python tracker 

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



[issue5798] test_asynchat fails on Mac OSX

2009-05-07 Thread Jean Brouwers

Jean Brouwers  added the comment:

Understood.

On Thu, May 7, 2009 at 5:18 PM, Josiah Carlson wrote:

>
> Josiah Carlson  added the comment:
>
> As an aside, I was testing against trunk, not 3.1b1 .
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--
Added file: http://bugs.python.org/file13918/unnamed

___
Python tracker 

___Understood.On Thu, May 7, 2009 at 
5:18 PM, Josiah Carlson rep...@bugs.python.org> 
wrote:

Josiah Carlson josiahcarl...@users.sourceforge.net>
 added the comment:

As an aside, I was testing against trunk, not 3.1b1 .

--

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

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



[issue5964] WeakSet cmp methods

2009-05-07 Thread Robert Schuppenies

New submission from Robert Schuppenies :

Running this code:

>>> import weakref
>>> class C: pass
...
>>> ws = weakref.WeakSet([C])
>>> if ws == 1:
...  print(1)
...

gives me the following exception:

Traceback (most recent call last):
  File "", line 1, in 
File "/home/bob/python/svn/py3k/Lib/_weakrefset.py", line 121, in __eq__
return self.data == set(ref(item) for item in other)
TypeError: 'int' object is not iterable

Looking at _weakrefset.py line 121 gives

  def __eq__(self, other):
  return self.data == set(ref(item) for item in other)

which treats any 'other' object as a set like object. Therefore
comparing WeakSet to a non-set-like object always fails.

Do I understand it correctly and if so, is this the intended behavior?

--
components: Library (Lib)
messages: 87420
nosy: schuppenies
severity: normal
status: open
title: WeakSet cmp methods
type: behavior
versions: Python 3.0, Python 3.1

___
Python tracker 

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



[issue5965] Format Specs: doc 's' and implicit conversions

2009-05-07 Thread Terry J. Reedy

New submission from Terry J. Reedy :

String Services / Format Specification Mini-Language (7.1.3.1 in 3.1)
Building on #5963: document type 's' and implicit conversions.

Near the top, after
"A general convention is that an empty format string ("") produces the
same result as if you had called str() on the value."
add
"A non-empty format string typically modifies that result."

[This applies to all formats but particularly explains the point of 's',
present or implied.]

In the grammar box, add '" s " |' to the front of the list of types.

After "Finally, the type determines how the data should be presented." add
"Non-number values require 's' or no type.  Numbers are not allowed with
's'.

At the very end, add

"If an integer is used with a non-integer number presentation type
(those above other than 'n' or none) it is converted with float(). 
However, using a float or decimal with an integer-only presentation type
is not allowed."

--
assignee: georg.brandl
components: Documentation
messages: 87421
nosy: georg.brandl, tjreedy
severity: normal
status: open
title: Format Specs: doc 's' and implicit conversions
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1

___
Python tracker 

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



[issue5965] Format Specs: doc 's' and implicit conversions

2009-05-07 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I forgot to include:

Error messages for mismatches between specification type and value type
currently look like

"ValueError: Unknown conversion type d"

They would be *much* clearer written as something like

"ValueError: Conversion type d is invalid for float values"

and similarly for similar errors.

--

___
Python tracker 

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



[issue5963] Doc error: integer precision in formats

2009-05-07 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Whoops, I believe my suggested replacement.
"A precision is not allowed for integer values."
should really be
"A precision is not allowed for integer presentation types."
or something similar.

If you did not change the end of the sentence, please do.  A precision 
*is* allowed for integer values (integers) if a float presentation type
is used, because they are auto-converted (though floats are not).

This is not documented but I think it should be.  See #5965 for this and
related suggestions.

For future reference, in case anyone ever objects, I agree with
remaining strict and changing the doc.
1) Given that the code is strict about the other 'only valid'
restrictions (I checked some and it seems to be), it seems reasonable to
be consistency strict with precision and ints also.
2) Given that there are 7 presentation types for int and 8 for floats,
it is easily possible to make an error.  Best to catch it early.

The only possible use case I can think of for precision with ints is
something like
'{0:10.3{1}}'.format(val, typ) # fails for int typs

but we fail-proof that, we should also fail-proof '#' with floats:
'{0:#10{1}}'.format(val, typ)# fails for float typs

--

___
Python tracker 

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



[issue5924] When setting complete PYTHONPATH on Python 3.x, paths in the PYTHONPATH are ignored

2009-05-07 Thread Suzumizaki

Changes by Suzumizaki :


--
nosy: +Suzumizaki

___
Python tracker 

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



[issue4351] [PATCH] Better stacklevel for GzipFile.filename DeprecationWarning

2009-05-07 Thread Philip Jenvey

Philip Jenvey  added the comment:

this and more applied in r72458

--
status: open -> closed

___
Python tracker 

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



[issue5442] test_importlib fails on Mac OSX 10.5.6 w/ case-sensitive file system

2009-05-07 Thread Ismail Donmez

Ismail Donmez  added the comment:

Down to 1 failure:

FAILED (failures=1)
test test_importlib failed -- Traceback (most recent call last):
  File "/Users/cartman/Python-
3.1b1/Lib/importlib/test/source/test_abc_loader.py", line 271, in 
test_lacking_parent
self.verify_bytecode(mock, name)
  File "/Users/cartman/Python-3.1b1/Lib/importlib/test/source/util.py", 
line 18, in wrapper
to_return = fxn(*args, **kwargs)
  File "/Users/cartman/Python-
3.1b1/Lib/importlib/test/source/test_abc_loader.py", line 253, in 
verify_bytecode
self.assertIn(name, mock.module_bytecode)
AssertionError: 'pkg.mod' not found in {}

--
status: pending -> open

___
Python tracker 

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



[issue5809] "No such file or directory" with framework build under MacOS 10.4.11

2009-05-07 Thread Ned Deily

Ned Deily  added the comment:

--enable-framework and --enable-shared are mutually exclusive options.  
See, for example, the discussion in Issue4472.  Use one or the other, not 
both.

As a side comment, I think this error crops up often enough that it would 
make sense to add a check somewhere (configure?) and produce a useful 
error.

--
nosy: +nad, ronaldoussoren

___
Python tracker 

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



[issue4432] IDLE.app (Mac) File Menu MIssing Options

2009-05-07 Thread Ned Deily

Ned Deily  added the comment:

Can not reproduce with 3.0.1.  A number of fixes were checked in for OS X 
Python builds and specifically for IDLE menus between 3.0rc3 and 3.0.1.  
See, for example, Issue5196 and Issue5194.

--
nosy: +nad, ronaldoussoren

___
Python tracker 

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