[issue21212] Documentation of octal representation

2014-04-14 Thread Bill

New submission from Bill:

This documentation section:
https://docs.python.org/3/faq/programming.html?highlight=octal#how-do-i-convert-a-string-to-a-number
seems still to refer to Python 2 octal representation rules.  So I think it 
needs updating.

--
assignee: docs@python
components: Documentation
messages: 216069
nosy: docs@python, ees1wc
priority: normal
severity: normal
status: open
title: Documentation of octal representation
versions: Python 3.5

___
Python tracker 

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



[issue1484] logging: callHandlers tests handler levels instead of logger levels?

2014-04-14 Thread Artur

Artur added the comment:

So what is logger level for if it's not used on calling handlers?

--
nosy: +artur.ambroziak
versions: +Python 2.7 -Python 2.4, Python 2.5

___
Python tracker 

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



[issue21213] Memory bomb by incorrect custom serializer to json.dumps

2014-04-14 Thread saaj

New submission from saaj:

I was chaning an implementation of the function that is passed to json.dumps to 
extend serializable types. By a mistake (**return** instead of **raise**) it 
turned into, which at its minum can be expressed as::

  def d(obj):
return TypeError(repr(obj))

  json.dumps(1j, default = d) 

After a few moments by laptop froze, though after a minute I could open shell 
in separate session, and top command showed that python interpretter is 
consuming about 4GiB of memory and 50% of 4 logical cores. 

Worst about it it doesn't end with any exception, it just keeps running. 
Without ``repr`` it ends up with somewhat expected ``RuntimeError: maximum 
recursion depth exceeded while getting the str of an object``.

The same behaviour is on python3, where it just consumes memory with less speed.

OS:
Linux Mint 15 Olivia
Linux 3.8.0-31-generic #46-Ubuntu SMP Tue Sep 10 20:03:44 UTC 2013 x86_64

Packages are last available:
python  2.7.4-0ubuntu1
python3 3.3.1-0ubuntu1

P.S. Sorry for confirming on console at python.org.

--
components: Library (Lib)
messages: 216071
nosy: saaj
priority: normal
severity: normal
status: open
title: Memory bomb by incorrect custom serializer to json.dumps
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



[issue21214] PEP8 doesn't verifies last line.

2014-04-14 Thread Max

New submission from Max:

PEP8 doesn't verifies last line at all. Also W292 will never be checked.
Reproducible on PEP8 >= 1.5.0

--
messages: 216072
nosy: f1ashhimself
priority: normal
severity: normal
status: open
title: PEP8 doesn't verifies last line.
type: behavior

___
Python tracker 

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



[issue18321] Multivolume support in tarfile module

2014-04-14 Thread Lars Gustäbel

Lars Gustäbel added the comment:

Okay, let me tell you why I reject your contribution at this point.

The patch you submitted may be well-suited for your purposes but it does not 
meet the requirements of a standard library implementation because it is not 
generic and comprehensive enough.

It contains duplicate code, spelling mistakes and needless code changes e.g.  
in test_tarfile.py.

It does not expose one set of volumes as one tar archive to the user. It is not 
possible to iterate over all members of all volumes in one go. It does not 
allow random-access.

Actually, it does not implement complete multivolume support but only the 
"easy" parts.  For example, it fails to read GNU tar archives that are split in 
the middle of a pax header block sequence. The other way around, when writing 
it makes a split only when it is inside the data part of a member. Hence, it is 
possible that a volume turns out smaller than max_volume_size which is not only 
inaccurate but also bad on a tape device.

If you decide that you still want multivolume support in tarfile, feel free to 
reopen this issue with a new and significantly better patch. I gave you a 
number of clues on what I think is required.

--
assignee:  -> lars.gustaebel
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



[issue21214] PEP8 doesn't verifies last line.

2014-04-14 Thread Mark Dickinson

Mark Dickinson added the comment:

The pep8 tool is a third-party package: it isn't part of the core Python 
project.  You probably want to report this at the pep8 bugtracker:

http://github.com/jcrocholl/pep8/issues

--
nosy: +mark.dickinson
resolution:  -> 3rd party
status: open -> closed

___
Python tracker 

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



[issue21212] Documentation of octal representation

2014-04-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fb7bc8fe0d49 by Eric V. Smith in branch '3.4':
Fix text about int() with octal numbers. Closes #21212.
http://hg.python.org/cpython/rev/fb7bc8fe0d49

New changeset 6107a727c60a by Eric V. Smith in branch 'default':
Merge 3.4: Fix text about int() with octal numbers. Closes #21212.
http://hg.python.org/cpython/rev/6107a727c60a

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



[issue21212] Documentation of octal representation

2014-04-14 Thread Eric V. Smith

Eric V. Smith added the comment:

Fixed. Thanks!

--
nosy: +eric.smith
resolution: fixed -> 
stage: committed/rejected -> 
status: closed -> open

___
Python tracker 

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



[issue21212] Documentation of octal representation

2014-04-14 Thread Berker Peksag

Changes by Berker Peksag :


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



[issue21169] getpass.getpass() fails with non-ASCII characters in prompt

2014-04-14 Thread R. David Murray

R. David Murray added the comment:

Ok, I'll reopen the issue to do that.

--
status: closed -> open

___
Python tracker 

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



[issue21169] getpass.getpass() fails with non-ASCII characters in prompt

2014-04-14 Thread Kushal Das

Kushal Das added the comment:

Another patch with docs update and one line code comment.

--
Added file: http://bugs.python.org/file34815/issue21169_v7.patch

___
Python tracker 

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



[issue20077] Format of TypeError differs between comparison and arithmetic operators

2014-04-14 Thread R. David Murray

R. David Murray added the comment:

I think 'please review' was directed at anyone, and yes, using the review link 
is one way to do a review, but when there isn't enough line-by-line commenting 
to make the code review tool worth using you can just post on the issue.  (And 
when you do use the review link, it is helpful to post a message here that you 
did, since one doesn't appear automatically...which is something we need to 
fix.)

--
nosy: +r.david.murray

___
Python tracker 

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



[issue21215] build-deps instructions for Ubuntu

2014-04-14 Thread Glenn Jones

New submission from Glenn Jones:

The package listed in the dev guide may not exist depending on the version of 
Ubuntu. It may be necessary to use python3.3 or python3.4.

--
components: Devguide
messages: 216080
nosy: Glenn.Jones, ezio.melotti
priority: normal
severity: normal
status: open
title: build-deps instructions for Ubuntu

___
Python tracker 

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



[issue21169] getpass.getpass() fails with non-ASCII characters in prompt

2014-04-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bdde36cd9048 by R David Murray in branch '3.4':
#21169: add comment and doc update for getpass change.
http://hg.python.org/cpython/rev/bdde36cd9048

New changeset fe532dccf8f6 by R David Murray in branch 'default':
Merge: #21169: add comment and doc update for getpass change.
http://hg.python.org/cpython/rev/fe532dccf8f6

--

___
Python tracker 

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



[issue21169] getpass.getpass() fails with non-ASCII characters in prompt

2014-04-14 Thread R. David Murray

R. David Murray added the comment:

I decided to tweak the language slightly, Kushal.  If this isn't what you were 
looking for, Martin, let me know.

--
status: open -> closed

___
Python tracker 

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



[issue20434] Process crashes if not enough memory to import module

2014-04-14 Thread Eric Snow

Eric Snow added the comment:

I was going to say we should consider changing the API of _PyBytes_Resize() and 
_PyString_Resize().  However, having looked at the two functions, I guess it 
makes sense.

Looking at the patch, I'd argue that we still need to set the string to NULL in 
the error case.  Only in the out-of-memory case do the two functions change it 
to NULL for you.

--

___
Python tracker 

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



[issue19980] Improve help('non-topic') response

2014-04-14 Thread Jessica McKellar

Jessica McKellar added the comment:

Elias, thanks for your patch!

I think it's important to add the second part of Terry's suggestion which gives 
the user a specific next step to take, namely:

> Try help('help') for information on recognized strings or help(str) for help 
> on the str class.

Can you add that to your patch?

Additionally, we'll want to make sure we don't accidentally break this new 
functionality. Can you add a few test cases, for example what happens when you 
run help on a module (e.g. help("os"), 2) help on an instance of a class (e.g. 
help(1)), and help on a string that doesn't have a special meaning, (e.g. 
help("abcxyz"))?

I don't see any existing tests for help(), but it is an instance of 
site._Helper (as reported by type(help)), and site tests live in 
Lib/test/test_site.py. It also gets loaded into builtins, so tests could also 
live in Lib/test/test_builtins.py.

--
nosy: +Jessica.McKellar, jesstess

___
Python tracker 

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



[issue21209] q.put(some_tuple) fails when PYTHONASYNCIODEBUG=1

2014-04-14 Thread Guido van Rossum

Guido van Rossum added the comment:

This is nice (a backport 3.3 would be even nicer) but at least for the PyPI
repo version of Tulip I'd like to have work-around so people won't run into
this when they are using a slightly outdated Python version. I'll think
about which of my work-arounds is safe for that while not breaking the
intended functionality of CoroWrapper (i.e. that it prints a warning when
destructed before it has reached the end). That may require setting an
additional flag.

--

___
Python tracker 

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



[issue21215] build-deps instructions for Ubuntu

2014-04-14 Thread Glenn Jones

Changes by Glenn Jones :


--
keywords: +patch
Added file: http://bugs.python.org/file34816/ubuntu-build-dep.patch

___
Python tracker 

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



[issue21215] build-deps instructions for Ubuntu

2014-04-14 Thread R. David Murray

R. David Murray added the comment:

Since you are saying that it is "sometimes" necessary to use a different 
package, perhaps we should be saying that in the devguide?  And providing the 
possible names.

--
nosy: +barry, r.david.murray

___
Python tracker 

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



[issue20434] Process crashes if not enough memory to import module

2014-04-14 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

I would also advocate for a better api, that leaves it up to the caller what to 
do, much like realloc() does.  A convenience macro that frees the block on 
error could then be provided.  But this is 2.7 and we don't change stuff there 
:)

Can you elaborate on your second comment?  Is there some place where I forgot 
to clear the object?

--

___
Python tracker 

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



[issue21215] build-deps instructions for Ubuntu

2014-04-14 Thread Glenn Jones

Glenn Jones added the comment:

On Ubuntu 13.10, using python3 did not install the dependencies (apt reported 
using the python3-defaults source package instead of python3). The python3.4, 
package does not exist, but the python3.3 package did work.

This may be that we're specifying the wrong package or that the upstream Ubuntu 
package has a bug or maybe we just need to use the specific package depending 
on what's available in the ubuntu version.

barry, what do you think?

--

___
Python tracker 

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



[issue12546] builtin __format__ methods cannot fill with \x00 char

2014-04-14 Thread Eric V. Smith

Changes by Eric V. Smith :


--
type: enhancement -> behavior
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



[issue17498] error responses from server are masked in smtplib when server closes connection

2014-04-14 Thread Kushal Das

Kushal Das added the comment:

New version of the patch which can be successfully applied to tip.

--
Added file: http://bugs.python.org/file34817/issue17498_v2.patch

___
Python tracker 

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



[issue20434] Process crashes if not enough memory to import module

2014-04-14 Thread Eric Snow

Eric Snow added the comment:

For example, in the patch binascii_b2a_uu() in Modules/binascii.c no longer 
sets rv to NULL even though in one of the _PyString_Resize() error cases rv is 
not automatically set to NULL.  And simply setting rv to NULL would be 
backward-incompatible as well.

--

___
Python tracker 

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



[issue20624] Clarify recommendation to inherit from Exception

2014-04-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8dc1b45bd467 by Mark Dickinson in branch '3.4':
Issue #20624: Exception docs wording tweak - clarify that it's okay to inherit 
from a subclass of Exception.
http://hg.python.org/cpython/rev/8dc1b45bd467

New changeset 262204877004 by Mark Dickinson in branch 'default':
Issue #20624: Merge exception docs tweak from 3.4 branch.
http://hg.python.org/cpython/rev/262204877004

--
nosy: +python-dev

___
Python tracker 

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



[issue6623] Lib/ftplib.py Netrc class should be removed.

2014-04-14 Thread Matt Chaput

Matt Chaput added the comment:

This patch is the same as my previous one, except instead of removing Netrc 
usage from the ftplib.test() function, it replaces it with the netrc.netrc 
object. Note that there are no existing tests for the ftplib.test() function.

Also did some very minor cleanups (bare raise is no longer valid) to get rid of 
warnings/errors in static analyzer.

--
Added file: http://bugs.python.org/file34818/remove_Netrc_class2.patch

___
Python tracker 

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



[issue12546] builtin __format__ methods cannot fill with \x00 char

2014-04-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 520ce42ba2b8 by Eric V. Smith in branch '2.7':
Issue #12546: Allow \x00 as a fill character for builtin type __format__ 
methods.
http://hg.python.org/cpython/rev/520ce42ba2b8

--
nosy: +python-dev

___
Python tracker 

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



[issue20968] mock.MagicMock does not mock __truediv__

2014-04-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 445ef3b58109 by Michael Foord in branch '3.4':
Issue 20968. unittest.mock.MagicMock now supports division
http://hg.python.org/cpython/rev/445ef3b58109

--
nosy: +python-dev

___
Python tracker 

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



[issue20434] Process crashes if not enough memory to import module

2014-04-14 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

This is _PyString_Resize(). I don't immediatlly see an error case where the 
string isn't freed:

int
_PyString_Resize(PyObject **pv, Py_ssize_t newsize)
{
register PyObject *v;
register PyStringObject *sv;
v = *pv;
if (!PyString_Check(v) || Py_REFCNT(v) != 1 || newsize < 0 ||
PyString_CHECK_INTERNED(v)) {
*pv = 0;
Py_DECREF(v);
PyErr_BadInternalCall();
return -1;
}
/* XXX UNREF/NEWREF interface should be more symmetrical */
_Py_DEC_REFTOTAL;
_Py_ForgetReference(v);
*pv = (PyObject *)
PyObject_REALLOC((char *)v, PyStringObject_SIZE + newsize);
if (*pv == NULL) {
PyObject_Del(v);
PyErr_NoMemory();
return -1;
}
_Py_NewReference(*pv);
sv = (PyStringObject *) *pv;
Py_SIZE(sv) = newsize;
sv->ob_sval[newsize] = '\0';
sv->ob_shash = -1;  /* invalidate cached hash value */
return 0;
}

--

___
Python tracker 

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



[issue20624] Clarify recommendation to inherit from Exception

2014-04-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f729a0e90c4f by Mark Dickinson in branch '2.7':
Issue #20624: Merge exception docs tweak from 3.4 branch.
http://hg.python.org/cpython/rev/f729a0e90c4f

--

___
Python tracker 

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



[issue20624] Clarify recommendation to inherit from Exception

2014-04-14 Thread Mark Dickinson

Mark Dickinson added the comment:

Fixed.  Closing.

--
resolution:  -> fixed
status: open -> closed
versions: +Python 3.5 -Python 3.3

___
Python tracker 

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



[issue17826] Setting a side_effect on mock from create_autospec doesn't work

2014-04-14 Thread Michael Foord

Michael Foord added the comment:

Can you explain why we need to check for the call_count here? I don't 
understand why this is needed.

--

___
Python tracker 

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



[issue12220] minidom xmlns not handling spaces in xmlns attribute value field

2014-04-14 Thread Marek Stepniowski

Marek Stepniowski added the comment:

Added test to amathew's patch.

--
nosy: +mstepniowski
Added file: 
http://bugs.python.org/file34819/minidom_space_char_in_namespace_with_test.patch

___
Python tracker 

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



[issue7776] http.client.HTTPConnection tunneling is broken

2014-04-14 Thread Senthil Kumaran

Senthil Kumaran added the comment:

I verified the patch and this indeed corrects a nasty bug in sending a wrong 
header when doing it a lower level HTTPSConnection to proxy and set_tunnel (bad 
term) to the end host..I was worried as why we did not observe this earlier and 
it seems to me that the advertised way to do HTTPS CONNECT is via Proxy Handler 
or urllib.request and when doing it via a ProxyHandler, these wierdly named 
action (set_tunnel) happen underneath, but the skip_hosts bit is set as we got 
headers from the higher level method. and the host header is carried 
transparently to the tunnel connection request and thus we escaped this. 

The patch fixes the problem and cleans up a bit. Thanks for that , Nikolaus.

This code (http/client.py) will require more attention beyond this bug too.

--

___
Python tracker 

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



[issue20968] mock.MagicMock does not mock __truediv__

2014-04-14 Thread Michael Foord

Michael Foord added the comment:

Thanks!

--
assignee:  -> michael.foord
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



[issue15104] Unclear language in __main__ description

2014-04-14 Thread Sam Lucidi

Sam Lucidi added the comment:

I've attempted to synthesize the ideas in this thread into a clearer 
explanation of __main__. What I've written doesn't attempt to explain anything 
else about module naming, but it does try to address the common package and 
module uses of __main__.

--
keywords: +patch
nosy: +mansam
Added file: 
http://bugs.python.org/file34820/clarify-__main__-documentation.patch

___
Python tracker 

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



[issue15104] Unclear language in __main__ description

2014-04-14 Thread R. David Murray

R. David Murray added the comment:

I've made some review comments.

--

___
Python tracker 

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



[issue15104] Unclear language in __main__ description

2014-04-14 Thread R. David Murray

Changes by R. David Murray :


--
stage: needs patch -> patch review
versions: +Python 3.5 -Python 3.2, Python 3.3

___
Python tracker 

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



[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2014-04-14 Thread Toshio Kuratomi

Toshio Kuratomi added the comment:

Took a look at this and was able to reproduce it on Fedora Linux 20 and current 
cpython head.  It is somewhat random though.  I'm able to get reasonably 
consistent failures using image/jpeg and iterating the test case about 20 times.

Additionally, it looks like the data structure that 
mimetypes.guess_extensions() is reading its extensions from is a list so it 
doesn't have to do with dictionary sort order.  It has something to do with the 
way the extensions are read in from the files and then given to add_type().

Talking to r.david.murray I think that this particular problem can be solved by 
simply sorting the list of extensions prior to guess_extension taking the first 
extension off of the list.

The question of what to do when the first extension in the list isn't the best 
extension should be resolved in Issue1043134.

I'll attach a patch with test case for this problem.

--
nosy: +a.badger
Added file: http://bugs.python.org/file34821/issue4963.patch

___
Python tracker 

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



[issue12546] builtin __format__ methods cannot fill with \x00 char

2014-04-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7c484551bce1 by Eric V. Smith in branch '3.4':
Issue #12546: Allow \x00 as a fill character for builtin type __format__ 
methods.
http://hg.python.org/cpython/rev/7c484551bce1

New changeset bd90e68dc81f by Eric V. Smith in branch 'default':
Closes issue #12546: Allow \x00 as a fill character for builtin type __format__ 
methods.
http://hg.python.org/cpython/rev/bd90e68dc81f

--

___
Python tracker 

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



[issue12546] builtin __format__ methods cannot fill with \x00 char

2014-04-14 Thread Eric V. Smith

Eric V. Smith added the comment:

Fixed in 2.7, 3.4, 3.5.

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



[issue15104] Unclear language in __main__ description

2014-04-14 Thread Sam Lucidi

Sam Lucidi added the comment:

Thanks, I've revised the change based on your comments.

--
Added file: 
http://bugs.python.org/file34822/clarify-__main__-documentation.patch

___
Python tracker 

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



[issue15916] change doctest DocTestSuite not to raise ValueError if no docstrings

2014-04-14 Thread R. David Murray

Changes by R. David Murray :


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

___
Python tracker 

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



[issue15916] change doctest DocTestSuite not to raise ValueError if no docstrings

2014-04-14 Thread R. David Murray

Changes by R. David Murray :


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

___
Python tracker 

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



[issue18518] return-ing within code timed with timeit.timeit causes wrong return value of timeit.timeit

2014-04-14 Thread jonathan ferretti

jonathan ferretti added the comment:

Added note to timeit function briefly explaining how to avoid it the issue and 
the cause

--
keywords: +patch
nosy: +jonathan.ferretti
type: enhancement -> behavior
Added file: http://bugs.python.org/file34823/timeit.patch

___
Python tracker 

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



[issue21198] Minor tarfile documentation bug

2014-04-14 Thread Matt Chaput

Matt Chaput added the comment:

Simple patch to remove the underscore in tarfile.rst.

--
keywords: +patch
nosy: +maatt
Added file: http://bugs.python.org/file34824/issue21198.patch

___
Python tracker 

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



[issue21146] update gzip usage examples in docs

2014-04-14 Thread Matt Chaput

Matt Chaput added the comment:

The patch looks good to me.

--
nosy: +maatt

___
Python tracker 

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



[issue20480] Add ipaddress property to get name of reverse DNS PTR record

2014-04-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5992d2c9522c by Eric V. Smith in branch 'default':
Issue #20480: Add ipaddress.reverse_pointer. Patch by Leon Weber.
http://hg.python.org/cpython/rev/5992d2c9522c

--
nosy: +python-dev

___
Python tracker 

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



[issue20480] Add ipaddress property to get name of reverse DNS PTR record

2014-04-14 Thread Eric V. Smith

Changes by Eric V. Smith :


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



[issue17009] "Thread Programming With Python" should be removed

2014-04-14 Thread R. David Murray

R. David Murray added the comment:

Well, with the new website the url now returns a 404, so I guess we can close 
this.  If someone wants to see it restored as a historical document, that would 
be an issue for the web site bug tracker.  But, since other essays exist, it 
looks like it was a conscious decision on someone's part to omit this one.

--
nosy: +r.david.murray
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



[issue17660] mock.patch could whitelist builtins to not need create=True

2014-04-14 Thread Kushal Das

Kushal Das added the comment:

Updated patch with builtins module.

--
versions: +Python 3.4 -Python 3.5
Added file: http://bugs.python.org/file34825/issue17660_v3.patch

___
Python tracker 

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



[issue7776] http.client.HTTPConnection tunneling is broken

2014-04-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 39ee3286d187 by Senthil Kumaran in branch '3.4':
Issue #7776: Fix ``Host:'' header and reconnection when using 
http.client.HTTPConnection.set_tunnel().
http://hg.python.org/cpython/rev/39ee3286d187

New changeset 2c9af09ba7b8 by Senthil Kumaran in branch 'default':
merge from 3.4
http://hg.python.org/cpython/rev/2c9af09ba7b8

--
nosy: +python-dev

___
Python tracker 

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



[issue21215] build-deps instructions for Ubuntu

2014-04-14 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

The `python3` binary package is a sort of meta package that brings in the 
interpreter (and some ancillary stuff) for all supported Python 3 versions.  
For Ubuntu 14.04 that will be just python3.4.  But if you want to build the 
interpreter from source (e.g. an hg clone) on an Ubuntu system, you'll need to 
bring in the Build-Depends for the specific interpreter package you want.  That 
would be python3.4 or python3.3, etc.  It's generally okay to `sudo apt-get 
build-dep python3.3` on a-pre-14.04 Ubuntu to get all the build-deps for Python 
3.4.  There maybe something you'll need to install manually, but I can't think 
of what that is.

--

___
Python tracker 

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



[issue13598] string.Formatter doesn't support empty curly braces "{}"

2014-04-14 Thread Eric V. Smith

Changes by Eric V. Smith :


--
versions: +Python 3.5 -Python 3.4

___
Python tracker 

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



[issue17009] "Thread Programming With Python" should be removed

2014-04-14 Thread Ned Deily

Ned Deily added the comment:

I don't think it was a conscious decision. Unlike most of the others, the link 
for this essay is to the 2.2 docs tree.  I'm guessing there was a redirect 
there that has gone AWOL.

--

___
Python tracker 

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



[issue7776] http.client.HTTPConnection tunneling is broken

2014-04-14 Thread Senthil Kumaran

Senthil Kumaran added the comment:

This is fixed in 3.4 and 3.5 (finally). I will port it to 2.7 as well.

--

___
Python tracker 

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



[issue21209] q.put(some_tuple) fails when PYTHONASYNCIODEBUG=1

2014-04-14 Thread Benjamin Peterson

Benjamin Peterson added the comment:

3.3 is in security-fix only mode.

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue20434] Process crashes if not enough memory to import module

2014-04-14 Thread Eric Snow

Eric Snow added the comment:

Yeah, I missed the "*pv = 0;" line in the first error case.

--

___
Python tracker 

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



[issue21216] getaddrinfo is wrongly considered thread safe on linux

2014-04-14 Thread Julien Palard

New submission from Julien Palard:

I just found that python consider linux implementation of getaddrinfo thread 
safe :

./python2.6-2.6.8/Modules/socketmodule.c:180

/* On systems on which getaddrinfo() is believed to not be thread-safe, 


   (this includes the getaddrinfo emulation) protect access with a lock. */
#if defined(WITH_THREAD) && (defined(__APPLE__) || \
(defined(__FreeBSD__) && __FreeBSD_version+0 < 503000) || \
defined(__OpenBSD__) || defined(__NetBSD__) || \
defined(__VMS) || !defined(HAVE_GETADDRINFO))
#define USE_GETADDRINFO_LOCK
#endif

Badly, it's wrong on my version of linux, and maybe others : 
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=722075

So for me, looping in three threads on getaddrinfo leads me to a rapid 
deadlock, while reading on a NETLINK socket, after another thread wrote a DNS 
query on it and trying to get a response on it.

It may only be reproductible when your getaddrinfo use a NETLINK to get 
informations about your interfaces before doing the DNS query.

--
messages: 216121
nosy: Julien.Palard
priority: normal
severity: normal
status: open
title: getaddrinfo is wrongly considered thread safe on linux

___
Python tracker 

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



[issue21209] q.put(some_tuple) fails when PYTHONASYNCIODEBUG=1

2014-04-14 Thread Yury Selivanov

Yury Selivanov added the comment:

> 3.3 is in security-fix only mode.

Yeah, but this is a core language bug. I believe some people may be stuck on 
3.3 with broken 'yield from' for whatever reason, which will cause hard to find 
bugs in 3.3 compatible libraries (like asyncio/tulip).  I think we can lift the 
security-only restriction for this specific patch, no?

--

___
Python tracker 

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



[issue21209] q.put(some_tuple) fails when PYTHONASYNCIODEBUG=1

2014-04-14 Thread Benjamin Peterson

Benjamin Peterson added the comment:

On Mon, Apr 14, 2014, at 10:20, Yury Selivanov wrote:
> 
> Yury Selivanov added the comment:
> 
> > 3.3 is in security-fix only mode.
> 
> Yeah, but this is a core language bug. I believe some people may be stuck
> on 3.3 with broken 'yield from' for whatever reason, which will cause
> hard to find bugs in 3.3 compatible libraries (like asyncio/tulip).  I
> think we can lift the security-only restriction for this specific patch,
> no?

I don't really have an opinion on this nor is it my call; I'm just
regurgitating policy.

--

___
Python tracker 

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



[issue17009] "Thread Programming With Python" should be removed

2014-04-14 Thread Guido van Rossum

Changes by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue21015] support SSL_CTX_set_ecdh_auto on newer OpenSSLs

2014-04-14 Thread Mark Dickinson

Mark Dickinson added the comment:

The docs[1] for SSL_set_ecdh_auto say: "These functions were first added to 
OpenSSL 1.0.2."  From looking at Modules/_ssl.c, it looks as though we're 
trying to use them when the version is >= 0.9.8.


[1] ftp://ftp.ulakbim.gov.tr/pub/openssl/docs/ssl/SSL_CTX_set1_curves.html

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue18628] Better index entry for encoding declarations

2014-04-14 Thread Sam Lucidi

Sam Lucidi added the comment:

Here's a patch which changes the entry in the index to "encoding declarations 
(source file)" per Terry's third point.

--
keywords: +patch
nosy: +mansam
Added file: http://bugs.python.org/file34826/encoding-declarations-index.patch

___
Python tracker 

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



[issue21209] q.put(some_tuple) fails when PYTHONASYNCIODEBUG=1

2014-04-14 Thread Guido van Rossum

Guido van Rossum added the comment:

I think I have to add a work-around to Tulip anyway, because I don't want to 
have to tell people "you must upgrade your Python 3.3 otherwise this problem 
can happen" (if upgrading was easy for them they would be on 3.4 :-). So I 
don't care much if the 3.3 backport happens.

--

___
Python tracker 

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



[issue21015] support SSL_CTX_set_ecdh_auto on newer OpenSSLs

2014-04-14 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> The docs[1] for SSL_set_ecdh_auto say: "These functions were first
added to OpenSSL 1.0.2." From looking at Modules/_ssl.c, it looks as
though we're trying to use them when the version is >= 0.9.8.

If that was the issue at hand we would get a compile error, no?

--

___
Python tracker 

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



[issue21217] inspect.getsourcelines finds wrong lines when lambda used argument to decorator

2014-04-14 Thread Thomas Ballinger

New submission from Thomas Ballinger:

https://gist.github.com/thomasballinger/10666031

"""
inspect.getsourcelines incorrectly guesses what lines correspond
to the function foo
 
see getblock in inspect.py
once it finds a lambda, def or class it finishes it then stops
so get getsourcelines returns only the first two noop decorator
lines of bar, while normal behavior is to return all decorators
as it does for foo
"""
import inspect
from pprint import pprint
 
def noop(arg):
def inner(func):
return func
return inner
 
@noop(1)
@noop(2)
def foo():
return 1
 
@noop(1)
@noop(lambda: None)
@noop(1)
def bar():
return 1
 
pprint(inspect.getsourcelines(foo))
pprint(inspect.getsourcelines(bar))

--
components: Library (Lib)
messages: 216127
nosy: ballingt
priority: normal
severity: normal
status: open
title: inspect.getsourcelines finds wrong lines when lambda used argument to 
decorator
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue21217] inspect.getsourcelines finds wrong lines when lambda used argument to decorator

2014-04-14 Thread Thomas Ballinger

Thomas Ballinger added the comment:

"The code object's co_lnotab is how inspect should be getting the sourcelines 
of the code, instead of looking for the first codeblock."

I'm looking at this now, thanks to Yhg1s for the above.

--

___
Python tracker 

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



[issue18518] return-ing within code timed with timeit.timeit causes wrong return value of timeit.timeit

2014-04-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7e2708484ea5 by Andrew Kuchling in branch '3.4':
#18518: mention that including a return statement changes/breaks the behaviour
http://hg.python.org/cpython/rev/7e2708484ea5

--
nosy: +python-dev

___
Python tracker 

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



[issue20491] textwrap: Non-breaking space not honored

2014-04-14 Thread Matt Chaput

Matt Chaput added the comment:

Patch on top of dbudinova's that attempts to replace the concatenation of 
strings with a verbose regex.

--
nosy: +maatt
Added file: http://bugs.python.org/file34827/issue20491_verbose.patch

___
Python tracker 

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



[issue21015] support SSL_CTX_set_ecdh_auto on newer OpenSSLs

2014-04-14 Thread Mark Dickinson

Mark Dickinson added the comment:

Yep, true.  Ignore me.

--

___
Python tracker 

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



[issue11983] Inconsistent hash and comparison for code objects

2014-04-14 Thread Caelyn McAulay

Caelyn McAulay added the comment:

Here is a patch to add the requested documentation to code.h - I expanded it to 
specify (as per the conversation in this issue) that co_name is used in both 
hash and comparisons while co_firstlineno is used only in comparisons. 

I do not attempt explain the inconsistency; but let the comment reflect reality.

--
keywords: +patch
nosy: +math_foo
Added file: http://bugs.python.org/file34828/comment11983.patch

___
Python tracker 

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



[issue21015] support SSL_CTX_set_ecdh_auto on newer OpenSSLs

2014-04-14 Thread Mark Dickinson

Changes by Mark Dickinson :


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

___
Python tracker 

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



[issue20434] Process crashes if not enough memory to import module

2014-04-14 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

Ok, are we good to go then?

--

___
Python tracker 

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



[issue21215] build-deps instructions for Ubuntu

2014-04-14 Thread R. David Murray

R. David Murray added the comment:

OK, so the devguide currently has 

  sudo apt-get build-dep python3

which did something on Glenn's machine, but did not enable him to build the 
optional packages.  So the question is, what should we put in the devguide as 
the correct build-dep to install?  Is it build-dep for the same version as the 
system python for that particular system?

--

___
Python tracker 

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



[issue21204] published examples don't work

2014-04-14 Thread jmaki

jmaki added the comment:

loewis, r.david.murray: Please proceed in terms of #3--"The specific example 
does not work on Windows".  I am using python 2.7.6 on Windows 7.

Below is the failing message that happens immediately on startup, specifically, 
when hitting this line:
Process(target=serve_forever, args=(server,)).start()

Thank you for the attention.

- error message -
Traceback (most recent call last):
  File "C:/Python27/httpthreadpool.py", line 75, in 
test()
  File "C:/Python27/httpthreadpool.py", line 70, in test
runpool(ADDRESS, NUMBER_OF_PROCESSES)
  File "C:/Python27/httpthreadpool.py", line 51, in runpool
Process(target=serve_forever, args=(server,)).start()
  File "C:\Python27\lib\multiprocessing\process.py", line 130, in start
self._popen = Popen(self)
  File "C:\Python27\lib\multiprocessing\forking.py", line 277, in __init__
dump(process_obj, to_child, HIGHEST_PROTOCOL)
  File "C:\Python27\lib\multiprocessing\forking.py", line 199, in dump
ForkingPickler(file, protocol).dump(obj)
  File "C:\Python27\lib\pickle.py", line 224, in dump
self.save(obj)
  File "C:\Python27\lib\pickle.py", line 331, in save
self.save_reduce(obj=obj, *rv)
  File "C:\Python27\lib\pickle.py", line 419, in save_reduce
save(state)
  File "C:\Python27\lib\pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
  File "C:\Python27\lib\pickle.py", line 649, in save_dict
self._batch_setitems(obj.iteritems())
  File "C:\Python27\lib\pickle.py", line 681, in _batch_setitems
save(v)
  File "C:\Python27\lib\pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
  File "C:\Python27\lib\pickle.py", line 548, in save_tuple
save(element)
  File "C:\Python27\lib\pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
  File "C:\Python27\lib\pickle.py", line 725, in save_inst
save(stuff)
  File "C:\Python27\lib\pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
  File "C:\Python27\lib\pickle.py", line 649, in save_dict
self._batch_setitems(obj.iteritems())
  File "C:\Python27\lib\pickle.py", line 681, in _batch_setitems
save(v)
  File "C:\Python27\lib\pickle.py", line 331, in save
self.save_reduce(obj=obj, *rv)
  File "C:\Python27\lib\pickle.py", line 419, in save_reduce
save(state)
  File "C:\Python27\lib\pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
  File "C:\Python27\lib\pickle.py", line 649, in save_dict
self._batch_setitems(obj.iteritems())
  File "C:\Python27\lib\pickle.py", line 681, in _batch_setitems
save(v)
  File "C:\Python27\lib\pickle.py", line 331, in save
self.save_reduce(obj=obj, *rv)
  File "C:\Python27\lib\pickle.py", line 419, in save_reduce
save(state)
  File "C:\Python27\lib\pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
  File "C:\Python27\lib\pickle.py", line 649, in save_dict
self._batch_setitems(obj.iteritems())
  File "C:\Python27\lib\pickle.py", line 681, in _batch_setitems
save(v)
  File "C:\Python27\lib\pickle.py", line 331, in save
self.save_reduce(obj=obj, *rv)
  File "C:\Python27\lib\pickle.py", line 396, in save_reduce
save(cls)
  File "C:\Python27\lib\pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
  File "C:\Python27\lib\pickle.py", line 748, in save_global
(obj, module, name))
PicklingError: Can't pickle : it's not found as thread.lock

--

___
Python tracker 

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



[issue17660] mock.patch could whitelist builtins to not need create=True

2014-04-14 Thread Éric Araujo

Changes by Éric Araujo :


--
versions: +Python 3.5 -Python 3.4

___
Python tracker 

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



[issue18518] return-ing within code timed with timeit.timeit causes wrong return value of timeit.timeit

2014-04-14 Thread R. David Murray

R. David Murray added the comment:

The suggestion was to make this a footnote, not a note.  Also, it should 
probably say that the stmt is executed inside a function, meaning that instead 
of being a syntax error it changes the return value of the internal timeit 
function.

I understand Raymond's desire not to clutter the docs, but I consider the 
footnote worth it, not to pre-inform the user, but to let them know that it is 
not a bug if they check the docs *after* things don't work right.  It may be 
naive of me to think that they would do so.

--

___
Python tracker 

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



[issue15370] test_runpy should include namespace package tests

2014-04-14 Thread Christian Hudon

Christian Hudon added the comment:

As far as I can see, this is now tested by the following tests in test_runpy:

test_run_module_in_namespace_package
test_run_package_in_namespace_package
test_run_namespace_package
test_run_namespace_package_in_namespace_package

(These new tests were in introduced in revision 87961, on Dec 15th, 2013.)

Can someone who knows more about CPython's implementation confirm that these 
tests do cover what was intended with this bug report (and then close the bug), 
or if not, flesh out the bug report with what's missing, and I'll do my best to 
add the missing tests.

--
nosy: +chrish42

___
Python tracker 

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



[issue21218] Test failure for test_ssl.test_default_ecdh_curve on OS X

2014-04-14 Thread Jeff Ramnani

New submission from Jeff Ramnani:

The unittest, test_ssl.test_default_ecdh_curve, is failing on OS X (and FreeBSD 
9).

The test fails with the error message:
"""
==
ERROR: test_default_ecdh_curve (test.test_ssl.ThreadedTests)
--
Traceback (most recent call last):
  File "/Users/jramnani/code/cpython/Lib/test/test_ssl.py", line 2596, in 
test_default_ecdh_curve
context.set_ciphers("ECDH")
ssl.SSLError: ('No cipher can be selected.',)

--
"""

It looks to be related to issue, #21015 (changesets 3b81d1b3f9d1 and 
869277faf3dc).


OS Info:
* Version: OS X 10.9.2
* OpenSSL version: OpenSSL 0.9.8y 5 Feb 2013


The problem looks like OpenSSL on OS X is reporting that it has ECDH when it 
does not.

Python 3.5.0a0 (default:8cf384852680, Apr 14 2014, 13:32:46)
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ssl
>>> ssl.HAS_ECDH
True

--
components: Tests
messages: 216138
nosy: jramnani
priority: normal
severity: normal
status: open
title: Test failure for test_ssl.test_default_ecdh_curve on OS X
versions: Python 3.4, Python 3.5

___
Python tracker 

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



[issue21215] build-deps instructions for Ubuntu

2014-04-14 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue21218] Test failure for test_ssl.test_default_ecdh_curve on OS X

2014-04-14 Thread Ned Deily

Ned Deily added the comment:

Thanks for the report. This is being tracked in Issue21015.

--
nosy: +ned.deily
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed
superseder:  -> support SSL_CTX_set_ecdh_auto on newer OpenSSLs

___
Python tracker 

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



[issue18628] Better index entry for encoding declarations

2014-04-14 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo
stage: needs patch -> patch review
versions: +Python 3.5 -Python 3.3

___
Python tracker 

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



[issue18518] return-ing within code timed with timeit.timeit causes wrong return value of timeit.timeit

2014-04-14 Thread A.M. Kuchling

A.M. Kuchling added the comment:

BTW, this change is also relevant to 2.7.  Previously I wouldn't have bothered 
to commit it to 2.7 since the branch was largely closed, but now we're talking 
about some corporate maintainer eventually going through and backporting fixes 
to the newly-extended 2.7 branch.  So should I go ahead and apply it to 2.7?

--

___
Python tracker 

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



[issue19980] Improve help('non-topic') response

2014-04-14 Thread Terry J. Reedy

Terry J. Reedy added the comment:

help() uses lib/pydoc.py and pydoc tests are in test/test_pydoc.py
I think tests for things help does that pydoc does not do (help on topics?) 
should be in site.py.

--

___
Python tracker 

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



[issue21215] build-deps instructions for Ubuntu

2014-04-14 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Apr 14, 2014, at 05:47 PM, R. David Murray wrote:

>OK, so the devguide currently has 
>
>  sudo apt-get build-dep python3
>
>which did something on Glenn's machine, but did not enable him to build the
>optional packages.  So the question is, what should we put in the devguide as
>the correct build-dep to install?  Is it build-dep for the same version as
>the system python for that particular system?

I guess I would recommend:

$ sudo apt-get build-dep python3.4

with a fallback to

$ sudo apt-get build-dep python3.3

The drag is if they have a really old version which only has python3.2, or an
even newer future version that has only python3.5.

--

___
Python tracker 

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



[issue21146] update gzip usage examples in docs

2014-04-14 Thread Éric Araujo

Éric Araujo added the comment:

Isn’t there a buffering argument in open that can be used to avoid line 
buffering?

--
nosy: +eric.araujo
versions: +Python 3.5 -Python 3.2, Python 3.3

___
Python tracker 

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



[issue15916] change doctest DocTestSuite not to raise ValueError if no docstrings

2014-04-14 Thread Glenn Jones

Glenn Jones added the comment:

I've attached a patch that uses the original default DocTestFinder and does not 
raise an exception when there are no tests.

--
nosy: +Glenn.Jones
Added file: http://bugs.python.org/file34829/issue15916-no-exception.patch

___
Python tracker 

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



[issue18518] return-ing within code timed with timeit.timeit causes wrong return value of timeit.timeit

2014-04-14 Thread A.M. Kuchling

A.M. Kuchling added the comment:

I dislike footnotes and prefer to put things in the text whenever possible.  
The text for this change struck as relevant enough -- it notes a property of 
the *stmt* parameter -- that it doesn't belong in a footnote.  (I'd be happy to 
just make it a paragraph instead of a highlighted note: I dislike notes too!)

--
nosy: +akuchling

___
Python tracker 

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



[issue20035] Clean up Tcl library discovery in Tkinter on Windows

2014-04-14 Thread Zachary Ware

Zachary Ware added the comment:

Ok, debugging again with better breakpoints, I see what I missed before, so 
here's a new patch that does things a little differently.  This patch sets the 
TCL_LIBRARY envvar just before calling Tcl_FindExecutable, and unsets it after 
the call.  The $tcl_library Tcl var is set after interpreter creation, as in 
the previous patch.  Both places do nothing if TCL_LIBRARY envvar is already 
set or the Tcl library isn't in one of the two expected locations.

I attempted to get things to work by setting Tcl's encoding search path before 
the call to Tcl_FindExecutable, but doing so seems to require some part of the 
initialization done by Tcl_FindExecutable.  I would much prefer a solution that 
doesn't mess around with the TCL_LIBRARY envvar at all, but I've had no luck 
with it.

--
Added file: http://bugs.python.org/file34830/issue20035.v4.diff

___
Python tracker 

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



[issue21198] Minor tarfile documentation bug

2014-04-14 Thread Andrew Scheller

Andrew Scheller added the comment:

Éric - appears to be only Doc/library/tarfile.rst that is affected.

Matt - looks like your "simple patch" contains a lot more than you intended?!

--

___
Python tracker 

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



[issue21219] WARNING: Inline literal start-string without end-string.

2014-04-14 Thread Stéphane Wirtel

New submission from Stéphane Wirtel:

When I build the documentation, I get a warning about the NEWS file. Just add a 
new patch for this warning.


> (sphinx) make html
sphinx-build -b html -d build/doctrees -D latex_paper_size=  . build/html
Making output directory...
Running Sphinx v1.2.2
loading pickled environment... not yet created
building [html]: targets for 455 source files that are out of date
updating environment: 455 added, 0 changed, 0 removed
reading sources... [100%] whatsnew/index
../../Misc/NEWS:44: WARNING: Inline literal start-string without end-string.
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done

--
assignee: docs@python
components: Documentation
messages: 216149
nosy: docs@python, matrixise
priority: normal
severity: normal
status: open
title: WARNING: Inline literal start-string without end-string.
type: compile error
versions: Python 3.5

___
Python tracker 

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



[issue21219] WARNING: Inline literal start-string without end-string.

2014-04-14 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

Here is the patch for this bug.

--
keywords: +patch
Added file: http://bugs.python.org/file34833/issue21219_1.patch

___
Python tracker 

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



[issue7776] http.client.HTTPConnection tunneling is broken

2014-04-14 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
resolution:  -> fixed
stage: test needed -> committed/rejected
versions: +Python 3.5 -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



[issue15104] Unclear language in __main__ description

2014-04-14 Thread Sam Lucidi

Changes by Sam Lucidi :


Added file: 
http://bugs.python.org/file34831/clarify-__main__-documentation-backticks.patch

___
Python tracker 

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



[issue21209] q.put(some_tuple) fails when PYTHONASYNCIODEBUG=1

2014-04-14 Thread Yury Selivanov

Yury Selivanov added the comment:

Guido: please take a look at the patch "corowrapper_01.patch".

--
Added file: http://bugs.python.org/file34832/corowrapper_01.patch

___
Python tracker 

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



[issue21219] WARNING: Inline literal start-string without end-string.

2014-04-14 Thread Zachary Ware

Changes by Zachary Ware :


--
nosy: +orsenthil

___
Python tracker 

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



[issue11983] Inconsistent hash and comparison for code objects

2014-04-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0e35cef1d984 by Andrew Kuchling in branch 'default':
#11983: update comment to describe which fields are used and why.
http://hg.python.org/cpython/rev/0e35cef1d984

--
nosy: +python-dev

___
Python tracker 

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



[issue11983] Inconsistent hash and comparison for code objects

2014-04-14 Thread A.M. Kuchling

A.M. Kuchling added the comment:

Thanks for the patch!

--
assignee:  -> akuchling
nosy: +akuchling
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
versions: +Python 3.5 -Python 3.3

___
Python tracker 

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



  1   2   3   >