[issue17263] crash when tp_dealloc allows other threads

2013-02-21 Thread Charles-François Natali

Charles-François Natali added the comment:

Could you try with recent checkout of python 2.7?
I wonder if this could be an occurrence of issue #13992 fixed by Antoine a 
couple months ago.

--
nosy: +neologix

___
Python tracker 

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



[issue17273] multiprocessing.pool.Pool task/worker handlers are not fork safe

2013-02-21 Thread Arun Babu Neelicattu

Arun Babu Neelicattu added the comment:

I should have mentioned this too,

[GOOD] Workaround:
Probably the 'correct' way to achieve what is required in the example, could be 
to use a managed pool.

pool = multiprocessing.Manager().Pool()

--

___
Python tracker 

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



[issue17269] getaddrinfo segfaults on OS X when provided with invalid arguments combinations

2013-02-21 Thread Ronald Oussoren

Ronald Oussoren added the comment:

I've filed radar #13271126 for this in Apple's tracker.

--

___
Python tracker 

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



[issue17269] getaddrinfo segfaults on OS X when provided with invalid arguments combinations

2013-02-21 Thread Ronald Oussoren

Ronald Oussoren added the comment:

That's interesting... this also crashes:

>>> socket.getaddrinfo("localhost", "0", 0, 0, 0, socket.AI_NUMERICSERV)

While using another port number does not.

The attached patches for the default branch fixes the issue for me (on OSX 
10.8). 

The same approach should also work with 2.7 (but the patch likely won't apply 
cleanly due to the use of TABs for indents in 2.7 and spaces in 3.x).

Open issue: should there be a testcase for this problem?

--
keywords: +needs review, patch
stage:  -> patch review
Added file: http://bugs.python.org/file29160/issue17269.txt

___
Python tracker 

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



[issue17227] devguide: buggy heading numbers

2013-02-21 Thread Kushal Das

Kushal Das added the comment:

I found that http://docs.python.org/devguide/stdlibchanges.html also has left 
side bar text with full index just like my patch does. For FAQ the problem is 
title texts are kind of long so they look bad.

--

___
Python tracker 

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



[issue17273] multiprocessing.pool.Pool task/worker handlers are not fork safe

2013-02-21 Thread Arun Babu Neelicattu

Changes by Arun Babu Neelicattu :


--
nosy: +jnoller, sbt

___
Python tracker 

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



[issue17269] getaddrinfo segfaults on OS X when provided with invalid arguments combinations

2013-02-21 Thread Ronald Oussoren

Ronald Oussoren added the comment:

Looks like a bug in libSystem, see mdns_addrinfo in 
.
 Its handling of AI_NUMERICSERV doesn't match that of si_getaddrinfo.c at the 
same location.

I'll file a bug with Apple, anyone running into this problem migh want to do so 
as well (Apple's tracker is more or less a popularity contest, the more an 
issue is report, the more likely it is to get fixed).

I'm in favor of working around this bug on OSX by settings the servname to "0" 
when AI_NUMERICSERVICE is set and the passed in service name is None. I\m 
working on a patch.

--

___
Python tracker 

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



[issue17249] reap threads in test_capi

2013-02-21 Thread Ezio Melotti

Ezio Melotti added the comment:

The attached patch converts the function in a real test, using proper skips and 
assert methods.

--
components: +Library (Lib) -Tests
Added file: http://bugs.python.org/file29159/issue17249.diff

___
Python tracker 

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



[issue17183] Small enhancements to Lib/_markupbase.py

2013-02-21 Thread Ezio Melotti

Changes by Ezio Melotti :


--
keywords: +patch
Added file: http://bugs.python.org/file29158/issue17183.diff

___
Python tracker 

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



[issue17271] NamedTemporaryFile expects bytes, not string in documentation for tempfile module

2013-02-21 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the report!

--
assignee: docs@python -> ezio.melotti
nosy: +ezio.melotti
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
type:  -> enhancement
versions: +Python 3.3, Python 3.4

___
Python tracker 

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



[issue17271] NamedTemporaryFile expects bytes, not string in documentation for tempfile module

2013-02-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 82343bbf8868 by Ezio Melotti in branch '3.2':
#17271: update example in tempfile docs.
http://hg.python.org/cpython/rev/82343bbf8868

New changeset a9993d40821f by Ezio Melotti in branch '3.3':
#17271: merge with 3.2.
http://hg.python.org/cpython/rev/a9993d40821f

New changeset fcc61327c86c by Ezio Melotti in branch 'default':
#17271: merge with 3.3.
http://hg.python.org/cpython/rev/fcc61327c86c

--
nosy: +python-dev

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-02-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I meant one pull and multiple updates (instead of the multiple 'pull -u's I 
have now).

--

___
Python tracker 

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



[issue17273] multiprocessing.pool.Pool task/worker handlers are not fork safe

2013-02-21 Thread Arun Babu Neelicattu

New submission from Arun Babu Neelicattu:

The task/worker handler threads in the multiprocessing.pool.Pool class are (in 
accordance to posix standards) not copied over when the process containing the 
pool is forked.

This leads to a situation where the Pool keeps receiving tasks but the tasks 
never get handled. This could potentially lead to deadlocks if 
AsyncResult.wait() is called.

Not sure if this should be considered as a bug, or an invalid use case. 
However, this becomes a problem when importing modules that use pools and the 
main code uses multiprocessing too.

[BAD] Workaround:
Reassigning Pool._task_handler to a new instance of threading.Thread after the 
fork seems to work in the case highlighted in the example.

Environment:
Fedora 18 
Linux 3.7.8-202.fc18.x86_64 #1 SMP Fri Feb 15 17:33:07 UTC 2013 x86_64 x86_64 
x86_64 GNU/Linux
python3-3.3.0-1.fc18.x86_64

An example of this issue is shown below:

from multiprocessing import Pool, Process

def t2():
# We expect the pool to handle this
print('t2: Hello!')

pool = Pool()
def t1():
# We assign a task to the pool
pool.apply_async(t2)
print('t1: Hello!')

if __name__ == '__main__':
# Process() forks the main process containing the pool
Process(target=t1).start()

--
components: Library (Lib)
files: pool_forking.py
messages: 182647
nosy: abn
priority: normal
severity: normal
status: open
title: multiprocessing.pool.Pool task/worker handlers are not fork safe
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file29157/pool_forking.py

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-02-21 Thread Ezio Melotti

Ezio Melotti added the comment:

> I think it would be good to have a separate subsection dedicated just 
> to the setting up portion of multiple clones with the share extension 

I'm not sure that's necessary though, given how simple it is (enable share 
extension, "hg share source dest", repeat).

The ideas are:
  1) have a straightforward from-beginning-to-end overview in committing.rst, 
followed by a few sections that explain more in detail the most common steps 
(e.g. how to merge between different versions, how to solve merge conflicts, 
etc.);
  2) list alternative approaches (e.g. multiple unshared clones) and "advanced" 
steps (e.g. deal with merge conflicts) in the FAQs;

If you think all the approaches should be listed somewhere, we can always add a 
new FAQ later, but it shouldn't block this issue (and it shouldn't be in 
committing.rst).

> One thing that is missing though, which I think is or was in a
> current or previous version, is to put all the pull and update
> commands in a batch file.

The point of the share extension is that is no longer necessary to pull/push 
changesets between clones (the updates still are though).

--

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-02-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

As someone who previously tried but failed to setup shared clones, to avoid the 
apparently senseless copying of multiple copies of .hg/store, because of the 
inadequate disjointed doc, I like patch 1. I am using it now to redo my setup 
and batch file. I think how to set it up (10 lines) *should* be followed by how 
to use it. One thing that is missing though, which I think is or was in a 
current or previous version, is to put all the pull and update commands in a 
batch file. If the shared approach somehow mandates that they be interspersed 
with edit, merge, and commit, that would be a big negative.

--

___
Python tracker 

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



[issue17227] devguide: buggy heading numbers

2013-02-21 Thread Kushal Das

Kushal Das added the comment:

>I had tried this, but doesn't this make the contents in the left side bar 
>unwieldy (and perhaps also on the devguide index page) -- is that what we 
>want?  I was under the assumption that the purpose of the tocdepth directive 
>was to avoid that.

Yes, missed that issue. Trying to find any other solution if possible.

--

___
Python tracker 

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



[issue17272] request.full_url: unexpected results on assignment

2013-02-21 Thread Demian Brecht

Demian Brecht added the comment:

I also meant to mention that of course, the obvious workaround would simply be 
to instantiate a new Request object with the new URL, but in my mind, this is 
something that should likely be supported by the Request object itself.

--

___
Python tracker 

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



[issue17272] request.full_url: unexpected results on assignment

2013-02-21 Thread Demian Brecht

New submission from Demian Brecht:

When assigning a value to an already instantiated Request object's full_url, 
unexpected results are found as a consequence in the attributes selector, type 
and fragment. Selector, type and fragment are only assigned to during 
instantiation. Unless you know to call Request._parse() after assignment to 
Request.full_url, the other attributes will not be reassigned new values.

The attached patch changes full_url to be a @property, essentially moving what 
was going on in the constructor into the property method(s). All tests pass.

I ran into this issue when working on an OAuth 2.0 client library when 
attempting to mutate an already instantiated Request object, injecting the 
access_token into the query params.

Sandboxed code to repro the issue below:

In [1]: from urllib.request import Request
In [2]: r = Request('https://example.com?foo=bar#baz')

# as expected
In [4]: r.__dict__
Out[4]: 
{'_data': None,
 '_tunnel_host': None,
 'fragment': 'baz',
 'full_url': 'https://example.com?foo=bar',
 'headers': {},
 'host': 'example.com',
 'method': None,
 'origin_req_host': 'example.com',
 'selector': '/?foo=bar',
 'type': 'https',
 'unredirected_hdrs': {},
 'unverifiable': False}

In [5]: r.full_url = 'https://example.com?foo=bar&access_token=token_value#baz'

# unexpected results in selector
In [6]: r.__dict__
Out[6]: 
{'_data': None,
 '_tunnel_host': None,
 'fragment': 'baz',
 'full_url': 'https://example.com?foo=bar&access_token=token_value#baz',
 'headers': {},
 'host': 'example.com',
 'method': None,
 'origin_req_host': 'example.com',
 'selector': '/?foo=bar',
 'type': 'https',
 'unredirected_hdrs': {},
 'unverifiable': False}

In [7]: Request('https://example.com?foo=bar&access_token=token_value#baz')
Out[7]: 

# these results should match that of the full_url setter
In [8]: 
Request('https://example.com?foo=bar&access_token=token_value#baz').__dict__
Out[8]: 
{'_data': None,
 '_tunnel_host': None,
 'fragment': 'baz',
 'full_url': 'https://example.com?foo=bar&access_token=token_value',
 'headers': {},
 'host': 'example.com',
 'method': None,
 'origin_req_host': 'example.com',
 'selector': '/?foo=bar&access_token=token_value',
 'type': 'https',
 'unredirected_hdrs': {},
 'unverifiable': False}

--
components: Library (Lib)
files: request.patch
keywords: patch
messages: 182642
nosy: dbrecht
priority: normal
severity: normal
status: open
title: request.full_url: unexpected results on assignment
versions: Python 3.4
Added file: http://bugs.python.org/file29156/request.patch

___
Python tracker 

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



[issue17227] devguide: buggy heading numbers

2013-02-21 Thread Chris Jerdonek

Chris Jerdonek added the comment:

> Adding a patch to fix this issue.

I had tried this, but doesn't this make the contents in the left side bar 
unwieldy (and perhaps also on the devguide index page) -- is that what we want? 
 I was under the assumption that the purpose of the tocdepth directive was to 
avoid that.

--

___
Python tracker 

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



[issue17271] NamedTemporaryFile expects bytes, not string in documentation for tempfile module

2013-02-21 Thread Jason S Friedman

New submission from Jason S Friedman:

Page is http://docs.python.org/3/library/tempfile.html#module-tempfile.

The code in question currently reads:
>>> f = NamedTemporaryFile(delete=False)
>>> f
', mode 'w+b' at 0x384698>
>>> f.name
'/var/folders/5q/5qTPn6xq2RaWqk+1Ytw3-U+++TI/-Tmp-/tmpG7V1Y0'
>>> f.write("Hello World!\n")
>>> f.close()
>>> os.unlink(f.name)
>>> os.path.exists(f.name)
False

It should read:
>>> import os
>>> from tempfile import NamedTemporaryFile
>>> f = NamedTemporaryFile(delete=False)
>>> f

>>> f.name
'/tmp/tmpdxd_85'
>>> f.write("Hello World!\n".encode())
13
>>> f.close()
>>> os.unlink(f.name)
>>> os.path.exists(f.name)
False

--
assignee: docs@python
components: Documentation
messages: 182640
nosy: docs@python, jsf80...@gmail.com
priority: normal
severity: normal
status: open
title: NamedTemporaryFile expects bytes, not string in documentation for 
tempfile module
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



[issue17256] code example in C API docsshould be highlighted

2013-02-21 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the patch!

--
assignee: docs@python -> ezio.melotti
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
versions: +Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue17035] Use new style classes in {class, static}method examples

2013-02-21 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the report and the patch!

--
assignee: docs@python -> ezio.melotti
nosy: +ezio.melotti
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed
type:  -> enhancement

___
Python tracker 

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



[issue17256] code example in C API docsshould be highlighted

2013-02-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ad55dc7de7fc by Ezio Melotti in branch '2.7':
#17256: fix syntax highlight in embedding example.  Patch by Kushal Das.
http://hg.python.org/cpython/rev/ad55dc7de7fc

New changeset b42e7aeb4235 by Ezio Melotti in branch '3.2':
#17256: fix syntax highlight in embedding example.  Patch by Kushal Das.
http://hg.python.org/cpython/rev/b42e7aeb4235

New changeset 3405d828ce95 by Ezio Melotti in branch '3.3':
#17256: merge with 3.2.
http://hg.python.org/cpython/rev/3405d828ce95

New changeset fb50eb64e097 by Ezio Melotti in branch 'default':
#17256: merge with 3.3.
http://hg.python.org/cpython/rev/fb50eb64e097

--
nosy: +python-dev

___
Python tracker 

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



[issue17035] Use new style classes in {class, static}method examples

2013-02-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 30e7bc28d4f5 by Ezio Melotti in branch '2.7':
#17035: use new style classes in classmethod/staticmethod examples.  Patch by 
Berker Peksag.
http://hg.python.org/cpython/rev/30e7bc28d4f5

--
nosy: +python-dev

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-02-21 Thread Chris Jerdonek

Chris Jerdonek added the comment:

> The "Clones setup" section is not about "how to set up a clone", but "how do 
> I do these steps depending on the specific setup I'm using" (single or 
> multiple clones).

Then the section should be called something like "Cloning approaches" rather 
than "Clones setup."  Neverthless, I think it would be good to have a separate 
subsection dedicated just to the setting up portion of multiple clones with the 
share extension (with an appropriate title).

>> For example, an issue can be created for adding to the docs a section on how 
>> to set up multiple clones.
>
> This is not the goal of this issue.

My remarks were about setting up multiple clones with the share extension.  I 
was suggesting that a separate issue be created to address that aspect of the 
current issue.  It's okay to add information on how to set up multiple clones 
with the share extension without initially saying everything about how to use 
this approach (just as the share extension is already linked to without 
including such instructions).

--

___
Python tracker 

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



[issue17227] devguide: buggy heading numbers

2013-02-21 Thread Kushal Das

Kushal Das added the comment:

Adding a patch to fix this issue.

--
keywords: +patch
nosy: +kushaldas
Added file: http://bugs.python.org/file29155/issue17227.patch

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-02-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

> Do you you mean s/update/clone/? duh, yes
> I don't think the devguide should cover tortoisehg.

Given the obnoxiousness of Command Prompt, and how foreign it is to working on 
Windows, I think maybe there should be an addendum *somewhere*, but I don't 
expect anyone else to write it. (Goodness, there is a devguide chapter for 
emacs editing.) The easiest way to run direct hg commands is within the command 
pane of Workbench.

About  "run `make patchcheck`". The current Committing page gives
"(or ./python.exe Tools/scripts/patchcheck.py on Windows)" as the windows 
equivalent. './' does not work on Windows. '.\' will, but I do not know if it 
is needed. I presume the command should be given from within a particular 
repository. In its top directory, 'python' will run the installed python, 
'PCbuild\python.exe' or 'PCbuild\python_d.exe' (backslash required here, though 
not in the patchcheck path) is needed to run the python built from that 
repository.

--

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-02-21 Thread Ezio Melotti

Ezio Melotti added the comment:

> The current "1-add_clones_setup.diff" patch mixes things by including 
> info on applying, committing, and merging a patch under the section on 
> setting things up.

The goal of that section is to provide an overview of all the steps that a 
committer has to follow, starting from the beginning (getting a clone) till the 
end (the patch is applied on all the branches and pushed).
The "Clones setup" section is not about "how to set up a clone", but "how do I 
do these steps depending on the specific setup I'm using" (single or multiple 
clones).


> For example, an issue can be created for adding to the docs a section on how 
> to set up multiple clones. 

This is not the goal of this issue.
How to create one/multiple clones is already covered in:
 1) http://docs.python.org/devguide/#quick-start (single clone)
 2) http://docs.python.org/devguide/setup.html#checkout (single clone)
 3) 
http://docs.python.org/devguide/committing.html#using-several-working-copies 
(multiple clones without share)
 4) 
http://docs.python.org/devguide/faq.html#i-want-to-keep-a-separate-working-copy-per-development-branch-is-it-possible
 (multiple clones without share)
 5) 
http://docs.python.org/devguide/faq.html#how-do-i-avoid-repeated-pulls-and-pushes-between-my-local-repositories
 (just a link to the share extension)


After all the patches are applied:
 * the quick start and the setup page will still explain the single-clone 
approach (intended for contributors, but valid also for developers);
 * the committing.rst page will only explain the multiple shared clones 
approach (for developers) and just link to 2) for the single-clone approach;
 * the faq will still explain the multiple non-shared clones approach in 4) as 
an alternative, but also suggest the shared version and link to committing.rst;

The reason why (almost) all the patches should be applied together is that once 
the multiple shared clones approach is explained as the default approach (patch 
1), the instructions about the different branches (patch 3), merging between 
the same major version (patch 4) and between major versions (patch 5) must be 
updated.  At the same time, the section about using multiple unshared clones is 
no longer necessary so it has to be removed (patch 6).  Finally there's no 
reason to mention the share extension in the faq (patch 8).

Patch 2 could indeed committed separately, and patch 7 reflects the separation 
between single-clone/contributors and multiple-clones/developers by dividing 
the FAQs in two groups.

After this is done I was planning to update the "developers" FAQs, but this 
issue is currently blocking that.

--

___
Python tracker 

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



[issue17256] code example in C API docsshould be highlighted

2013-02-21 Thread Kushal Das

Kushal Das added the comment:

Following patch solves the problem.

--
keywords: +patch
nosy: +kushaldas
Added file: http://bugs.python.org/file29154/issue17256.patch

___
Python tracker 

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



[issue16123] IDLE - deprecate running without a subprocess

2013-02-21 Thread Roger Serwy

Roger Serwy added the comment:

@Raymond: What is so broken about IDLE that requires using "-n" to fix it? 
Let's try to fix those problems rather than keeping up the maintenance burden 
of supporting two execution modes.

--

___
Python tracker 

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



[issue16123] IDLE - deprecate running without a subprocess

2013-02-21 Thread Raymond Hettinger

Raymond Hettinger added the comment:

FWIW, I help a lot of people with IDLE problems and sometimes the -n option is 
the only thing that saves them.  ISTM that removing it is not such as a good 
idea.

--
nosy: +rhettinger

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-02-21 Thread Chris Jerdonek

Chris Jerdonek added the comment:

For reasons I stated above, I think it will help to break this issue into 
smaller, self-contained parts as we go -- even if some of the issues turn out 
to be short-lived.

For example, an issue can be created for adding to the docs a section on how to 
set up multiple clones.  This way, we can separate the discussion and treatment 
of telling people how to use multiple clones from telling people how to set 
them up.  I think it will be simpler to address and commit the latter first.  
The current "1-add_clones_setup.diff" patch mixes things by including info on 
applying, committing, and merging a patch under the section on setting things 
up.

--

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-02-21 Thread Ezio Melotti

Ezio Melotti added the comment:

I could mention mercurial.ini too, but I don't think the devguide should cover 
tortoisehg.  All the commands should work fine on Windows too.

> I don't think that is actually used as I created the clones with
> hg update rather than hg share.

Do you you mean s/update/clone/?

--

___
Python tracker 

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



[issue17183] Small enhancements to Lib/_markupbase.py

2013-02-21 Thread Ezio Melotti

Ezio Melotti added the comment:

I did some macro-benchmarks and the proposed changes don't seem to affect the 
result (most likely because they are in _parse_doctype_element and 
_parse_doctype_attlist which should be called only once per document).

I did some profiling, and this is the result:
 4437196 function calls (4436748 primitive calls) in 36.582 seconds

   Ordered by: internal time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
929317.4000.000   17.0820.000 parser.py:320(parse_starttag)
  2026.3630.032   36.2810.180 parser.py:171(goahead)
   6732855.3020.0005.3020.000 {method 'match' of 
'_sre.SRE_Pattern' objects}
   3694183.2720.0004.5540.000 _markupbase.py:48(updatepos)
832432.6980.0004.6390.000 parser.py:421(parse_endtag)
   3088822.0060.0002.0060.000 {method 'group' of 
'_sre.SRE_Match' objects}
   2700741.5210.0001.5210.000 {method 'search' of 
'_sre.SRE_Pattern' objects}
929311.1500.0002.6430.000 
parser.py:378(check_for_whole_start_tag)
   2910791.0280.0001.0280.000 {method 'count' of 'str' objects}
   2958920.8830.0000.8830.000 {method 'startswith' of 'str' 
objects}
   3874390.7330.0000.7330.000 {method 'lower' of 'str' objects}
   4039220.6420.0000.6420.000 {method 'end' of '_sre.SRE_Match' 
objects}
   1245120.4060.0001.1560.000 parser.py:504(unescape)
   1867750.3260.0000.3260.000 {method 'start' of 
'_sre.SRE_Match' objects}
962130.2550.0000.2550.000 {method 'endswith' of 'str' 
objects}
595220.2530.0000.2530.000 {method 'rindex' of 'str' objects}
832260.2150.0000.2150.000 parser.py:164(clear_cdata_mode)
 64280.1940.0000.3370.000 parser.py:507(replaceEntities)
   1064870.1830.0000.1830.000 parser.py:484(handle_data)

Excluding string and regex methods, the 3 slowest methods are parse_starttag, 
goahead, and updatepos.
The attached patch adds a couple of simple optimizations to the first two -- I 
couldn't think a way to optimize updatepos.
The resulting speedup is however fairly small, so I'm not sure it's worth 
applying the patch.
I might try doing other benchmarks in future (should I add them somewhere in 
Tools?).

--

___
Python tracker 

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



[issue16123] IDLE - deprecate running without a subprocess

2013-02-21 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components: +IDLE

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-02-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Looking at patch 1. On Windows, ~/.hgrc is $HOME$/mercurial.ini.
On my win7 machine, that translates to C:/Users/Terry/mercurial.ini.
I think it would be different on xp. But with TortoiseHG/Workbench, one should 
better use the Settings dialogs than edit directly.

I have [extensions]\nshare = set in that file but I don't think that is 
actually used as I created the clones with hg update rather than hg share. I 
will see what I have to do when I recreate the clones with hg share instead.

--

___
Python tracker 

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



[issue17203] add long option names to unittest discovery docs

2013-02-21 Thread Chris Jerdonek

Changes by Chris Jerdonek :


--
resolution:  -> fixed
stage: needs patch -> 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



[issue17203] add long option names to unittest discovery docs

2013-02-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f4ccc5aab287 by Chris Jerdonek in branch '2.7':
Issue #17203: add long option names to unittest discovery docs.
http://hg.python.org/cpython/rev/f4ccc5aab287

New changeset c0581f7be196 by Chris Jerdonek in branch '3.2':
Issue #17203: add long option names to unittest discovery docs.
http://hg.python.org/cpython/rev/c0581f7be196

New changeset 7d1122c79985 by Chris Jerdonek in branch '3.3':
Issue #17203: add long option names to unittest discovery docs.
http://hg.python.org/cpython/rev/7d1122c79985

New changeset bbe5efa9c667 by Chris Jerdonek in branch 'default':
Issue #17203: add long option names to unittest discovery docs.
http://hg.python.org/cpython/rev/bbe5efa9c667

--
nosy: +python-dev

___
Python tracker 

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



[issue17270] make the section header doc convention more clearly optional

2013-02-21 Thread Chris Jerdonek

Changes by Chris Jerdonek :


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



[issue17270] make the section header doc convention more clearly optional

2013-02-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fa06f733e2fe by Chris Jerdonek in branch 'default':
Issue #17270: clarify that the section header doc convention is optional.
http://hg.python.org/devguide/rev/fa06f733e2fe

--
nosy: +python-dev

___
Python tracker 

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



[issue17109] unittest.mock has wrong heading levels

2013-02-21 Thread Chris Jerdonek

Chris Jerdonek added the comment:

> It can just be changed to being a suggestion as opposed to "the convention 
> that we use."

I created issue 17270 for this.

--

___
Python tracker 

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



[issue17270] make the section header doc convention more clearly optional

2013-02-21 Thread Ezio Melotti

Ezio Melotti added the comment:

LGTM

--
stage: patch review -> commit review

___
Python tracker 

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



[issue17270] make the section header doc convention more clearly optional

2013-02-21 Thread Chris Jerdonek

New submission from Chris Jerdonek:

The documentation guidelines in the devguide list a convention for section 
headers:

http://docs.python.org/devguide/documenting.html#sections

The current wording, however, can be interpreted to mean that this convention 
is always (and should always) be used.  However, the reality is weaker.  For 
example, see:

http://bugs.python.org/issue17109#msg181302

This issue is to update the wording so the convention is more clearly a 
suggestion rather than a requirement.

--
components: Devguide
files: devguide-section-headers.diff
keywords: easy, patch
messages: 182620
nosy: chris.jerdonek, eric.araujo, ezio.melotti, ncoghlan
priority: normal
severity: normal
stage: patch review
status: open
title: make the section header doc convention more clearly optional
type: enhancement
Added file: http://bugs.python.org/file29153/devguide-section-headers.diff

___
Python tracker 

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



[issue17269] getaddrinfo segfaults on OS X when provided with invalid arguments combinations

2013-02-21 Thread Ned Deily

Ned Deily added the comment:

The crash occurs in OS X's libsystem_info on 10.8.

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_info.dylib0x7fff86bacd9e mdns_addrinfo + 299
1   libsystem_info.dylib0x7fff86badae2 search_addrinfo + 152
2   libsystem_info.dylib0x7fff86b97f6d si_addrinfo + 1641
3   libsystem_info.dylib0x7fff86b9785c getaddrinfo + 171
4   _socket.so  0x000100516524 socket_getaddrinfo + 
500

It's also reproducible back on OS X 10.6 crashing there in libSystem. (It looks 
like earlier versions of OS X don't support the AI_NUMERICSERV flag.)  So it 
would appear to be a long-standing OS X bug.  Possible actions: open an Apple 
incident and patch socket.getaddrinfo to catch this case.

--
nosy: +ned.deily

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-02-21 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Thanks for waiting and for posting the patches here.  I think the second patch 
"2-move_two_sections.diff" should be committed now, along with making "Working 
with Mercurial" a higher-level header (as it is done in the aggregate patch).  
This will separate the Mercurial-specific info from the non-Mercurial info in 
committing.rst, which is a good change in any case.

I will try to voice my high-level comments on the rest of the patches by this 
weekend, and/or suggest a second incremental change.

--

___
Python tracker 

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



[issue17269] getaddrinfo segfaults on OS X when provided with invalid arguments combinations

2013-02-21 Thread STINNER Victor

Changes by STINNER Victor :


--
assignee:  -> ronaldoussoren
components: +Macintosh
nosy: +ronaldoussoren
versions: +Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue17269] getaddrinfo segfaults on OS X when provided with invalid arguments combinations

2013-02-21 Thread STINNER Victor

STINNER Victor added the comment:

Linux manual page: "If  AI_NUMERICSERV  is  specified  in hints.ai_flags and 
service is not NULL, then service must point to a string containing a numeric 
port number."

So it looks like None is accepted on Linux. I checked: the example doesn't 
crash.

--
nosy: +haypo

___
Python tracker 

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



[issue17209] get_wch() doesn't handle KeyboardInterrupt

2013-02-21 Thread STINNER Victor

STINNER Victor added the comment:

Attached patch should fix this issue.

--
keywords: +patch
versions: +Python 3.4
Added file: http://bugs.python.org/file29152/curses_get_wch_sigint.patch

___
Python tracker 

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



[issue17269] getaddrinfo segfaults on OS X when provided with invalid arguments combinations

2013-02-21 Thread Johan Tibell

New submission from Johan Tibell:

The following call to getaddrinfo makes Python segfault:

$ python
Python 2.7.2 (default, Jun 20 2012, 16:23:33) 
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.getaddrinfo("localhost", None, 0, 0, 0, socket.AI_NUMERICSERV)
Segmentation fault: 11

The combination of no port (None) and socket.AI_NUMERICSERV makes no sense (I 
used it by mistake) but we probably don't want to segfault anyway.

--
components: Library (Lib)
messages: 182615
nosy: tibbe
priority: normal
severity: normal
status: open
title: getaddrinfo segfaults on OS X when provided with invalid arguments 
combinations
type: crash
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



[issue14468] Update cloning guidelines in devguide

2013-02-21 Thread Ezio Melotti

Ezio Melotti added the comment:

I extracted the diffs and attached them to the issue.
The first 6 patches update committing.rst:
[1]: 
https://bitbucket.org/ezio_melotti/devguide-14468/commits/c2fca99bdb7212c4815d9fe6b0c869bb4358886a
[2]: 
https://bitbucket.org/ezio_melotti/devguide-14468/commits/37e287725636bb9c4b82ae864e38a97e8b332809
[3]: 
https://bitbucket.org/ezio_melotti/devguide-14468/commits/55055f30dd933c3f05be1581fd7c6cf2ec97c09c
[4]: 
https://bitbucket.org/ezio_melotti/devguide-14468/commits/389488fc431dca256b3534ca658a4e4f
[5]: 
https://bitbucket.org/ezio_melotti/devguide-14468/commits/8dc7283e53de97692a76b9f363a80303
[6]: 
https://bitbucket.org/ezio_melotti/devguide-14468/commits/3c5c77f2fa75d3c8bcb459d0c6060354

The last two patches update faqs.rst:
[7]: 
https://bitbucket.org/ezio_melotti/devguide-14468/commits/7a6f9b28a9d14e1e40988c76712a78a6a6014d28
[8]: 
https://bitbucket.org/ezio_melotti/devguide-14468/commits/5bf313aec51c326673a63206f0d7d0c7b40d6e86

I also updated two patches that includes the changes of patches 1-6 and 7-8.
I'm planning to commit these two last patches, but I can also make 8 separate 
commits or even a single one.

--
stage: patch review -> commit review

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-02-21 Thread Ezio Melotti

Changes by Ezio Melotti :


Added file: http://bugs.python.org/file29150/1-6-committing.rst.diff

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-02-21 Thread Ezio Melotti

Changes by Ezio Melotti :


Added file: http://bugs.python.org/file29151/7-8-faqs.rst.diff

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-02-21 Thread Ezio Melotti

Changes by Ezio Melotti :


Added file: http://bugs.python.org/file29147/6-remove_outdated_sections.diff

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-02-21 Thread Ezio Melotti

Changes by Ezio Melotti :


Added file: http://bugs.python.org/file29149/8-update_faqs.diff

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-02-21 Thread Ezio Melotti

Changes by Ezio Melotti :


Added file: 
http://bugs.python.org/file29146/5-update_merge_between_major_versions.diff

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-02-21 Thread Ezio Melotti

Changes by Ezio Melotti :


Added file: 
http://bugs.python.org/file29145/4-update_merge_within_same_version.diff

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-02-21 Thread Ezio Melotti

Changes by Ezio Melotti :


Added file: http://bugs.python.org/file29142/1-add_clones_setup.diff

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-02-21 Thread Ezio Melotti

Changes by Ezio Melotti :


Added file: http://bugs.python.org/file29148/7-move_faq_in_two_subsections.diff

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-02-21 Thread Ezio Melotti

Changes by Ezio Melotti :


Added file: 
http://bugs.python.org/file29144/3-update_active_branches_and_mergin_order.diff

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-02-21 Thread Ezio Melotti

Changes by Ezio Melotti :


Added file: http://bugs.python.org/file29143/2-move_two_sections.diff

___
Python tracker 

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



[issue17170] string method lookup is too slow

2013-02-21 Thread Stefan Behnel

Stefan Behnel added the comment:

Cython does that in general, sure. However, this ticket is about a specific 
case where string methods (which are implemented in C) are slow when called 
from Python. Antoine found out that the main overhead is not so much from the 
method lookup itself but from argument parsing inside of the function. The 
unpacking code that Cython generates for the equivalent Python signature would 
speed this up, while keeping or improving the compatibility with Python call 
semantics.

--

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-02-21 Thread Ezio Melotti

Changes by Ezio Melotti :


Removed file: http://bugs.python.org/file28540/issue14468.diff

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-02-21 Thread Ezio Melotti

Changes by Ezio Melotti :


Removed file: http://bugs.python.org/file28629/committing.rst

___
Python tracker 

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



[issue17170] string method lookup is too slow

2013-02-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

(Stefan) > into tightly specialised unpacking code,

Are you suggesting that func.__call__ should be specialized to func's 
signature, more than it is now (which is perhaps not at all), or 
something else?

--

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-02-21 Thread Ezio Melotti

Changes by Ezio Melotti :


Removed file: http://bugs.python.org/file28628/issue14468-2.diff

___
Python tracker 

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



[issue14468] Update cloning guidelines in devguide

2013-02-21 Thread Ezio Melotti

Changes by Ezio Melotti :


--
hgrepos:  -170

___
Python tracker 

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



[issue16233] IDLE: conceptual problems with *Class browser*

2013-02-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Conceptual problems indeed. I never tried the 'class browser' because I mostly 
write modules with functions, not classes. Nonetheless, to see what this issue 
is about, I just tried it with one of my function-only files, expecting to see 
an empty 'show', whatever that would be. Instead I see new window with a nice 
listing of all the function definitions in the file.

& xxx.py
|- & def a(...)
|- & def b(...)
(& is a green Python snake)

But why must the file be open? Left click, right click, left double click, and 
the answer appears. The cursor in the open edit window moves to the 
corresponding def line, which is highlighted. So this is not just a class 
browser, but a module file navigator. This is a real gem that I should have 
been using, and would have if it were properly labeled and documented. I think 
the help/manual entry should be something like

Module Browser -- Summarize the function, class, and method statements in a 
opened module file with a tree structure in an auxiliary window. Double 
clicking on any line in the tree activates the corresponding edit window, moves 
its cursor to the beginning of the corresponding def or class statement, and 
highlights the first line of that statement.

(I did check that lambda expressions are ignored.)

Since this feature can almost never be useful in PyShell, I agree that 'Module 
Browser' (or whatever new name we choose) should best not be present, or grayed 
out, or always fail with a shell specific message. But it seems that while 
shell and edit windows each have some main menu entries that the other does 
not, the submenus present in each are the same, so this might not be trivial 
(or the context specific message might be the easiest change).

I think we can further improve the error message. I think 'this edit window' 
would be clearer that 'this buffer'. I think it should also specify that it 
only works with python module file. If someone who is editing a new non-Python 
file follows the instruction to save and try again, they will only be 
frustrated.

I have two complaints about the browser window itself. The first is that the 
line spacing is not adjusted for my larger than default font (which I need for 
my less than 'default' vision). Consequently, each line cuts off the bottoem of 
the chars in the line above. This is a bug.

The other is that the green snake at the beginning of *every* line is just 
distracting visual noise. The one before xxx.py is enough.

I think all the mentioned changes can go in all current versions.

--
stage:  -> patch review
type: enhancement -> behavior
versions: +Python 2.7, Python 3.4

___
Python tracker 

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



[issue17255] test_any and test_all should validate short-circuiting behaviour

2013-02-21 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the report and the patch!

--
assignee:  -> ezio.melotti
nosy: +ezio.melotti
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
versions:  -Python 2.6, Python 3.1, Python 3.5

___
Python tracker 

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



[issue17255] test_any and test_all should validate short-circuiting behaviour

2013-02-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 124237eb5de9 by Ezio Melotti in branch '2.7':
#17255: test short-circuiting behavior of any()/all().  Patch by Wim Glenn.
http://hg.python.org/cpython/rev/124237eb5de9

New changeset 34b7240d678b by Ezio Melotti in branch '3.2':
#17255: test short-circuiting behavior of any()/all().  Patch by Wim Glenn.
http://hg.python.org/cpython/rev/34b7240d678b

New changeset 576d2c885eb6 by Ezio Melotti in branch '3.3':
#17255: merge with 3.2.
http://hg.python.org/cpython/rev/576d2c885eb6

New changeset c65fcedc511c by Ezio Melotti in branch 'default':
#17255: merge with 3.3.
http://hg.python.org/cpython/rev/c65fcedc511c

--
nosy: +python-dev

___
Python tracker 

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



[issue17268] Context managers written as C types no longer work in Python 2.7

2013-02-21 Thread Benjamin Peterson

Benjamin Peterson added the comment:

This is a property of all special methods not just __enter__ and __exit__.

--

___
Python tracker 

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



[issue17170] string method lookup is too slow

2013-02-21 Thread Stefan Behnel

Stefan Behnel added the comment:

Let me throw in a quick reminder that Cython has substantially faster argument 
parsing than the C-API functions provide because it translates function 
signatures like

def func(int a, b=1, *, list c, d=2):
...

into tightly specialised unpacking code, while keeping it as compatible as 
possible with the equivalent Python function (better than manually implemented 
C functions, BTW). Might be an alternative to the Argument Clinic, one that has 
been working for a couple of years now and has already proven its applicability 
to a large body of real world code.

--
nosy: +scoder

___
Python tracker 

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



[issue17268] Context managers written as C types no longer work in Python 2.7

2013-02-21 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



[issue17225] JSON decoder reports wrong column number on first line

2013-02-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for the report, Ferdinand.

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



[issue17225] JSON decoder reports wrong column number on first line

2013-02-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ce583eb0bec2 by Serhiy Storchaka in branch '2.7':
Issue #17225: JSON decoder now counts columns in the first line starting
http://hg.python.org/cpython/rev/ce583eb0bec2

New changeset 36220cf535aa by Serhiy Storchaka in branch '3.2':
Issue #17225: JSON decoder now counts columns in the first line starting
http://hg.python.org/cpython/rev/36220cf535aa

New changeset 361ba6d4b7c9 by Serhiy Storchaka in branch '3.3':
Issue #17225: JSON decoder now counts columns in the first line starting
http://hg.python.org/cpython/rev/361ba6d4b7c9

New changeset 69f793cc34fc by Serhiy Storchaka in branch 'default':
Issue #17225: JSON decoder now counts columns in the first line starting
http://hg.python.org/cpython/rev/69f793cc34fc

--
nosy: +python-dev

___
Python tracker 

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



[issue17225] JSON decoder reports wrong column number on first line

2013-02-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

https://github.com/simplejson/simplejson/issues/57

Simplejson has fixed this for about 6 hours.

--

___
Python tracker 

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



[issue17225] JSON decoder reports wrong column number on first line

2013-02-21 Thread Bob Ippolito

Bob Ippolito added the comment:

I've applied a very similar patch to simplejson and released 3.0.9 

https://github.com/simplejson/simplejson/commit/44d7709a31f3a19f3d465411585ebb7be7fa2295

--
nosy: +bob.ippolito

___
Python tracker 

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



[issue17268] Context managers written as C types no longer work in Python 2.7

2013-02-21 Thread Marc-Andre Lemburg

Changes by Marc-Andre Lemburg :


--
Removed message: http://bugs.python.org/msg182601

___
Python tracker 

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



[issue17268] Context managers written as C types no longer work in Python 2.7

2013-02-21 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 21.02.2013 17:36, Marc-Andre Lemburg wrote:
> After some experiments, it turned out that by simply filling in the 
> tp_methods slot, the problem went away.
> 
> Still, the change to use _PyObject_LookupSpecial() appears to have missed the 
> (older) use case where you don't define tp_members, but instead implement 
> method lookup as part of the tp_getattr slot.

Sorry: *tp_methods*, not tp_members.

--

___
Python tracker 

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



[issue17268] Context managers written as C types no longer work in Python 2.7

2013-02-21 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 21.02.2013 17:36, Marc-Andre Lemburg wrote:
> 
> After some experiments, it turned out that by simply filling in the 
> tp_methods slot, the problem went away.

Sorry: *tp_methods*, not tp_members.

--

___
Python tracker 

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



[issue17268] Context managers written as C types no longer work in Python 2.7

2013-02-21 Thread Christian Heimes

Christian Heimes added the comment:

The change should also be documented here, 
http://docs.python.org/2.7/whatsnew/2.7.html#porting-to-python-2-7

--
assignee:  -> docs@python
components: +Documentation
nosy: +christian.heimes, docs@python
stage:  -> needs patch

___
Python tracker 

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



[issue17268] Context managers written as C types no longer work in Python 2.7

2013-02-21 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

After some experiments, it turned out that by simply filling in the tp_methods 
slot, the problem went away.

Still, the change to use _PyObject_LookupSpecial() appears to have missed the 
(older) use case where you don't define tp_members, but instead implement 
method lookup as part of the tp_getattr slot.

Not sure whether this is worth fixing. I just filed this report so that others 
running into the same problem can find it.

--

___
Python tracker 

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



[issue17268] Context managers written as C types no longer work in Python 2.7

2013-02-21 Thread Marc-Andre Lemburg

New submission from Marc-Andre Lemburg:

We have implemented the context manager API for connections and cursors in our 
mxODBC module and this works fine in Python 2.6.

In Python 2.7 we get the following error:

Traceback (most recent call last):
  File "context-manager.py", line 6, in 
with db.cursor() as cursor:
AttributeError: __exit__

Here's the code snippet:

import mx.ODBC.unixODBC as ODBC
connectionString = '...'
db = ODBC.DriverConnect(connectionString)
with db.cursor() as cursor:
print cursor

The mxODBC cursor is not an instance, it's implemented as Python type in C. It 
implements the tp_getattr slot, but not the tp_desc_get slot.

Looking at the apparently new API _PyObject_LookupSpecial(), this does not 
appear to support the tp_getattr slot and goes straight for the tp_desc_get 
slot.

--
messages: 182598
nosy: lemburg
priority: normal
severity: normal
status: open
title: Context managers written as C types no longer work in Python 2.7
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



[issue17264] Update Building C and C++ Extensions with distutils documentation

2013-02-21 Thread Éric Araujo

Éric Araujo added the comment:

Thanks, will tweak and apply.

--
assignee: docs@python -> eric.araujo
nosy: +eric.araujo
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



[issue16446] pdb raises BdbQuit on 'quit' when started with set_trace

2013-02-21 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

I also bumped into this problem on both 2.7 and 3.3. It is very annoying.

--

___
Python tracker 

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



[issue16446] pdb raises BdbQuit on 'quit' when started with set_trace

2013-02-21 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



[issue17267] datetime.time support for '+' and 'now'

2013-02-21 Thread Ronald Oussoren

Ronald Oussoren added the comment:

IMHO this would to module 24 arithmetic, just like a normal clock.

When I do calculations with plain time that is what I want, if the date is also 
important I use datetime.datetime.  That a time value silently truncates when 
going past midnight is IMHO also the obvious behavior.

The biggest argument against adding this functionality I could come up with is 
that this can give wrong answers when daylight savings time transitions happen, 
which could lead to subtle bugs.

--

___
Python tracker 

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



[issue17267] datetime.time support for '+' and 'now'

2013-02-21 Thread Eric V. Smith

Eric V. Smith added the comment:

What would this give:

   tm = datetime.time(13, 20)
   later = tm + datetime.timedelta(hours=47, minutes=44)

datetime.time(13, 4)? Or raise an exception?

I've thought about this before, but it's always a problem when going over date 
boundaries. If you define "+" to be modulo 24 hours, then it's not very useful 
for cases I've looked at. Every time I've used time by itself, I end up going 
back to datetime. But I'll admit that might be a shortcoming of mine, not the 
concept.

--
nosy: +eric.smith

___
Python tracker 

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



[issue16233] IDLE: conceptual problems with *Class browser*

2013-02-21 Thread Ramchandra Apte

Ramchandra Apte added the comment:

IMO, Class Browser shouldn't even appear in PyShell.

--
nosy: +Ramchandra Apte

___
Python tracker 

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



[issue17267] datetime.time support for '+' and 'now'

2013-02-21 Thread Ronald Oussoren

New submission from Ronald Oussoren:

It would be nice if datetime.time would be possible to add a delta to a 
datetime.time object, and if datetime.time had a method for returning the 
current time (just like datetime.date and date time.datetime have 'today' and 
'now' methods).

Rationale for the '+' operator: calculating the wall clock time some time after 
an time on an unspecified date. The easy solution would be:

   tm = datetime.time(13, 20)
   later = tm + datetime.timedelta(hours=5, minutes=44)

That's is currently not possible, but requires more complicated code.

Getting the current time without date information currently requires getting 
done with 'datetime.datetime.now().time()', a class method of 'datetime.time' 
would IMHO be nicer. I must admit that I don't have a good suggestion for the 
name of that method.

--
components: Library (Lib)
messages: 182592
nosy: ronaldoussoren
priority: normal
severity: normal
stage: test needed
status: open
title: datetime.time support for '+' and 'now'
type: enhancement
versions: Python 3.4

___
Python tracker 

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



[issue17248] test_posix chown -1, 0 tests fail if user has group root

2013-02-21 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
status: open -> closed

___
Python tracker 

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



[issue17248] test_posix chown -1, 0 tests fail if user has group root

2013-02-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7a9ea3d08f51 by Serhiy Storchaka in branch '2.7':
Issue #17248: Fix os.*chown() testing when user is in root group.
http://hg.python.org/cpython/rev/7a9ea3d08f51

New changeset 0f7383e6ced7 by Serhiy Storchaka in branch '3.2':
Issue #17248: Fix os.*chown() testing when user is in root group.
http://hg.python.org/cpython/rev/0f7383e6ced7

New changeset a4e348c4b5d3 by Serhiy Storchaka in branch '3.3':
Issue #17248: Fix os.*chown() testing when user is in root group.
http://hg.python.org/cpython/rev/a4e348c4b5d3

New changeset d49685548a7a by Serhiy Storchaka in branch 'default':
Issue #17248: Fix os.*chown() testing when user is in root group.
http://hg.python.org/cpython/rev/d49685548a7a

--

___
Python tracker 

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



[issue17237] m68k aligns on 16bit boundaries.

2013-02-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> Erm, still, which one do I build? Not 3.2 because it obviously
> works, at least as packaged in Debian.

Any >= 3.3.0.

--

___
Python tracker 

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



[issue17225] JSON decoder reports wrong column number on first line

2013-02-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

These values used only in the exception message. However current (3.0.8, stdlib 
json based on 2.0.9) simplejson exposes them as an exception attributes.

http://simplejson.readthedocs.org/en/latest/#exceptions

--

___
Python tracker 

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



[issue17266] Idle + tcl 8.6.0 Can't convert '_tkinter.Tcl_Obj' object to str implicitly

2013-02-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Python is not ready for Tcl/Tk 8.6 yet.

--
components: +Tkinter
nosy: +serhiy.storchaka
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed
superseder:  -> Tk 8.6.0 introduces TypeError. (Tk 8.5.13 works)
type:  -> behavior

___
Python tracker 

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



[issue17266] Idle + tcl 8.6.0 Can't convert '_tkinter.Tcl_Obj' object to str implicitly

2013-02-21 Thread Helmut Jarausch

New submission from Helmut Jarausch:

I have tcl/tk 8.6.0 installed here. Both Python versions below
are build from source.

I'm using LANG=en_US.iso88591 here if that matters.

When opening a file in Idle with 
python-3.3.1 revision: c08bcf5302ec

or

python-3.4.0a0 (default:3a110a506d35) (HG version)

I get
Failed to load extension 'CodeContext'
Traceback (most recent call last):
  File 
"/home/jarausch/GenToo/LOC/TEST/Python/cpython/Lib/idlelib/EditorWindow.py", 
line 1034, in load_standard_extensions
self.load_extension(name)
  File 
"/home/jarausch/GenToo/LOC/TEST/Python/cpython/Lib/idlelib/EditorWindow.py", 
line 1055, in load_extension
ins = cls(self)
  File 
"/home/jarausch/GenToo/LOC/TEST/Python/cpython/Lib/idlelib/CodeContext.py", 
line 49, in __init__
self.toggle_code_context_event()
  File 
"/home/jarausch/GenToo/LOC/TEST/Python/cpython/Lib/idlelib/CodeContext.py", 
line 66, in toggle_code_context_event
padx += int(str( widget.pack_info()['padx'] ))
  File "/home/jarausch/GenToo/LOC/TEST/Python/cpython/Lib/tkinter/__init__.py", 
line 1919, in pack_info
self.tk.call('pack', 'info', self._w))
TypeError: Can't convert '_tkinter.Tcl_Obj' object to str implicitly

--
components: IDLE
messages: 182587
nosy: HJarausch
priority: normal
severity: normal
status: open
title: Idle + tcl 8.6.0 Can't convert '_tkinter.Tcl_Obj' object to str 
implicitly
versions: Python 3.3, Python 3.4

___
Python tracker 

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



[issue17265] Fix code highlight in the string.Template example

2013-02-21 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the report and the patch!

--
assignee: docs@python -> ezio.melotti
nosy: +ezio.melotti
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
type:  -> enhancement

___
Python tracker 

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



[issue17265] Fix code highlight in the string.Template example

2013-02-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 943ea41d3ceb by Ezio Melotti in branch '2.7':
#17265: fix highlight in template example.  Initial patch by Berker Peksag.
http://hg.python.org/cpython/rev/943ea41d3ceb

New changeset 1b9de5788698 by Ezio Melotti in branch '3.2':
#17265: fix highlight in template example.  Initial patch by Berker Peksag.
http://hg.python.org/cpython/rev/1b9de5788698

New changeset 0e2d89f34ae5 by Ezio Melotti in branch '3.3':
#17265: merge with 3.2.
http://hg.python.org/cpython/rev/0e2d89f34ae5

New changeset a11ddd687a0b by Ezio Melotti in branch 'default':
#17265: merge with 3.3.
http://hg.python.org/cpython/rev/a11ddd687a0b

--
nosy: +python-dev

___
Python tracker 

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



[issue17261] multiprocessing.manager BaseManager cannot return proxies from proxies remotely (when listening on '')

2013-02-21 Thread Richard Oudkerk

Changes by Richard Oudkerk :


--
nosy: +sbt

___
Python tracker 

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



[issue17265] Fix code highlight in the string.Template example

2013-02-21 Thread Berker Peksag

New submission from Berker Peksag:

See for the current version:

http://docs.python.org/3.4/library/string.html#string.Template.template

--
assignee: docs@python
components: Documentation
files: string_template_highlight.diff
keywords: patch
messages: 182584
nosy: berker.peksag, docs@python
priority: normal
severity: normal
status: open
title: Fix code highlight in the string.Template example
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file29141/string_template_highlight.diff

___
Python tracker 

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



[issue17225] JSON decoder reports wrong column number on first line

2013-02-21 Thread Ferdinand Beyer

Ferdinand Beyer added the comment:

Line and column number are included in the formatted error message ("raise 
ValueError(errormsg(...))").  They are currently not accessible separately as 
exception arguments.

--

___
Python tracker 

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



  1   2   >