[issue19185] Allow multiprocessing Pool initializer to return values

2013-10-06 Thread Matteo Cafasso

Matteo Cafasso added the comment:

I agree with your point, I've probably made my considerations too quickly.

The consideration was based on the fact that returning any value previously was 
a misuse (without consequences) of the initializer itself.

Now the misuse would be exposed by the new implementation, probably meeting the 
requirements that leds to the misuse itself.

Aim of the patch is to give an alternative to the use of global variables.
Global variables usage is a pattern which might lead to code errors and many 
developers discourage from following it.
I do believe that forcing such pattern in order to accomplish the desired goals 
is quite restrictive from an API.

--

___
Python tracker 

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



[issue19070] In place operators of weakref.proxy() not returning self.

2013-10-06 Thread shishkander

shishkander added the comment:

This bug happens not just with operators, but with any call 
self.call_something()! For example, running this:

from __future__ import print_function
import weakref

class Test(object):
def method(self):
return type(self)

def test(obj):
print(type(obj), "=>", obj.method())

o = Test()
test(o)
test(weakref.proxy(o))


(also attached for convenience as t.py) 
produces in both python2.7 and python3.2:

$ python t.py 
 => 
 => 

--
nosy: +shishkander
Added file: http://bugs.python.org/file31983/t.py

___
Python tracker 

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



[issue18281] tarfile defines stat constants

2013-10-06 Thread Ethan Furman

Ethan Furman added the comment:

Christian, do you mind if I get this patchd committed?

--

___
Python tracker 

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



[issue19031] Make help() enum aware

2013-10-06 Thread Ethan Furman

Ethan Furman added the comment:

What I'd really like to see is for help to be smart enough to pick up the 
docstrings from instances if an instance has one.

--

___
Python tracker 

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



[issue19075] Add sorting algorithm visualization to turtledemo

2013-10-06 Thread Ethan Furman

Ethan Furman added the comment:

What are the requirements (if any) to get something added to demos?  If not 
many, I'll spiffy up the code a bit (mostly make it go more than one round 
without having to restart).

--

___
Python tracker 

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



[issue16938] pydoc confused by __dir__

2013-10-06 Thread Ethan Furman

Ethan Furman added the comment:

=
class Boom:
def __dir__(self):
return ['BOOM']
def __getattr__(self, name):
if name =='BOOM':
return 42
return super().__getattr(name)

help(Boom)
=
Help on class Boom in module __main__:

class Boom(builtins.object)
 |  Methods defined here:
 |  
 |  __dir__(self)
 |  
 |  __getattr__(self, name)
 |  
 |  --
 |  Data descriptors defined here:
 |  
 |  __dict__
 |  dictionary for instance variables (if defined)
 |  
 |  __weakref__
 |  list of weak references to the object (if defined)
(END)
=

So on an instance there is no problem.

=
import inspect

class MetaBoom(type):
def __dir__(cls):
return ['__class__', '__module__', '__name__', 'BOOM']
def __getattr__(self, name):
if name =='BOOM':
return 42
return super().__getattr(name)
def test(self):
print('testing...')

class Boom(metaclass=MetaBoom):
pass

help(Boom())
=
Help on Boom in module __main__ object:


(END)
=

Still have problem with metaclasses.

Looking at the result from inspect.classify_class_attrs() we see:
=
Attribute(name='BOOM', kind='data', defining_class=None,
object=)
=

The defining class for BOOM should be Boom, not None.

With the attached patch, we get:
=
Help on Boom in module __main__ object:

class Boom(builtins.object)
 |  Data and other attributes defined here:
 |  
 |  BOOM = 42
(END)
=

--
assignee:  -> ethan.furman
keywords: +patch
priority: low -> normal
stage: test needed -> patch review
versions:  -Python 2.7
Added file: http://bugs.python.org/file31982/issue16938.stoneleaf.01.patch

___
Python tracker 

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



[issue19158] BoundedSemaphore.release() subject to races

2013-10-06 Thread Tim Peters

Tim Peters added the comment:

New patch makes the test case do what I intended it to do ;-)

--
Added file: http://bugs.python.org/file31981/boundsem2.patch

___
Python tracker 

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



[issue17359] Mention "__main__.py" explicitly in command line docs

2013-10-06 Thread Chris Rebert

Changes by Chris Rebert :


--
nosy: +cvrebert

___
Python tracker 

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



[issue19097] bool(cgi.FieldStorage(...)) may be False unexpectedly

2013-10-06 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Hi Guido,

Agree with both your points.

Attaching a patch that fixes this issue.

1. Raises TypeError exception when header is not a Mapping or 
email.message.Message type.
2. Asserts for fp.read and fp.readline() to assert that fp, the first argument 
to FieldStorage is a file like object. I would have preferred to assert fp as a 
type of BytesIO object, but I saw some tests failings, so that could be taken 
as a separate 3.4 only backwards incompatible improvement (and not bug fix).

Finally, in the cases where read_single() is called for FieldStorage(), bool() 
raises valid TypeError for empty FieldStorage.

Please review and if it is OK, I can check this in.

--
assignee:  -> orsenthil
keywords: +patch
stage:  -> patch review
type:  -> behavior
Added file: http://bugs.python.org/file31980/19097.patch

___
Python tracker 

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



[issue19158] BoundedSemaphore.release() subject to races

2013-10-06 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue18874] Add a new tracemalloc module to trace memory allocations

2013-10-06 Thread STINNER Victor

STINNER Victor added the comment:

ec121a72e848.patch:

- ignore changes on Lib/test/support/__init__.py: it's my own fix for issue 
#18948 which will be fixed differently
- ignore changes on Lib/test/regrtest.py: they should not be commited, it's 
just a convinient way to test tracemalloc (python -X tracemalloc -m test -r)
- changes on Modules/readline.c: this is the fix for the issue #16742
- Objects/codeobject.c: calling PyUnicode_READY(filename) in PyCode_New() is 
useful on Windows in debug mode, the filename may not be ready, whereas 
tracemalloc requires a ready Unicode string. This change can probably be fixed 
in default independently
- Objects/obmalloc.c: changes on _PyMem_Debug  and changes replacing 
PyMem_Malloc() with PyMem_RawMalloc() are a try to reuse pymalloc allocator for 
PyMem_Malloc(). This should be discussed independently

Sorry for all these unrelated change, I will try to cleanup the repository in 
the next patch.

--

___
Python tracker 

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



[issue19158] BoundedSemaphore.release() subject to races

2013-10-06 Thread Tim Peters

Tim Peters added the comment:

Attached patch, which closes the timing hole, and adds a new basic sanity test.

--
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file31979/boundsem.patch

___
Python tracker 

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



[issue19156] Enum helper functions test-coverage

2013-10-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 516576f5f9dc by Ethan Furman in branch 'default':
Close #19156: add tests and fix for Enum helper edge cases.  Patch from CliffM.
http://hg.python.org/cpython/rev/516576f5f9dc

--
nosy: +python-dev
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue19156] Enum helper functions test-coverage

2013-10-06 Thread Ethan Furman

Ethan Furman added the comment:

Thanks for catching that, Cliff.

--

___
Python tracker 

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



[issue19185] Allow multiprocessing Pool initializer to return values

2013-10-06 Thread Richard Oudkerk

Richard Oudkerk added the comment:

> the previous initializers were not supposed to return any value

Previously, any returned value would have been ignored.  But the documentation 
does not say that the function has to return None.  So I don't think we can 
assume there is no compatibility issue.

--
nosy: +sbt

___
Python tracker 

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



[issue19176] DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser

2013-10-06 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +eli.bendersky

___
Python tracker 

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



[issue16381] Introduce option to force the interpreter to exit upon MemoryErrors

2013-10-06 Thread STINNER Victor

STINNER Victor added the comment:

See also issue #1195571: simple callback system for Py_FatalError. It is 
somehow related.

--

___
Python tracker 

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



[issue16381] Introduce option to force the interpreter to exit upon MemoryErrors

2013-10-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

If we want to get more sophisticated, I would suggest a two-pronged approach:
- first call a user-defined oom function
- if calling the user-defined oom function raises MemoryError, dump a fatal 
error

--
nosy: +pitrou

___
Python tracker 

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



[issue16381] Introduce option to force the interpreter to exit upon MemoryErrors

2013-10-06 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue19185] Allow multiprocessing Pool initializer to return values

2013-10-06 Thread Matteo Cafasso

New submission from Matteo Cafasso:

This patch allows the pool initializer function to return the initialized 
values. The returned values will be passed to the called function as first 
positional argument.

Previously the common pattern was to store the initialized objects into global 
variables making the code more difficult to manage.

The patch is not breaking any backward compatibility as the previous 
initializers were not supposed to return any value, if the initializer does not 
return anything the behavior is the same as usual.

--
files: pool_initializer.patch
keywords: patch
messages: 199116
nosy: noxdafox
priority: normal
severity: normal
status: open
title: Allow multiprocessing Pool initializer to return values
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file31978/pool_initializer.patch

___
Python tracker 

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



[issue11798] Test cases not garbage collected after run

2013-10-06 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe :


--
nosy: +tshepang

___
Python tracker 

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



[issue17534] unittest keeps references to test cases alive

2013-10-06 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe :


--
nosy: +tshepang

___
Python tracker 

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



[issue9815] assertRaises as a context manager keeps tracebacks and frames alive

2013-10-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

See issue1565525 for the new helper function in the traceback module.

--
nosy: +akuchling
stage: patch review -> needs patch

___
Python tracker 

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



[issue9815] assertRaises as a context manager keeps tracebacks and frames alive

2013-10-06 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions:  -Python 3.2

___
Python tracker 

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



[issue17534] unittest keeps references to test cases alive

2013-10-06 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions:  -Python 3.2

___
Python tracker 

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



[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Microbenchmarking hash computation (Linux, gcc 4.7.3):

* Short strings:
  python -m timeit -s "b=b'x'*20" "hash(memoryview(b))"

- 64-bit build, before: 0.263 usec per loop
- 64-bit build, after: 0.263 usec per loop

- 32-bit build, before: 0.303 usec per loop
- 32-bit build, after: 0.358 usec per loop

* Long strings:
  python -m timeit -s "b=b'x'*1000" "hash(memoryview(b))"

- 64-bit build, before: 1.56 usec per loop
- 64-bit build, after: 1.03 usec per loop

- 32-bit build, before: 1.61 usec per loop
- 32-bit build, after: 2.46 usec per loop

Overall, performance looks fine to me.

--

___
Python tracker 

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



[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Here is a simple benchmark (Linux, gcc 4.7.3):

$ ./python -m timeit -s "words=[w for line in open('LICENSE') for w in 
line.split()]; import collections" "c = collections.Counter(words); 
c.most_common(10)"

- 64-bit build, before: 313 usec per loop
- 64-bit build, after: 298 usec per loop

- 32-bit build, before: 328 usec per loop
- 32-bit build, before: 329 usec per loop

- x32 build, before: 291 usec per loop
- x32 build, after: 284 usec per loop

--

___
Python tracker 

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



[issue1215] documentation doesn't say that you can't handle C segfaults from python

2013-10-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bd16e333 by Georg Brandl in branch '3.3':
Closes #1215: document better why it is not a good idea to catch e.g. SIGSEGV 
and refer to faulthandler.
http://hg.python.org/cpython/rev/bd16e333

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue1215] documentation doesn't say that you can't handle C segfaults from python

2013-10-06 Thread Georg Brandl

Georg Brandl added the comment:

I see not much to be done here, except from committing Martin's patch updated 
to the current trunk.

--

___
Python tracker 

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



[issue19172] selectors: add keys() method

2013-10-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Here is a proof-of-concept patch adding a get_map() method to Selector (and 
removing get_key()).

--
Added file: http://bugs.python.org/file31977/selectors_map.patch

___
Python tracker 

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



[issue12162] Documentation about re \number

2013-10-06 Thread Georg Brandl

Georg Brandl added the comment:

I can't see the issue here.  The RE docs are much better off with the regexes 
unquoted.

The '(.+) \1' example was fixed today (the string supposed to not match 
actually did match).

--
nosy: +georg.brandl
resolution:  -> works for me
status: open -> closed

___
Python tracker 

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



[issue11789] Extend upon metaclass/type class documentation, here: zope.interface and usage of instances of classes as base classes

2013-10-06 Thread Georg Brandl

Changes by Georg Brandl :


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

___
Python tracker 

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



[issue11585] Documentation 1.8 shows Python 2 example

2013-10-06 Thread Georg Brandl

Georg Brandl added the comment:

This has since been fixed already.

--
nosy: +georg.brandl
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue10709] Misc/AIX-NOTES needs updating

2013-10-06 Thread Georg Brandl

Georg Brandl added the comment:

Ping? :)

--

___
Python tracker 

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



[issue18939] Venv docs regarding original python install

2013-10-06 Thread Vinay Sajip

Vinay Sajip added the comment:

Closing, as documentation has now been updated.

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

___
Python tracker 

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



[issue19182] Socket leak in logging.handlers

2013-10-06 Thread Vinay Sajip

Vinay Sajip added the comment:

Thanks for the report and patch. This issue only applies to Python 3.4 - it was 
in new code added in the default branch, and so does not apply to earlier 
Python releases.

--
resolution:  -> fixed
status: open -> closed
versions:  -Python 2.7, Python 3.3

___
Python tracker 

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



[issue19182] Socket leak in logging.handlers

2013-10-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bd314db5532d by Vinay Sajip in branch 'default':
Issue #19182: Fixed socket leak on exception when connecting.
http://hg.python.org/cpython/rev/bd314db5532d

--
nosy: +python-dev

___
Python tracker 

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



[issue14101] example function in tertools.count docstring is misindented

2013-10-06 Thread Georg Brandl

Changes by Georg Brandl :


--
resolution:  -> duplicate
status: open -> closed
superseder:  -> Intendation issue in example code in itertools.count 
documentation

___
Python tracker 

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



[issue15432] gzip.py: mtime argument only since python 2.7

2013-10-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ad19a9982b03 by Georg Brandl in branch '3.3':
Closes #15432: GzipFile mtime argument is new in 3.1.
http://hg.python.org/cpython/rev/ad19a9982b03

--

___
Python tracker 

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



[issue15432] gzip.py: mtime argument only since python 2.7

2013-10-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 74ae6064d3e8 by Georg Brandl in branch '2.7':
Closes #15432: GzipFile mtime argument was added in 2.7.
http://hg.python.org/cpython/rev/74ae6064d3e8

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue15228] os.utime() docs not clear on behavior on nonexistant files

2013-10-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 62321359c35b by Georg Brandl in branch '3.3':
Closes #15228: remove reference to Unix "touch"; it is confusing since the path 
needs to exist for os.utime() to succeed
http://hg.python.org/cpython/rev/62321359c35b

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue15213] _PyOS_URandom documentation

2013-10-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 176bb5a98463 by Georg Brandl in branch '3.3':
Closes #15213: update comment for _PyOS_URandom
http://hg.python.org/cpython/rev/176bb5a98463

--

___
Python tracker 

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



[issue11807] Documentation of add_subparsers lacks information about parametres

2013-10-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b930b4e67c8a by Georg Brandl in branch '3.3':
Closes #11807: document argparse add_subparsers method better.
http://hg.python.org/cpython/rev/b930b4e67c8a

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue11807] Documentation of add_subparsers lacks information about parametres

2013-10-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d5027e489c25 by Georg Brandl in branch '2.7':
Closes #11807: document argparse add_subparsers method better.
http://hg.python.org/cpython/rev/d5027e489c25

--

___
Python tracker 

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



[issue15213] _PyOS_URandom documentation

2013-10-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3e5078c3784e by Georg Brandl in branch '2.7':
Closes #15213: update comment for _PyOS_URandom
http://hg.python.org/cpython/rev/3e5078c3784e

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue19184] dis module has incorrect docs for RAISE_VARARGS

2013-10-06 Thread Ned Batchelder

New submission from Ned Batchelder:

The order of values on the stack is backwards for RAISE_VARARGS.  The docs say:

"Raises an exception. argc indicates the number of parameters to the raise 
statement, ranging from 0 to 3. The handler will find the traceback as TOS2, 
the parameter as TOS1, and the exception as TOS."

But in fact, the order is reverse of that.  In the one-parameter case, the 
exception is TOS, in the two-parameter case, the value is TOS, and in the 
three-parameter case, the traceback is TOS.  Not sure how to write that 
concisely, thought.  :)

--
assignee: docs@python
components: Documentation
keywords: easy
messages: 199096
nosy: docs@python, nedbat
priority: normal
severity: normal
status: open
title: dis module has incorrect docs for RAISE_VARARGS
versions: Python 2.7, Python 3.4

___
Python tracker 

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



[issue17725] English mistake in Extending and Embedding Python doc page.

2013-10-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 27f1a3b0b340 by Georg Brandl in branch '2.7':
Closes #17725: small grammar fix.
http://hg.python.org/cpython/rev/27f1a3b0b340

--

___
Python tracker 

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



[issue17725] English mistake in Extending and Embedding Python doc page.

2013-10-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8ce8eae6abfa by Georg Brandl in branch '3.3':
Closes #17725: small grammar fix.
http://hg.python.org/cpython/rev/8ce8eae6abfa

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue17745] "packaging" no longer planned to be included

2013-10-06 Thread Georg Brandl

Georg Brandl added the comment:

Currently we have packaging listed as "deferred to post-3.3" which is certainly 
not wrong.

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

___
Python tracker 

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



[issue19177] Link to "TLS (Transport Layer Security) and SSL (Secure Socket Layer)" dead

2013-10-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9f3da04a0045 by Georg Brandl in branch '3.3':
Closes #19177: replace dead link to SSL/TLS introduction with the version from 
Apache.
http://hg.python.org/cpython/rev/9f3da04a0045

--

___
Python tracker 

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



[issue19177] Link to "TLS (Transport Layer Security) and SSL (Secure Socket Layer)" dead

2013-10-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 03e8ba26fb80 by Georg Brandl in branch '2.7':
Closes #19177: replace dead link to SSL/TLS introduction with the version from 
Apache.
http://hg.python.org/cpython/rev/03e8ba26fb80

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue19181] ftp.cwi.nl used as example does not exist anymore

2013-10-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 635e6239aa8e by Georg Brandl in branch '2.7':
Closes #19181: replace non-existing host ftp.cwi.nl with ftp.debian.org in 
ftplib example.
http://hg.python.org/cpython/rev/635e6239aa8e

--

___
Python tracker 

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



[issue19181] ftp.cwi.nl used as example does not exist anymore

2013-10-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d41aab121366 by Georg Brandl in branch '3.3':
Closes #19181: replace non-existing host ftp.cwi.nl with ftp.debian.org in 
ftplib example.
http://hg.python.org/cpython/rev/d41aab121366

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue12350] Improve stat_result.st_blocks and st_blksize documentation

2013-10-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ef5aa8d7e932 by Georg Brandl in branch '3.3':
Closes #12350: clarify blocks/block size members of stat result.
http://hg.python.org/cpython/rev/ef5aa8d7e932

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue12350] Improve stat_result.st_blocks and st_blksize documentation

2013-10-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c32657e278f6 by Georg Brandl in branch '2.7':
Closes #12350: clarify blocks/block size members of stat result.
http://hg.python.org/cpython/rev/c32657e278f6

--

___
Python tracker 

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



[issue18874] Add a new tracemalloc module to trace memory allocations

2013-10-06 Thread STINNER Victor

STINNER Victor added the comment:

TODO list:

* unit test for task reschedule
* hash_destroy(): use a double-linked list to avoid the O(n) complexity?
* Snapshot.add_process_memory_metrics():

  * rename metrics on Windows?
  * more metrics on Linux?
  * implement get_process_memory() on BSD

* add unit test for the command line interface
* add unit test for DisplayTopTask/TakeSnapshot.start()
* remove TRACE_RAW_MALLOC, always define it?
* test_io.check_interrupted_write() enters a deadlock when tracemalloc task
  is called before _pyio is blocked in the C write() function: the SIGINT does
  not interrupt write() but another instruction
* hide _tracemalloc._atexit()?

--

___
Python tracker 

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



[issue18874] Add a new tracemalloc module to trace memory allocations

2013-10-06 Thread STINNER Victor

Changes by STINNER Victor :


Removed file: http://bugs.python.org/file31806/21f7c3df0f15.patch

___
Python tracker 

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



[issue18874] Add a new tracemalloc module to trace memory allocations

2013-10-06 Thread STINNER Victor

STINNER Victor added the comment:

ec121a72e848.patch: updated patch, based on revision ec121a72e848 of the 
tracemalloc repository.

--
Added file: http://bugs.python.org/file31976/ec121a72e848.patch

___
Python tracker 

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



[issue18229] attribute headers of http.server.BaseHTTPRequestHandler sometimes does not exists

2013-10-06 Thread Georg Brandl

Georg Brandl added the comment:

OK, so I guess it could be documented that the "headers" attribute is not set 
if the request cannot be parsed as a HTTP request.  That's a valid point.

By the way, you should really call your "self" argument "self".

--
versions: +Python 2.7, Python 3.4

___
Python tracker 

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



[issue11798] Test cases not garbage collected after run

2013-10-06 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +haypo

___
Python tracker 

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



[issue18229] attribute headers of http.server.BaseHTTPRequestHandler sometimes does not exists

2013-10-06 Thread Jordan Szubert

Jordan Szubert added the comment:

#minimal server:
#!/c/Python33/python.exe
from http.server import HTTPServer as S, BaseHTTPRequestHandler as H
class HNDL(H):
def log_request(req,code):
print('header is',req.headers.get('X-Forwarder-For'),', 
code',code)
H.log_request(req)
s=S(('',54321),HNDL)
s.serve_forever()


#non-http client:
#!/c/Python33/python.exe
import socket,os
s=socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('localhost', 54321))
s.sendall(os.urandom(1024))
buf=s.recv(2048)
s.close()
print(buf)


#running server:
$ ./server.py
127.0.0.1 - - [06/Oct/2013 17:33:41] code 400, message Bad HTTP/0.9 request type
 ('E)\xaeE^2¤\xf2W\x8f\xb3aG')

Exception happened during processing of request from ('127.0.0.1', 18234)
Traceback (most recent call last):
  File "c:\Python33\lib\socketserver.py", line 306, in _handle_request_noblock
self.process_request(request, client_address)
  File "c:\Python33\lib\socketserver.py", line 332, in process_request
self.finish_request(request, client_address)
  File "c:\Python33\lib\socketserver.py", line 345, in finish_request
self.RequestHandlerClass(request, client_address, self)
  File "c:\Python33\lib\socketserver.py", line 666, in __init__
self.handle()
  File "c:\Python33\lib\http\server.py", line 400, in handle
self.handle_one_request()
  File "c:\Python33\lib\http\server.py", line 380, in handle_one_request
if not self.parse_request():
  File "c:\Python33\lib\http\server.py", line 311, in parse_request
"Bad HTTP/0.9 request type (%r)" % command)
  File "c:\Python33\lib\http\server.py", line 428, in send_error
self.send_response(code, message)
  File "c:\Python33\lib\http\server.py", line 443, in send_response
self.log_request(code)
  File "./server.py", line 5, in log_request
print('header is',req.headers.get('X-Forwarder-For'),', code',code)
AttributeError: 'HNDL' object has no attribute 'headers'



#running client:
$ ./client.py
b''
$

--

___
Python tracker 

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



[issue16355] inspect.getcomments() does not work in the interactive shell

2013-10-06 Thread Vajrasky Kok

Vajrasky Kok added the comment:

I pep-8 Phil Connell's work and revamped the unit test based on  R. David 
Murray's request.

--
nosy: +vajrasky
Added file: http://bugs.python.org/file31975/issue16355_v2.diff

___
Python tracker 

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



[issue19182] Socket leak in logging.handlers

2013-10-06 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
assignee:  -> vinay.sajip
nosy: +vinay.sajip
stage:  -> patch review
versions: +Python 2.7, Python 3.3, Python 3.4

___
Python tracker 

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



[issue19172] selectors: add keys() method

2013-10-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> FWIW, I think the "ideal" solution would be for keys() (*) to return a
> read-only Mapping implementation, allowing for file object lookup (using
> __getitem__) as well as iteration on SelectorKeys (using __iter__) and
> fast emptiness checking (using __len__).

Actually, you would use values() to iterate on SelectorKeys.

--

___
Python tracker 

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



[issue19172] selectors: add keys() method

2013-10-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

FWIW, I think the "ideal" solution would be for keys() (*) to return a
read-only Mapping implementation, allowing for file object lookup (using
__getitem__) as well as iteration on SelectorKeys (using __iter__) and
fast emptiness checking (using __len__).

(to implement Mapping, you can subclass Mapping and implement
__getitem__, __len__ and __iter__)

(*) or a better name

--

___
Python tracker 

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



[issue19172] selectors: add keys() method

2013-10-06 Thread STINNER Victor

STINNER Victor added the comment:

> Perhaps the method shouldn't be called keys() to avoid any confusion with 
> subclasses of the Container ABC?

If you don't want to rename the SelectorKey class, rename the method
to get_keys().

--

___
Python tracker 

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



[issue19183] PEP 456 Secure and interchangeable hash algorithm

2013-10-06 Thread Christian Heimes

New submission from Christian Heimes:

The patch implements the current state of PEP 456 plus a configure option to 
select the hash algorithm. I have tested it only on 64bit Linux so far.

--
components: Interpreter Core
files: pep-0456-1.patch
keywords: patch
messages: 199078
nosy: christian.heimes, ncoghlan, pitrou
priority: normal
severity: normal
stage: patch review
status: open
title: PEP 456 Secure and interchangeable hash algorithm
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file31974/pep-0456-1.patch

___
Python tracker 

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



[issue18229] attribute headers of http.server.BaseHTTPRequestHandler sometimes does not exists

2013-10-06 Thread Jordan Szubert

Jordan Szubert added the comment:

what _lowerHTTP does is try read request header 'X-Forwarded-For', but instance 
of request handler have attribute headers only if thing that connected to port 
where server listens happened to send valid enough http request

my problem is, documentation does not help write code that would not crash when 
client sends random bytes instead of expected http request

--
resolution: invalid -> 
status: closed -> open

___
Python tracker 

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



[issue19172] selectors: add keys() method

2013-10-06 Thread Guido van Rossum

Guido van Rossum added the comment:

No time to follow this in detail, but one thing: please do not make the 
selector appear "false" under *any* circumstances. I've seen too many code 
write "if foo" where they meant "if foo is not None" and get in trouble because 
foo wasn't None but happened to have no content. (See e.g. recent issue 19097, 
although the situation there is even more complicated.) (And for things 
formally deriving from Container it's a different thing. But that shouldn't be 
done lightly.)

I think it's useful to be able to get the keys; it would be nice if that was an 
O(1) operation so you can also check for emptiness without needing a second 
method. Perhaps the method shouldn't be called keys() to avoid any confusion 
with subclasses of the Container ABC?

--

___
Python tracker 

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



[issue19172] selectors: add keys() method

2013-10-06 Thread STINNER Victor

STINNER Victor added the comment:

2013/10/6 Charles-François Natali :
>> BaseSelector.register(fd) raises a KeyError if fd is already registered, 
>> which means that any selector must know the list of all registered FDs. For 
>> EpollSelector, the list may be inconsistent *if* the epoll is object is 
>> modified externally, but it's really a corner case.
>
> Yes, and there's nothing we can do about it :-(

Oh, I just mentioned to corner case to say that it would nice to
expose the length of a selector.

>> What do you think of having some mapping methods?
>>
>> - iter(selector), selector.keys(): : iter(self._fd_to_key), iterator on file 
>> descriptor numbers (int)
>> - selector.values(): self._fd_to_key.values(), iterate on SelectorKey objects
>> - selector.items(): self._fd_to_key.items(), iterator on (fd, SelectorKey) 
>> tuples
>
> I don't know, it makes me uncomfortable treating a selector like
> a plain container.

I don't know if there is a real use case.

>> By the way, is SelectorKey.fileobj always defined? If not, the documentation 
>> is wrong: the attribut should be documented as "Optional", as .data.
>
> Yes, it's always defined: it's the object passed to register().

Oh, selector.register(0).fileobj gives me 0... I didn't know that 0 is
a file object :-) I would expect .fileobj=None and .fd=0.

--

___
Python tracker 

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



[issue19182] Socket leak in logging.handlers

2013-10-06 Thread Esa Peuha

New submission from Esa Peuha:

Running test_logging produces the following:

/home/peuha/python/cpython/Lib/logging/handlers.py:550: ResourceWarning: 
unclosed 
  self.retryTime = now + self.retryPeriod
/home/peuha/python/cpython/Lib/logging/handlers.py:550: ResourceWarning: 
unclosed 
  self.retryTime = now + self.retryPeriod

This turns out to be a bug in SocketHandler.makeSocket; the attachment should 
fix it.

--
components: Library (Lib)
files: logging.handlers.diff
keywords: patch
messages: 199074
nosy: Esa.Peuha
priority: normal
severity: normal
status: open
title: Socket leak in logging.handlers
type: behavior
Added file: http://bugs.python.org/file31973/logging.handlers.diff

___
Python tracker 

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



[issue18758] Fix internal references in the documentation

2013-10-06 Thread Ezio Melotti

Ezio Melotti added the comment:

Serhiy, are you planning to work on more patches or can this be closed?

--
type:  -> enhancement

___
Python tracker 

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



[issue17618] base85 encoding

2013-10-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Well, I think the following comments (Serhiy's) should be implemented:

"""As for interface, I think 'adobe' flag should be false by default. It makes 
encoder simpler. ascii85 encoder in Go's standard library doesn't wrap nor add 
Adobe's brackets. btoa/atob functions looks redundant as we can just use 
a85encode/a85decoder with appropriate options."""

--

___
Python tracker 

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



[issue19181] ftp.cwi.nl used as example does not exist anymore

2013-10-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

ftp://ftp.ietf.org/ ? ftp://ftp.debian.org/ ?

--
nosy: +pitrou

___
Python tracker 

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



[issue19181] ftp.cwi.nl used as example does not exist anymore

2013-10-06 Thread Georg Brandl

New submission from Georg Brandl:

ftp.python.org doesn't seem to listen on port 21 either... anyone know a public
FTP server we can use as example?

 Original-Nachricht 
Betreff:[docs] quick note on ftplib for python
Datum:  Tue, 8 Jan 2013 16:17:14 +1100
Von:Jeremy Orchard 
An: 

Hello,

Quick note, ftplib gives example host ftp.cwi.nl

In its documentation which is a url which is no longer active… when you try the
dummy example, ftplib doesn’t really output a clear error so it might be worth
updating the host, (though most programmers should assume this quickly),

Python 2.7 > documentation for ftplib which introduced the feature FTP_TLS gives
the examplehost ftp.python.org  which is possibly the
ideal candidate for the change.

Not really a bug, thought id save you the trouble by reporting just incase, it
was something worth changing.

--
assignee: docs@python
components: Documentation
messages: 199070
nosy: docs@python, georg.brandl
priority: normal
severity: normal
status: open
title: ftp.cwi.nl used as example does not exist anymore

___
Python tracker 

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



[issue19180] some RFC references could be updated

2013-10-06 Thread Georg Brandl

New submission from Georg Brandl:

 Original-Nachricht 
Betreff: [docs] some RFC references could be updated
Datum: Mon, 20 May 2013 22:37:53 -0400
Von: Sean Turner 
An: d...@python.org

Hi,

Just starting to learn python and have noted that at the bottom of this
page:

http://docs.python.org/3/library/ssl.html

There's a couple of out of date references:

0) RFC 1750 has been been obsoleted by RFC 4086 so maybe this is a
better reference (and I prefer the datatracker view as opposed to the
tools view):

http://datatracker.ietf.org/doc/rfc4086/

Same could be done on this link:

http://docs.python.org/3.4/library/ssl.html

1) RFC 3280 has been obsoleted by RFC 5280 so maybe:

http://datatracker.ietf.org/doc/rfc5280/

Same could be done on this link:

http://docs.python.org/3.4/library/ssl.html

2) RFC 4366 has been obsoleted by RFC 6066 so maybe:

http://datatracker.ietf.org/doc/rfc6066/

On http://docs.python.org/3.4/library/ssl.html you could probably just
drop the reference and change in the ssl.HAS_SNI section.

3) The link to TLS seems broken maybe just point to:

TLS 1.0 http://datatracker.ietf.org/doc/rfc2246/
TLS 1.1 http://datatracker.ietf.org/doc/rfc4346/
TLS 1.2 http://datatracker.ietf.org/doc/rfc5246/
SSL 3.0 http://datatracker.ietf.org/doc/rfc6101/

Actually the same link is broken on:

http://docs.python.org/3.4/library/ssl.html

4) (this is a shameless plug) Might be worth adding a reference in the
ssl.PROTOCOL_SSLv2 section that points to:

http://datatracker.ietf.org/doc/rfc6146/

--
assignee: docs@python
components: Documentation
messages: 199069
nosy: docs@python, georg.brandl
priority: normal
severity: normal
status: open
title: some RFC references could be updated

___
Python tracker 

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



[issue19177] Link to "TLS (Transport Layer Security) and SSL (Secure Socket Layer)" dead

2013-10-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I think we could use the Apache SSL intro:
http://httpd.apache.org/docs/trunk/en/ssl/ssl_intro.html

(some fine points are a bit outdated, but the general discourse looks fine)

--

___
Python tracker 

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



[issue12350] Improve stat_result.st_blocks and st_blksize documentation

2013-10-06 Thread Martin Panter

Martin Panter added the comment:

What happened to this patch? The current documentation is very misleading 
because the descriptions of the two block fields appear to complement each 
other.

--
nosy: +vadmium

___
Python tracker 

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



[issue19179] doc bug: confusing table of values

2013-10-06 Thread Georg Brandl

Changes by Georg Brandl :


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

___
Python tracker 

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



[issue19179] doc bug: confusing table of values

2013-10-06 Thread Georg Brandl

New submission from Georg Brandl:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

[From Jason Scherer on d...@python.org]

On this page:

http://docs.python.org/2/library/xml.html

The table of truth values is a bit confusing because it's not clear from the
context what it's actually saying is true, or false.

It might be better to replace the words "true" and "false" with "vulnerable" and
"protected" or something like that.  Otherwise, I can't tell if "true" means
"yes, this parser is vulnerable to this attack" or if "true" means "yes, this
parser is protected from this attack"

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.21 (GNU/Linux)

iEYEARECAAYFAlJRQ0IACgkQN9GcIYhpnLCziACeO3MzVKKcH8RLlU+w11hAy9Kh
wo4AnRYvAXuCCLdlrED2SHJ0oexW1vj0
=dxxa
-END PGP SIGNATURE-

--
messages: 199066
nosy: georg.brandl
priority: normal
severity: normal
status: open
title: doc bug: confusing table of values

___
Python tracker 

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



[issue18229] attribute headers of http.server.BaseHTTPRequestHandler sometimes does not exists

2013-10-06 Thread Georg Brandl

Georg Brandl added the comment:

This appears to be a bug in the _lowerHTTP module, which does not ship with 
Python.

--
nosy: +georg.brandl
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue15172] Document nasm-2.10.01 as required version for openssl

2013-10-06 Thread Georg Brandl

Georg Brandl added the comment:

Fixed, I guess?

--
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue15956] backreference to named group does not work

2013-10-06 Thread Georg Brandl

Georg Brandl added the comment:

Thanks for the patch.  I made a few changes, such as explaining what the 
example pattern does.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue15956] backreference to named group does not work

2013-10-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f765a29309d1 by Georg Brandl in branch '3.3':
Closes #15956: improve documentation of named groups and how to reference them.
http://hg.python.org/cpython/rev/f765a29309d1

--

___
Python tracker 

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



[issue15956] backreference to named group does not work

2013-10-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bee2736296c5 by Georg Brandl in branch '2.7':
Closes #15956: improve documentation of named groups and how to reference them.
http://hg.python.org/cpython/rev/bee2736296c5

--
nosy: +python-dev
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue19129] 6.2.1. Regular Expression Syntax flags

2013-10-06 Thread Georg Brandl

Georg Brandl added the comment:

This is intended, the U flag is a legacy flag that is not supposed to by used 
in new code.

--
nosy: +georg.brandl
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue19172] selectors: add keys() method

2013-10-06 Thread Charles-François Natali

Charles-François Natali added the comment:

> BaseSelector.register(fd) raises a KeyError if fd is already registered, 
> which means that any selector must know the list of all registered FDs. For 
> EpollSelector, the list may be inconsistent *if* the epoll is object is 
> modified externally, but it's really a corner case.

Yes, and there's nothing we can do about it :-(

> What do you think of having some mapping methods?
>
> - iter(selector), selector.keys(): : iter(self._fd_to_key), iterator on file 
> descriptor numbers (int)
> - selector.values(): self._fd_to_key.values(), iterate on SelectorKey objects
> - selector.items(): self._fd_to_key.items(), iterator on (fd, SelectorKey) 
> tuples

I don't know, it makes me uncomfortable treating a selector like
a plain container.

> "SelectorKey" name is confusing, it's not really a key as a dictionary dict. 
> SelectorKey.fd *is* the key, Selector.event is not.
>
> "SelectorFile" or "SelectorItem" would be more explicit, no?

It's more key as "indexing key", or token: it's the interface between the 
selector and the external world.
The FD "is" indeed the key internally, but that's an implementation detail.

I'd really like to have Guido's feeling regarding the above questions.

> By the way, is SelectorKey.fileobj always defined? If not, the documentation 
> is wrong: the attribut should be documented as "Optional", as .data.

Yes, it's always defined: it's the object passed to register().

--
nosy: +gvanrossum

___
Python tracker 

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



[issue18529] Use long dash

2013-10-06 Thread Georg Brandl

Georg Brandl added the comment:

Agreed.

--
nosy: +georg.brandl
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue19119] duplicate test name in Lib/test/test_heapq.py

2013-10-06 Thread Vajrasky Kok

Vajrasky Kok added the comment:

I have played around with this test.

The major issue (there are other issues as well but not so difficult) is 
whether nlargest and nsmallest should support iterator that could be endless 
iterator or reject it (by checking __len__ attribute) straight away.

Once we decide that, the fix should be not that hard.

For example, I want to get 2 largest numbers from fibonacci number series.

heapq.nlargest(2, fibonacci_iterator) => what is the answer for this?
Exception or let it be stuck forever.

--
nosy: +vajrasky

___
Python tracker 

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



[issue19145] Inconsistent behaviour in itertools.repeat when using negative times

2013-10-06 Thread Raymond Hettinger

Changes by Raymond Hettinger :


Added file: http://bugs.python.org/file31972/itertools_repeat.diff

___
Python tracker 

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



[issue13951] Document that Seg Fault in .so called by ctypes causes the interpreter to Seg Fault

2013-10-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1e163fdf8cf3 by Georg Brandl in branch '3.3':
Closes #13951: Add a "faulthandler" reference in the ctypes docs talking about 
crashes.
http://hg.python.org/cpython/rev/1e163fdf8cf3

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue18927] Lock.acquire() docs incorrect about negative timeout

2013-10-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ff5fb419967f by Georg Brandl in branch '3.3':
Closes #18927: Lock.acquire only accepts -1 or positive values for timeout.
http://hg.python.org/cpython/rev/ff5fb419967f

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue18972] Use argparse in email example scripts

2013-10-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Georg for the review

--
assignee: docs@python -> serhiy.storchaka
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue18972] Use argparse in email example scripts

2013-10-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1b1b1d4b28e8 by Serhiy Storchaka in branch 'default':
Issue #18972: Modernize email examples and use the argparse module in them.
http://hg.python.org/cpython/rev/1b1b1d4b28e8

--
nosy: +python-dev

___
Python tracker 

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



[issue19178] Entries for "module" and "package" in glossary

2013-10-06 Thread Georg Brandl

New submission from Georg Brandl:

>From Kevin Murphy on docs@:

> I think newbies might like having 'module' and 'package' defined in 
> the glossary, e.g. http://docs.python.org/2/glossary.html

I agree.

--
assignee: docs@python
components: Documentation
messages: 199052
nosy: docs@python, georg.brandl
priority: normal
severity: normal
stage: needs patch
status: open
title: Entries for "module" and "package" in glossary
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4

___
Python tracker 

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



[issue18646] Improve tutorial entry on 'Lambda Forms'.

2013-10-06 Thread Georg Brandl

Changes by Georg Brandl :


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

___
Python tracker 

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



[issue18758] Fix internal references in the documentation

2013-10-06 Thread Georg Brandl

Georg Brandl added the comment:

Definitely not.

--

___
Python tracker 

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



[issue18646] Improve tutorial entry on 'Lambda Forms'.

2013-10-06 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I think this was a nice improvement.

--
nosy: +rhettinger

___
Python tracker 

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



[issue18972] Use argparse in email example scripts

2013-10-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

FileType have some problems (see issue13824).

--

___
Python tracker 

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



[issue18790] incorrect text in argparse add_help example

2013-10-06 Thread Georg Brandl

Georg Brandl added the comment:

Thanks for closing this!

--
nosy: +georg.brandl

___
Python tracker 

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



  1   2   >