[issue11549] Rewrite peephole to work on AST

2011-03-16 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11549 ___ ___ Python-bugs-list mailing

[issue11477] Bug in code dispatching based on internal slots

2011-03-16 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11477 ___ ___ Python-bugs-list mailing

[issue11665] Regexp findall freezes

2011-03-24 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: Yes, this is known as catastrophic backtracking, and there isn't really a solution for it, some regexps can't be efficiently matched. -- nosy: +alex ___ Python tracker rep...@bugs.python.org http

[issue11682] PEP 380 reference implementation for 3.3

2011-03-25 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11682 ___ ___ Python-bugs-list mailing

[issue11704] functools.partial doesn't create bound methods

2011-03-28 Thread Alex Gaynor
New submission from Alex Gaynor alex.gay...@gmail.com: This is related to the discussion we had at the PyCon language summit about C vs Python function binding. If you create a partial instance and put it on a class it doesn't create bound instances. This behavior is a tad surprising in my

[issue11704] functools.partial doesn't create bound methods

2011-03-28 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: Indeed I completely missed the section at the bottom. A note in the above section would be a useful addition. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11704

[issue11743] Rewrite PipeConnection and Connection in pure Python

2011-04-03 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11743 ___ ___ Python-bugs-list mailing

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-04-10 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: FWIW in PyPy we have https://bitbucket.org/pypy/pypy/src/default/lib_pypy/disassembler.py which we use for some of our tools. -- nosy: +alex ___ Python tracker rep...@bugs.python.org http

[issue9269] Cannot pickle self-referencing sets

2011-04-23 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9269 ___ ___ Python-bugs-list mailing

[issue1062277] Pickle breakage with reduction of recursive structures

2011-04-24 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1062277 ___ ___ Python-bugs-list

[issue11949] Make float('nan') unorderable

2011-04-28 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: The C standard (and/or the POSIX one, I forget) says sqrt(-0.0) returns -0.0. -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11949

[issue11985] Document that platform.python_implementation supports PyPy

2011-05-03 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: It returns PyPy on pypy. -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11985

[issue12017] Decoding a highly-nested object with json (_speedups enabled) causes segfault

2011-05-06 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: Why not use Py_EnterRecursiveCall? -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12017

[issue12033] AttributeError: 'module' object has no attribute 'scipy'

2011-05-08 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: This bug tracker is for filing bugs in Python itself, for support with 3rd party libraries you should try their mailing lists or IRC channels. -- nosy: +alex resolution: - invalid status: open - closed

[issue12203] isinstance not functioning as documented

2011-05-28 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: I don't see why this is incorrect, type(a) - type, and object is a superclass of type. -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12203

[issue13238] Add shell command helpers to shutil module

2011-10-21 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: These feel like a shell injection waiting to happen to me. -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13238

[issue13274] heapq pure python version uses islice without guarding for negative counts

2011-10-29 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13274 ___ ___ Python-bugs-list mailing

[issue13340] list.index does not accept None as start or stop

2011-11-05 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13340 ___ ___ Python-bugs-list mailing

[issue13430] Add a curry function to the functools module

2011-11-18 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: This already exists, as functools.partial: http://docs.python.org/library/functools.html#functools.partial -- nosy: +alex resolution: - invalid status: open - closed ___ Python tracker rep

[issue13529] Segfault inside of gc/weakref

2011-12-04 Thread Alex Gaynor
New submission from Alex Gaynor alex.gay...@gmail.com: I don't have a particularly minimal test case for this, however I am able to reproduce it consistently (so far reproduced on multiple machines, 32-bit and 64-bit on 2.6 and 2.7), using these steps: First get a checkout of the PyPy

[issue13529] Segfault inside of gc/weakref

2011-12-04 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: Antoine asked for a gdb bt, here's the last couple of useful frames: #0 _PyWeakref_ClearRef (self=0x4000) at Objects/weakrefobject.c:97 #1 0x004d4c66 in handle_weakrefs (old=0x78a2b0, unreachable=0x7fff87b0

[issue13529] Segfault inside of gc/weakref

2011-12-04 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: Turns out this was a subtle bug in some raw memory manipulation code, which amaury spotted. -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http

[issue13536] ast.literal_eval fails on sets

2011-12-05 Thread Alex Gaynor
New submission from Alex Gaynor alex.gay...@gmail.com: In 2.7 ast.literal_eval blows up with a set for input: import ast ast.literal_eval({1}) -- messages: 148897 nosy: alex priority: low severity: normal status: open title: ast.literal_eval fails on sets versions: Python 2.7

[issue13536] ast.literal_eval fails on sets

2011-12-05 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: Patch with tests -- keywords: +patch Added file: http://bugs.python.org/file23859/x.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13536

[issue13536] ast.literal_eval fails on sets

2011-12-05 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: There's no support for comprehensions of any sort, and confusingly limited support for arithmetic ops, I'd like to keep the scope of this issue small, basically backporting 90bf0631bfb8 and adding the tests (which I can also add to default

[issue13603] Add prime-related and number theory functions to Python

2011-12-14 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: I'll chip in my 2 cents as well and say this also seems too domain specific and not useful enough for the stdlib. -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue13592] repr(regex) doesn't include actual regex

2011-12-22 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: Raymond, Antoine: I don't see your claims as contradictory, it's definitely true that the Python standardlib has historically tried to keep reprs as being eval-able, I think Antoine's correct that the vast majority of 3rd-party code does

[issue13667] __contains__ method behavior

2011-12-28 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: For what it's worth I proposed this on -ideas a while ago, the sticking points were what does `not in` do (no one had an answer anyone was happy with for this), and do we need a way to override it from the other perspective (e.g. if I want

[issue13704] Random number generator in Python core

2012-01-03 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13704 ___ ___ Python-bugs-list mailing

[issue13703] Hash collision security issue

2012-01-03 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13703 ___ ___ Python-bugs-list mailing

[issue13707] Clarify hash() lifetime

2012-01-03 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13707 ___ ___ Python-bugs-list mailing

[issue13697] python RLock implementation unsafe with signals

2012-01-03 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13697 ___ ___ Python-bugs-list mailing

[issue13703] Hash collision security issue

2012-01-04 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: Except, it's a totally non-scalable approach. People have vulnerabilities all over their sites which they don't realize. Some examples: django-taggit (an application I wrote for handling tags) parses tags out an input, it stores

[issue13703] Hash collision security issue

2012-01-05 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: Perl is so paranoid they obscure their variable names! In all seriousness, both Perl and Ruby are vulnerable to the timing attacks, and as far as I know the JVM is not patching this themselves, but telling applications to fix it themselves

[issue13723] Regular expressions: (?:X|\s+)*$ takes a long time

2012-01-06 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13723 ___ ___ Python-bugs-list mailing

[issue13703] Hash collision security issue

2012-01-07 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: You're seriously underestimating the number of vulnerable dicts. It has nothing to do with the module, and everything to do with the origin of the data. There's tons of user code that's vulnerable too

[issue13819] _warnings settings are process-wide

2012-01-18 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13819 ___ ___ Python-bugs-list mailing

[issue13703] Hash collision security issue

2012-01-19 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: Django's tests will *not* be run with HASHEED=0, if they're broken with hash randomization then they are likely broken on random.choice([32-bit, 64-bit, pypy, jython, ironpython]) and we strive to run on all those platforms. If our tests

[issue13703] Hash collision security issue

2012-01-21 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: On Sat, Jan 21, 2012 at 5:42 PM, Gregory P. Smith rep...@bugs.python.orgwrote: Gregory P. Smith g...@krypto.org added the comment: On Sat, Jan 21, 2012 at 2:45 PM, Antoine Pitrou rep...@bugs.python.org wrote: Antoine Pitrou pit

[issue13849] Add tests for NUL checking in certain strs

2012-01-23 Thread Alex Gaynor
New submission from Alex Gaynor alex.gay...@gmail.com: ATM there's no tests (at least in 2.x, I haven't checked 3.x yet) for this behavior: os.path.exists(/tmp\x00abcds) Traceback (most recent call last): File stdin, line 1, in module File /usr/lib/python3.2/genericpath.py, line 18

[issue13848] io.open() doesn't check for embedded NUL characters

2012-01-23 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13848 ___ ___ Python-bugs-list mailing

[issue13703] Hash collision security issue

2012-01-25 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: On Wed, Jan 25, 2012 at 7:45 AM, Dave Malcolm rep...@bugs.python.orgwrote: Dave Malcolm dmalc...@redhat.com added the comment: I've found a bug in my patch; insertdict writes the old non-randomized hash value into me_hash at: ep

[issue13703] Hash collision security issue

2012-01-26 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: On Thu, Jan 26, 2012 at 4:00 PM, Martin v. Löwis rep...@bugs.python.orgwrote: Martin v. Löwis mar...@v.loewis.de added the comment: I'd like to propose an entirely different approach: use AVL trees for colliding strings, for dictionaries

[issue13703] Hash collision security issue

2012-01-26 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: On Thu, Jan 26, 2012 at 5:42 PM, Martin v. Löwis rep...@bugs.python.orgwrote: Martin v. Löwis mar...@v.loewis.de added the comment: What happens if, instead of putting strings in a dictionary directly, I have them wrapped in something

[issue13703] Hash collision security issue

2012-01-26 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: I'm sorry then, but I'm a little confused. I think we pretty clearly established earlier that requiring users to make changes anywhere they stored user data would be dangerous, because these locations are often in libraries or other places

[issue2636] Adding a new regex module (compatible with re)

2012-01-28 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: So, to my reading of teh compatibility PEP this cannot be added wholesale, unless there is a pure Python version as well. However, if it replaced re (read: patched) it would be valid. On Sun, Jan 29, 2012 at 1:26 AM, Nick Coghlan rep

[issue16612] Integrate Argument Clinic specialized preprocessor into CPython trunk

2012-12-08 Thread Alex Gaynor
Alex Gaynor added the comment: For what it's worth, I'm not as concerned with the process of the PEP, as having a single document we can review and discuss. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16612

[issue16651] Find out what stdlib modules lack a pure Python implementation

2012-12-09 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16651 ___ ___ Python-bugs-list mailing

[issue16651] Find out what stdlib modules lack a pure Python implementation

2012-12-10 Thread Alex Gaynor
Alex Gaynor added the comment: A lot of builtins :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16651 ___ ___ Python-bugs-list mailing list

[issue16894] Function attribute access doesn't invoke methods in dict subclasses

2013-01-08 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16894 ___ ___ Python-bugs-list mailing

[issue16991] Add OrderedDict written in C

2013-01-18 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16991 ___ ___ Python-bugs-list mailing

[issue17338] Add length_hint parameter to list, dict, set constructors to allow efficient presizing

2013-03-02 Thread Alex Gaynor
New submission from Alex Gaynor: Following the length_hint PEP, we should expose this facility to end-python programmers. The semantics would be basically: the list has behavior identical to if you hadn't provided length_hint, except the VM is free to preallocate efficiently. CPython

[issue17338] Add length_hint parameter to list, dict, set constructors to allow efficient presizing

2013-03-02 Thread Alex Gaynor
Alex Gaynor added the comment: python-dev/ideas may be a better place to have this discussion, but basically if you're going to insist that stuff like this doesn't go into Python because it isn't C++, people are going to have to write C++, and that makes me incredibly sad. There's an obvious

[issue17338] Add length_hint parameter to list, dict, set constructors to allow efficient presizing

2013-03-03 Thread Alex Gaynor
Alex Gaynor added the comment: That strategy only works if you know the exact count, it fails if you only have an estimate (as __length_hint__ gives you). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17338

[issue17343] Add a version of str.split which returns an iterator

2013-03-03 Thread Alex Gaynor
New submission from Alex Gaynor: str.split returns a list, which is inefficient when you just want to process items one be one. You could emulate this with str.find and tracking indexes manually, but this should really be a builtin behavior. -- messages: 183411 nosy: alex priority

[issue17423] libffi on 32bit is broken on linux

2013-03-14 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17423 ___ ___ Python-bugs-list mailing

[issue17423] libffi on 32bit is broken on linux

2013-03-16 Thread Alex Gaynor
Alex Gaynor added the comment: The patch has been merged into libffi upstream: https://github.com/atgreen/libffi/pull/32 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17423

[issue17496] OS X test for Tk availability in runtktests.py doesn't work

2013-03-20 Thread Alex Gaynor
New submission from Alex Gaynor: If I run: $ python -mtest.test_tk I get a skip, after speaking with people familiar with OS X, it appears that the condition for the skip uses old Carbon APIs, which are totally deprecated under 64-bit. Attached is a patch which should work. -- files

[issue17513] astrike(*) in argv

2013-03-21 Thread Alex Gaynor
Alex Gaynor added the comment: This is a result of your shell automatically expeanding that, depending on what shell you use there'll be a way to escape the *. -- nosy: +alex resolution: - invalid ___ Python tracker rep...@bugs.python.org http

[issue12370] Use of super overwrites use of __class__ in class namespace

2011-06-19 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12370 ___ ___ Python-bugs-list mailing

[issue12422] When deepcopying, don't store immutable objects in the memo dict

2011-06-27 Thread Alex Gaynor
New submission from Alex Gaynor alex.gay...@gmail.com: All storing immutable objects in the memo dict does is slow stuff down, due to having a larger hash table, and on some other Python's causing hilarious levels of GC pressure. Using http://paste.pocoo.org/show/421310/ as a benchmark

[issue12422] When deepcopying, don't store immutable objects in the memo dict

2011-06-27 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: A slightly cleverer version (or less clever, depending on how you approach the issue) that also works with tuples of immutable content. -- Added file: http://bugs.python.org/file22499/d.diff

[issue12422] When deepcopying, don't store immutable objects in the memo dict

2011-06-27 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: Switched to using assertIs, as merwok suggested. -- Added file: http://bugs.python.org/file22500/d.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12422

[issue12422] When deepcopying, don't store immutable objects in the memo dict

2011-06-27 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: Amaury points out: this is not strictly about immutable objects, but rather objects who's deepcopy is themselves (identity-wise), in some (rare I think) cases this could provide a slowdown. Specifically a case of [(1, 2, 3)] * 1 would

[issue12575] add a AST validator

2011-07-16 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12575 ___ ___ Python-bugs-list mailing

[issue12615] add array.zeroes

2011-07-22 Thread Alex Gaynor
New submission from Alex Gaynor alex.gay...@gmail.com: From python-ideas: introduce array.zeroes, a new classmethod that provides an alternative constructor, its signature is zeroes(typecode, length), which allows for preallocating an array, with a lower overhead than methods such as array

[issue12575] add a AST validator

2011-07-22 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: 1) Yes, it address a real concern that arose during Armin's GSOC project which has been developing a unified template compilation architecture (via the AST module) for Django and Jinja2. 2) Asking speed questions about this is silly IMO

[issue12957] mmap.resize changes memory address of mmap'd region

2011-09-10 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12957 ___ ___ Python-bugs-list mailing

[issue1621] Do not assume signed integer overflow behavior

2011-09-13 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1621 ___ ___ Python-bugs-list mailing

[issue12998] Memory leak with CTypes Structure

2011-09-17 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: This is caused by a cache which is kept of array's for different (Structure, length) pairs. -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12998

[issue13012] Allow keyword argument in str.splitlines()

2011-09-20 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: Personally, I regard every C function which, for obscure internal details, doesn't take keyword arguments as a sad bug, which should of course be fixed :) -- nosy: +alex ___ Python tracker rep

[issue13849] Add tests for NUL checking in certain strs

2012-05-16 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: I'm perfectly happy to write a patch for this, the only reason I didn't was Martin and others expressed opposition to committing it. If there's a philosophicaly opposition to the patch I won't write

[issue14965] super() and property inheritance behavior

2012-05-30 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14965 ___ ___ Python-bugs-list mailing

[issue14972] listcomp with nested classes

2012-05-31 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14972 ___ ___ Python-bugs-list mailing

[issue15001] segmentation fault with del sys.module['__main__']

2012-06-04 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15001 ___ ___ Python-bugs-list mailing

[issue15061] hmac.secure_compare() leaks information about length of strings

2012-06-19 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15061 ___ ___ Python-bugs-list mailing

[issue15391] Add bitlength function to the math module

2012-07-18 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: I think what you're looking for already exists: http://docs.python.org/dev/library/stdtypes.html#int.bit_length -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue15503] concatenating string in dict unexpected performance

2012-07-30 Thread Alex Gaynor
Alex Gaynor added the comment: Actually, I would argue that it's concatentation of a local variable which has unexpected performance. Logically it should be O(n**2), however due to hacks in CPython it isn't. -- nosy: +alex ___ Python tracker rep

[issue8847] crash appending list and namedtuple

2012-07-30 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8847 ___ ___ Python-bugs-list mailing

[issue15540] Python 3.3 and numpy

2012-08-02 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15540 ___ ___ Python-bugs-list mailing

[issue15551] Unit tests that return generators silently fail

2012-08-03 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15551 ___ ___ Python-bugs-list mailing

[issue15568] yield from missed StopIteration raised from iterator instead of getting value

2012-08-06 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15568 ___ ___ Python-bugs-list mailing

[issue13703] Hash collision security issue

2012-02-06 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: On Mon, Feb 6, 2012 at 4:41 PM, Marc-Andre Lemburg rep...@bugs.python.orgwrote: Marc-Andre Lemburg m...@egenix.com added the comment: Gregory P. Smith wrote: Gregory P. Smith g...@krypto.org added the comment: The release

[issue13703] Hash collision security issue

2012-02-06 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: On Mon, Feb 6, 2012 at 5:04 PM, Marc-Andre Lemburg rep...@bugs.python.orgwrote: Marc-Andre Lemburg m...@egenix.com added the comment: Alex Gaynor wrote: Can't randomization just be applied to integers as well? A simple seed xor'ed

[issue14010] deeply nested filter segfaults

2012-02-14 Thread Alex Gaynor
New submission from Alex Gaynor alex.gay...@gmail.com: http://paste.pocoo.org/show/550884/ will reliably segfault Python3 on all platforms (similar versions for Python2 using itertools work) -- components: Interpreter Core messages: 153344 nosy: alex, benjamin.peterson priority: normal

[issue14051] Cannot set attributes on staticmethod

2012-02-18 Thread Alex Gaynor
New submission from Alex Gaynor alex.gay...@gmail.com: This is inconsistant with regular functions, which unfortunately prevents them from being used interchangeably. -- messages: 153649 nosy: alex priority: normal severity: normal status: open title: Cannot set attributes

[issue2377] Replace __import__ w/ importlib.__import__

2012-02-24 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2377 ___ ___ Python-bugs-list mailing

[issue14126] Speed up list comprehensions by preallocating the list where possible

2012-02-25 Thread Alex Gaynor
New submission from Alex Gaynor alex.gay...@gmail.com: This adds a new opcode which for certain list comprehensions (ones with no if statements and only a single comprehension), preallocates the list to the appropriate size. Patch is against 2.7, because it was a bit easier. On: def f

[issue14212] Segfault when using re.finditer over mmap

2012-03-07 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14212 ___ ___ Python-bugs-list mailing

[issue13797] Allow objects implemented in pure Python to export PEP 3118 buffers

2012-03-20 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: FWIW pypy has an __buffer__ method (used exclusively internally, AFAIK), which has semantics similar to your first proposal. -- nosy: +alex ___ Python tracker rep...@bugs.python.org http

[issue14544] Limit global keyword name conflicts in language spec to those enforced by CPython

2012-04-10 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: This shouldn't be a problem for PyPy, in fact I'm almost positive that we implement this already (since Django has a test that uses this feature). If/when the spec is changed please make sure there are tests for all these cases so we *know

[issue18530] posixpath.ismount performs extra lstat calls

2013-07-22 Thread Alex Gaynor
New submission from Alex Gaynor: Right now it calls islink(), which does an lstat, and then does its own lstat on the same path. This can be optimized by inlining the body of islink and reusing the stat result. (This has been identified as an actual issue in openstack-swift https

[issue18530] posixpath.ismount performs extra lstat calls

2013-07-22 Thread Alex Gaynor
Alex Gaynor added the comment: Attached is a simple first pass at a diff against 2.7, shoudl be easy to port it to default. -- keywords: +patch Added file: http://bugs.python.org/file31010/ismount.diff ___ Python tracker rep...@bugs.python.org http

[issue18530] posixpath.ismount performs extra lstat calls

2013-07-22 Thread Alex Gaynor
Alex Gaynor added the comment: Addresses the review comments: returns to catching all oserrors -- Added file: http://bugs.python.org/file31011/ismount.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18530

[issue18530] posixpath.ismount performs extra lstat calls

2013-07-22 Thread Alex Gaynor
Alex Gaynor added the comment: Attached patch is against default. I don't have my ssh keys set up for this machine, so if someone else could land I'd be appreciative :) (Not sure if this qualifies for a backport) -- Added file: http://bugs.python.org/file31012/ismount-3k.diff

[issue18531] Undocumented different between METH_KEYWORDS and **kws

2013-07-22 Thread Alex Gaynor
Alex Gaynor added the comment: I'll confirm that PyPy raises a KeyError on the format() code. -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18531

[issue18719] Remove false optimizaton for equality comparison of hashed strings

2013-08-12 Thread Alex Gaynor
Alex Gaynor added the comment: does this show demonstrable results (in either direction) on stringbench or the benchmarks repo? -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18719

[issue18719] Remove false optimizaton for equality comparison of hashed strings

2013-08-12 Thread Alex Gaynor
Alex Gaynor added the comment: The statistic that htis is *never* hit across a large python program is great evidence that this isn't useful. +1 on removing from me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18719

[issue18756] os.urandom() fails under high load

2013-08-16 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18756 ___ ___ Python-bugs-list mailing

[issue18788] Proof of concept: implicit call syntax

2013-08-20 Thread Alex Gaynor
Alex Gaynor added the comment: I suppose I'm one of the more qualified people to comment on how Ruby does it: a mess of hacks in the lexer/parser. Ruby's case is complicated by the fact that a bare `foo` can either be a local variable or a method call on self. Consider the case `a +b`, should

  1   2   3   4   5   >