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

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

[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

[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

[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.pytho

[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

[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 ___ ___ Pytho

[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

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

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

[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

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

[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

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

[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

[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.pytho

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

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

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

[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

[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://ma

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

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

[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) -- __

[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

[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! -- _

[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? -- keyword

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

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

[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

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

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

[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

[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.p

[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. -- _

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

[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, P

[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

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

[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

[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: Preparat

[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: Preparat

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

[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: ope

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

[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

[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, Pyt

[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.o

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

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

[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.pyt

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

[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.pytho

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

[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

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

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

[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.pytho

[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 ___ __

[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.pan

[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.pytho