[issue25459] EAGAIN errors in Python logging module

2016-02-06 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue26285] Garbage collection of unused input sections from CPython binaries

2016-02-06 Thread Martin Panter

Martin Panter added the comment:

Maybe I am missing something, but I don’t see how you could load your module if 
it uses PyMem_RawMalloc. Perhaps PyMem_RawMalloc has been removed from some 
other executable (e.g. Parser/pgen), rather than the main Python executable?

--
nosy: +martin.panter

___
Python tracker 

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



[issue25913] base64.a85decode adobe flag incorrectly utilizes <~ as a marker causing error

2016-02-06 Thread Swati Jaiswal

Swati Jaiswal added the comment:

Is there any requirement for further modification or it can be accepted?

--

___
Python tracker 

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



[issue25351] pyvenv activate script failure with specific bash option

2016-02-06 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue22847] Improve method cache efficiency

2016-02-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 04424651f76c by Benjamin Peterson in branch '2.7':
fix hash member name (closes #22847)
https://hg.python.org/cpython/rev/04424651f76c

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



[issue26302] cookies module allows commas in keys

2016-02-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The regular expression is used for performance.

--

___
Python tracker 

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



[issue22847] Improve method cache efficiency

2016-02-06 Thread koobs

Changes by koobs :


--
resolution: fixed -> 

___
Python tracker 

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



[issue22847] Improve method cache efficiency

2016-02-06 Thread koobs

koobs added the comment:

It appears this change broke all FreeBSD builders (9: gcc, 10/11: clang) for 
the 2.7 branch with:

 koobs-freebsd-current (clang 3.7.x)

cc -pthread -c -fno-strict-aliasing -OPT:Olimit=0 -g -O2 -g -O0 -Wall 
-Wstrict-prototypes  -I. -IInclude -I./Include  -DPy_BUILD_CORE -o 
Objects/typeobject.o Objects/typeobject.c
Objects/typeobject.c:2568:44: error: no member named 'hash' in 'PyStringObject'
assert(((PyStringObject *)(name))->hash != -1);
   ~~  ^
/usr/include/assert.h:54:21: note: expanded from macro 'assert'
#define assert(e)   ((e) ? (void)0 : __assert(__func__, __FILE__, \
  ^
1 error generated.
*** Error code 1

 koobs-freebsd10 (clang 3.4.x)

cc -pthread -c -fno-strict-aliasing -OPT:Olimit=0 -g -O2 -g -O0 -Wall 
-Wstrict-prototypes  -I. -IInclude -I./Include -fPIC -DPy_BUILD_CORE -o 
Objects/unicodeobject.o Objects/unicodeobject.c
--- Objects/typeobject.o ---
Objects/typeobject.c:2568:18: error: use of undeclared identifier 
'PyASCIIObject'
assert(((PyASCIIObject *)(name))->hash != -1);
 ^
/usr/include/assert.h:54:21: note: expanded from macro 'assert'
#define assert(e)   ((e) ? (void)0 : __assert(__func__, __FILE__, \
  ^
Objects/typeobject.c:2568:33: error: expected expression
assert(((PyASCIIObject *)(name))->hash != -1);
^
/usr/include/assert.h:54:21: note: expanded from macro 'assert'
#define assert(e)   ((e) ? (void)0 : __assert(__func__, __FILE__, \
  ^
--- Objects/unicodectype.o ---
cc -pthread -c -fno-strict-aliasing -OPT:Olimit=0 -g -O2 -g -O0 -Wall 
-Wstrict-prototypes  -I. -IInclude -I./Include -fPIC -DPy_BUILD_CORE -o 
Objects/unicodectype.o Objects/unicodectype.c
--- Objects/typeobject.o ---
2 errors generated.
*** [Objects/typeobject.o] Error code 1


 koobs-freebsd9 (gcc 4.2.1 + patches)

gcc -pthread -c -fno-strict-aliasing -g -O2 -g -O0 -Wall -Wstrict-prototypes  
-I. -IInclude -I./Include  -DPy_BUILD_CORE -o Objects/unicodeobject.o 
Objects/unicodeobject.c
Objects/unicodeobject.c: In function 'PyUnicode_DecodeUTF7Stateful':
Objects/unicodeobject.c:1694: warning: comparison is always true due to limited 
range of data type
gcc -pthread -c -fno-strict-aliasing -g -O2 -g -O0 -Wall -Wstrict-prototypes  
-I. -IInclude -I./Include  -DPy_BUILD_CORE -o Objects/unicodectype.o 
Objects/unicodectype.c
Objects/typeobject.c: In function '_PyType_Lookup':
Objects/typeobject.c:2568: error: 'PyASCIIObject' undeclared (first use in this 
function)
Objects/typeobject.c:2568: error: (Each undeclared identifier is reported only 
once
Objects/typeobject.c:2568: error: for each function it appears in.)
Objects/typeobject.c:2568: error: expected expression before ')' token
*** [Objects/typeobject.o] Error code 1

--
nosy: +koobs
status: closed -> open

___
Python tracker 

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



[issue25226] "suffix" attribute not documented in logging.TimedRotatingFileHandler

2016-02-06 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue26136] DeprecationWarning for PEP 479 (generator_stop)

2016-02-06 Thread Anish Shah

Anish Shah added the comment:

@martin.panter I have fixed the What's New docs. I have updated the patch. 
Thanks!

--
Added file: http://bugs.python.org/file41840/issue26136_20160207.patch

___
Python tracker 

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



[issue25195] mock.ANY doesn't match mock.MagicMock() object

2016-02-06 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +michael.foord

___
Python tracker 

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



[issue25151] venv does not work with debian releases, if you want to install pip

2016-02-06 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +vinay.sajip
resolution: third party -> 
stage: resolved -> 
versions:  -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



[issue26302] cookies module allows commas in keys

2016-02-06 Thread Martin Panter

Martin Panter added the comment:

Another option might be to do away with the regular expression (personally I 
like to avoid REs and code generation where practical):

def _is_legal_key(key):
return key and set(_LegalChars).issuperset(key)

--
nosy: +martin.panter
stage: needs patch -> patch review

___
Python tracker 

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



[issue21263] test_gdb failures on os x 10.9.2

2016-02-06 Thread Ned Deily

Changes by Ned Deily :


--
keywords: +easy

___
Python tracker 

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



[issue21263] test_gdb failures on os x 10.9.2

2016-02-06 Thread Ned Deily

Ned Deily added the comment:

See also duplicate Issue25992.  Unless someone has a better idea, I suggest we 
just disable test_gdb on OS X or, somewhat more precisely, when Python has been 
compiled with LLVM clang.

--
nosy: +Bryce Miller
stage:  -> needs patch
versions: +Python 2.7, Python 3.6 -Python 3.4

___
Python tracker 

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



[issue25992] test_gdb fails on OSX

2016-02-06 Thread Ned Deily

Ned Deily added the comment:

There is an open earlier issue about test_gdb failures on OS X with Homebrew.  
Closing this issue in favor of that one.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> test_gdb failures on os x 10.9.2

___
Python tracker 

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



[issue26136] DeprecationWarning for PEP 479 (generator_stop)

2016-02-06 Thread Martin Panter

Martin Panter added the comment:

Thanks for the updated patch. There are a couple minor problems with the What’s 
New entry, which you can fix if you want, or I could fix if I get around to 
merging it:

* Bullet point should probably be wrapped onto multiple lines
* According to the 3.5 What’s New, the DeprecationWarning is “non-silent”, but 
I would just drop the “silent” attribute (Once upon a time in Python 2, 
DeprecationWarning was apparently enabled by default, in constrast with 
PendingDeprecationWarning, which was silenced by default.)
* Change “which will trigger a RuntimeError” → “and will trigger . . .”
* Missing full stop at the end

--

___
Python tracker 

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



[issue16023] IDLE freezes on ^5 or ^6 (Un-)Tabify Region with OS X Cocoa Tk 8.5

2016-02-06 Thread Ned Deily

Ned Deily added the comment:

I can no longer reproduce this either so I agree with Mark that it has most 
likely been fixed in later versions of Tk.  If the problem can be reproduced 
with current Tk releases, please re-open.

--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue25179] PEP 498 f-strings need to be documented

2016-02-06 Thread Martin Panter

Martin Panter added the comment:

Regarding doc strings, it seems that a constant f-string without any 
interpolations does become a doc string. But I would treat this as an 
implementation detail, not something to advertise.

Attached is my attempt at a patch. Please have a look and let me know if there 
are things I missed, if I added too much detail, wrong terminology, or 
whatever. I haven’t really written documentation like this before.

The combinations and permutations of all the Fr". . ." prefixes are getting 
borderline out of hand in the lexical_analysis.rst grammar. Any suggestions?

I put the bulk of the documentation in a new section “Formatted string 
literals” of the Lexical Analysis chapter, the same place that describes escape 
sequences and raw strings. Let me know if there is a more appropriate place for 
it. It doesn’t feel quite right where it is because this chapter comes before 
Expressions, and f-strings use expressions inside them.

I also made minimal changes to existing parts of the documentation and 
tutorial, to point to the new documentation. Perhaps some code examples could 
be changed from str.format() to f". . .", but I think that would be the subject 
of a separate patch. There are even places that still use the outdated 
"{0}".format() numbering.

--
keywords: +patch
nosy: +martin.panter
stage: needs patch -> patch review
Added file: http://bugs.python.org/file41839/f-strings.patch

___
Python tracker 

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



[issue25179] PEP 498 f-strings need to be documented

2016-02-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f25d8cbd074a by Martin Panter in branch '3.5':
Issue #25179: Preparatory cleanup of existing docs on string formatting
https://hg.python.org/cpython/rev/f25d8cbd074a

New changeset fe692ee6d19a by Martin Panter in branch '2.7':
Issue #25179: Preparatory cleanup of existing docs on string formatting
https://hg.python.org/cpython/rev/fe692ee6d19a

--
nosy: +python-dev

___
Python tracker 

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



[issue19729] [regression] str.format sublevel format parsing broken in Python 3.3.3

2016-02-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f25d8cbd074a by Martin Panter in branch '3.5':
Issue #25179: Preparatory cleanup of existing docs on string formatting
https://hg.python.org/cpython/rev/f25d8cbd074a

New changeset fe692ee6d19a by Martin Panter in branch '2.7':
Issue #25179: Preparatory cleanup of existing docs on string formatting
https://hg.python.org/cpython/rev/fe692ee6d19a

--

___
Python tracker 

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



[issue1927] Change input() to always prompt to stderr

2016-02-06 Thread Martin Panter

Martin Panter added the comment:

This proposal is starting to sound reasonable to me. Changing the title to 
reflect the new direction.

--
stage: patch review -> needs patch
title: raw_input behavior incorrect if readline not enabled -> Change input() 
to always prompt to stderr
versions:  -Python 2.7, Python 3.5

___
Python tracker 

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



[issue26209] TypeError in smtpd module with string arguments

2016-02-06 Thread Lorenzo Ancora

Lorenzo Ancora added the comment:

(msg259748) ok, then I propose to correct 
https://docs.python.org/dev/library/smtpd.html?highlight=q#smtpd.SMTPServer 
from:

.. class:: SMTPServer(localaddr, remoteaddr, data_size_limit=33554432,\
  map=None, enable_SMTPUTF8=False, decode_data=True)

   Create a new :class:`SMTPServer` object, which binds to local address
   *localaddr*.  It will treat *remoteaddr* as an upstream SMTP relayer.  It
   inherits from :class:`asyncore.dispatcher`, and so will insert itself into
   :mod:`asyncore`'s event loop on instantiation.


To:


.. class:: SMTPServer(localaddr, remoteaddr, data_size_limit=33554432,\
  map=None, enable_SMTPUTF8=False, decode_data=True)

   Creates a new :class:`SMTPServer` object, which binds to local address
   *localaddr* and uses *remoteaddr* as an upstream SMTP relayer.
   Both parameters should be a tuple in the form ``("host", portnumber)``, 
where *host* is a valid IP/FQDN.
   The object will insert itself into :mod:`asyncore`'s event loop on 
instantiation (inherits from :class:`asyncore.dispatcher`) and can be started 
with a call to :class:`asyncore.loop`.

---

These clarifications should be also inserted in the source code as heredocs 
(without the Sphynx syntax).
I really think that those changes will make the use of smtpd easier.

--

___
Python tracker 

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



[issue23718] strptime() can produce invalid date with negative year day

2016-02-06 Thread Tamás Bence Gedai

Tamás Bence Gedai added the comment:

It looks interesting, let me try to solve this. At first it seems odd that 
_calc_julian_from_U_or_W returns -2, I guess something is wrong around there.

--
nosy: +beng94

___
Python tracker 

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



[issue26250] no document for sqlite3.Cursor.connection

2016-02-06 Thread Aviv Palivoda

Aviv Palivoda added the comment:

Added patch with my suggestion for sqlite3.Cursor.connection attribute 
documentation

--
assignee:  -> docs@python
components: +Documentation, Extension Modules -Library (Lib)
keywords: +patch
nosy: +docs@python, ghaering, palaviv
versions: +Python 3.5, Python 3.6
Added file: http://bugs.python.org/file41838/sqlite3-cursor-connection-doc.patch

___
Python tracker 

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



[issue26302] cookies module allows commas in keys

2016-02-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

_LegalChars contained only characters which don't require quoting, as 
documented in the comment above. If _LegalChars was only used to create 
_is_legal_key, we would just wrote the regular expression. But it is used also 
in other places. In this particular case adding "\" to _LegalChars doesn't lead 
to visible bug (except inconsistency with the comment), but we can't be sure.

_is_legal_key() is implementation detail. It would be better to test public API.

--

___
Python tracker 

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



[issue23551] IDLE to provide menu link to PIP gui.

2016-02-06 Thread Terry J. Reedy

Terry J. Reedy added the comment:

On idle-dev, Beni Cherniavsky-Paskin suggested that easily installing into a 
virtualenv would be a useful option, especially in semi-locked down education 
setting.  I probably agree, as a follow-on feature, but am barely familiar with 
venvs.

--

___
Python tracker 

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



[issue26300] "unpacked" bytecode

2016-02-06 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue26209] TypeError in smtpd module with string arguments

2016-02-06 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Note that the proposed code change would be a 3.6 only enhancement.  Adding the 
other versions was part of changing to a doc-only issue.  Note also that if the 
module is not deprecated, then a 3.6 code change could be considered.  But only 
a doc change for now.

--
dependencies: +Deprecate smtpd (based on deprecated asyncore/asynchat): write a 
new smtp server with asyncio

___
Python tracker 

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



[issue26209] TypeError in smtpd module with string arguments

2016-02-06 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Code patches should not be assigned to 'docs'.  But Berker, for the reason 
stated, thinks this should be doc only.  Giampaolo is not currently active, so 
should not be assigned the issue by anyone else.

After making a patch -- see the devguide -- use the File: Browse button to 
upload a file.  You can suggest a specific doc change in a message, without a 
.patch or .diff file.

--

___
Python tracker 

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



[issue26302] cookies module allows commas in keys

2016-02-06 Thread Anish Shah

Anish Shah added the comment:

@serhiy.storchaka OK, I have used re.escape instead of '\'. And I have added a 
test too.

Also, may I know why '\' can not be in _LegalChars, so that I can remember this 
for future purpose?

--
Added file: http://bugs.python.org/file41837/issue26302_20160206-2.patch

___
Python tracker 

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



[issue26302] cookies module allows commas in keys

2016-02-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

No, _LegalChars shouldn't include "\".

--

___
Python tracker 

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



[issue26302] cookies module allows commas in keys

2016-02-06 Thread Jason R. Coombs

Jason R. Coombs added the comment:

A test would be much appreciated. It's worthwhile capturing the rejection of at 
least one invalid character, if not several common ones.

--

___
Python tracker 

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



[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-06 Thread Yury Selivanov

Yury Selivanov added the comment:

Alright, I ran a few benchmarks myself.  In rigorous mode regex_v8 has the same 
performance on my 2013 Macbook Pro and an 8-years old i7 CPU (Linux).

Here're results of "perf.py -b raytrace,spectral_norm,meteor_contest,nbody 
../cpython/python.exe ../cpython-git/python.exe -r"


fastint5:

### nbody ###
Min: 0.227683 -> 0.197046: 1.16x faster
Avg: 0.229366 -> 0.198889: 1.15x faster
Significant (t=137.31)
Stddev: 0.00170 -> 0.00142: 1.1977x smaller

### spectral_norm ###
Min: 0.296840 -> 0.262279: 1.13x faster
Avg: 0.299616 -> 0.265387: 1.13x faster
Significant (t=74.52)
Stddev: 0.00331 -> 0.00319: 1.0382x smaller

The following not significant results are hidden, use -v to show them:
meteor_contest, raytrace.


==


inline-2:


### raytrace ###
Min: 1.188825 -> 1.213788: 1.02x slower
Avg: 1.199827 -> 1.227276: 1.02x slower
Significant (t=-18.12)
Stddev: 0.00559 -> 0.01408: 2.5184x larger

### spectral_norm ###
Min: 0.296535 -> 0.277025: 1.07x faster
Avg: 0.299044 -> 0.278071: 1.08x faster
Significant (t=87.40)
Stddev: 0.00220 -> 0.00097: 2.2684x smaller

The following not significant results are hidden, use -v to show them:
meteor_contest, nbody.

--

___
Python tracker 

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



[issue26302] cookies module allows commas in keys

2016-02-06 Thread Anish Shah

Anish Shah added the comment:

We just need to use '\-' instead of '-'.

```
>>> regex = re.compile("[a-z]")
>>> bool(regex.match('b'))
True
>>> regex = re.compile("[a\-z]")
>>> bool(regex.match('b'))
False
```

I have uploaded a patch.
Let me know if this needs some tests too?

--
keywords: +patch
Added file: http://bugs.python.org/file41836/issue26302_20160206.patch

___
Python tracker 

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



[issue26288] Optimize PyLong_AsDouble for single-digit longs

2016-02-06 Thread Yury Selivanov

Yury Selivanov added the comment:

> Sorry, I was a bit brief: The current comment says "decimal" instead of 
> "double". It should be changed to "double".

Oh, got it now, sorry.  I rephrased the comment a bit, hopefully it's better 
now.  Please check.  Thanks!

--

___
Python tracker 

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



[issue26288] Optimize PyLong_AsDouble for single-digit longs

2016-02-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cfb77ccdc23a by Yury Selivanov in branch 'default':
Issue #26288: Fix comment
https://hg.python.org/cpython/rev/cfb77ccdc23a

--

___
Python tracker 

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



[issue26288] Optimize PyLong_AsDouble for single-digit longs

2016-02-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Actually, let me refine that. nbody and spectral-norm don't make sense
for people running CPython. Perhaps people running PyPy might care about
their performance... (though PyPy is supposed to support a subset of
Numpy too)

--

___
Python tracker 

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



[issue26288] Optimize PyLong_AsDouble for single-digit longs

2016-02-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Le 06/02/2016 18:07, Yury Selivanov a écrit :
> 
>> Actually, please fix the comment. We don't want someone wondering what those 
>> "macro-benchmarks" are.
> 
> If spectral-norm and nbody aren't good benchmarks then let's remove
> them from our benchmarks suite.

Probably, yes.

--

___
Python tracker 

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



[issue26288] Optimize PyLong_AsDouble for single-digit longs

2016-02-06 Thread Stefan Krah

Stefan Krah added the comment:

Sorry, I was a bit brief: The current comment says "decimal" instead of 
"double". It should be changed to "double".

--

___
Python tracker 

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



[issue26288] Optimize PyLong_AsDouble for single-digit longs

2016-02-06 Thread Mark Dickinson

Changes by Mark Dickinson :


--
nosy: +mark.dickinson

___
Python tracker 

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



[issue26288] Optimize PyLong_AsDouble for single-digit longs

2016-02-06 Thread Yury Selivanov

Yury Selivanov added the comment:

> Actually, please fix the comment. We don't want someone wondering what those 
> "macro-benchmarks" are.

If spectral-norm and nbody aren't good benchmarks then let's remove them from 
our benchmarks suite.

I'll remove that comment anyways, as it doesn't make a lot of sense :)

> Additionally, "single digit will always fit a double"?

What's wrong about that phrase?  Would this be better: "It's safe to cast a 
single-digit long (31 bits) to double"?

--

___
Python tracker 

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



[issue26136] DeprecationWarning for PEP 479 (generator_stop)

2016-02-06 Thread Anish Shah

Anish Shah added the comment:

@martin.panter Any reviews for the patch? Is it ready to merge?

--

___
Python tracker 

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



[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-06 Thread Yury Selivanov

Yury Selivanov added the comment:

> ### regex_v8 ###
> Min: 0.041323 -> 0.048099: 1.16x slower
> Avg: 0.041624 -> 0.049318: 1.18x slower

I think this is a random fluctuation, that benchmark (and re lib) doesn't use 
the operators too much.  It can't be THAT slower just because of optimizing a 
few binops.

--

___
Python tracker 

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



[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-06 Thread Yury Selivanov

Yury Selivanov added the comment:

You're also running a very small subset of all benchmarks available. Please try 
the '-b all' option.  I'll also run benchmarks on my machines.

--

___
Python tracker 

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



[issue26302] cookies module allows commas in keys

2016-02-06 Thread Anish Shah

Changes by Anish Shah :


--
nosy: +anish.shah

___
Python tracker 

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



[issue26303] Shared execution context between doctests in a module

2016-02-06 Thread kernc

kernc added the comment:

The use case is not unpopular [1] and with unambiguous examples like

>>> arr = np.arange(5)
>>> my_sum(arr)
10

(i.e., without importing numpy as np everywhere), it also makes a lot of sense.


[1]: 
http://stackoverflow.com/questions/13106118/object-reuse-in-python-doctest/35242443

--

___
Python tracker 

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



[issue26303] Shared execution context between doctests in a module

2016-02-06 Thread kernc

New submission from kernc:

The doctest execution context documentation [0] says the tests get shallow 
*copies* of module's globals, so one test can't mingle with results of another. 
This makes it impossible to make literate modules such as:


"""
This module is about reusable doctests context.

Examples

Let's prepare something the later examples can work with:

>>> import foo
>>> result = foo.Something()
2

"""
class Bar:
"""
Class about something.

>>> bar = Bar(foo)
>>> bar.uses(foo)
True

"""
def baz(self):
"""
Returns 3.

>>> result + bar.baz()
5

"""
return 3


I.e. one has to instantiate everything in every single test. The documentation 
says one can pass their own globals as `glob=your_dict`, but it doesn't mention 
the dict is *cleared* after the test run.

Please acknowledge the use case of doctests in a module sharing their 
environment and results sometimes legitimately exists, and to make it 
future-compatible, please amend the final paragraph of the relevant part of 
documentation [0] like so:


You can force use of your own dict as the execution context by 
passing `globs=your_dict` to `testmod()` or `testfile()` instead, 
e.g., to have all doctests in a module use the _same_ execution
context (sharing variables), define a context like so:

class Context(dict):
def copy(self):
return self
def clear(self):
pass

and use it, optionally prepopulated with `M`'s globals:

doctest.testmod(module,
glob=Context(module.__dict__.copy()))


Thank you!


[0]: https://docs.python.org/3/library/doctest.html#what-s-the-execution-context

--
assignee: docs@python
components: Documentation
messages: 259731
nosy: docs@python, kernc
priority: normal
severity: normal
status: open
title: Shared execution context between doctests in a module
type: enhancement
versions: Python 3.6

___
Python tracker 

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



[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-06 Thread STINNER Victor

STINNER Victor added the comment:

Benchmark on fastint5_4.patch.

python3 -u perf.py --affinity=2-3,6-7 --rigorous ../default/python.orig 
../default/python_fastint5_4

Report on Linux smithers 4.3.4-300.fc23.x86_64 #1 SMP Mon Jan 25 13:39:23 UTC 
2016 x86_64 x86_64
Total CPU cores: 8

### django_v3 ###
Min: 0.563959 -> 0.578181: 1.03x slower
Avg: 0.565383 -> 0.579137: 1.02x slower
Significant (t=-152.48)
Stddev: 0.00075 -> 0.00050: 1.4900x smaller

### fastunpickle ###
Min: 0.551076 -> 0.563469: 1.02x slower
Avg: 0.555481 -> 0.567028: 1.02x slower
Significant (t=-27.05)
Stddev: 0.00278 -> 0.00324: 1.1687x larger

### json_dump_v2 ###
Min: 2.737429 -> 2.662615: 1.03x faster
Avg: 2.754239 -> 2.685404: 1.03x faster
Significant (t=55.63)
Stddev: 0.00610 -> 0.01077: 1.7662x larger

### nbody ###
Min: 0.228548 -> 0.212292: 1.08x faster
Avg: 0.230082 -> 0.213574: 1.08x faster
Significant (t=73.74)
Stddev: 0.00175 -> 0.00139: 1.2567x smaller

### regex_v8 ###
Min: 0.041323 -> 0.048099: 1.16x slower
Avg: 0.041624 -> 0.049318: 1.18x slower
Significant (t=-45.38)
Stddev: 0.00123 -> 0.00116: 1.0613x smaller

The following not significant results are hidden, use -v to show them:
2to3, chameleon_v2, fastpickle, json_load, tornado_http.

--

___
Python tracker 

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



[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-06 Thread STINNER Victor

STINNER Victor added the comment:

Benchmark on inline-2.patch. No speedup, only slowdown.

I'm now running benchmark on fastint5_4.patch.

$ python3 -u perf.py --affinity=2-3,6-7 --rigorous ../default/python.orig 
../default/python.inline-2

Report on Linux smithers 4.3.4-300.fc23.x86_64 #1 SMP Mon Jan 25 13:39:23 UTC 
2016 x86_64 x86_64
Total CPU cores: 8

### json_load ###
Min: 0.707290 -> 0.723411: 1.02x slower
Avg: 0.707845 -> 0.724238: 1.02x slower
Significant (t=-297.25)
Stddev: 0.00026 -> 0.00049: 1.8696x larger

### regex_v8 ###
Min: 0.03 -> 0.070435: 1.06x slower
Avg: 0.066947 -> 0.071378: 1.07x slower
Significant (t=-17.98)
Stddev: 0.00172 -> 0.00177: 1.0313x larger

The following not significant results are hidden, use -v to show them:
2to3, chameleon_v2, django_v3, fastpickle, fastunpickle, json_dump_v2, nbody, 
tornado_http.

real58m32.662s
user57m43.058s
sys 0m47.428s

--

___
Python tracker 

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



[issue20109] TestProgram is mentioned in the unittest docs but is not documented

2016-02-06 Thread Tamás Bence Gedai

Tamás Bence Gedai added the comment:

I think TestProgram should be anonymous, all the work is done in its 
constructor. I don't see why would anyone would call its functions. I can 
update the docs if it's needed.

--
nosy: +beng94

___
Python tracker 

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



[issue26209] TypeError in smtpd module with string arguments

2016-02-06 Thread Lorenzo Ancora

Lorenzo Ancora added the comment:

(msg259475) Terry J. Reedy thank you for the correction, I've confused the 
versions affected with the versions actually supported.
Since this doesn't only affect the documentation, is it correct to assign the 
issue to docs@python?
The expert index indicates giampaolo.rodola as the module maintainer, so he 
should be moved from the nosy list to the field "Assigned To" and docs@python 
should be in the nosy list.

Also, there is a documentation on how to send a patch for a specific module in 
Python 3.5?
I'd like to help by creating a new source code patch. :-)

--

___
Python tracker 

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



[issue26302] cookies module allows commas in keys

2016-02-06 Thread Kunal Grover

Kunal Grover added the comment:

Hi, I am a newcomer here, I am interested to work on this issue.

--
nosy: +Kunal Grover

___
Python tracker 

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



[issue21042] ctypes.util.find_library() should return full pathname instead of filename in linux

2016-02-06 Thread Tamás Bence Gedai

Tamás Bence Gedai added the comment:

Added a new patch, as Martin pointed out, I put back the ABI matching. The 
regex looks quite ugly, because it has to match \n\t. To be exact, it has to 
match something like this: "/lib/x86_64-linux-gnu/libc.so.6\n\tlibbz2.so.1.0 
(libc6,x86-64)".

I updated the docs, although I don't know what should I write for the version, 
please someone help me with that.

For testing, there's a test function in this module, I updated that.

--
Added file: http://bugs.python.org/file41835/find_lib_v1.patch

___
Python tracker 

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



[issue26288] Optimize PyLong_AsDouble for single-digit longs

2016-02-06 Thread Stefan Krah

Stefan Krah added the comment:

Additionally, "single digit will always fit a double"?

--
nosy: +skrah

___
Python tracker 

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



[issue26288] Optimize PyLong_AsDouble for single-digit longs

2016-02-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Actually, please fix the comment. We don't want someone wondering what those 
"macro-benchmarks" are.

--
assignee:  -> yselivanov
status: closed -> open

___
Python tracker 

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



[issue21573] Clean up turtle.py code formatting

2016-02-06 Thread Anish Shah

Changes by Anish Shah :


--
nosy: +anish.shah

___
Python tracker 

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



[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> I see two main trends: optimize most cases (optimize most operators for int 
> and float,  ex: fastint5_4.patch) versus optimize very few cases to limit 
> changes and to limit effects on ceval.c (ex: inline-2.patch).

I agree that may be optimizing very few cases is better. We need to collect the 
statistics of using different operations with different types in long run of 
tests or benchmarks. If say division is used 100 times less than addition, we 
shouldn't complicate ceval loop to optimize it.

--

___
Python tracker 

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



[issue26302] cookies module allows commas in keys

2016-02-06 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
keywords: +3.5regression

___
Python tracker 

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



[issue26302] cookies module allows commas in keys

2016-02-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ah, how can I missed this catch?

The simplest way is just move "-" to the start or the end of character list. 
The most error-proof way is to use re.escape().

--
components: +Library (Lib)
keywords: +easy -3.5regression
nosy: +demian.brecht
stage:  -> needs patch
type:  -> behavior

___
Python tracker 

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



[issue26300] "unpacked" bytecode

2016-02-06 Thread Andrew Barnert

Andrew Barnert added the comment:

Reading more about wpython (slide 23 of 
https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/wpython2/Cleanup%20and%20new%20optimizations%20in%20WPython%201.1.pdf),
 one of his optimizations was moving the peephole optimizer into the compiler, 
so it could just use the linked list of block objects of arrays of instruction 
objects, instead of raw bytecode.

Obviously that idea isn't compatible with PEP 511. But on the off chance that 
PEP 511 founders, that might be the simplest answer to this problem.

--

___
Python tracker 

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