[issue9930] Incorrect semantics of __radd__ method for builtin types

2010-09-23 Thread Mark Shannon
New submission from Mark Shannon ma...@dcs.gla.ac.uk: Attached program fails. See comments in file for details and possible diagnosis -- files: binary_op_mimic.py messages: 117216 nosy: Mark.Shannon priority: normal severity: normal status: open title: Incorrect semantics of __radd__

[issue12149] Segfault in _PyObject_GenericGetAttrWithDict

2011-12-14 Thread Mark Shannon
Mark Shannon ma...@dcs.gla.ac.uk added the comment: Please reopen this bug as the fix is wrong. This fix merely hides the symptoms of _PyType_Lookup returning a dead object, by calling PyType_Modified() frequently, thus ensuring the type method cache is almost always invalidated. This results

[issue12149] Segfault in _PyObject_GenericGetAttrWithDict

2011-12-15 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Absolutely. subtype_dealloc deals with deallocation of subtype *instances*, not the types themselves. Maybe we can try and explore the reference graph again? This sort of thing is one of the reasons that the cycle GC does not call any

[issue12149] Segfault in _PyObject_GenericGetAttrWithDict

2011-12-15 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: What's happening is that the cycle GC calls type_clear to clear the type, but the method-cache is not invalidated. I have added a call to PyType_Modified in type_clear (as well as type_set_name and type_set_qualname, which also modify the type

[issue12149] Segfault in _PyObject_GenericGetAttrWithDict

2011-12-15 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Beat me to it, Antoine! Don't forget type_set_name and type_set_qualname. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12149

[issue12149] Segfault in _PyObject_GenericGetAttrWithDict

2011-12-15 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Antoine Pitrou wrote: Antoine Pitrou pit...@free.fr added the comment: I have added a call to PyType_Modified in type_clear (as well as type_set_name and type_set_qualname, which also modify the type). Can __name__ and __qualname__ be looked

[issue13606] test_clear_dict_in_ref_cycle in test_module only works by coincidence

2011-12-15 Thread Mark Shannon
New submission from Mark Shannon m...@hotpy.org: test_clear_dict_in_ref_cycle in test_module only works by coincidence, if the name of the variable on line 77 is changed from 'a' to 'x', then the test fails. This is a result of the arbitrary ordering of removals of values from a modules

[issue13703] Hash collision security issue

2012-01-04 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: -- nosy: +Mark.Shannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13703 ___ ___ Python-bugs-list

[issue13703] Hash collision security issue

2012-01-05 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: What is the mechanism by which the attacker can determine the seeds? The actual hash value is not directly observable externally. The attacker can only determine the timing effects of multiple insertions into a dict, or have I missed something

[issue13703] Hash collision security issue

2012-01-05 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: But that's not the issue we are supposed to be dealing with. A single (genuinely random) seed will deal with the attack described in the talk and it is (almost) as fast as using 0 as a seed. Why make things complicated dealing with a hypothetical

[issue13703] Hash collision security issue

2012-01-06 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: I agree. +1 for strings. -0 for numbers. This might cause problems with dict subclasses and the like, so I'm -1 on this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13703

[issue13703] Hash collision security issue

2012-01-06 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Without the context, that last message didn't make much sense. I agree with Terry that we should copy Perl and Ruby (for strings). I'm -1 on hash() returning a different value than dict uses internally

[issue13703] Hash collision security issue

2012-01-11 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: * the method would need to be implemented for all hashable Python types It was already discussed, and it was said that only hash(str) need to be modified. Really ? What about the much simpler attack on integer hash values ? You only have

[issue13897] Move fields relevant to coroutine/generators out of frame into generator/threadstate

2012-01-28 Thread Mark Shannon
New submission from Mark Shannon m...@hotpy.org: The frame object has a number of fields which belong to the generator object. By creating a CoState struct, these fields can be moved to generator/threadstate where they belong. The interpreter no longer has to swap around exception state

[issue13897] Move fields relevant to coroutine/generators out of frame into generator/threadstate

2012-01-29 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Amaury Forgeot d'Arc wrote: - Why is it called CoState? is it related to coroutines? Yes it is related to coroutines, threads and generators *are* (a limited form of) asymmetric coroutines, even if we don't usually think of them that way

[issue13897] Move fields relevant to coroutine/generators out of frame into generator/threadstate

2012-01-29 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Nick Coghlan wrote: Nick Coghlan ncogh...@gmail.com added the comment: The division of responsibilities between generator objects and the eval loop is currently a little messy. The eval loop deals almost entirely with frame objects and also

[issue13903] New shared-keys dictionary implementation

2012-01-29 Thread Mark Shannon
New submission from Mark Shannon m...@hotpy.org: The proposed dictionary implementation allows sharing of keys hashes between dictionaries. This leads to substantial memory savings for object-oriented programs. For non-OO programs the impact is negligible. -- components: Interpreter

[issue13903] New shared-keys dictionary implementation

2012-01-29 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: Added file: http://bugs.python.org/file24360/6a21f3b35e20.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13903

[issue13897] Move fields relevant to coroutine/generators out of frame into generator/threadstate

2012-01-29 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: The important part is not the change of name, but wrapping them in a struct which can be embedded in both PyThreadState and PyGenObject. The state-exc_XXX trio of values are the currently handled exception (sys.exc_info()) and are shadowed

[issue13907] test_pprint relies on set/dictionary repr() ordering

2012-01-29 Thread Mark Shannon
New submission from Mark Shannon m...@hotpy.org: The function test_set_reprs() includes the comment: Consequently, this test is fragile and implementation-dependent Changing the dictionary iteration ordering breaks it. -- components: Tests messages: 152272 nosy: Mark.Shannon priority

[issue13703] Hash collision security issue

2012-01-29 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Barry A. Warsaw wrote: Barry A. Warsaw ba...@python.org added the comment: On Jan 28, 2012, at 07:26 PM, Dave Malcolm wrote: This turns out to pass without PYTHONHASHRANDOMIZATION in the environment, and fail intermittently with it. Note

[issue13909] Ordering of free variables in dis is dependent on dict ordering.

2012-01-29 Thread Mark Shannon
New submission from Mark Shannon m...@hotpy.org: This only seems to apply to free variables, not local or cell variables. The offending tests are lines 429 430 of Lib/test/test_dis.py (tricky, code_info_tricky), (co_tricky_nested_f, code_info_tricky_nested_f), Changing

[issue13910] test_packaging is dependent on dict ordering.

2012-01-29 Thread Mark Shannon
New submission from Mark Shannon m...@hotpy.org: Changing PyDict_MINSIZE to 4 causes the following failure: python -m test.test_packaging ... Traceback (most recent call last): File /home/mark/python/cpython/Lib/runpy.py, line 160, in _run_module_as_main __main__, fname, loader, pkg_name

[issue13911] test_trace depends on dict repr() ordering

2012-01-29 Thread Mark Shannon
New submission from Mark Shannon m...@hotpy.org: Changing PyDict_MINSIZE to 4 causes the following failure python -m test.test_trace ... == ERROR: test_coverage (__main__.TestCoverage

[issue13903] New shared-keys dictionary implementation

2012-01-30 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Does this really need a PEP? There is no new language feature and no change to any API. It is just saving some memory. The only possible issue is changing dict repr() ordering, but issue 13703 will do that anyway

[issue13903] New shared-keys dictionary implementation

2012-01-31 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Raymond Hettinger wrote: Raymond Hettinger raymond.hettin...@gmail.com added the comment: Changing dictionaries is a big deal. You're changing many pieces at once (not a good idea) including changing tunable parameters that are well-studied

[issue16676] Segfault under Python 3.3 after PyType_GenericNew

2012-12-14 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: -- nosy: +Mark.Shannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16676 ___ ___ Python-bugs-list

[issue16956] Allow signed line number deltas in the code object's line number table

2013-01-13 Thread Mark Shannon
New submission from Mark Shannon: The restriction that line numbers must be monotonically increasing w.r.t bytecode offset in the co_lnotab array prevents a number of beneficial transformations in the bytecode compiler. This patch allows negative line number deltas and uses this capability

[issue16956] Allow signed line number deltas in the code object's line number table

2013-01-13 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: -- keywords: +patch Added file: http://bugs.python.org/file28718/dd04caae6647.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16956

[issue16956] Allow signed line number deltas in the code object's line number table

2013-01-15 Thread Mark Shannon
Mark Shannon added the comment: The interaction between bdb/pdb and the line number table is via the frame.f_lineno attribute. Allowing signed offsets changes the one-to-one line muber = bytecode offset relation into a one-to-many relation. Reading frame.f_lineno is not an issue as each

[issue17170] string method lookup is too slow

2013-02-28 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: -- nosy: +Mark.Shannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17170 ___ ___ Python-bugs-list

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

2012-05-27 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: -- nosy: +Mark.Shannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12370 ___ ___ Python-bugs-list

[issue15055] dictnotes.txt is out of date

2012-06-13 Thread Mark Shannon
New submission from Mark Shannon m...@hotpy.org: dictnotes.txt is out of date w.r.t. dictobject.c Remove notes from dictnotes.txt that duplicate comments in dictobject.c and ensure comments in dictobject.c cover all aspects of tunable parameters. Patch attached. -- assignee: docs

[issue15055] dictnotes.txt is out of date

2012-06-13 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Raymond, I don't think this is the place to discuss the changes to the tunables in dictobject.c. This patch merely ensures that dictnotes.txt and the comments in dictobject.c are in agreement. It doesn't change any code (apart from creating

[issue13783] Clean up PEP 380 C API additions

2012-06-13 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: There is one call to PyGen_FetchStopIterationValue in ceval.c. But I don't think it should be public. There is no real reason for the Gen in the name. The function is used by generator handling code, but the code itself relates to StopIteration

[issue15003] make PyNamespace_New() public

2012-06-24 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: -1 for the reasons Nick stated. -- nosy: +Mark.Shannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15003

[issue15055] dictnotes.txt is out of date

2012-06-24 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Is there any reason not to commit this patch? The docs are out of sync with the code and need to be updated. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15055

[issue15055] dictnotes.txt is out of date

2012-06-24 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: No apology needed :) Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15055 ___ ___ Python

[issue14241] io.UnsupportedOperation.__new__(io.UnsupportedOperation) fails

2012-07-07 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: io.UnsupportedOperation.__new__(io.UnsupportedOperation) behaves correctly now (rev d9c98730e2e8) This bug was (I believe) caused somehow by an error in OSError_new() which did not initialize self-args if OSError_init() was not called. Here

[issue15301] os.chown: OverflowError: Python int too large to convert to C long

2012-07-13 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Larry, you're the expert on this. Looks to me like the format character in PyArg_ParseTuple in posix_fchown and kin should be 'k' (unsigned long) rather than 'l' (signed long). -- nosy: +Mark.Shannon, larry type: - behavior

[issue5765] stack overflow evaluating eval(() * 30000)

2012-08-17 Thread Mark Shannon
Mark Shannon added the comment: I've re-reviewed Andrea's patch (I was looking over Andrea's shoulder at the EuroPython sprint when he wrote it). It looks good and applies cleanly. Could someone commit it please. -- nosy: +Mark.Shannon ___ Python

[issue13903] New shared-keys dictionary implementation

2012-02-06 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: -- hgrepos: -109 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13903 ___ ___ Python-bugs-list mailing

[issue13903] New shared-keys dictionary implementation

2012-02-08 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: -- hgrepos: +112 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13903 ___ ___ Python-bugs-list mailing list

[issue13903] New shared-keys dictionary implementation

2012-02-08 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: Added file: http://bugs.python.org/file24453/a9138aba7896.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13903

[issue13903] New shared-keys dictionary implementation

2012-02-08 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: Removed file: http://bugs.python.org/file24360/6a21f3b35e20.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13903

[issue13903] New shared-keys dictionary implementation

2012-02-08 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: Removed file: http://bugs.python.org/file24453/a9138aba7896.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13903

[issue13903] New shared-keys dictionary implementation

2012-02-08 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: Added file: http://bugs.python.org/file24454/1f703b2607af.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13903

[issue13903] New shared-keys dictionary implementation

2012-02-08 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Antoine Pitrou wrote: Antoine Pitrou pit...@free.fr added the comment: Looking at your latest patch, I worry about any deletion +(including pop popitem) causes a split table to become a combined table. Why wouldn't you use a dummy pointer

[issue13903] New shared-keys dictionary implementation

2012-02-08 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: Removed file: http://bugs.python.org/file24454/1f703b2607af.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13903

[issue13903] New shared-keys dictionary implementation

2012-02-08 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: Added file: http://bugs.python.org/file24455/bc286099ce9a.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13903

[issue13903] New shared-keys dictionary implementation

2012-02-08 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: Removed file: http://bugs.python.org/file24455/bc286099ce9a.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13903

[issue13903] New shared-keys dictionary implementation

2012-02-08 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: Added file: http://bugs.python.org/file24456/20702d1acf17.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13903

[issue13970] frameobject should not have f_yieldfrom attribute

2012-02-08 Thread Mark Shannon
New submission from Mark Shannon m...@hotpy.org: The f_yieldfrom field should not be visible at Python level, it is an internal implementation detail. Patch attached. -- files: remove_f_yieldfrom.patch keywords: patch messages: 152895 nosy: Mark.Shannon priority: normal severity

[issue13911] test_trace depends on dict repr() ordering

2012-02-08 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Failure occurs in test_pprint which is covered by issue 13907 -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13911

[issue13903] New shared-keys dictionary implementation

2012-02-09 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: Added file: http://bugs.python.org/file24465/e50db1b7ad7b.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13903

[issue13903] New shared-keys dictionary implementation

2012-02-09 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: Removed file: http://bugs.python.org/file24456/20702d1acf17.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13903

[issue13897] Move fields relevant to sys.exc_info out of frame into generator/threadstate

2012-02-13 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: This issue was too broad. The new patch is focussed on sys.exc_info. All hints of coroutines have been removed and f_yieldfrom is untouched. New patch reduces code by 65 lines and does not conflict with issue 13607. -- title: Move fields

[issue13897] Move fields relevant to sys.exc_info out of frame into generator/threadstate

2012-02-13 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: Removed file: http://bugs.python.org/file24350/coro.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13897

[issue13607] Move generator specific sections out of ceval.

2012-02-13 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Why do the codes used internally by ceval have to be the same as those made public? Have you considered returning the exit code directly, rather than adding another field to frameobject? yieldfrom can be handled in a similar way to yield

[issue13903] New shared-keys dictionary implementation

2012-02-13 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: Added file: http://bugs.python.org/file24510/691ce331f955.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13903

[issue13903] New shared-keys dictionary implementation

2012-02-13 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: Removed file: http://bugs.python.org/file24465/e50db1b7ad7b.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13903

[issue13909] Ordering of free variables in dis is dependent on dict ordering.

2012-02-24 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Fixed by revisions 224ebf9d428a and 38828f0c9312 -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13909

[issue13903] New shared-keys dictionary implementation

2012-02-28 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: Added file: http://bugs.python.org/file24670/49b7e7e4a27c.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13903

[issue13903] New shared-keys dictionary implementation

2012-02-29 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Jim Jewett wrote: Jim Jewett jimjjew...@gmail.com added the comment: As of Feb 28, 2012, the PEP mentions an additional optimization of storing the values in an array indexed by (effectively) key insertion order, rather than key position

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

2012-03-03 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Could you run the benchamrks at http://hg.python.org/benchmarks/ and report the results, for 3.3 (rather than 2.7), please? Adding a new bytecode because it speeds up one 4 line program does not seem such a good idea. -- nosy

[issue14205] Raise an error if a dict is modified during a lookup

2012-03-05 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: I much prefer dict_lookup.patch to nomodify.patch. It doesn't increase the memory use of dict. One extra word per dict could be a lot of memory for a large application. There is a very subtle semantic change, but I think it is a positive one

[issue14199] Keep a refence to mro in _PyType_Lookup() and super_getattro()

2012-03-05 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Looks good to me. The INCREF/DECREFs are outside of the loops so will have negligible performance impact. -- nosy: +Mark.Shannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue14205] Raise an error if a dict is modified during a lookup

2012-03-06 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Jim Jewett wrote: Jim Jewett jimjjew...@gmail.com added the comment: Can't this be triggered by non-malicious code that just happened to have a python comparison and get hit with a thread switch? So, they are writing to a dict in one thread

[issue13897] Move fields relevant to sys.exc_info out of frame into generator/threadstate

2012-03-07 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Jim Jewett wrote: http://bugs.python.org/review/13897/diff/4186/14521 File Python/sysmodule.c (right): http://bugs.python.org/review/13897/diff/4186/14521#newcode211 Python/sysmodule.c:211: while ((exc_info-exc_type == NULL || exc_info

[issue14230] Delegating generator is not always visible to debugging tools such as inspect pdb

2012-03-08 Thread Mark Shannon
New submission from Mark Shannon m...@hotpy.org: Delegating generators do not show always up in stack traces, such as inspect.stack(). The show up during the first delegation, but not thereafter. I have attached a patch. It alters the way the YIELD_FROM bytecode works; it loops back on itself

[issue14220] yield from kills generator on re-entry

2012-03-08 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: I've just added issue 14230 which overlaps with this issue somewhat. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14220

[issue14205] Raise an error if a dict is modified during a lookup

2012-03-09 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Unmodified CPython (without the patch) already passes the new test in the patch. The unmodified code already raises a Runtime error; a recursion limit exceeded error! -- ___ Python tracker rep

[issue14239] Uninitialised variable in _PyObject_GenericSetAttrWithDict

2012-03-09 Thread Mark Shannon
New submission from Mark Shannon m...@hotpy.org: I get the following compiler warning (rev 2a142141e5fd) Its not strictly an error, but an unitialised variable in such an important function is dangerous. Objects/object.c: In function ‘_PyObject_GenericSetAttrWithDict’: Objects/object.c:1144

[issue13903] New shared-keys dictionary implementation

2012-03-09 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: Added file: http://bugs.python.org/file24766/257e16e71654.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13903

[issue14241] io.UnsupportedOperation.__new__(io.UnsupportedOperation) fails

2012-03-09 Thread Mark Shannon
New submission from Mark Shannon m...@hotpy.org: io.UnsupportedOperation.__new__(io.UnsupportedOperation) Traceback (most recent call last): File stdin, line 1, in module TypeError: ValueError.__new__(UnsupportedOperation) is not safe, use OSError.__new__() Looking at the mro

[issue14205] Raise an error if a dict is modified during a lookup

2012-03-09 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: STINNER Victor wrote: STINNER Victor victor.stin...@gmail.com added the comment: Guido Given all this I think we should keep it as you have committed Guido and add it to the docs and whatsnew. I updated What's New in Python 3.3 document. I

[issue8743] set() operators don't work with collections.Set instances

2012-03-14 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Review of set-with-Set.patch: Looks good overall. I agree that restricting operations to instances of Set rather than Iterable is correct. Implementing __rsub__ in terms of - (subtraction) means that infinite recursion is a possibility. It also

[issue14230] Delegating generator is not always visible to debugging tools such as inspect pdb

2012-03-15 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Updated Patch -- Added file: http://bugs.python.org/file24870/yieldfrom.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14230

[issue14230] Delegating generator is not always visible to debugging tools such as inspect pdb

2012-03-15 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: Removed file: http://bugs.python.org/file24759/yieldfrom.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14230

[issue14230] Delegating generator is not always visible to debugging tools such as inspect pdb

2012-03-15 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Could you try this new patch (with white space changes included)? -- Added file: http://bugs.python.org/file24872/yieldfrom.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue14230] Delegating generator is not always visible to debugging tools such as inspect pdb

2012-03-16 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: The magic number has not been updated Patch attached. -- Added file: http://bugs.python.org/file24889/magic.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14230

[issue13903] New shared-keys dictionary implementation

2012-04-02 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: Added file: http://bugs.python.org/file25096/372d0bca85ae.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13903

[issue13903] New shared-keys dictionary implementation

2012-04-02 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: I'm not bothered by the regression in silent_logging, as it is a micro benchmark with a very short running time. The regression in mako is, I think, caused by competition for the data cache between the new dict implementation and the method-cache

[issue13903] New shared-keys dictionary implementation

2012-04-04 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Antoine Pitrou wrote: Antoine Pitrou pit...@free.fr added the comment: I'm not bothered by the regression in silent_logging, as it is a micro benchmark with a very short running time. I'm not concerned about the micro-benchmark itself

[issue13903] New shared-keys dictionary implementation

2012-04-06 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: How about changing the method-cache size in a separate patch? On my machine, reducing the method-cache size from 2**10 to 2**9 results in a very small improvement in performance (with the original dict). That way we don't get a performance

[issue13897] Move fields relevant to sys.exc_info out of frame into generator/threadstate

2012-04-09 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: 3rd party code should not be accessing fields in the threadstate object, but without the accessors proposed in issue 14098 there may be no alternative. Once the patch for issue 14098 has been applied it, would it then be acceptable to remove

[issue14432] Bug in generator if the generator in created in a C thread

2012-04-11 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Rather than ensuring that f_tstate always points to the current frame, just remove it altogether. Patch attached -- nosy: +Mark.Shannon Added file: http://bugs.python.org/file25176/remove_f_tstate.patch

[issue13897] Move fields relevant to sys.exc_info out of frame into generator/threadstate

2012-04-11 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: According to PEP 384 (Defining a Stable ABI) the thread state object is opaque, so we should be free to add or remove fields. Nevertheless, I have added a new patch that simply moves the f_exc... fields from the frame object to the generator

[issue13903] New shared-keys dictionary implementation

2012-04-11 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: I don't really understand your objection to changing the method-cache size. As I said, I can remove the change, but that will cause the performance regression that Antoine noticed. -- ___ Python

[issue13903] New shared-keys dictionary implementation

2012-04-23 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: Added file: http://bugs.python.org/file25313/73423916a242.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13903

[issue13903] New shared-keys dictionary implementation

2012-04-23 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: I've updated the repository and uploaded a new patch in response to Benjamin's review. (And the contributor form is in the post). One remaining issue is the return value of __sizeof__(). If it is an int, then it cannot accurately reflect

[issue13903] New shared-keys dictionary implementation

2012-04-23 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: I fixed it back then, but didn't add the test. It subsequently regressed. Should know better. Patch (with test this time) attached. -- resolution: fixed - status: closed - open Added file: http://bugs.python.org/file25318

[issue13903] New shared-keys dictionary implementation

2012-04-24 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Failing to maintain GC tracking in setdefault and copy (for split-tables) Patch attached -- Added file: http://bugs.python.org/file25339/gc_tracking.patch ___ Python tracker rep...@bugs.python.org http

[issue14658] Overwriting dict.__getattr__ is inconsistent

2012-04-24 Thread Mark Shannon
Changes by Mark Shannon m...@hotpy.org: -- nosy: +Mark.Shannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14658 ___ ___ Python-bugs-list

[issue13903] New shared-keys dictionary implementation

2012-04-24 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Failed to differentiate between failure and error in make_split_table(). Patch attached -- Added file: http://bugs.python.org/file25340/make_split_table_error.patch ___ Python tracker rep

[issue13903] New shared-keys dictionary implementation

2012-04-27 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Decref cached-keys when type is deallocated. Patch attached. -- Added file: http://bugs.python.org/file25381/cached_keys.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13903

[issue13903] New shared-keys dictionary implementation

2012-04-30 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Change insertdict to follow normal (non-stealing) ref-counting behaviour which fixes possible leakage. Patch attached. -- Added file: http://bugs.python.org/file25422/insertdict.patch ___ Python

[issue14699] Calling a classmethod_descriptor directly raises a TypeError for wrong number of parameters.

2012-04-30 Thread Mark Shannon
New submission from Mark Shannon m...@hotpy.org: classmethod_descriptor should either be uncallable or (better) accept the correct number of arguments. The classmethod_descriptor can be regarded as the Python object corresponding directly to the underlying C function, as well as a descriptor

[issue14699] Calling a classmethod_descriptor directly raises a TypeError for wrong number of parameters.

2012-05-01 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: New patch in response to review. -- Added file: http://bugs.python.org/file25431/classmethoddescr_call.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14699

[issue12660] test_gdb fails when installed

2012-05-06 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: python-gdb.py was modified for the new dictionary implementation. Can you check that your 3.3 installation isn't using an earlier version of python-gdb.py? -- nosy: +Mark.Shannon ___ Python tracker rep

  1   2   3   4   5   6   7   8   9   10   >