[issue9258] Typos in docs for methods kqueue and kevent of module 'select'

2010-07-14 Thread Retro

New submission from Retro :

Fix the docs for every selected Python version. They all have the same typos.

The typos appear in the documentation of the 'select' module. These are the 
methods that need typo fixes:


select.kqueue()
(Only supported on BSD.)

Returns a kernel queue object object ...

[remove one of the words 'object' here because they are unnecessarily repeated]


select.kevent(ident, filter=KQ_FILTER_READ, flags=KQ_EV_ADD, fflags=0, data=0, 
udata=0)
(Only supported on BSD.)

Returns a kernel event object object; see section Kevent Objects below for the 
methods supported by kqueue objects.

[again, remove one of the words 'object' here because they are unnecessarily 
repeated; also, fix the word 'kqueue' to 'kevent']

--
assignee: d...@python
components: Documentation
messages: 110255
nosy: Retro, d...@python, georg.brandl
priority: normal
severity: normal
status: open
title: Typos in docs for methods kqueue and kevent of module 'select'
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3

___
Python tracker 

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



[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-07-14 Thread Ask Solem

Ask Solem  added the comment:

There's one more thing

 if exitcode is not None:
   cleaned = True
if exitcode != 0 and not worker._termination_requested:
abnormal.append((worker.pid, exitcode))


Instead of restarting crashed worker processes it will simply bring down
the pool, right?

If so, then I think it's important to decide whether we want to keep
the supervisor functionality, and if so decide on a recovery strategy.

Some alternatives are:

A) Any missing worker brings down the pool.

B) Missing workers will be replaced one-by-one. A maximum-restart-frequency 
decides when the supervisor should give up trying to recover
the pool, and crash it.

C) Same as B, except that any process crashing when trying to get() will bring 
down the pool.

I think the supervisor is a good addition, so I would very much like to keep 
it. It's also a step closer to my goal of adding the enhancements added by 
Celery to multiprocessing.pool.

Using C is only a few changes away from this patch, but B would also be 
possible in combination with my accept_callback patch. It does pose some 
overhead, so it depends on the level of recovery we want to support.

accept_callback: this is a callback that is triggered when the job is reserved 
by a worker process. The acks are sent to an additional Queue, with an 
additional thread processing the acks (hence the mentioned overhead). This 
enables us to keep track of what the worker processes are doing, also get the 
PID of the worker processing any given job (besides from recovery, potential 
uses are monitoring and the ability to terminate a job 
(ApplyResult.terminate?). See 
http://github.com/ask/celery/blob/master/celery/concurrency/processes/pool.py

--

___
Python tracker 

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



[issue9258] Typos in docs for methods kqueue and kevent of module 'select'

2010-07-14 Thread Georg Brandl

Georg Brandl  added the comment:

Thanks, fixed in r82871.

--
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



[issue9258] Typos in docs for methods kqueue and kevent of module 'select'

2010-07-14 Thread Éric Araujo

Éric Araujo  added the comment:

Just for your information, there is no 3.3 version yet. This value is useful 
for bugs that won’t be fixed in 3.2 (a.k.a. the py3k trunk).

--
nosy: +merwok

___
Python tracker 

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



[issue9258] Typos in docs for methods kqueue and kevent of module 'select'

2010-07-14 Thread Georg Brandl

Georg Brandl  added the comment:

Ah yes, and please don't add me to the nosy list on doc issues.  d...@python is 
enough.

--

___
Python tracker 

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



[issue9235] missing "import sys" in Tools/gdb/libpython.py

2010-07-14 Thread Georg Brandl

Georg Brandl  added the comment:

Thanks, fixed in r82874.

--
nosy: +georg.brandl
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



[issue2986] difflib.SequenceMatcher not matching long sequences

2010-07-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Le mercredi 14 juillet 2010 à 01:45 +, Terry J. Reedy a écrit :
> 
> 2. Add a parameter that defaults to using the heuristic but allows
> turning it off. Perhaps better, but code that used the new API would
> crash if run on 2.7.0

Yes, but this is an exceptional situation. We normally don't add new
APIs in bugfix versions. We'll have to live with it.

> 3.
> [...]
> Ugly, but perhaps crazy brilliant. Use of such a hack would obviously
> be temporary. Perhaps its use could be made to issue a -3 warning if
> such were enabled.

It's still incredibly ugly. Besides, code written for 2.7.1 might not
"blow up" with 2.7, but it will still have different behaviour.
If you are using the new parameter, it's because you *need* it, hence
different behaviour will be unacceptable; therefore, better to raise an
error as the API change proposal does.

--

___
Python tracker 

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



[issue9217] 2to3 crashes with some doctests

2010-07-14 Thread Tiago Antao

Tiago Antao  added the comment:

I've re-opened this bug because of the late examples that I've included that 
still crash. I can open a new bug if you prefer with the late examples (just 
tell me and I will open a new bug).

This is somewhat important for us: In order to be able to release a Python3 
version of biopython we need to have 2to3 doctest processing working.

--
status: closed -> open

___
Python tracker 

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



[issue5673] Add timeout option to subprocess.Popen

2010-07-14 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +brian.curtin
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



[issue9251] Test for the import lock

2010-07-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> test_threaded_import is designed to check the import lock (and it does
> at least to some degree - I changed runpy's handling of the import
> lock because my original approach broke that test).

Apparently, Lib/test/test_threaded_import only works if run directly. If
run through regrtest, it succeeds even with the import lock disabled
(probably because random.py is already included by regrtest).

--

___
Python tracker 

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



[issue7231] Windows installer does not add \Scripts folder to the path

2010-07-14 Thread sorin

sorin  added the comment:

Additional information that will enable the installer to update the path 
without requiring a relogin/restart: http://support.microsoft.com/kb/104011

--

___
Python tracker 

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



[issue5842] Move test outside of urlparse module

2010-07-14 Thread Éric Araujo

Éric Araujo  added the comment:

Done in r82881 to 82883. Thanks orsenthil!

--
resolution:  -> fixed
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



[issue5842] Move test outside of urlparse module

2010-07-14 Thread Éric Araujo

Éric Araujo  added the comment:

FTR, r82884 too for 2.6.

--

___
Python tracker 

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



[issue9251] Test for the import lock

2010-07-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Ok, here is a patch for test_threaded_import that makes it work for regrtest 
too. I've removed all global variables and converted it to unittest.

--
keywords: +patch
Added file: http://bugs.python.org/file17995/threadimp.patch

___
Python tracker 

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



[issue9259] Python 2.7 breaks assigned __exit__s

2010-07-14 Thread Ariel Ben-Yehuda

New submission from Ariel Ben-Yehuda :

Hello, I think there is a problem with Python 2.7: I installed it, and tried to 
compile GObject-Introspection 0.9.2. Here is the result:

...
  GISCAN GLib-2.0.gir
Traceback (most recent call last):
  File "../tools/g-ir-scanner", line 36, in 
from giscanner.scannermain import scanner_main
  File "/sources/gobject-introspection-0.9.2/giscanner/scannermain.py", line 
31, in 
from giscanner.dumper import compile_introspection_binary
  File "/sources/gobject-introspection-0.9.2/giscanner/dumper.py", line 26, in 

from .glibtransformer import IntrospectionBinary
  File "/sources/gobject-introspection-0.9.2/giscanner/glibtransformer.py", 
line 34, in 
from .transformer import Names
  File "/sources/gobject-introspection-0.9.2/giscanner/transformer.py", line 
31, in 
from .girparser import GIRParser
  File "/sources/gobject-introspection-0.9.2/giscanner/girparser.py", line 32, 
in 
from .girwriter import COMPATIBLE_GIR_VERSION
  File "/sources/gobject-introspection-0.9.2/giscanner/girwriter.py", line 30, 
in 
from .xmlwriter import XMLWriter
  File "/sources/gobject-introspection-0.9.2/giscanner/xmlwriter.py", line 70, 
in 
with LibtoolImporter:
AttributeError: __exit__

Oops, no GObject-Introspection for me. Investigating the bug, I looked in the 
recent changes in Python2.7 for something interesting, and found this: 
A new opcode was added to perform the initial setup for with statements, 
looking up the __enter__()  and __exit__()  methods. (Contributed by Benjamin 
Peterson.)

Finally, I made 3 test cases to the bug. All 3 produce no input in Python 2.6, 
but crash pretty nicely in 2.7, the first 2 not finding __exit__ and the last 
missing __enter__.

I will try to make a patch, however my CPython skills are not so great, so you 
will probably make a better one.

--
components: Interpreter Core
files: tests.tar.xz
messages: 110268
nosy: arielbyd
priority: normal
severity: normal
status: open
title: Python 2.7 breaks assigned __exit__s
versions: Python 2.7
Added file: http://bugs.python.org/file17996/tests.tar.xz

___
Python tracker 

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



[issue9251] Test for the import lock

2010-07-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I've committed the fix in r82885 (3.2) and r82886 (3.1). The reliance on random 
still looks a bit quirky to me, but at least the test now does what it should 
do, and has a cleaned up coding style.

I'm leaving this issue open, for the other test might be interesting to 
integrate as well.

--

___
Python tracker 

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



[issue4932] Little improvement on urlparse module, urlparse function.

2010-07-14 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

I reviewed the patch and we may not go with it.
- There is recent improvements in parsing and the patch does not go well with 
it, especially the clear_cache removal.

Also there is a mistake in the patch:

-scheme, url = url[:i].lower(), url[i+1:]
+url = url[i+1:]

This can create problems for certain parsing logic as scheme is being used 
later in the code.

Closing the bug is invalid.

--
resolution:  -> invalid
stage: unit test needed -> 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



[issue9259] Python 2.7 breaks assigned __exit__s

2010-07-14 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue7384] curses crash on FreeBSD

2010-07-14 Thread Stefan Krah

Stefan Krah  added the comment:

So you have garbage from stderr in readline_termcap_lib. Since that's
useless anyway (no matter what locale is set), let's check the return
value of os.system().

The attached patch skips readline linkage detection if ldd fails. In
that case, linking will be done in the same manner as before r81830.


Please report if the patch allows you to build py3k in the problematic
locale.


Your method of detecting readline linkage looks interesting, but I
doubt that I'm going to implement it: These cross platform issues
take an *immense* amount of time, since you have to test on all
buildbot platforms (+ OpenBSD and OpenSolaris), with different
compilers (icc, suncc).

If you want that done, the best way is to open another issue, submit a
patch (probably for configure.in) _and_ do all the testing.

--
Added file: http://bugs.python.org/file17997/ldd-retval-py3k.patch

___
Python tracker 

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



[issue6033] LOOKUP_METHOD and CALL_METHOD optimization

2010-07-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

First, are these benchmark results jitted or non-jitted? Right now, non-jitted 
results are a stronger motivation for inclusion in main CPython, IMHO. 

Second, 2.7 won't receive any features / performance improvements anymore. It 
would be nice to have 3.2 (non-jitted) benchmark results.

Third, if removing intermediate allocations is the kind of optimizations a JIT 
will do anyway, does it make sense or not to make these optimizations explicit 
at the bytecode level? (this is really an open question, not a rhetorical one)

--
nosy: +collinwinter, jyasskin

___
Python tracker 

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



[issue6033] LOOKUP_METHOD and CALL_METHOD optimization

2010-07-14 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage:  -> patch review
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



[issue9244] multiprocessing.pool: Worker crashes if result can't be encoded

2010-07-14 Thread Ask Solem

Ask Solem  added the comment:

> To be clear, the errback change and the unpickleable result
> change are actually orthogonal, right?

Yes, it could be a separate issue. Jesse, do you think I should I open
up a separate issue for this?

> Why not add an error_callback for map_async as well?

That's a good idea!

> Any reason you chose to use a different internal name
> (errback versus error_callback)? It seems cleaner to me
> to be consistent about the name.

It was actually a mistake. The argument was ``errback`` before, so
it's just a leftover from the previous name.

> In general, I'm wary of nonessential whitespace changes...
> did you mean to include these?

Of course not.

> Using "assertTrue" seems misleading. "assertIsNotNone" is what
> really mean, right?  Although, I believe that's redundant,
> since presumably self.assertIsInstance(None, KeyError) will
> error out anyway (I haven't verified this).

bool(KeyError("foo")) is True and bool(None) is False, so it works either way. 
It could theoretically result in a false negative if
the exception class tested overrides __nonzero__, but that is unlikely
to happen as the target always returns KeyError anyway (and the test below 
ensures it) It's just a habit of mine, unless I really want to test for 
Noneness, I just use assertTrue, but I'm not against changing it to 
assertIsNotNone either.

> Under what circumstances would these be None?  (Perhaps you
> want wrapped.exc != 'None'?)  The initializer for
> MaybeEncodingError enforces the invariant that exc/value are strings
> right?
It's just to test that these are actually set to something.
Even an empty string passes with assertIsNone instead of assertTrue.
Maybe it's better to test the values set, but I didn't bother.

--

___
Python tracker 

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



[issue9259] Python 2.7 breaks assigned __exit__s

2010-07-14 Thread Éric Araujo

Éric Araujo  added the comment:

Thank you for the report. Unfortunately, the 2.6 behavior was a bug, as I 
explained on #9220: Magic methods are looked up on the object’s class, not in 
the object’s __dict__. 

(Your test with class methods was a clever idea, but a class is a type 
instance, so it’s the same behavior: __enter__ is looked up on type, not on the 
class. Nice try :)

Tip for future bug reports: We prefer regular files over archives. Thanks again!

--
nosy: +merwok

___
Python tracker 

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



[issue9259] Python 2.7 breaks assigned __exit__s

2010-07-14 Thread Éric Araujo

Changes by Éric Araujo :


--
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue9259] Python 2.7 breaks assigned __exit__s

2010-07-14 Thread Ariel Ben-Yehuda

Ariel Ben-Yehuda  added the comment:

Bug or not bug, Python2.7 breaks Gobject-Introspection.

--
status: closed -> open

___
Python tracker 

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



[issue9259] Python 2.7 breaks assigned __exit__s

2010-07-14 Thread Éric Araujo

Éric Araujo  added the comment:

Please produce a test to prove that Python behaves in contradiction to the 
documentation. Otherwise I’m afraid it’s a GI bug, like in your tests :)

--

___
Python tracker 

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



[issue9249] struct.pack and Long Integer datatype should be 4, but is 8 bytes

2010-07-14 Thread hannes reuter

hannes reuter  added the comment:

Dear Marc,

Thanks for taking time to answer that question. I understand that this
comes from the native formating i specified,
>>> calcsize('L')
8
>>> calcsize(' wrote:
>
> Mark Dickinson  added the comment:
>
> Please read the three sentences directly preceding that table and tell me
> whether they clear this up for you.
>
> --
> assignee: theller -> mark.dickinson
> nosy: +mark.dickinson
>
> ___
> Python tracker 
> 
> ___
>

--
status: pending -> open

___
Python tracker 

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



[issue9259] Python 2.7 breaks assigned __exit__s

2010-07-14 Thread Ariel Ben-Yehuda

Ariel Ben-Yehuda  added the comment:

My test on Class Methods was based on the GI Code that does not run on Python 
2.7.

--

___
Python tracker 

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



[issue9259] Python 2.7 breaks assigned __exit__s

2010-07-14 Thread Éric Araujo

Éric Araujo  added the comment:

I am afraid we have conflicting viewpoints. You are saying that upgrading 
Python broke code, and I agree it’s a bad thing. Usually such regression 
reports are accepted and fixed.

In this case however, the code was already broken in the previous version, it 
was only working because of a problem in the implementation. So from the 
viewpoint of GI users, it’s a regression, but from the viewpoint of Python the 
2.7 behavior fixes a regression in 2.6. It is not supported to find magic 
methods (“__name__”) on instances.

--

___
Python tracker 

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



[issue1448060] gettext.py breaks on plural-forms header (PATCH)

2010-07-14 Thread Mark Lawrence

Changes by Mark Lawrence :


--
dependencies:  -patch fixing #1448060 (gettext.py bug)

___
Python tracker 

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



[issue9259] Python 2.7 breaks assigned __exit__s

2010-07-14 Thread Éric Araujo

Éric Araujo  added the comment:

Since Benjamin Peterson, release manager for 2.7, confirmed that the change was 
intentional, I’m closing again.

To solve the bug in GI, you need to define a metaclass with those __enter__ and 
__exit__ methods, then use it as metaclass for LibtoolImporter. Please send me 
private email if you want more details.

--
status: open -> closed

___
Python tracker 

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



[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-07-14 Thread Ask Solem

Ask Solem  added the comment:

Jesse wrote,


> We can work around the shutdown issue (really, bug 9207) by
> ignoring the exception such as shutdown.patch does, or passing in
> references/adding references to the functions those methods need. Or (as 
> Brett suggested) converting them to class methods and adding references to 
> the class. Or passing them in via the signature like this 
> _handle_workers(arg, _debug=debug), etc.


Greg wrote,

> Another option would be to enable only for the worker handler.  I
> don't have a particularly great sense of what the Right Thing to
> do here is.

I don't think _make_shutdown_safe should be added to the result handler.
If the error can indeed happen there, then we need to solve it in a way that 
enables it to finish the work.

Jesse, how hard is it to fix the worker handler by passing the references? Note 
that _worker_handler is not important to complete shutdown at this point, but 
it may be in the future (it seems termination.patch already changes this)

--

___
Python tracker 

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



[issue1574217] isinstance swallows exceptions

2010-07-14 Thread Mark Lawrence

Mark Lawrence  added the comment:

Can we get this closed as the patch is in 2.6 already, just needs to be applied 
to the later versions.  Or have I missed something?

--
nosy: +BreamoreBoy
versions: +Python 3.2

___
Python tracker 

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



[issue1574217] isinstance swallows exceptions

2010-07-14 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

I don't see it being applied.  Tres Seaver above reports that 
issue1574217_dont_mask_errors.txt applies cleanly to 2.6 branch, which means 
that it has not been applied yet.

Someone needs to check if the patch is current for 2.7 and py3k branches to 
move this forward.

--
nosy: +belopolsky
versions:  -Python 2.6, Python 3.1

___
Python tracker 

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



[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-07-14 Thread Jesse Noller

Jesse Noller  added the comment:

Passing the references seems to be a losing game; for _handle_workers - we  
only need 1 function (debug) - for others (say _join_exited_workers), we need 
references to reversed/range/len.

A possible alternative is to make those threads non-daemon threads; but I'd 
have to test that.

--

___
Python tracker 

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



[issue9227] can't import Tkinter / use IDLE after installing Python 2.7 on Mac OS X

2010-07-14 Thread Alex Rodriguez

Changes by Alex Rodriguez :


--
nosy: +Alex.Rodriguez

___
Python tracker 

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



[issue9227] can't import Tkinter / use IDLE after installing Python 2.7 on Mac OS X

2010-07-14 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

I'm going to experiment with embedding a minimal version of Tk in the 
installer, which would both fix this issue and ensure that we use a version of 
Tk that is better adjusted to OSX (which should remove some other issues)

I want to do this during the europython sprint days.

--

___
Python tracker 

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



[issue9260] A finer grained import lock

2010-07-14 Thread Antoine Pitrou

New submission from Antoine Pitrou :

This is an implementation of the idea suggested in:
http://mail.python.org/pipermail/python-dev/2003-February/033445.html

The patch creates a dictionary of reentrant locks keyed by module full name. 
Trying to import a module or package will first get the lock for that module 
(or, if necessary, create it) and then acquire it. This is done for any module 
type.

The global import lock is still there, but only used for two things:
- serializing first time creation of module-specific locks
- protection of imports based on import hooks, since we don't know whether 
third-party import hooks are themselves thread-safe

Semantics of the public C API are unchanged, because it is not clear whether 
they should be or not (concerns of usefulness vs. compatibility). For example, 
PyImport_ImportModuleNoBlock() still uses the global import lock but this could 
be relaxed in a later patch.

--
components: Interpreter Core
files: implock.patch
keywords: patch
messages: 110287
nosy: brett.cannon, christian.heimes, grahamd, gvanrossum, ncoghlan, pitrou
priority: normal
severity: normal
status: open
title: A finer grained import lock
type: feature request
versions: Python 3.2
Added file: http://bugs.python.org/file17998/implock.patch

___
Python tracker 

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



[issue9260] A finer grained import lock

2010-07-14 Thread Antoine Pitrou

Changes by Antoine Pitrou :


Removed file: http://bugs.python.org/file17998/implock.patch

___
Python tracker 

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



[issue9260] A finer grained import lock

2010-07-14 Thread Antoine Pitrou

Changes by Antoine Pitrou :


Added file: http://bugs.python.org/file17999/implock.patch

___
Python tracker 

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



[issue9012] Separate compilation of time and datetime modules

2010-07-14 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
nosy: +tim.golden

___
Python tracker 

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



[issue9079] Make gettimeofday available in time module

2010-07-14 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
nosy: +tim.golden

___
Python tracker 

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



[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-07-14 Thread Greg Brockman

Greg Brockman  added the comment:

Before I forget, looks like we also need to deal with the result from a worker 
being un-unpickleable:
"""
#!/usr/bin/env python
import multiprocessing
def foo(x):
  global bar
  def bar(x):
pass
  return bar
p = multiprocessing.Pool(1)
p.apply(foo, [1])
"""

This shouldn't require much more work, but I'll hold off on submitting a patch 
until we have a better idea of where we're going in this arena.

> Instead of restarting crashed worker processes it will simply bring down
> the pool, right?
Yep.  Again, as things stand, once you've lost an worker, you've lost a task, 
and you can't really do much about it.  I guess that depends on your 
application though... is your use-case such that you can lose a task without it 
mattering?  If tasks are idempotent, one could have the task handler resubmit 
them, etc..  But really, thinking about the failure modes I've seen (OOM 
kills/user-initiated interrupt) I'm not sure under what circumstances I'd like 
the pool to try to recover.

The idea of recording the mapping of tasks -> workers seems interesting.  
Getting all of the corner cases could be hard (e.g. making removing a task from 
the queue and recording which worker did the removing atomic, detecting if the 
worker crashed while still holding the queue lock) and doing this would require 
extra mechanism.  This feature does seem to be useful for pools running many 
different jobs, because that way a crashed worker need only terminate one job.

Anyway, I'd be curious to know more about the kinds of crashes you've 
encountered from which you'd like to be able to recover.  Is it just 
Unpickleable exceptions, or are there others?

--

___
Python tracker 

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



[issue9260] A finer grained import lock

2010-07-14 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
nosy: +belopolsky

___
Python tracker 

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



[issue1574217] isinstance swallows exceptions

2010-07-14 Thread Tres Seaver

Tres Seaver  added the comment:

This bug exists in Python 2.6 and 3.1, which are still being maintained, AFAIK.

--
versions: +Python 2.6, Python 3.1

___
Python tracker 

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



[issue1574217] isinstance swallows exceptions

2010-07-14 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

This looks like a borderline case between a bug and a feature request.  If this 
is deemed to be a feature, it is not appropriate for 2.x or 3.1.  In any case, 
I think the first step should be to consider this for py3k branch.

--

___
Python tracker 

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



[issue444582] Finding programs in PATH, adding shutil.which

2010-07-14 Thread Jan Killian

Jan Killian  added the comment:

* updated tests

--
Added file: http://bugs.python.org/file18000/shutil_which_82778.patch

___
Python tracker 

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



[issue444582] Finding programs in PATH, adding shutil.which

2010-07-14 Thread Jan Killian

Changes by Jan Killian :


Added file: http://bugs.python.org/file18001/which.py

___
Python tracker 

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



[issue1574217] isinstance swallows exceptions

2010-07-14 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

I have verified that the issue is present in py3k.  The unit test portion of 
the patch applies cleanly in py3k an the added tests fail.  The code portion 
applies with patch -l and fixes the issue.  I'll upload a patch with fixed 
white space.

--

___
Python tracker 

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



[issue1574217] isinstance swallows exceptions

2010-07-14 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


Added file: http://bugs.python.org/file18002/issue1574217.diff

___
Python tracker 

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



[issue1646068] Dict lookups fail if sizeof(Py_ssize_t) < sizeof(long)

2010-07-14 Thread Mark Lawrence

Mark Lawrence  added the comment:

As this is a small patch about which there is one statement from Martin that 
says "I believe the proposed patch is fine", there is only one query from 
Antoine, and because the issue discussed refers to problems with 32 and 64 bit 
sizes, could someone with the relevant knowledge please take a look with a view 
to moving this forward.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue9251] Test for the import lock

2010-07-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Here is another patch that also tests that calls to path hooks and meta_path 
entries are serialized. Again, they pass in normal conditions and fail when the 
import lock is disabled.

--
Added file: http://bugs.python.org/file18003/threadimp2.patch

___
Python tracker 

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



[issue9259] Python 2.7 breaks assigned __exit__s

2010-07-14 Thread Ariel Ben-Yehuda

Ariel Ben-Yehuda  added the comment:

Done it for myself. However, I am not a GI Maintainer - you should talk with 
them and send them this patch.

--

___
Python tracker 

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



[issue9261] include higher (../../) dirs fails

2010-07-14 Thread Dan OD

New submission from Dan OD :

MANIFEST.in example:

recursive-include ../../this *.that

fails to include files with

"warning: no files found matching '*.that' under directory '../../this'"

and also

include ../../this *.that

fails with

"warning: no files found matching '../../this'"

- odd situation I know, but including files in higher directories shouldn't be 
impossible should it? Thanks, Dan

--
assignee: tarek
components: Distutils
messages: 110296
nosy: indiedan, tarek
priority: normal
severity: normal
status: open
title: include higher (../../) dirs fails
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



[issue1669539] Change (fix!) os.path.isabs() semantics on Win32

2010-07-14 Thread Mark Lawrence

Mark Lawrence  added the comment:

Nosy list changed as both have an interest in Windows issues.

--
nosy: +BreamoreBoy, brian.curtin, tim.golden

___
Python tracker 

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



[issue6033] LOOKUP_METHOD and CALL_METHOD optimization

2010-07-14 Thread Reid Kleckner

Reid Kleckner  added the comment:

Sorry, I was just posting it so Benjamin could see what this bought us.  I'm 
not pushing to get this in CPython.

The results are for JITed code.  I forget what the interpreted results are.  I 
think they are good for the microbenchmarks, but not as good for the macro.

--

___
Python tracker 

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



[issue5673] Add timeout option to subprocess.Popen

2010-07-14 Thread Brian Curtin

Brian Curtin  added the comment:

I'm looking into the TODO details right now, but the patch as-is didn't pass 
for me.

The last line of test_communicate_timeout fails on Windows 7 with 
"pineapple\r\npear\r\n" not matching "pineapple\npear\n". Creating the Popen 
object with universal_newlines=1 fixes the issue locally (haven't tried on 
other OSes), but it should probably follow the convention laid out in 
test_universal_newlines.

--

___
Python tracker 

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



[issue1646068] Dict lookups fail if sizeof(Py_ssize_t) < sizeof(long)

2010-07-14 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Responding to Antoine question, I don't understand how you would use a union 
here.  Certainly you cannot define Py_dicthashcache_t as a union of long and 
Py_ssize_t because it will not be able to easily assign long or Py_ssize_t 
values to it. I don't think ANSI C allows a cast from integer type to a union.

I am OK with the patch, but if this goes into 2.7/3.x, I think the same change 
should be applied to the set type.

--
nosy: +belopolsky

___
Python tracker 

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



[issue9262] IDLE: Use ttk.Notebook for tabbed windows

2010-07-14 Thread Terry J. Reedy

New submission from Terry J. Reedy :

The addition of tabbed windows to web browsers was a great advance that is now 
standard. For Windows, it eliminated the crowding of the taskbar. I suspect it 
made switching easier on all systems.

The addition of the same to IDLE would have similar benefits. I often have a 
shell and two edit windows open.

This would require, I believe, the use of ttk.Notebook, which requires tcl/tk 
8.5+ or the Tile extension. Can this be made a requirement for IDLE in 3.2? 
Windows has 8.5 now. *nix users can add Tile if they have 8.4. I do not know 
the situation for Mac.

--
components: IDLE
messages: 110301
nosy: tjreedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE: Use ttk.Notebook for tabbed windows
type: feature request
versions: Python 3.2

___
Python tracker 

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



[issue9261] include higher (../../) dirs fails

2010-07-14 Thread Dan OD

Dan OD  added the comment:

Thinking about this - maybe including dirs above ./ is bad as it's not obvious 
where they should live in the sdist. 

My alternative would be to create links to ../../this in ./ but then distutils 
creates links rather than hard copies in sdist - is this something that can be 
avoided? 

Thanks again, Dan

--

___
Python tracker 

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



[issue1646068] Dict lookups fail if sizeof(Py_ssize_t) < sizeof(long)

2010-07-14 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

On the second thought, this comment:

-   /* Cached hash code of me_key.  Note that hash codes are C longs.
-* We have to use Py_ssize_t instead because dict_popitem() abuses
-* me_hash to hold a search finger.
-*/

suggests that a union may be appropriate here.  I am not sure of the standards 
standing of anonymous unions, but if we could do

union {
  Py_ssize_t me_finger;
  long me_hash;
};

it would cleanly solve the problem.  If anonymous unions are not available, a 
regular union could also do the trick:

union {
  Py_ssize_t finger;
  long hash;
} me;

and use me.finger where me is used as search finger and me.hash where it stores 
hash.  Less clever naming scheme would be welcome, though.

--

___
Python tracker 

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



[issue9261] include higher (../../) dirs fails

2010-07-14 Thread Dan OD

Dan OD  added the comment:

Sorry for all the noise - this dynamic link thing seems to be fixed in 2.7 
rendering this report 'closed'

Dan

--
status: open -> closed

___
Python tracker 

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



[issue9262] IDLE: Use ttk.Notebook for tabbed windows

2010-07-14 Thread Guilherme Polo

Guilherme Polo  added the comment:

It is possible to create a tabbed window without ttk.Notebook. This is already 
being done in the configuration dialog. The real issue goes much beyond 
ttk.Notebook, check the patch "tabs_ttk_and_co.diff" at 
http://code.google.com/p/python-ttk/downloads/list for an earlier work on this 
(there is also a screenshot in the wiki over there showing the final result).

--
nosy: +gpolo

___
Python tracker 

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



[issue1646068] Dict lookups fail if sizeof(Py_ssize_t) < sizeof(long)

2010-07-14 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Please ignore my comment about set type.  Sets don't have this issue.

--

___
Python tracker 

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



[issue1669539] Change (fix!) os.path.isabs() semantics on Win32

2010-07-14 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



[issue1646068] Dict lookups fail if sizeof(Py_ssize_t) < sizeof(long)

2010-07-14 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Yet it looks like set has a bigger problem whenever sizeof(Py_ssize_t) > 
sizeof(long).  setentry.hash is defined as long, but set_pop() stores a 
Py_ssize_t index in it.

--

___
Python tracker 

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



[issue9262] IDLE: Use tabbed shell and edit windows

2010-07-14 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Changed title to match new info. Tabs might also be used for any pop-up windows 
that would benefit from persistence. [JEdit does this, but being 
non-language-specific, it does not have a shell with error traceback.]

--
title: IDLE: Use ttk.Notebook for tabbed windows -> IDLE: Use tabbed shell and 
edit windows

___
Python tracker 

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



[issue9262] IDLE: Use tabbed shell and edit windows

2010-07-14 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' :


--
nosy: +giampaolo.rodola

___
Python tracker 

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



[issue9253] argparse: optional subparsers

2010-07-14 Thread Vincent Driessen

Vincent Driessen  added the comment:

Actually, this is a rather common concept. Broadly used tools like for example 
Git use this kind of subcommand handling.

This command shows all remotes:
   git remote(i.e. is like git remote list)

Showing/removing remotes is done using subsubcommands:
   git remote show [...]
   git remote rm [...]

That, in combination with the explicit design goal that "[argparse] isn't 
dogmatic about what your command line interface should look like" should be 
enough reason to be wanting this, in my humble opinion.

--

___
Python tracker 

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



[issue1646068] Dict lookups fail if sizeof(Py_ssize_t) < sizeof(long)

2010-07-14 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

I am attaching a patch that uses a regular union of long and Py_ssize_t to 
store cached hash/index value in both set and dict entry.  Using an anonymous 
union would simplify the patch and would reduce the likelihood of breaking 
extensions that access entry structs.

--
Added file: http://bugs.python.org/file18004/issue1646068.diff

___
Python tracker 

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



[issue1349732] urllib.urlencode provides two features in one param

2010-07-14 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

This was fixed as part of Issue8788. Closing this.

--
resolution:  -> duplicate
stage: unit test needed -> 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



[issue9249] struct.pack and Long Integer datatype should be 4, but is 8 bytes

2010-07-14 Thread Mark Dickinson

Mark Dickinson  added the comment:

> However, as my system is a little endian one(e.g.
> sys.byteorder=little), whats the difference between native and little

Native mode uses:  native size, native byteorder and alignment that
  matches your platform
Little endian: standard size, little-endian, no alignment

The *native* size means the size of the corresponding C type (e.g., as computed 
by sizeof) on your platform.  So on a typical 64-bit Unix-alike platform, 
that's 8 for 'l' and 'L'; on 64-bit Windows and most 32-bit platforms, it's 4 
for 'l' and 'L'.

The *standard* size is as given by the table.  It's the same on all platforms.

It's true that on most common platforms the 'l' and 'L' codes are the only ones 
likely to differ.

> b) Where could I look up/find such a native format table ?
Why not just use struct.calcsize?

This is all explained in the docs;  I'm going to close this issue, since I 
don't think there's any discrepancy between the docs and the behaviour of the 
module.

However, if you have ideas for specific improvements to the documentation, 
please do open another issue.

--
status: open -> closed

___
Python tracker 

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



[issue3163] module struct support for ssize_t and size_t

2010-07-14 Thread Mark Dickinson

Mark Dickinson  added the comment:

Jean, if you're still around:

Do you still have interest in pursuing this?

--

___
Python tracker 

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



[issue5843] Possible normalization error in urlparse.urlunparse

2010-07-14 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Currently this claim will fail:

>>> obj = urlparse.urlparse('http://a/b/c?')
>>> urlparse.urlunparse(obj)
'http://a/b/c'
>>> obj = urlparse.urlparse('http://a/b/c#')
>>> urlparse.urlunparse(obj)
'http://a/b/c'

If we move away from the current behavior, there will surely be some test 
failures that can be observed for urljoins. We will have to consider those 
cases too while fixing this.

--

___
Python tracker 

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



[issue3163] module struct support for ssize_t and size_t

2010-07-14 Thread Mark Dickinson

Changes by Mark Dickinson :


--
priority: normal -> low

___
Python tracker 

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



[issue1646068] Dict lookups fail if sizeof(Py_ssize_t) < sizeof(long)

2010-07-14 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

If this goes in, it can't go into bug fix releases, as it may break the ABI.

--
versions:  -Python 2.6, Python 2.7, Python 3.1

___
Python tracker 

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



[issue9260] A finer grained import lock

2010-07-14 Thread Brett Cannon

Brett Cannon  added the comment:

So I say we don't worry about loaders being thread-safe. If __import__ handles 
the locking for a specific module then it will hold the lock on behalf of the 
loader. Now if someone decides to call load_module on their own, that's there 
business, but they should be aware of what could happen if they do that without 
acquiring the lock themselves. Otherwise we just make sure to provide a context 
manager that takes the name of the module and people can use that when they 
make their call to loader.load_module.

--

___
Python tracker 

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



[issue6853] system proxy not used for https (on windows)

2010-07-14 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Fixed in r82890 and branches. Thanks Mark for bringing these issues out.

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue9260] A finer grained import lock

2010-07-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> So I say we don't worry about loaders being thread-safe. If __import__
> handles the locking for a specific module then it will hold the lock
> on behalf of the loader.

Yes but what happens if two different modules are imported from two
different threads, and handled by the same loader? The loader could have
global structures which rely on serialization of imports for
consistency.

--

___
Python tracker 

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



[issue6960] test_telnetlib gives spurious output

2010-07-14 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

No problems observed now. I randomized and ran the tests a couple of times. I 
don't know what the scenario was when this was observed, so I will let __ap__ 
close the issue.

--
nosy: +orsenthil

___
Python tracker 

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



[issue6960] test_telnetlib gives spurious output

2010-07-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Ok, let's say this was an exceptional failure.

--
resolution:  -> works for me
status: open -> closed

___
Python tracker 

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



[issue9259] Python 2.7 breaks assigned __exit__s

2010-07-14 Thread Éric Araujo

Éric Araujo  added the comment:

Since you know the project, the bug and the fix, I think you’re in a better 
position than me to talk with them.

--

___
Python tracker 

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



[issue7965] Problem with urlparse in Windows XP after a drag and drop

2010-07-14 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

The resultant url you get after doing a urlparse is not a Windows PATH, but url 
path component. So, when you use in relative manner by doing urljoin, you will 
see that the original will get constructed properly.

So, there is really no a problem here.

--
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



[issue9260] A finer grained import lock

2010-07-14 Thread Brett Cannon

Brett Cannon  added the comment:

On Wed, Jul 14, 2010 at 12:34, Antoine Pitrou wrote:

>
> Antoine Pitrou  added the comment:
>
> > So I say we don't worry about loaders being thread-safe. If __import__
> > handles the locking for a specific module then it will hold the lock
> > on behalf of the loader.
>
> Yes but what happens if two different modules are imported from two
> different threads, and handled by the same loader? The loader could have
> global structures which rely on serialization of imports for
> consistency.
>

That's why I said we should supply a context decorator (or function) which
will handle the lock appropriately, taking the name of the module to import
as an argument so the locking is fine-grained.

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

___
Python tracker 

___On Wed, Jul 14, 2010 at 12:34, Antoine Pitrou 
rep...@bugs.python.org> 
wrote:


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

> So I say we don't worry about loaders being thread-safe. If 
__import__
> handles the locking for a specific module then it will hold the lock
> on behalf of the loader.

Yes but what happens if two different modules are imported from two
different threads, and handled by the same loader? The loader could have
global structures which rely on serialization of imports for
consistency.That's why I said we 
should supply a context decorator (or function) which will handle the lock 
appropriately, taking the name of the module to import as an argument so the 
locking is fine-grained.


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



[issue9260] A finer grained import lock

2010-07-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> That's why I said we should supply a context decorator (or function) which
> will handle the lock appropriately, taking the name of the module to import
> as an argument so the locking is fine-grained.

Ok, so what are you saying is that we can break compatibility for non
thread-safe import loaders which currently work fine?
(I have nothing against it, just trying to be sure we agree on the
implications)

--

___
Python tracker 

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



[issue5437] Singleton MemoryError can hold traceback data and locals indefinitely

2010-07-14 Thread Mark Lawrence

Mark Lawrence  added the comment:

Would someone please check out thie patch, it's mostly changes to C code that 
I'm not qualified to comment on.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue9132] Documentation for comparing dictionaries is out of date

2010-07-14 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

The patch was pretty good. Committed it in r82899 and r82900.
Thanks Eli for the patch & Terry for the review.

--
nosy: +orsenthil
resolution:  -> fixed
stage: commit review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue9261] include higher (../../) dirs fails

2010-07-14 Thread Éric Araujo

Éric Araujo  added the comment:

Can you tell if the docs fail to mention that? If they do, please reopen this 
as a documentation bug (change title, select component Documentation, and set 
status to open). Thank you!

--
nosy: +merwok

___
Python tracker 

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



[issue7732] imp.find_module crashes Python if there exists a directory named "__init__.py"

2010-07-14 Thread Mark Lawrence

Mark Lawrence  added the comment:

Quote from ncoghlan on msg102699 "Florent's patch looks correct".  Does anyone 
else wish to comment or can this be taken forward?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue1646068] Dict lookups fail if sizeof(Py_ssize_t) < sizeof(long)

2010-07-14 Thread Mark Dickinson

Mark Dickinson  added the comment:

The approach in Alexander's patch looks fine to me.  +1 on applying this patch 
if someone can test it on a platform where sizeof(long) > sizeof(Py_ssize_t), 
and also verify that there are current test failures that are fixed by this 
patch.  (If there are no such tests, we should add some.)

I've only tested this on machines with sizeof(long) == sizeof(Py_ssize_t) == 4 
and sizeof(long) == sizeof(Py_ssize_t) == 8, which isn't really much of a test 
at all.

ked-tao, if you're still listening:  are you in a position to test Alexander's 
patch on a relevant machine?

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue3163] module struct support for ssize_t and size_t

2010-07-14 Thread Jean Brouwers

Jean Brouwers  added the comment:

Yes I am and I will get back to you on this after check my (old) notes.

/Jean

On Wed, Jul 14, 2010 at 12:08 PM, Mark Dickinson wrote:

>
> Mark Dickinson  added the comment:
>
> Jean, if you're still around:
>
> Do you still have interest in pursuing this?
>
> --
>
> ___
> Python tracker 
> 
> ___
>

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

___
Python tracker 

___Yes I am and I will get back to you on this after check my (old) 
notes./JeanOn Wed, Jul 14, 
2010 at 12:08 PM, Mark Dickinson rep...@bugs.python.org> 
wrote:

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

Jean, if you're still around:

Do you still have interest in pursuing this?

--

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

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



[issue9260] A finer grained import lock

2010-07-14 Thread Brett Cannon

Brett Cannon  added the comment:

What I'm saying is that loaders are quite possibly not thread-safe already, so 
we don't need to do any special for them. If you look at PEP 302 you will 
notice not a single mention of loaders needing to care about the import lock 
because there is no mention of the import lock! So changing the locking 
mechanism most likely won't break loaders because they are not using the 
current import lock anyway and so already have their own issues.

As long as __import__ does the proper locking on behalf of loaders and we 
provide a way for people to use the lock if they want to then I am not worried 
about the impact on loaders. For example, this will change the logic in 
importlib where the current import lock is grabbed, but otherwise won't change 
a thing in terms of the code for the various loaders it implements.

--

___
Python tracker 

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



[issue9260] A finer grained import lock

2010-07-14 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> So changing the locking mechanism most likely won't break loaders
> because they are not using the current import lock anyway and so
> already have their own issues.

Are you sure they aren't using it implicitly? 
In vanilla py3k, PyImport_ImportModuleLevel() takes the import lock
therefore it protects any inner code, including the various hooks.

--

___
Python tracker 

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



[issue731991] find correct socklen_t type

2010-07-14 Thread Mark Lawrence

Mark Lawrence  added the comment:

Can this be closed, I can't see anyone going to the trouble of porting a patch 
prepared for 2.3 over 7 years ago to 2.7 or 3.2?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue754016] urlparse goes wrong with IP:port without scheme

2010-07-14 Thread Mark Lawrence

Mark Lawrence  added the comment:

The patch will need to be reworked for the 2.7, 3.1 and 3.2 branches.

--
nosy: +BreamoreBoy
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6

___
Python tracker 

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



[issue9260] A finer grained import lock

2010-07-14 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


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

___
Python tracker 

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



[issue775321] plistlib error handling

2010-07-14 Thread Mark Lawrence

Mark Lawrence  added the comment:

If anything is to be done the patch needs updating.  I'd be inclined to close 
this as "won't fix" unless someone can come up with a really compelling reason 
to implement it.

--
nosy: +BreamoreBoy
versions: +Python 3.2 -Python 2.7

___
Python tracker 

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



[issue9260] A finer grained import lock

2010-07-14 Thread Graham Dumpleton

Graham Dumpleton  added the comment:

How is this going to deal with cyclical imports where different threads could 
import at the same time different modules within that cycle? I need to look 
through the proposed patch and work out exactly what it does, but am concerned 
about whether this approach would cause the classic deadlock problem if not 
done right?

FWIW, this concept of a lock per module is what I used in the mod_python module 
importer when it was rewritten. I would have to go look back over that code and 
see how the way the concept is being implemented differs, but there was one 
remaining potential race condition in the mod_python code which could in rare 
instances cause a problem. I never did get around to fixing it. Anyway, what I 
did learn was that this approach isn't necessarily as simple as it may seem so 
it will need some really good analysis on whatever solution is developed to 
ensure subtle problems don't come up.

--

___
Python tracker 

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



[issue812369] module shutdown procedure based on GC

2010-07-14 Thread Mark Lawrence

Mark Lawrence  added the comment:

issue1545463 has been closed as "won't fix", so wouldn't implementing this 
patch kill two birds with one stone?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue839159] iterators broken for weak dicts

2010-07-14 Thread Mark Lawrence

Mark Lawrence  added the comment:

If this is to go forward the patch will need porting to 2.7, 3.1 and 3.2

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

___
Python tracker 

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



  1   2   >