Martin Morrison added the comment:
The proposed patch does stop requiring the leading <~, but still trims the
first two characters off the data set. This will no doubt fail in cases where
there is no leading marker.
I think it will need to explicitly handle the case where the leading mar
New submission from Martin Morrison:
Minimal testcase of the problem situation is tokenising (with posix mode on):
''),
Specifically, an empty string, followed by a non-word character, followed by a
non-space character. In this case, the token buffer is empty and due to a
missing check
Changes by Martin Morrison m...@ensoft.co.uk:
Added file: http://bugs.python.org/file35984/shlex.2.7.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21999
Changes by Martin Morrison m...@ensoft.co.uk:
--
nosy: +isoschiz, pconnell
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17950
___
___
Python-bugs
Martin Morrison added the comment:
The latest diff (cellfree4.diff) applies correctly to 3.3 (one hunk fails, but
it's just the one where you've removed a blank line).
The tests also pass successfully with the diff applied.
--
___
Python tracker
Martin Morrison added the comment:
Our usage of Python would certainly benefit from the backport.
We are embedding Python 3.3 in a system with requirements that lead us to
disable the gc in most cases, so cycles are an obvious problem for us. Cycles
created inadvertently
Changes by Martin Morrison m...@ensoft.co.uk:
--
nosy: +isoschiz
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7475
___
___
Python-bugs-list
Changes by Martin Morrison m...@ensoft.co.uk:
--
nosy: +isoschiz
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17170
___
___
Python-bugs-list
Changes by Martin Morrison m...@ensoft.co.uk:
--
nosy: +isoschiz, pconnell
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13533
___
___
Python-bugs
Changes by Martin Morrison m...@ensoft.co.uk:
--
nosy: +isoschiz
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16427
___
___
Python-bugs-list
Changes by Martin Morrison m...@ensoft.co.uk:
--
nosy: +isoschiz, pconnell
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9141
___
___
Python-bugs
Changes by Martin Morrison m...@ensoft.co.uk:
--
nosy: +isoschiz, pconnell
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1195571
___
___
Python
Martin Morrison added the comment:
Attached another diff, which includes new test cases to cover all functions
that weren't covered before - expect print_last. I couldn't see a way of
getting sys.last_* set to test that function (it seems to require an unhandled
exception). However
Martin Morrison added the comment:
On 21 Apr 2013, at 17:38, Serhiy Storchaka rep...@bugs.python.org wrote:
Serhiy Storchaka added the comment:
As for interface, I think 'adobe' flag should be false by default. It makes
encoder simpler. ascii85 encoder in Go's standard library doesn't wrap
Changes by Martin Morrison m...@ensoft.co.uk:
--
nosy: +isoschiz, pconnell
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1635741
___
___
Python
Changes by Martin Morrison m...@ensoft.co.uk:
--
nosy: +isoschiz, pconnell
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17408
___
___
Python-bugs
Changes by Martin Morrison m...@ensoft.co.uk:
--
nosy: +isoschiz
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9634
___
___
Python-bugs-list
Changes by Martin Morrison m...@ensoft.co.uk:
--
nosy: +isoschiz
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14531
___
___
Python-bugs-list
Changes by Martin Morrison m...@ensoft.co.uk:
--
nosy: +isoschiz, pconnell
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14621
___
___
Python-bugs
Martin Morrison added the comment:
On 20/04/2013 03:54, Benjamin Peterson wrote:
It would be great to have a test for that. :)
I was afraid you'd say that. ;-)
I'll look at adding test cases to cover the functions not currently
covered (seems most of the print functions aren't, and all
Changes by Martin Morrison m...@ensoft.co.uk:
--
nosy: +isoschiz
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17800
___
___
Python-bugs-list
Martin Morrison added the comment:
On 20 Apr 2013, at 18:55, Serhiy Storchaka rep...@bugs.python.org wrote:
Serhiy Storchaka added the comment:
Could print_exception() in Lib/idlelib/run.py reuse new traceback functions?
Actually, cleaning up code like that in Idle and the code module
Martin Morrison added the comment:
I like the idea of this. Two comments:
- I'm no expert on the C API, but in s_iter_unpack do you not need to check for
failure of PyType_GenericAlloc before calling PyObject_GetBuffer?
- I'm not a fan of separate iter_ functions (and there seemed
Martin Morrison added the comment:
On 20 Apr 2013, at 23:01, Martin Morrison rep...@bugs.python.org wrote:
- I'm not a fan of separate iter_ functions (and there seemed to be a general
move away from them elsewhere in Python3; obviously here we have to maintain
backwards compat though
Changes by Martin Morrison m...@ensoft.co.uk:
--
nosy: +pconnell
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17468
___
___
Python-bugs-list
Martin Morrison added the comment:
How embarrassing - I guess that'll teach me to try to doctor the diff file. :-)
I've now regenerated the diff, and re-run all the testing, etc. Apologies for
the churn.
--
Added file: http://bugs.python.org/file29943/issue17646-3.diff
Changes by Martin Morrison m...@ensoft.co.uk:
--
nosy: +isoschiz
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11549
___
___
Python-bugs-list
Changes by Martin Morrison m...@ensoft.co.uk:
--
nosy: +isoschiz
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16741
___
___
Python-bugs-list
Changes by Martin Morrison m...@ensoft.co.uk:
--
nosy: +isoschiz
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12535
___
___
Python-bugs-list
Changes by Martin Morrison m...@ensoft.co.uk:
--
nosy: +isoschiz
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14805
___
___
Python-bugs-list
Martin Morrison added the comment:
print_tb() wasn't passing the file argument through to print_list() - now
fixed. I also verified none of the other functions had a similar bug.
--
Added file: http://bugs.python.org/file29944/issue17646-4.diff
Martin Morrison added the comment:
Latest upload has all of the agreed markups from the review.
--
Added file: http://bugs.python.org/file29929/issue17646-2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17646
Martin Morrison added the comment:
Raised http://bz.selenic.com/show_bug.cgi?id=3894 against Mercurial for them to
workaround issue14596.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17618
Martin Morrison added the comment:
Attached a minor tweak over the last diff - I'd forgotten to fix the Struct
handling inside the Mercurial implementation as well.
All other comments still apply to this diff.
--
Added file: http://bugs.python.org/file29930/issue17618-5.diff
Changes by Martin Morrison m...@ensoft.co.uk:
--
nosy: +isoschiz
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17468
___
___
Python-bugs-list
Martin Morrison added the comment:
Attached patch does exactly as described. Seems to be unused, and still passes
all pydoc tests.
--
keywords: +patch
nosy: +isoschiz
Added file: http://bugs.python.org/file29932/issue11182.diff
___
Python tracker
Changes by Martin Morrison m...@ensoft.co.uk:
Removed file: http://bugs.python.org/file29929/issue17646-2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17646
Martin Morrison added the comment:
Sorry, that is an unrelated change I was experimenting with, which I
accidentally forgot to take out.
Please see the new uploaded diff.
--
Added file: http://bugs.python.org/file29933/issue17646-2.diff
___
Python
Martin Morrison added the comment:
I threw together a function that implements this. The only variation from the
proposed signature was adding the onerror argument supported by the other
similar functions in the module.
--
keywords: +patch
nosy: +isoschiz
Added file: http
Changes by Martin Morrison m...@ensoft.co.uk:
--
nosy: +isoschiz
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3693
___
___
Python-bugs-list
Martin Morrison added the comment:
This is still an issue today:
import re
[m.groups() for m in re.finditer(r'(^z*)|(\w+)', 'abc')]
[('', None), (None, 'bc')]
--
nosy: +isoschiz
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Martin Morrison added the comment:
Using a trick with struct.unpack() has very unpleasant side effect.
It might be a few speed up encoding, but creates the Struct object
with the size is many times larger than the size of the processed
data. Worse, this object is cached and continues
Martin Morrison added the comment:
Can you elaborate on this? What leakage is there? I assume this is some
implementation quirk of the struct module that I'm not aware of.
issue14596.
Thanks for the pointer. I will rework the patch for the encoder/decoders
to use an explicit Struct so
Martin Morrison added the comment:
New diff. Changes from the last one:
- change in struct handling to avoid issue14596
- Addition of btoa85 and atob85 functions that do legacy 'btoa'
encoding/decoding. These are just wrappers around a85(en|de)code, which now
have additional keyword args
Martin Morrison added the comment:
I've updated the Ascii85 algorithms to remove the quadratic complexity, and use
a single struct.pack/unpack. They should now be much quicker for large input
strings.
It's difficult to factor out commonality with b85* because the encodings and
rules differ
Martin Morrison added the comment:
Ok, great. I'll update the patch to include both encoding schemes.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17618
Martin Morrison added the comment:
Updated patch that includes both my original implementation of Ascii85, as well
as the Mercurial implementation of base85. A few notes/questions:
- I named the Mercurial base85 implementation functions with the b85 prefix.
For the Ascii85 ones, I used a85. I
Changes by Martin Morrison m...@ensoft.co.uk:
--
nosy: +isoschiz
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17636
___
___
Python-bugs-list
Martin Morrison added the comment:
I wrote an implementation from scratch (based on the wikipedia article; I've
not looked at any existing implementations) in pure Python in the attached
diff. It includes tests.
Feel free to use it as the pure Python implementation if desired, though I
won't
Martin Morrison added the comment:
(sorry for spam)
Forgot to mention, I included an optional keyword argument to support the
'btoa' shortcut for sequences of space characters as described in the Wikipedia
article. However, I'm unsure if any other implementation supports this, so
might
Martin Morrison added the comment:
Ok, having now looked at mercurial's implementation... it looks like they
implemented the RFC1924 version, whereas my implementation is the Ascii85
version (and I verified it against, amongst others:
http://www.tools4noobs.com/online_tools/ascii85_encode
Martin Morrison added the comment:
Ok, I'm not even sure that Mercurial follows RFC1924! That RFC is specifically
for encoding IPv6 addresses, and mandates that the calculations be performed on
a 128bit integer.
The Mercurial implementation seems to follow the Ascii85 policy of taking each
4
New submission from Martin Morrison:
traceback.py contains a lot of code duplication, which makes it fragile in the
face of changes (i.e. special cases) to the stack/traceback output (I am
separately working on just such a change).
The attached patch refactors the code to reduce to a single
Martin Morrison added the comment:
I hadn't spotted that one!
My refactor goes further (consolidates all duplicates, not just the tb ones),
is implemented the way you suggested therein (print in terms of extract), and
is more efficient in that it uses generators for all intermediate iterators
Changes by Martin Morrison m...@ensoft.co.uk:
--
nosy: +isoschiz
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14905
___
___
Python-bugs-list
Martin Morrison martin.morri...@gmail.com added the comment:
This solution has some very undesirable properties - namely that Mar 1st is now
less than Feb 29th!
It seems like the correct follow up fix would be to adjust the date of the
returned struct_time back to 1900. The struct_time object
New submission from Martin Morrison martin.morri...@gmail.com:
time.strptime without a year fails on Feb 29 with:
time.strptime(Feb 29, %b %d)
Traceback (most recent call last):
File stdin, line 1, in module
File /usr/lib/python2.6/_strptime.py, line 454, in _strptime_time
return
57 matches
Mail list logo