[issue11656] Debug builds for Windows would be very helpful

2013-03-14 Thread Ezio Melotti

Ezio Melotti added the comment:

Can this be closed then?

--
nosy: +ezio.melotti
status: open - pending

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



[issue15121] devguide doesn't document all bug tracker components

2013-03-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2889f71c9e20 by Ezio Melotti in branch 'default':
#15121: document the email component.
http://hg.python.org/devguide/rev/2889f71c9e20

--
nosy: +python-dev

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



[issue15121] devguide doesn't document all bug tracker components

2013-03-14 Thread Ezio Melotti

Ezio Melotti added the comment:

I documented the email component, and removed the None component.
I'm still not sure what to do about Cross-build -- maybe it should be removed 
as well.  Its name is self-explanatory, so even if it's not removed and it's 
not documented I don't think it's a big deal.

--
assignee:  - ezio.melotti
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
type:  - enhancement

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



[issue17044] Implement PEP 422: Simple class initialisation hook

2013-03-14 Thread Nick Coghlan

Nick Coghlan added the comment:

I hadn't noticed that type.__new__ copied the contents (it surprises me that it 
does both that *and* restricts the input type to a true dict instance).

The Extending a class example should still work as shown, since the magic of 
that happens while the body of ExtendedExample is running.

For the order preserving case, it turns out CPython already keeps a copy of the 
original namespace around as cls.__locals__, but this is currently undocumented 
(as far as I can tell anyway).

If we elevate that to documented behaviour, then __init_class__ implementations 
can reference both the original object, as well as the snapshot underlying the 
class object.

Given that, it is probably also better to revert the namespace keyword to 
accepting an instance rather than a factory function, since the copy operation 
after execution of the class body is automatic.

--

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



[issue15917] hg hook to detect unmerged changesets

2013-03-14 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Reviewed the patch - the logic looks okay to me - namely verifying that the 
changeset the merged with the next +0.1, 3.x branch or default.

I tested.

2.7 - push - success.
3.1 - push - fail - merge to 3.2 - fail - merge to default - success.

Looks like a good server-side hgrc hook to have.

--
nosy: +orsenthil

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15917
___
___
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-03-14 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


Removed file: http://bugs.python.org/file29394/issue14468-new-faqs.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14468
___
___
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-03-14 Thread Ezio Melotti

Ezio Melotti added the comment:

The attached patch fixes the typo and mentions ``hg heads branch``.

 I think a version of your 6 step display would be helpful. It was for me.

The FAQ already describes the general approach (merge heads in each branch and 
then merge branches as usual).  The worst-case scenario that those 6 steps 
address is something that doesn't really happen often (and it's also a bit 
intimidating), so I preferred to leave it out and just describe a more common 
example.

--
Added file: http://bugs.python.org/file29406/issue14468-new-faqs.diff

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



[issue11479] Add discussion of trailing backslash in raw string to tutorial

2013-03-14 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
stage: patch review - commit review

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



[issue17232] Improve -O docs

2013-03-14 Thread Ezio Melotti

Ezio Melotti added the comment:

I left a review on rietveld.

--
nosy: +ezio.melotti
stage:  - patch review

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



[issue17403] Robotparser fails to parse some robots.txt

2013-03-14 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
keywords: +easy
nosy: +ezio.melotti
stage:  - test needed

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



[issue11869] Include information about the bug tracker Rietveld code review tool

2013-03-14 Thread Ezio Melotti

Ezio Melotti added the comment:

Closing this as duplicate of #13963.

--
resolution:  - duplicate
stage: needs patch - committed/rejected
status: open - closed
superseder:  - dev guide has no mention of mechanics of patch review

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



[issue11454] email.message import time

2013-03-14 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
stage:  - patch review
versions: +Python 3.4 -Python 3.3

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



[issue1243730] Big speedup in email message parsing

2013-03-14 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
versions: +Python 3.4 -Python 3.3

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



[issue6640] urlparse should parse mailto: URL headers as query parameters

2013-03-14 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
keywords: +easy
versions: +Python 3.4 -Python 3.2

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



[issue17413] format_exception() breaks on exception tuples from trace function

2013-03-14 Thread Helmut Jarausch

Helmut Jarausch added the comment:

The problem is caused by the new format_exception in Python's traceback.py 
file. It reads

def format_exception(etype, value, tb, limit=None, chain=True): 
  list = []
  if chain:
 values = _iter_chain(value, tb)
  else:
 values = [(value, tb)]
  for value, tb in values:
  if isinstance(value, str):

and then

def _iter_chain(exc, custom_tb=None, seen=None):
if seen is None:
seen = set()
seen.add(exc)
its = []
context = exc.__context__

As you can see, the new keyword parameter chain is True by default. Thus, 
iter_chain is called by default.

And there you have context= exc.__context__.
Now, if value is an object of type str Python tries to access the __context__ 
field of an object of type str.

And this raises an attribute error.

In an application (pudb) I've used the fixed

exc_info= sys.exc_info()

format_exception(*exc_info,chain=not isinstance(exc_info[1],str))

So, why is the keyword parameter 'chain' True by default.
This causes the problem.

--
nosy: +HJarausch

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



[issue16931] mention work-around to create diffs in default/non-git mode

2013-03-14 Thread Ezio Melotti

Ezio Melotti added the comment:

 This can be in a general Mercurial section before the section specific
 to committers, or else spread throughout (e.g. in the FAQ).

FWIW I'm leaning towards making the committing.rst page for committers only, 
and move general instructions for non-committers elsewhere.  For this issue I 
think it might be OK to either add a FAQ about Rietveld that also mentions the 
git format, or possibly include it in a new Rietveld section somewhere in the 
tracker docs (see #13963).

--
stage:  - needs patch
type:  - enhancement

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



[issue15575] Tutorial is unclear on multiple imports of a module.

2013-03-14 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
keywords: +easy
nosy: +ezio.melotti
stage:  - needs patch

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



[issue10872] Add mode to TextIOWrapper repr

2013-03-14 Thread Ezio Melotti

Ezio Melotti added the comment:

Should this still be backported on 2.7?

--
keywords: +easy
nosy: +ezio.melotti

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



[issue17413] format_exception() breaks on exception tuples from trace function

2013-03-14 Thread R. David Murray

R. David Murray added the comment:

Because the second argument to format_traceback is supposed to be (is 
documented to be) an exception object.  The fact that it used to work anyway in 
Python2 if you passed a string was an accident of the implementation.  
Likewise, settrace is documented to provide a value, not a string, so the fact 
that it provides a string is a bug.  That needs to be fixed.

(As to specifically why chain defaults to True, it defaults to having the same 
behavior as the normal exception machinery.)

--

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



[issue17414] timeit.timeit not in __all__ even though documented

2013-03-14 Thread Chris Angelico

New submission from Chris Angelico:

The timeit module is commonly used via the convenience function timeit.timeit, 
which is listed in the documentation as the recommended Python Interface:
http://docs.python.org/3/library/timeit.html

However, this function is not listed in __all__, meaning that it does not come 
up in IDLE when Ctrl-Space is pressed. It is also not mentioned in the module 
docstring, which says Library usage: see the Timer class..

Same applies to timeit.repeat(), save that it's not as commonly used. Both are 
listed in the online docs but not in the docstring or __all__.

--
components: Library (Lib)
messages: 184147
nosy: Rosuav, terry.reedy
priority: normal
severity: normal
status: open
title: timeit.timeit not in __all__ even though documented
type: enhancement
versions: Python 2.6, Python 3.3

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



[issue14515] tempfile.TemporaryDirectory documented as returning object but returns name

2013-03-14 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti, terry.reedy
stage: needs patch - patch review
versions: +Python 3.4

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



[issue17414] timeit.timeit not in __all__ even though documented

2013-03-14 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
assignee:  - docs@python
components: +Documentation
keywords: +easy
nosy: +docs@python, ezio.melotti
stage:  - needs patch
versions: +Python 2.7, Python 3.2, Python 3.4

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



[issue13604] update PEP 393 (match implementation)

2013-03-14 Thread Ezio Melotti

Ezio Melotti added the comment:

What's the status of this?

--
nosy: +ezio.melotti

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



[issue3701] test_ntpath.test_relpath fails when launched from a different Windows drive

2013-03-14 Thread Ezio Melotti

Ezio Melotti added the comment:

Since 3.1 is no longer maintained I'm going to close this.

--
nosy: +ezio.melotti
resolution:  - out of date
stage: needs patch - committed/rejected
status: open - closed

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



[issue9104] test_exceptions does not test pickling with pickle.py

2013-03-14 Thread Ezio Melotti

Ezio Melotti added the comment:

 there's an issue about that.

That would be #8273.  See also #17037 and PEP 399.

--
nosy: +ezio.melotti

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



[issue2786] Names in traceback should have class names, if they're methods

2013-03-14 Thread Ezio Melotti

Ezio Melotti added the comment:

Perhaps __qualname__ could be used in the traceback.

--
keywords: +easy
nosy: +ezio.melotti, pitrou
stage:  - needs patch
versions: +Python 3.4 -Python 3.2

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



[issue17415] Documentation Ambiguity 1

2013-03-14 Thread Gurmeet Singh

New submission from Gurmeet Singh:

This is the first time I am creating an issue. I may be doing something wrong. 
I will correct that if you make me aware about it!

Issue with documentation:
Documentation page: http://docs.python.org/3/library/os.path.html
Entry: os.path.normpath(path)
Contention line: It should be understood that this may change the meaning of 
the path if it contains symbolic links!

Ambiguity Source: Contention line immediately follows the line On Windows, it 
converts forward slashes to backward slashes. relating contention line to also 
windows.

Ambiguity: I think (i.e. I do not know for sure) that, the contention line 
should apply to all OS, not just windows. for example, .. after a symlink 
should, according to me, remove the symlink itself by the normpath function. 
This would be an incorrect behaviour of the normpath (I consider that 
incorrect). Hence, should be documented for all OS.

--
assignee: docs@python
components: Documentation
messages: 184152
nosy: docs@python, gsingh
priority: normal
severity: normal
status: open
title: Documentation Ambiguity 1
type: enhancement
versions: Python 3.3

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



[issue17416] Documentation Ambiguity 2

2013-03-14 Thread Gurmeet Singh

New submission from Gurmeet Singh:

Source page: http://docs.python.org/3/library/os.html
Entry: os.walk(...)

Ambiguity Source: Name of the argument TopDown and / or its description.

The TopDown name is misleading to me. I would suggest BFS or DFS instead. 
TopDown false would imply to me that the traversal would run bottom up from 
the directory mentioned in the argument list (even though the name of that 
argument is top, it is confusing indicating a possibility of another naming 
mistake instead!)

--
assignee: docs@python
components: Documentation
messages: 184153
nosy: docs@python, gsingh
priority: normal
severity: normal
status: open
title: Documentation Ambiguity 2
type: enhancement
versions: Python 3.3

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



[issue12684] profile does not dump stats on exception like cProfile does

2013-03-14 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

I wasn't aware of this issue (sorry) and I have already fixed this back in cset 
422169310b7c for the 3.4 branch.
2.7, 3.2 and 3.3 branches can still be fixed though.

--
versions: +Python 2.7 -Python 3.4

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



[issue17417] Documentation Modification Suggestion: os.walk, fwalk

2013-03-14 Thread Gurmeet Singh

New submission from Gurmeet Singh:

Source page: http://docs.python.org/3/library/os.html
Entry: os.walk(...), os.fwalk()

These functions seems to be a generator functions. An expert like yourself may 
have no trouble to make this out. But for novice (or for people out of touch) 
like myself would have preferred a starting line of this function as A 
generator function that generates file names , rather than currently 
Generates file names

--
assignee: docs@python
components: Documentation
messages: 184155
nosy: docs@python, gsingh
priority: normal
severity: normal
status: open
title: Documentation Modification Suggestion: os.walk, fwalk
type: enhancement
versions: Python 3.3

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



[issue17407] RotatingFileHandler issue when using multiple loggers instances (but one process/thread) to the same file

2013-03-14 Thread Vinay Sajip

Vinay Sajip added the comment:

I don't believe this is logging-related - it relates to how you can rename open 
files on POSIX. Both loggers use the same file, until rollover - thereafter, 
they use different files, resulting in the behaviour you saw. To illustrate, 
run the following script on your system, which has no logging code:

# rotest.py
import os

FN = 'dummy-%s.log' % os.getpid()

print('Using %s' % FN)

fa = open(FN, 'a')
fb = open(FN, 'a')

aline = 'a' * 40 + '\n'
bline = 'b' * 40 + '\n'

for i in range(5):
if i == 2:
# simulate rollover of a
fa.write('Rolling over - a\n'); fa.flush()
fa.close()
os.rename(FN, FN + '.1')
fa = open(FN, 'a')
fa.write('Rolled over - a\n'); fa.flush()
if i == 3:
# simulate rollover of b
fb.write('Rolling over - b\n'); fa.flush()
fb.close()
os.rename(FN + '.1', FN + '.2')
os.rename(FN, FN + '.1')
fb = open(FN, 'a')
fb.write('Rolled over - b\n'); fa.flush()
fa.write(aline); fa.flush()
fb.write(bline); fb.flush()

When run, I get the following results:

$ python rotest.py
Using dummy-2320.log
$ cat dummy-2320.log
Rolled over - b


$ cat dummy-2320.log.1
Rolled over - a



$ cat dummy-2320.log.2




Rolling over - a

Rolling over - b

As in your case, the oldest file contains both 'a' and 'b' lines, but after 
rollover, 'a' and 'b' lines are segregated.

Note that the script (and your approach) won't work on Windows, because there 
you can't rename open files (one handler has the file open even when the other 
has closed it).

Based on the above, I'm marking this issue as invalid. For obvious reasons, the 
approach you are using here is not recommended.

--
resolution:  - invalid
status: open - closed

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



[issue17407] RotatingFileHandler issue when using multiple loggers instances (but one process/thread) to the same file

2013-03-14 Thread Vinay Sajip

Vinay Sajip added the comment:

BTW in the example script I do fa.flush() a couple of times when I meant to do 
fb.flush() (in the i == 3 clause). The result is the same after correcting this.

--

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



[issue15244] Support for opening files with FILE_SHARE_DELETE on Windows

2013-03-14 Thread Piotr Dobrogost

Piotr Dobrogost added the comment:

 I don't understand whether you are proposing to include the patch into Python 
 as-is;

I think Richard is well aware of the constraints you specify and current patch 
was meant as a proof of concept; to show that all tests pass with such a 
change. Of course that's only my belief and we shall see what Richard has to 
say.

 That said, having maximum sharing when opnening files sounds fine to me.

Good to hear. However I started to wonder if we are ready for all consequences 
of this. For example taking into account what Richard noted in 
http://bugs.python.org/issue14243, specifically:

 Unfortunately using O_TEMPORARY is the only way allowed by msvcrt to
 get FILE_SHARE_DELETE, even though it also has the orthogonal effect
 of unlinking the file when all handles are closed.

forces programs which would like to open a file being opened at the same time 
by Python code (by means of built-in open() or os.open() with default 
arguments) to either use O_TEMPORARY when using msvcrt or to go low level and 
use CreateFile() Win32 API function with FILE_SHARE_DELETE flag. Are we ok with 
it?

--

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



[issue11420] Make testsuite pass with -B/DONTWRITEBYTECODE set.

2013-03-14 Thread Berker Peksag

Berker Peksag added the comment:

+skip_if_dont_write_bytecode = unittest.skipIf(
+sys.dont_write_bytecode,
+test meaningful only when writing bytecode)

Maybe this could be added to the test.support module?

--
nosy: +berker.peksag

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



[issue17414] timeit.timeit not in __all__ even though documented

2013-03-14 Thread Anuj Gupta

Anuj Gupta added the comment:

I'm a new contributor so, not sure if I'm missing anything:

The issue seems straightforward to me, the exports should definitely be 
included in both - the docstring and __all__. Also, default_timer is documented 
and should be imported as well.

I've contributed a patch for the dev version. After a review, I can submit 
patches for all remaining versions.

Thanks!

--
keywords: +patch
nosy: +anuj
Added file: http://bugs.python.org/file29407/timeit_exports.diff

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



[issue17390] display python version on idle title bar

2013-03-14 Thread bagrat lazaryan

bagrat lazaryan added the comment:

good. thank you.

i'm not sure about the architecture. i understand it's not crucial for most of 
the users. i would like to have it though.

--

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



[issue1222585] C++ compilation support for distutils

2013-03-14 Thread Jeroen Demeyer

Changes by Jeroen Demeyer jdeme...@cage.ugent.be:


--
nosy: +jdemeyer

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



[issue15244] Support for opening files with FILE_SHARE_DELETE on Windows

2013-03-14 Thread Martin v . Löwis

Martin v. Löwis added the comment:

Am 14.03.13 03:31, schrieb Piotr Dobrogost:
 forces programs which would like to open a file being opened at the
 same time by Python code (by means of built-in open() or os.open()
 with default arguments) to either use O_TEMPORARY when using msvcrt
 or to go low level and use CreateFile() Win32 API function with
 FILE_SHARE_DELETE flag. Are we ok with it?

That's why I was asking for an actual patch. The proposed change may
well not be implementable. If os.open continues to create CRT handles,
a way needs to be found to get a CRT handle that as the
FILE_SHARE_DELETE bit set.

An alternative approach could be that os.open stops creating CRT
handles, and directly uses OS handles. The problem with that is that
stdin/stdout/stderr would stop being 0/1/2, which is not acceptable.
An alternative solution to that could be that we introduce a notion
of python io handles, parallel, but indepedendent from CRT handles.
And so on.

--

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



[issue11656] Debug builds for Windows would be very helpful

2013-03-14 Thread Martin v . Löwis

Changes by Martin v. Löwis mar...@v.loewis.de:


--
resolution:  - wont fix
status: pending - closed

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



[issue8918] distutils test_config_cmd failure on Solaris

2013-03-14 Thread alef

alef added the comment:

The same happens with AIX 6.1 using xlc 10.1. Using -P implies removing -o 
output_file. The resulting _configtest.i is anyhow empty, even using -qppline.

--
nosy: +alef

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



[issue11188] test_time error on AIX

2013-03-14 Thread alef

Changes by alef alessandro.for...@eumetsat.int:


--
nosy: +alef

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



[issue11192] test_socket error on AIX

2013-03-14 Thread alef

Changes by alef alessandro.for...@eumetsat.int:


--
nosy: +alef

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



[issue11190] test_locale error on AIX

2013-03-14 Thread alef

Changes by alef alessandro.for...@eumetsat.int:


--
nosy: +alef

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



[issue15477] test_cmath failures on OS X 10.8

2013-03-14 Thread alef

Changes by alef alessandro.for...@eumetsat.int:


--
nosy: +alef

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



[issue15477] test_cmath failures on OS X 10.8

2013-03-14 Thread alef

Changes by alef alessandro.for...@eumetsat.int:


--
nosy:  -alef

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



[issue9920] test_cmath on atan fails on AIX

2013-03-14 Thread alef

Changes by alef alessandro.for...@eumetsat.int:


--
nosy: +alef

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



[issue15244] Support for opening files with FILE_SHARE_DELETE on Windows

2013-03-14 Thread Richard Oudkerk

Richard Oudkerk added the comment:

On 14/03/2013 1:00pm, Martin v. Löwis wrote:
 That's why I was asking for an actual patch. The proposed change may
 well not be implementable. If os.open continues to create CRT handles,
 a way needs to be found to get a CRT handle that as the
 FILE_SHARE_DELETE bit set.

The patch *does* create CRT fds from win32 handles by using 
msvcrt.open_osfhandle().

One other issue is that I do not know of a way to determine the current 
umask without temporarily changing it, causing a thread-race.

In the end I am not sure it is worth the hassle.  (But maybe it would be 
a good idea to add test.support.open() using FILE_SHARE_DELETE and 
test.support.unlink() to make the testsuite more resilient to 
Permission Denied errors.)

 An alternative approach could be that os.open stops creating CRT
 handles, and directly uses OS handles. The problem with that is that
 stdin/stdout/stderr would stop being 0/1/2, which is not acceptable.
 An alternative solution to that could be that we introduce a notion
 of python io handles, parallel, but indepedendent from CRT handles.
 And so on.

http://bugs.python.org/issue12939 has C implementations of _io.WinFileIO 
and _io.openhandle() which are equivalents for _io.FileIO and os.open() 
which use native Windows handles.

--

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



[issue13918] locale.atof documentation is missing func argument

2013-03-14 Thread Stefan Krah

Stefan Krah added the comment:

I agree with won't fix for the original issue. These locale functions
are in effect superseded by PEP 3101 formatting.

For decimal locale specific formatting, use:

format(Decimal(1729.1415927), n)


IOW, I don't think new formatting functions should be added to the
locale module.

--
status: open - closed

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



[issue17418] Documentation Bug

2013-03-14 Thread Gurmeet Singh

New submission from Gurmeet Singh:

Incompletely explained documentation at 2 places:

1. http://docs.python.org/3/library/functions.html#open

The buffering argument is not correctly explained when setting to a positive 
argument in binary mode.

2. http://docs.python.org/3/library/os.html#os.open

It is not very clear where to find descriptions of the arguments of this 
function. Where to find the required information and where to find C run-time 
documentation could be explained in following preferably:
(Python/C API Reference Manual) http://docs.python.org/3/c-api/index.html and / 
or 
(The Python Standard Library) http://docs.python.org/3/library and  / or 
(Python Runtime Services) http://docs.python.org/3/library/python.html 

A hyperlink may be added if so felt.

--
assignee: docs@python
components: Documentation
messages: 184166
nosy: docs@python, gsingh
priority: normal
severity: normal
status: open
title: Documentation Bug
versions: Python 3.3

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



[issue13918] locale.atof documentation is missing func argument

2013-03-14 Thread Cédric Krier

Cédric Krier added the comment:

locale.atof is not about formatting but parsing string into float following the 
locale.
For now, the only ways I see to parse a string to get a Decimal is to first 
convert it into float (which is not good if precision matters) or to use the 
undocumented parameter.

--
status: closed - open

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



[issue13918] locale.atof documentation is missing func argument

2013-03-14 Thread Stefan Krah

Stefan Krah added the comment:

Cédric Krier rep...@bugs.python.org wrote:
 locale.atof is not about formatting but parsing string into float following 
 the locale.

You're right. Sorry, I never use these locale functions. My impression is
that locales are often buggy or differ across platforms (see #16944).

So actually I now agree that making the parameter official is one reasonable
solution.

--

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



[issue17407] RotatingFileHandler issue when using multiple loggers instances (but one process/thread) to the same file

2013-03-14 Thread James Kesser

James Kesser added the comment:

My approach was just as outlined in the first few paragraphs here, just naming 
loggers for each module using __name__:

http://docs.python.org/2/howto/logging.html#logging-advanced-tutorial

If this is not recommended the documentation should be updated to reflect this.

In my project, I can work around this by having all modules use the same logger 
instance and just printing the module name in the Formatter instead of the 
logger name.

--

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



[issue17407] RotatingFileHandler issue when using multiple loggers instances (but one process/thread) to the same file

2013-03-14 Thread James Kesser

James Kesser added the comment:

Thanks for quick response!

--

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



[issue17419] bdist_wininst installer should allow install in user directory

2013-03-14 Thread Sergio Callegari

New submission from Sergio Callegari:

When installing a package by calling setup you have a --user option to install 
the package for a single user in his disk area.

E.g.,

python setup.py install --user

A similar possibility should be offered via the windows installer

An exe created by

python setup.py bdist_wininst

when run should offer a tickbox to install in the user disk area rather than 
globally.

--
messages: 184171
nosy: Sergio.Callegari
priority: normal
severity: normal
status: open
title: bdist_wininst installer should allow install in user directory
versions: Python 2.7

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



[issue17420] bdist_wininst does not play well with unicode descriptions

2013-03-14 Thread Sergio Callegari

New submission from Sergio Callegari:

When creating an installer with bdist_wininst, any unicode characters in the 
description and long_description fields get mangled when running the installer.

--
messages: 184172
nosy: Sergio.Callegari
priority: normal
severity: normal
status: open
title: bdist_wininst does not play well with unicode descriptions
versions: Python 2.7

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



[issue17413] format_exception() breaks on exception tuples from trace function

2013-03-14 Thread Andreas Kloeckner

Andreas Kloeckner added the comment:

Thanks for the suggestion. Since 3.2 and 3.3 will be with us for a while, I've 
implemented the workaround you've suggested. Works, too. :)

--

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



[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2013-03-14 Thread paul j3

paul j3 added the comment:

If nargs=2, type=float, an argv like '1e4 -.002' works, but '1e4 -2e-3' 
produces the same error as discussed here.  The problem is that 
_negative_number_matcher does not handle scientific notation.  The proposed 
generalize matcher, r'^-.+$', would solve this, but may be overkill.

I'm not as familiar with optparse and other argument processes, but I suspect 
argparse is different in that it processes the argument strings twice.  On one 
loop it parses them, producing an arg_strings_pattern that looks like 'OAA' (or 
'OAO' in these problem cases).  On the second loop is consumes the strings 
(optionals and positionals).  This gives it more power, but produces problems 
like this if the parsing does not match expectations.

--
nosy: +paul.j3

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



[issue17419] bdist_wininst installer should allow install in user directory

2013-03-14 Thread Martin v . Löwis

Martin v. Löwis added the comment:

Would you like to work on a patch?

--
nosy: +loewis

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



[issue17420] bdist_wininst does not play well with unicode descriptions

2013-03-14 Thread Martin v . Löwis

Martin v. Löwis added the comment:

Would you like to work on a patch?

--
nosy: +loewis

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



[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2013-03-14 Thread Evgeny Kapun

Evgeny Kapun added the comment:

The way how argparse currently parses option arguments is broken. If a long 
option requires an argument and it's value isn't specified together with the 
option (using --option=value syntax), then the following argument should be 
interpreted as that value, no matter what it looks like. There should be no 
guesses or heuristics here. That the behavior depends on whether some argument 
looks like a negative number is the most horrible. Argument parsing should 
follow simple, deterministic rules, preferably the same that used by standard 
getopt(3).

--

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



[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2013-03-14 Thread Eric V. Smith

Eric V. Smith added the comment:

Evgeny: I completely agree. It's unfortunate that argparse doesn't work that 
way.

However, I think it's too late to change this behavior without adding a new 
parser. I don't think existing argparse can be changed to not operate the way 
it does, due to backward compatibility concerns. The discussion in this issue 
describes those compatibility concerns.

--

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



[issue17299] Test cPickle with real files

2013-03-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8a0b5c9f04c2 by Serhiy Storchaka in branch '2.7':
Issue #17299: Add test coverage for cPickle with file objects and general IO
http://hg.python.org/cpython/rev/8a0b5c9f04c2

--
nosy: +python-dev

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



[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2013-03-14 Thread paul j3

paul j3 added the comment:

We need to be careful about when or where _negative_number_match is changed.

We basically do:
parser = argparse.ArgumentParser(...)
parser._negative_number_matcher = re.compile(r'^-.+$')


This changes the value for the parser itself, but not for the groups 
(_optionals, _positionals) or any subparsers. The code takes special care to 
make sure that the related property: _has_negative_number_optionals is properly 
shared among all these ActionContainers.

--

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



[issue17299] Test cPickle with real files

2013-03-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I'm a little polished the patch before committing. Thank you for the patch, 
Aman Shah.

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

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



[issue1285086] urllib.quote is too slow

2013-03-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4927899bea8d by Serhiy Storchaka in branch '2.7':
Issue #1285086: Get rid of the refcounting hack and speed up urllib.unquote().
http://hg.python.org/cpython/rev/4927899bea8d

New changeset 3cb07925fcb9 by Serhiy Storchaka in branch '3.2':
Issue #1285086: Get rid of the refcounting hack and speed up
http://hg.python.org/cpython/rev/3cb07925fcb9

New changeset 209a9c2de9bd by Serhiy Storchaka in branch '3.3':
Issue #1285086: Get rid of the refcounting hack and speed up
http://hg.python.org/cpython/rev/209a9c2de9bd

New changeset 9367411a261e by Serhiy Storchaka in branch 'default':
Issue #1285086: Get rid of the refcounting hack and speed up
http://hg.python.org/cpython/rev/9367411a261e

--
nosy: +python-dev

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



[issue1285086] urllib.quote is too slow

2013-03-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Sorry, I perhaps missed your response, Senthil. Now committed and closed again.

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

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



[issue17016] _sre: avoid relying on pointer overflow

2013-03-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Of course it would be nice to have the tests for so much cases as possible, but 
I am afraid that it will not be easy. The patch LGTM.

--

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



[issue17420] bdist_wininst does not play well with unicode descriptions

2013-03-14 Thread Sergio Callegari

Sergio Callegari added the comment:

On 14/03/2013 18:15, Martin v. Löwis wrote:
 Martin v. Löwis added the comment:

 Would you like to work on a patch?

 --
 nosy: +loewis

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue17420
 ___
I'd like to, but I really have no clue on bdist_wininst since I develop on 
Linux 
and only occasionally I need to package something so that it can be installed 
in 
Win.
In my linux machine which is ubuntu based bdist_ininst does not even work since 
some piece of it is apparently not installed in debian :-(

Sergio

--

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



[issue13056] test_multibytecodec.py:TestStreamWriter is skipped after PEP393

2013-03-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I think these tests have no sense after PEP393. They tests that StreamWriter 
works with non-BMP characters broken inside surrogate pair. I.e. 
c.write(s[:i]); c.write(s[i:]) always is same as c.write(s), even if i breaks s 
inside a surrogate pair. This case is impossible after PEP393.

--

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



[issue17421] Drop restriction that meta.__prepare__() must return a dict (subclass)

2013-03-14 Thread Eric Snow

New submission from Eric Snow:

Currently type_new() in Objects/typeobject.c enforces a restriction that the 
namespace be a dict or dict subclass.  It does this via the 
PyArg_ParseTupleAndKeywords() call there.

This means that valid mappings may not be used even though they should work 
just fine.  A demonstration of the problem is below.

I've attached a patch that relaxes this restriction.  Should we also add a note 
in the docs that type() will take anything for namespace that dict() will take?

Demonstration
-

class Meta(type):
@classmethod
def __prepare__(cls, name, bases, **kwargs):
return ClassMapping()

from collections import MutableMapping
class ClassMapping(MutableMapping):
def __init__(self, *args, **kwargs):
self._dict = dict(*args, **kwargs)
def __len__(self):
  return len(self._dict)
def __iter__(self):
return iter(self._dict)
def __getitem__(self, key):
return self._dict[key]
def __setitem__(self, key, value):
self._dict[key] = value
def __delitem__(self, key):
del self._dict[key]

 class X(metaclass=Meta):
... pass
...
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: type() argument 3 must be dict, not ClassMapping

--
files: type-namespace-restriction.diff
keywords: patch
messages: 184187
nosy: eric.snow, ncoghlan
priority: normal
severity: normal
stage: patch review
status: open
title: Drop restriction that meta.__prepare__() must return a dict (subclass)
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file29408/type-namespace-restriction.diff

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



[issue17422] language reference should specify restrictions on class namespace

2013-03-14 Thread Eric Snow

New submission from Eric Snow:

(related to PEP 422 and issue #17044)

The execution namespace from a class definition is passed as the third argument 
to the metaclass (see builtin___build_class__() in Python/bltinmodule.c).  When 
applicable, which is almost always, the subsequent call to type.__new__() 
copies that namespace into a new dict which is in turn exposed via the class's 
__dict__.

This matters in the case where a metaclass with __prepare__() gets used (or the 
PEP 422 equivalent).  The language reference[1] should note that the object 
returned by __prepare__() is copied into a new dict when the class is finally 
created via the metaclass.

[1] 
http://docs.python.org/3.4/reference/datamodel.html#customizing-class-creation

--
assignee: docs@python
components: Documentation
messages: 184188
nosy: docs@python, eric.snow, ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: language reference should specify restrictions on class namespace
type: enhancement
versions: Python 3.4

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



[issue17044] Implement PEP 422: Simple class initialisation hook

2013-03-14 Thread Eric Snow

Eric Snow added the comment:

We should definitely have a way to expose the original dictionary from 
__prepare__().  Along with Nick's point, another reason is to allow class 
decorators to have access to that original, which is important to any use case 
that involves post-creation introspection of the definition order within the 
class namespace.

Nick, where did you see cls.__locals__?  I'm not finding any mention of 
__locals__ outside compiler.c and symtable.c.  I agree that such an attribute 
on classes would be helpful, even if by another name, and that it should be 
documented.

--
nosy: +eric.snow

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



[issue17044] Implement PEP 422: Simple class initialisation hook

2013-03-14 Thread Eric Snow

Eric Snow added the comment:

I've also opened #17421 for dropping the restriction on the namespace passed to 
the metaclass and #17422 for documenting that the passed namespace is copied 
into a new dict.

--

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



[issue1243730] Big speedup in email message parsing

2013-03-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Test fails with stack overflow:

==
ERROR: test_pushCR_LF (email.test.test_email.TestIterators)
FeedParser BufferedSubFile.push() assumed it received complete
--
Traceback (most recent call last):
  File /home/serhiy/py/cpython2.7/Lib/email/test/test_email.py, line 2585, in 
test_pushCR_LF
bsf.push(il)
  File /home/serhiy/py/cpython2.7/Lib/email/feedparser.py, line 140, in push
parts = _splitlines(data)
  File /home/serhiy/py/cpython2.7/Lib/email/feedparser.py, line 170, in 
_splitlines
lines.extend(_splitlines(part))
...
  File /home/serhiy/py/cpython2.7/Lib/email/feedparser.py, line 170, in 
_splitlines
lines.extend(_splitlines(part))
RuntimeError: maximum recursion depth exceeded

--
nosy: +serhiy.storchaka

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



[issue17044] Implement PEP 422: Simple class initialisation hook

2013-03-14 Thread Eric Snow

Eric Snow added the comment:

 Given that, it is probably also better to revert the namespace keyword
 to accepting an instance rather than a factory function, since the copy
 operation after execution of the class body is automatic.

Agreed.  Of course, the related note is rendered superfluous.  There is still 
the possibility of reusing the same namespace across successive class 
definitions, with the associated consequences.  However, since type.__new__() 
copies the namespace into a new dict, it mitigates the main concern: implicit 
modification to an existing class in the definition of another.

--

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



[issue17423] libffi on 32bit is broken on linux

2013-03-14 Thread Maciej Fijalkowski

New submission from Maciej Fijalkowski:

The bug is a little tricky to reproduce. You need a 32bit linux. First compile 
x.c with:

gcc -O3 -g -shared -o x.so x.c -std=c99 -msse3 -ftree-vectorize -mfpmath=sse

and run x.py. It segfaults because the alignment of stack is not preserved (and 
it's assumed on a modern linux). Patch attached.

--
files: x.c
messages: 184193
nosy: fijall
priority: normal
severity: normal
status: open
title: libffi on 32bit is broken on linux
type: crash
Added file: http://bugs.python.org/file29409/x.c

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



[issue17423] libffi on 32bit is broken on linux

2013-03-14 Thread Maciej Fijalkowski

Changes by Maciej Fijalkowski fij...@gmail.com:


Added file: http://bugs.python.org/file29410/x.py

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



[issue17423] libffi on 32bit is broken on linux

2013-03-14 Thread Maciej Fijalkowski

Changes by Maciej Fijalkowski fij...@gmail.com:


Removed file: http://bugs.python.org/file29409/x.c

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



[issue17423] libffi on 32bit is broken on linux

2013-03-14 Thread Maciej Fijalkowski

Changes by Maciej Fijalkowski fij...@gmail.com:


Added file: http://bugs.python.org/file29411/x.c

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



[issue17423] libffi on 32bit is broken on linux

2013-03-14 Thread Maciej Fijalkowski

Changes by Maciej Fijalkowski fij...@gmail.com:


--
keywords: +patch
Added file: http://bugs.python.org/file29412/ffi.diff

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



[issue17424] help() should use the class signature

2013-03-14 Thread Sean Reifschneider

New submission from Sean Reifschneider:

David Beazley in his tutorial pointed out that you could use a metaclass to 
create function signatures for the common use case of:

class foo:
   def __init__(self, name, value, high, low):
  self.name = name
  self.value = value
  [...]

The signature can be used so that the classes created using an automation 
metaclass will show a signature of (*args).  inspect.signature will use this 
signature, but help() will not use the signature.

This is a stub created during the tutorial, I will flesh it out further during 
the sprints.

--
assignee: jafo
components: Interpreter Core
messages: 184194
nosy: jafo
priority: normal
severity: normal
status: open
title: help() should use the class signature
versions: Python 3.5

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



[issue17423] libffi on 32bit is broken on linux

2013-03-14 Thread Alex Gaynor

Changes by Alex Gaynor alex.gay...@gmail.com:


--
nosy: +alex

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



[issue17044] Implement PEP 422: Simple class initialisation hook

2013-03-14 Thread Nick Coghlan

Nick Coghlan added the comment:

Oh, that's bizarre - the presence of __locals__ is a side effect of
calling locals() in the class body. So perhaps passing the namespace
as a separate __init_class__ parameter is a better option.

--

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



[issue17422] language reference should specify restrictions on class namespace

2013-03-14 Thread Daniel Urban

Changes by Daniel Urban urban.dani...@gmail.com:


--
nosy: +daniel.urban

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



[issue17421] Drop restriction that meta.__prepare__() must return a dict (subclass)

2013-03-14 Thread Daniel Urban

Changes by Daniel Urban urban.dani...@gmail.com:


--
nosy: +daniel.urban

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



[issue17407] RotatingFileHandler issue when using multiple loggers instances (but one process/thread) to the same file

2013-03-14 Thread Vinay Sajip

Vinay Sajip added the comment:

 My approach was just as outlined in the first few paragraphs

The not-recommended approach I'm referring to is that of having a two 
RotatingFileHandlers *with the same filename* attached to two loggers.

It's perfectly OK to follow the recommendation of naming multiple loggers in 
multiple modules using __name__ - that doesn't lead to the problem you 
described in this issue. If you use different file names for the different 
handlers, that should be OK too.

--

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



[issue17412] Windows make.bat fails on 2.7

2013-03-14 Thread Ezio Melotti

Ezio Melotti added the comment:

On Linux make html seems to use v1.0.7 too, so updating make.bat should be OK.
See also #16471.

--

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



[issue16471] upgrade to sphinx 1.1

2013-03-14 Thread Ezio Melotti

Ezio Melotti added the comment:

When this is done make.bat should be updated too.

--
stage:  - needs patch

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



[issue17425] Update OpenSSL versions in Windows builds

2013-03-14 Thread Antoine Pitrou

New submission from Antoine Pitrou:

OpenSSL recently issued a security advisory (*). Our bundled OpenSSL versions 
seem to be vulnerable. They should be updated to OpenSSL 1.0.1d, 1.0.0k or 
0.9.8y depending on the version.

(*) http://www.openssl.org/news/secadv_20130205.txt

Apologies if this has already been handled and I've misunderstood 
Tools/buildbot/external-common.bat.

--
components: Build, Windows
messages: 184199
nosy: benjamin.peterson, christian.heimes, georg.brandl, larry, loewis, pitrou
priority: release blocker
severity: normal
status: open
title: Update OpenSSL versions in Windows builds
type: security
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

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



[issue17420] bdist_wininst does not play well with unicode descriptions

2013-03-14 Thread Martin v . Löwis

Martin v. Löwis added the comment:

 I'd like to, but I really have no clue on bdist_wininst

That's perfectly fine. If people make feature requests, it's
often uncertain whether they lack time or knowledge, or are
merely to shy/uncertain to propose a patch. So somebody else
needs to volunteer to work on this.

--

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



[issue17423] libffi on 32bit is broken on linux

2013-03-14 Thread Stefan Krah

Stefan Krah added the comment:

Is this the same as #17245?

--
nosy: +skrah

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



[issue17245] ctypes libffi needs to align the x86 stack to 16 bytes

2013-03-14 Thread Maciej Fijalkowski

Maciej Fijalkowski added the comment:

This patch is not in the whatever version ubuntu supplies. Btw, this is code 
duplication, since there is already darwin alignment, see 17423

--
nosy: +fijall

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



[issue17421] Drop restriction that meta.__prepare__() must return a dict (subclass)

2013-03-14 Thread Martin v . Löwis

Martin v. Löwis added the comment:

Are you sure that non-dicts work fine? ISTM that there is quite some code that 
relies on tp_dict being a dict-or-subdict instance, e.g. in 
typeobject.c:type_module,type_get_doc etc.

--
nosy: +loewis

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



[issue17425] Update OpenSSL versions in Windows builds

2013-03-14 Thread Martin v . Löwis

Martin v. Löwis added the comment:

No, it hasn't been handled. I'll look into it next week.

--

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



[issue11420] Make testsuite pass with -B/DONTWRITEBYTECODE set.

2013-03-14 Thread Ezio Melotti

Ezio Melotti added the comment:

There are a couple more tests elsewhere that use 
@skipIf(sys.dont_write_bytecode, ...) directly, but I don't think it's generic 
enough to be moved to test.support.

--

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



[issue17421] Drop restriction that meta.__prepare__() must return a dict (subclass)

2013-03-14 Thread Eric Snow

Eric Snow added the comment:

Sorry I wasn't clear.  Later in type.__new__() it copies that passed namespace 
into a new dict (see issue #17422).  So as long as the namespace argument is a 
valid argument to dict(), it's going to work fine.  We don't need the extra 
explicit check performed by PyArg_ParseTupleAndKeywords().

--

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



[issue17412] Windows make.bat fails on 2.7

2013-03-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7338e7ec47f0 by Terry Jan Reedy in branch '2.7':
Issue #17412: update 2.7 Doc/make.bat to also use sphinx-1.0.7.
http://hg.python.org/cpython/rev/7338e7ec47f0

--
nosy: +python-dev

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



[issue17412] Windows make.bat fails on 2.7

2013-03-14 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


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

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



[issue17423] libffi on 32bit is broken on linux

2013-03-14 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

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



[issue16471] upgrade to sphinx 1.1

2013-03-14 Thread Terry J. Reedy

Terry J. Reedy added the comment:

This duplicates a part of #10224, which proposes to upgrade all of Sphinx, 
Jinja2, and Pygments to Python 3 compatible versions (so we can build docs with 
Py3). In msg175768, Brett claims that all three have such versions.

Chris, if you want to push to only upgrade Sphinx and not the other two, you 
can re-open. But I'd like to see a justification as I suspect that upgrading 
the other two will, if anything, be easier (assuming no breakage of current 
usage).

--
nosy: +terry.reedy
resolution:  - duplicate
status: open - closed
superseder:  - Build 3.x documentation using python3.x

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



  1   2   >