Robert Collins added the comment:
LGTM please commit.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22903
___
___
Python-bugs-list mailing list
Robert Collins added the comment:
That should be straightforward - its just sequence suffix/prefix overlap
detection, and FrameSummary (unlike frames) can be compared with ==. So yes, I
think it makes it easier. It's not on my immediate itch-scratching though, but
if someone were to poke
Robert Collins added the comment:
I think for PyPI its actually important here - the JIT'd state of the code is
essentially global state being mutated - you can't assess how fast the code is
without first warming up the JIT, and if it warms up half way through your
fastest run, you're still
Changes by Robert Collins robe...@robertcollins.net:
--
nosy: +rbcollins
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23183
___
___
Python-bugs
Changes by Robert Collins robe...@robertcollins.net:
--
nosy: +rbcollins
resolution: - fixed
stage: patch review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18983
Robert Collins added the comment:
Here is a patch with some prose - feedback appreciated!
--
keywords: +patch
Added file: http://bugs.python.org/file38531/issue-23183-1.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23183
Changes by Robert Collins robe...@robertcollins.net:
--
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23183
___
___
Python
Changes by Robert Collins robe...@robertcollins.net:
--
nosy: +rbcollins
stage: needs patch - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6422
Robert Collins added the comment:
Reviewed on rietvald.
--
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23552
Robert Collins added the comment:
I'm confused by the feedback on the patch. It adds a single new function,
doesn't alter the public interface for any existing functions, and seems fit
for purpose. Could someone help me understand how its deficient
Changes by Robert Collins robe...@robertcollins.net:
--
nosy: +rbcollins
title: Enhancement for timeit: measure time to run blocks of code using 'with'
- context manager for measuring duration of blocks of code
___
Python tracker rep
Robert Collins added the comment:
bah, nevermind - I failed to get that setup is called once per loop regardless
- I might consider this a doc issue, or perhaps I was just fuzzy brained.
--
resolution: - not a bug
status: open - closed
___
Python
Robert Collins added the comment:
Filed #23693 for the accuracy thing.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6422
___
___
Python-bugs
New submission from Robert Collins:
In #6422 Haypo suggested making the timeit reports much better. This is a new
ticket just for that. See
https://bitbucket.org/haypo/misc/src/tip/python/benchmark.py and
http://bugs.python.org/issue6422?@ok_message=issue%206422%20nosy%2C%20nosy_count%2C
Robert Collins added the comment:
Closing, though ideally Terry can confirm it is fully fixed for him.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23631
New submission from Robert Collins:
I was timing some cold-cache operations today and had to not use timeit because
I wanted to run some code between statement (flushing caches) that shouldn't be
timed as part of statement. It would be nice, similarly to -s, to be able to
say -i 'something
Robert Collins added the comment:
Regression fixed AFAICT, please re-open if not.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17911
Robert Collins added the comment:
Test looks good to me. Do you want to apply it?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21112
Robert Collins added the comment:
Looking at the regression now.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17911
___
___
Python-bugs-list
Robert Collins added the comment:
Oh, it may be clear to everyone already but its perhaps worth noting: there are
two ways the cache can skew.
(older source): We may have a newer file compiled and in use and the older
source in the cache.
e.g. someone calls linecache.getlines(foo.py
Robert Collins added the comment:
Oh, meant to add - we could just call logging.warning or something.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8087
Changes by Robert Collins robe...@robertcollins.net:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23585
Robert Collins added the comment:
I suspect that this is due to a list being passed in that wasn't created by
traceback, in the older tuple-only format. That was meant to work, but possibly
is being short circuited somewhere. Shall fix asap
Robert Collins added the comment:
Ah, idle is being somewhat naughty. It's taking the original traceback and then
mangling the contents in-place, which is preserving the type information, and
throwing off StackSummary.from_list. We can and should make the new code deal
with this in case other
Robert Collins added the comment:
And here is a patch, since this is a regression I'll apply it tomorrow (or
sooner if it gets reviews :))
--
keywords: +patch
Added file: http://bugs.python.org/file38503/issue-23631-1.patch
___
Python tracker rep
Changes by Robert Collins robe...@robertcollins.net:
--
stage: - needs patch
type: - crash
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23310
Changes by Robert Collins robe...@robertcollins.net:
--
type: crash - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23310
___
___
Python
Robert Collins added the comment:
Fixed (patch referenced 22936)
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22937
Robert Collins added the comment:
Storing a marker in module objects which can be used to validate the linecache
is a good idea. timestamp isn't appropriate because of modules loaded from zips
or dynamic generation. I'd suggest we make it something opaque - we get source
code by asking
Robert Collins added the comment:
And the unittest patch.
--
Added file: http://bugs.python.org/file38348/issue-22936-5.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22936
Changes by Robert Collins robe...@robertcollins.net:
Added file: http://bugs.python.org/file38349/issue-22936-5.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22936
Robert Collins added the comment:
No worries. BTW there is one more patch needed to close this issue - adding the
feature to unittest. I'm working that up now.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22936
Changes by Robert Collins robe...@robertcollins.net:
Removed file: http://bugs.python.org/file38348/issue-22936-5.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22936
Robert Collins added the comment:
Yes, for debugging etc this can be very useful. I suggest further extending the
new traceback interface to allow a filtering/transform hook of some sort, to
allow folk more granular control than just repr overloading.
--
nosy: +rbcollins
Robert Collins added the comment:
Ok, cgitb - its passing a string instead of an exception type into
format_exception - something that was never supported - it only works by
accident AFAICT, because the old format code was ignoring the etype - it was
deriving the type from the value. Thats
New submission from Robert Collins:
make patchcheck depends on the interpreter and modules being built to work
correctly but the make target doesn't have this expressed. This simple patch
will fix it and adds well under a second of latency for me.
cpython.hg$ make patchcheck
./python ./Tools
Robert Collins added the comment:
Thats really strange, I did a ./python -m test run before committing - the
brown bag was due to me running with the patch for 22936 also applied. Looking
into the failures reported now.
--
___
Python tracker rep
Robert Collins added the comment:
Fixes for buildbots.
--
Added file: http://bugs.python.org/file38335/issue-19711-8.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17911
Changes by Robert Collins robe...@robertcollins.net:
Removed file: http://bugs.python.org/file38332/issue-22936-3.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22936
Changes by Robert Collins robe...@robertcollins.net:
Added file: http://bugs.python.org/file38333/issue-22936-3.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22936
Robert Collins added the comment:
Also apologies - ned told me on IRC that python -m test -uall is needed, not
just -m test. Doh.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17911
Robert Collins added the comment:
code module is using a _function from within the traceback module to filter out
a frame - we can do that with the new interface easily (it filters the first
tem).
--
___
Python tracker rep...@bugs.python.org
http
Robert Collins added the comment:
The decimal failure is due to _format_final_exc_line now filtering out 'None'
as well, because the string captured values of objects leads to None - 'None'
before we do rendering.
I think in this case its reasonable to change the behaviour (since None itself
Changes by Robert Collins robe...@robertcollins.net:
Added file: http://bugs.python.org/file38336/issue-22936-4.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22936
Robert Collins added the comment:
And now updated to HEAD as 17911 has been committed.
--
Added file: http://bugs.python.org/file38332/issue-22936-3.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22936
Robert Collins added the comment:
Ok, all changes applied, lets see how this looks to folk.
--
Added file: http://bugs.python.org/file38324/issue17911-5.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17911
Changes by Robert Collins robe...@robertcollins.net:
Added file: http://bugs.python.org/file38325/issue17911-6.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17911
Robert Collins added the comment:
@Mahmoud thanks! I had a quick look and the structural approach we've taken is
a bit different. What do you think of the current patch here
(issue17911-4.patch) ?
--
___
Python tracker rep...@bugs.python.org
http
Robert Collins added the comment:
I'm idealogically opposed to polymorphic interpretation of args :)
Antoine, will you be ok with one __init__ and one classmethod?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17911
Robert Collins added the comment:
Sorry xonatius I wasn't clear: AFAICT your patch is going to require changes to
the traceback tests, and this issue is changing the implementation
substantially: I was suggesting that you make sure your patch applies on top of
this issue, not that you merge
Robert Collins added the comment:
Nick, Antoine - I'm now stuck between you. Options going forward:
- I can JFDI realising you won't both be happy :)
- you two can reach consensus!
I could cripple __init__ by switching to __new__, but I think thats massive
overcomplication and not needed
Robert Collins added the comment:
I can certainly do that; I was aiming to make it fair I guess, given Antoines
strong feelings on this matter. As long as I'm not piggy-in-the-middle, I don't
have a care in this regard :)
--
___
Python tracker rep
Robert Collins added the comment:
updated with the latest 17911 patch basis.
--
Added file: http://bugs.python.org/file38008/issue-22936-2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22936
Robert Collins added the comment:
This iteration provides two constructors for TracebackException, one for
exception objects, one for exc_info tuples. So it should be easy to use.
The __init__ takes the exc_info tuple because thats less code (much easier to
destructure rather than restructure
Robert Collins added the comment:
I wonder if you could add this to the new code in
http://bugs.python.org/issue17911 which I'm hoping to commit this week.
--
nosy: +rbcollins
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Robert Collins added the comment:
Thanks for the review - shall action it all as it seems all good improvements.
Two key notes: the use of an exception triple is useful to ease backports of
this: a primary goal for me is being able to use the locals stuff in unittest
for existing production
Robert Collins added the comment:
And for profit, review changes applied (minus the small number I disagreed
with). I've clarified in the code why the exc_info tuple break out is still
used (compat with the legacy API is the strongest argument).
I haven't fleshed out the locals thing properly
Robert Collins added the comment:
actually, strike that, I'm happy with this pending a final +1 from another
reviewer. Finishing the locals stuff is a separate patch, and will look like a
single new parameter to StackSummary.extract, similarly on
TracebackException.__init__ and then change
Robert Collins added the comment:
The generator thing: the code was refactoring not so long ago to be generator
based internally with lists as a UI shim. I don't think there is a major
advantage either way. Less buffering on one hand. Less convenient in some cases
on the other. Simple use
Robert Collins added the comment:
Why do you consider it crippling?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17911
___
___
Python-bugs
Robert Collins added the comment:
First cut implementation. I'm sure there is lots we can add, but this will make
things nicer in and of itself.
Thanks for the pointer to cgitb, I've skimmed it and its definitely much more
comprehensive. I'm not entirely sure about the best way to glue
Robert Collins added the comment:
So its fairly simple IMO: it will be more code, not less, to support the
non-triple API, *and* it can be added later, unless we're proposing not to
support the triple API at all (which hasn't been proposed AFAICT).
To me thats a fairly strong argument
Robert Collins added the comment:
Right, and a usable API.
I believe that this will meet Guido's use case:
tb = TracebackException(*sys.exc_info, lookup_lines=False)
some time later
if should_show_tb:
lines = list(tb.format())
I'm not 100% sold on the public API being
Robert Collins added the comment:
FWIW, I agree with the analysis here, its standard HTTP behaviour in the real
world, and we should indeed handle it.
--
nosy: +rbcollins
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3566
Robert Collins added the comment:
Stack and Frame looking good, next update will be next Monday, when I finish
off my TracebackException class.
--
Added file: http://bugs.python.org/file37782/issue17911-1.patch
___
Python tracker rep
New submission from Robert Collins:
Discovered in issue 17911, all the traceback calls that render a stack trace
end up calling linecache.checkcache, which stats files on disk, making getting
a traceback rather more expensive than folk may expect. For oops, it crashed
situations thats fine
Robert Collins added the comment:
I've split out the stat question to http://bugs.python.org/issue23273 - we can
optimise it slightly in this patch, but I think its scope creep here, and will
be unclear, to dive after a full fix in this issue
Changes by Robert Collins robe...@robertcollins.net:
Added file: http://bugs.python.org/file37769/linecache_2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17911
Robert Collins added the comment:
This is a WIP patch, including it to just share progress.
--
Added file: http://bugs.python.org/file37770/frame_1.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17911
Robert Collins added the comment:
And this improves the scaling of the cache stating overhead, but we may well
want to fix this more fundamentally - e.g. by linking the cache ownership into
the import system somehow, so that when a file is reimported, the cached source
is automatically
Robert Collins added the comment:
One thing I noticed while working on this, traceback today stats each included
file once per frame per call into e.g. format_list. This might actually account
for quite some of the overhead. I'll include an optimisation for this in my new
API. http
Robert Collins added the comment:
Ok, here's a draft patch for linecache. Next up, poking around the new TB API.
--
Added file: http://bugs.python.org/file37700/linecache_1.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Robert Collins added the comment:
w.r.t. a new linecache interface, it looks like we need two attributes from
f_globals: __name__ and __loader__, so that we can eventually call
__loader__.get_source(__name__).
One small change (to let me focus on traceback) would be to add another kw
Changes by Robert Collins robe...@robertcollins.net:
--
nosy: +rbcollins
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12681
___
___
Python-bugs
Robert Collins added the comment:
I'll put something together.
--
nosy: +rbcollins
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17911
New submission from Robert Collins:
From https://github.com/testing-cabal/testtools/issues/111 - any code that is
data dependent can be hard to diagnose from a backtrace alone. Many unittest
and server environments address this by doing custom tracebacks that include
locals.
To address
Changes by Robert Collins robe...@robertcollins.net:
--
type: - enhancement
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22936
___
___
Python
New submission from Robert Collins:
From https://github.com/testing-cabal/testtools/issues/111 - any code that is
data dependent can be hard to diagnose from a backtrace alone. Many unittest
and server environments address this by doing custom tracebacks that include
locals.
To address
Robert Collins added the comment:
See http://bugs.python.org/issue22936 for the unittest aspect of this.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22936
New submission from Robert Collins:
TestProgram leaves defaultTestLoader.errors dirty. This primarily affects tests
but it would be good hygiene to clear it at the end of TestProgram.
--
components: Library (Lib)
messages: 231261
nosy: rbcollins
priority: normal
severity: normal
status
Robert Collins added the comment:
Yes, making customising the output easier is a good thing. One way is to use
e.g. subunit.run (which can work with all unittest versions since 2.6) and
write a custom filter. Or a custom TestResult and TextTestRunner can work too
New submission from Robert Collins:
This is just an ugly/hygiene thing. Since we've never advertised the submodules
as the API, we should be able to fix this by moving main.py to e.g. __main__.py.
--
messages: 231101
nosy: rbcollins
priority: normal
severity: normal
status: open
title
Changes by Robert Collins robe...@robertcollins.net:
--
components: +Library (Lib)
type: - behavior
versions: +Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22858
New submission from Robert Collins:
Before the argparse migration usageExit was invoked and could be extended via
subclasses, but it no longer is. We could delete it (and document it being no
longer accessible) or put some glue in to reinstate it. I think deleting it is
fine, as long as we
Changes by Robert Collins robe...@robertcollins.net:
--
components: +Library (Lib)
type: - behavior
versions: +Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22859
New submission from Robert Collins:
Some users of TestProgram would like to add options (e.g. testtools.run adds
--list and --load-list) but there isn't a clean point to add them without bulk
copying the implementation around.
We likely need some extra extension points as well - one
Robert Collins added the comment:
https://code.google.com/p/unittest-ext/issues/detail?id=11
I think that the hamcrest inspired matchers stuff may help make this a reality
too. OTOH if we had a clean patch now for the existing asserts that would be
fine too
New submission from Robert Collins:
From https://code.google.com/p/unittest-ext/issues/detail?id=13
The following is incorrect on Windows:
python -m unittest discover -p '*.py'
It should be without the single quotes around the .py:
python -m unittest discover -p *.py
This needs
New submission from Robert Collins:
Unittest doesn't support a test randomisation feature.
Such a feature should support:
- passing in a seed (to allow reproducing the order for debugging)
- preserving the suite hierarchy, to preserve class and module setUp
performance optimisations
New submission from Robert Collins:
If someone has a TestProgram script - e.g. the unit2 script in unittest2,
loading a module in cwd will fail, because the PYTHONPATH doesn't include '.'.
We might want to consider adding cwd to the PYTHONPATH in TestProgram.
From https://code.google.com/p
New submission from Robert Collins:
Unexpected successes cause failures, but we don't output details about them at
the end of the run.
From https://code.google.com/p/unittest-ext/issues/detail?id=22
A complicating factor is that we don't have a backtrace to show - but we may
have captured
Robert Collins added the comment:
See also https://code.google.com/p/unittest-ext/issues/detail?id=27
Sorry, wrong wording of the bug.
I tested this on IronPython 2.6.1 and 2.7.b1. I see the same result as you and
I consider the following wrong or at least misleading:
- [1, Decimal(1
Robert Collins added the comment:
Hmm, so testtools went in a different direction here - the same unification
stuff, but see
https://github.com/testing-cabal/testtools/commit/18bc5741cf277f7a0d601568be6dccacc7b0783c
tl;dr - I think unittest should not prevent this causing the process to exit
Changes by Robert Collins robe...@robertcollins.net:
--
title: Error in setUp not reported as expectedFailure (unittest) - document
(lack of) interaction between @expectedException on a test_method and setUp
___
Python tracker rep...@bugs.python.org
Robert Collins added the comment:
I don't consider the console output of unittest to be a stable interface.
Michael - do you?
Things that want to process unittest should be using the API.
--
nosy: +rbcollins
___
Python tracker rep
Robert Collins added the comment:
I agree. IIRC the windows shell passes the argument as '*.py' rather than as
*.py, so when we glob it we get no files, as no python files end with an
apostrophe.
--
___
Python tracker rep...@bugs.python.org
http
Robert Collins added the comment:
Hi, I'm glad you're interested in this. I very much want to see a
matcher/hamcrest approach rather than a library of assertions per se - because
match-or-except makes layering things harder.
--
___
Python tracker
Robert Collins added the comment:
+1 on a plain function or context manager.
w.r.t. addCleanUp taking a context manager, that could be interesting - perhaps
we'd want a thing where you pass it the context manager, it __enter__'s the
manager and then calls addCleanUp for you
Robert Collins added the comment:
b)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22813
___
___
Python-bugs-list mailing list
Unsubscribe
Robert Collins added the comment:
Its backported in unittest2 0.8.0 which is available on pypi for 2.6+ and 3.2+.
The changes are large enough that I'd hesitate to backport them in cPython
itself.
--
___
Python tracker rep...@bugs.python.org
http
301 - 400 of 538 matches
Mail list logo