Michael Foord added the comment:
Ah, well if the bugfix exists everywhere that function signatures exist then it
shouldn't be a problem. (I think there is already a backport of
inspect.signature() by Nick Coghlan.)
--
___
Python tracker
Changes by Michael Foord :
--
nosy: -michael.foord
___
Python tracker
<http://bugs.python.org/issue17041>
___
___
Python-bugs-list mailing list
Unsubscribe:
Michael Driscoll added the comment:
Whatever became of this? We just stumbled across this bug in our code at work
where we accidentally put multiple files of the same name into the zip file and
not only does it not overwrite the others, but when you go to access that file
name, it grabs the
Michael Foord added the comment:
There is a similar feature request on the mock issue tracker:
http://code.google.com/p/mock/issues/detail?id=189
I prefer this proposal to the other one though. (Although technically allowing
a wait for multiple calls is more flexible
Michael Stahn added the comment:
I thought the same as Ryan when reading the API. The best way would have been
to call "set_tunnel" -> "set_proxy" and to implement the behaviour you expect
on this: setting a proxy. There are some more places at this code which are no
Michael Foord added the comment:
Please don't commit I think we still need a discussion as to whether subtests
or paramaterized tests are a better approach. I certainly don't think we need
both and there are a lot of people asking for parameterized tests. I also
haven't had a
Michael Foord added the comment:
Subtests break the current unittest api of suite.countTests() and I fear they
will also break tools that use the existing test result api to generate junit
xml for continuous integration.
I would like to add a "parameterized test" mechanism to unit
Michael Foord added the comment:
"However, I think you're making a mistaking by seeing them as
*competing* APIs, rather than seeing subtests as a superior
implementation strategy for the possible later introduction of a
higher level parameterized tests API."
Parameterized tests a
Michael Foord added the comment:
A comment from lifeless on IRC (Robert Collins):
[12:15:46] please consider automated analysis. How can someone
tell which test actually failed ?
[12:15:55] How can they run just that test in future
Michael Foord added the comment:
My concern is that this re-uses the existing TestResult.add* methods in a
different way (including calling addError multiple times). This can break
existing tools.
Fix suggested by lifeless on IRC. A sub test failure / success / exception
calls the following
Michael Foord added the comment:
And on the "superior implementation strategy", both nose and py.test used to
have runtime test generation and both have deprecated them and moved to
collection time parameterization. (But I guess we know better.)
You don't need PEP 422 for p
Michael Foord added the comment:
The patch py3k_fix__AssertRaisesContext.patch looks good. A test would be nice.
The code already attempts to sanitize the traceback, so sanitizing __cause__
and __context__ seems reasonable.
--
versions: +Python 3.3, Python 3.4
Michael Foord added the comment:
I'm pretty sure the proposed patch doesn't work - but there's no test for it so
I can't be sure. I can't think of a better basic strategy, but the strategy
here is horrible. This means I'm sympathetic to the desire for a r
Michael Foord added the comment:
I think better filtering at the collection phase - collecting tests by name or
filtering out tests by name - could obviate the need for this.
--
___
Python tracker
<http://bugs.python.org/issue1778
Michael Foord added the comment:
Looks like we're going to get subtests ( issue #16997 ) instead of
parameterized tests.
--
___
Python tracker
<http://bugs.python.org/i
Michael Foord added the comment:
The patch looks good - can you add a test and documentation for this?
--
___
Python tracker
<http://bugs.python.org/issue16
Michael Foord added the comment:
I think you're right! Thanks.
--
assignee: -> michael.foord
resolution: fixed ->
status: closed -> open
___
Python tracker
<http://bugs.pyth
Michael Foord added the comment:
I still don't particularly like the idea of the assert_* methods returning
something.
If the call args tuples had args and kwargs attributes, for which there are
outstanding feature requests, then you could simply do:
my_mock(1, someobj(), bar=someoth
Changes by Michael Foord :
--
assignee: -> michael.foord
___
Python tracker
<http://bugs.python.org/issue15351>
___
___
Python-bugs-list mailing list
Unsubscri
Changes by Michael Foord :
--
resolution: -> works for me
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Michael Foord added the comment:
Although I'm not certain the first test is "invalid". It's testing a different
case than the second test. So if the first test passes it should be renamed
rather than removed. If it *fails* then I'd like to look at the behaviour
Michael Foord added the comment:
Good catch - thanks!
--
___
Python tracker
<http://bugs.python.org/issue18993>
___
___
Python-bugs-list mailing list
Unsubscribe:
Michael Foord added the comment:
Well, they actually test slightly different scenarios - they're *not* just
duplicates of each other.
--
___
Python tracker
<http://bugs.python.org/is
Michael Foord added the comment:
On balance I think that this test failing is *correct* (after deleting an
attribute the old mock should *not* come back). I'd rather adjust the test to
assert this than just remove it though.
--
___
Python tr
Michael Foord added the comment:
Can that be fixed in tulip?
--
___
Python tracker
<http://bugs.python.org/issue11798>
___
___
Python-bugs-list mailing list
Unsub
Michael Foord added the comment:
If we're sure suite._cleanupis a *good* api for this then fine to expose it
(and document) it as a public api. I'll take a look at it in a bit.
Test suites will still have to do *some* monkeying around to set suite.cleanup
(presumably in load_test
Michael Foord added the comment:
The problem is that the change you're proposing is backwards incompatible. Code
using MagicMock and objects with length will break.
--
assignee: -> michael.foord
versions: +Python 3.4 -Python 3.5
___
Python
Michael Foord added the comment:
Awesome, thanks for this work.
The only thing I'd say is that if _common_shorten is always called with two
args - and safe_repr is always called on them - then why not have it take two
args and call safe_repr on
New submission from Michael Herrmann:
I'm on 32 bit Python 2.7.3 and 64 bit Windows 7. I am working on a complex,
multithreaded application which uses COM to communicate with other processes.
My application uses regular expressions in a few (but not very many) places. An
example re
Michael Foord added the comment:
That would only be a shallow copy, so I'm not sure it's worth the effort. The
test has the opportunity in the setUp to ensure that initial state is correct -
so I would leave that per test. Obviously sharing state between tests is prima
facie ba
Michael Foord added the comment:
On 19 Sep 2013, at 14:06, Antoine Pitrou wrote:
>
> Antoine Pitrou added the comment:
>
>> That would only be a shallow copy, so I'm not sure it's worth the
>> effort. The test has the opportunity in the setUp to ensure that
>
Michael Foord added the comment:
Ah right, my mistake. Before setUp there shouldn't be test state. (Although
tests are free to do whatever they want in __init__ too and I've seen plenty of
TestCase subclasses using __init__ when they should be using setUp.)
Essentially though _cl
Michael Foord added the comment:
Having TestLoader.loadTestsFromTestCase() return a "lazy suite" that defers
testcase instantiation until iteration is a nice idea.
Unfortunately the TestSuite.addTests api iterates over a suite to add new
tests. i.e. the code that builds a TestSuite
New submission from Michael Smith:
Pretty straightforward:
File
"/usr/local/Cellar/python3/3.3.2/Frameworks/Python.framework/Versions/3.3/lib/python3.3/pdb.py",
line 675, in do_break
self.error(err, file=self.stdout)
TypeError: error() got an unexpected keyword argument
Michael Foord added the comment:
I dislike adding namedtuple specific code to mock. How many different types
should we special case here and in other places?
--
___
Python tracker
<http://bugs.python.org/issue19
Michael Foord added the comment:
Ouch. Looking.
--
___
Python tracker
<http://bugs.python.org/issue19217>
___
___
Python-bugs-list mailing list
Unsubscribe:
Michael Foord added the comment:
use_load_tests was deliberately undocumented. IIRC it only exists to allow us
to load tests from a package module (__init__.py) without invoking load_tests -
it maybe that it can just go away altogether now.
I'll need to look at the code to co
New submission from Michael Merickel:
http://docs.python.org/dev/library/statistics.html#mean describes the mean as
"effected" by outliers, when it should say "affected".
--
assignee: docs@python
components: Documentation
messages: 200704
nosy: docs@python, mmeric
Michael Foord added the comment:
pprint is also likely to have performance issues. I agree with Ezio that a diff
consisting of more than 30(x2) lines is not likely to be directly useful
anyway.
A test for the changed behaviour would be nice
Michael Foord added the comment:
Good catch and fix Antoine. Thanks.
--
___
Python tracker
<http://bugs.python.org/issue19352>
___
___
Python-bugs-list mailin
New submission from Michael Merickel:
I assume there is some incompatibility in the maverick's C runtime, but getting
a segfault only on the python binaries from python.org.
Version shipped by Apple OS X 10.9 Mavericks:
~❯ python2.7
Python 2.7.5 (default, Sep 12 2013, 21:33:34)
[GCC
New submission from Michael Haubenwallner:
Since python-3.2, there is a race condition building in parallel on AIX:
Consider these Makefile(.pre.in) rules:
$(BUILDPYTHON): ...
$(LINKCC) ... $(LINKFORSHARED) ...
Modules/_testembed: ...
$(LINKCC) ... $(LINKFORSHARED) ...
Modules
Michael Haubenwallner added the comment:
I'm unsure about the real purpose of _testembed, but given the name it does
make sense to me to export the same symbols as $(BUILDPYTHON), thus reusing
python.exp.
--
___
Python tracker
Michael Haubenwallner added the comment:
Actually, ld_so_aix is autogenerated from ld_so_aix.in into builddir, while
makexp_aix is not.
Attached patch eventually might fix the test too?
--
nosy: +haubi
Added file: http://bugs.python.org/file32542/python-tip-aix-absbuilddir.patch
New submission from Michael Haubenwallner:
The problem raises during build already when trying to run setup.py, where
./python is unavailable to locate the 'encodings' module and aborts.
It turns out that (some of) the filenames searched for are broken due to wrong
conversion fr
Michael Haubenwallner added the comment:
It is the abort() libc function being called, causing a core file to be
written. And I can see the backtrace from both the core file or when running in
the debugger.
Yes: I already have included this fix into my python-3.2.5 packaging. I'm
basi
Michael Haubenwallner added the comment:
This is a regression since 2.7.4 because of http://bugs.python.org/issue15989.
As the 'events' and 'revents' members of 'struct pollfd' both are bitfields,
the question actually is why they need to be signed at all.
A
Changes by Michael Haubenwallner :
--
versions: +Python 3.2, Python 3.3, Python 3.4, Python 3.5
___
Python tracker
<http://bugs.python.org/issue17919>
___
___
Michael Foord added the comment:
I do want to get this into 3.4. The logic is non-trivial though, so I need to
understand it before I can add it to discovery. It certainly *looks* good.
--
___
Python tracker
<http://bugs.python.org/issue17
Michael Foord added the comment:
The new behaviour is intentional, glad you've managed to work around it.
--
resolution: -> invalid
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.pyth
Michael Foord added the comment:
I'm going to commit this so we get it in before the feature freeze. It sounds
like the remaining issue is minor and we can resolve it in the betas.
Note that if we attempt discovery from a namespace package and fail we should
create a ModuleImportError
Michael Foord added the comment:
Need doc updates
--
___
Python tracker
<http://bugs.python.org/issue17457>
___
___
Python-bugs-list mailing list
Unsubscribe:
Michael Foord added the comment:
Seems like a perfectly reasonable request. I've no particular preference on an
api for this though.
--
___
Python tracker
<http://bugs.python.org/is
Michael Foord added the comment:
This can happen when the code used to compare the paths is different from the
code used to generate the failure message. This of course masks the real
problem. I can look at where that might be possible and then hopefully we can
get a genuine error message
New submission from Michael Foord:
It shouldn't do, so long as __import__ supports PEP 451. unittest.mock.patch
uses __import__ to find modules specified by name.
--
___
Python tracker
<http://bugs.python.org/is
Michael Haubenwallner added the comment:
Kindly ping. Do you prefer another report for the aix-absbuilddir patch as this
one is already closed?
--
___
Python tracker
<http://bugs.python.org/issue18
Michael Haubenwallner added the comment:
Erm, question target was the python committers. And I'd create the new issue if
they prefer.
--
___
Python tracker
<http://bugs.python.org/is
New submission from Michael Müller:
When having non ascii chars in the header of an translation file (xxx.po) the
following error will be raised:
File "D:\Python33\lib\gettext.py", line 410, in translation
t = _translations.setdefault(key, class_(fp))
File "D:\Python33
Michael Müller added the comment:
Used encoding is utf-8.
Testfile I used added to this comment.
Second about the PO-Revision-Date:
It should be human readable. It's unimportant for the program itself - it's
used for the translator of the xxx.po file.
Normally the whole header could
Changes by Michael Wu :
Removed file: http://bugs.python.org/file35732/testfile.py
___
Python tracker
<http://bugs.python.org/issue3423>
___
___
Python-bugs-list mailin
Michael Wu added the comment:
I ran the examples in this thread with Python 3.5, and it appears to print out
the correct line that exec() occurs on (http://codepad.org/M5CevRwT). It might
be time to close this issue.
--
nosy: +Michael.Wu
Added file: http://bugs.python.org/file35732
Michael Foord added the comment:
I agree that it looks like a bug that this behaviour is triggering for
non-strings. There is separate code (which uses maxDiff) for comparing
collections.
Switching off the behaviour for 3.4 / 2.7 and a new class attribute for 3.5 is
a good approach
Michael Foord added the comment:
So the proposed fix does the backslashreplace for errors and then re-decodes,
allowing the encode in the stream to work. That seems like a good fix.
--
___
Python tracker
<http://bugs.python.org/issue10
Michael Foord added the comment:
Those are the only ones I think. Thanks.
--
___
Python tracker
<http://bugs.python.org/issue21270>
___
___
Python-bugs-list mailin
Michael Foord added the comment:
It was a functionality change, not just a name change.
--
___
Python tracker
<http://bugs.python.org/issue17185>
___
___
Pytho
Michael Rohan added the comment:
I recently implemented a custom logger derived from Logger and to get the
reporting of modules, etc, correct, I implemented the findCaller using
the same code as library code with the minor change of
if filename == _srcfile:
to
if filename in [logging._srcfile
New submission from Michael Büsch:
The bdist_wininst installer does not run the specified --install-script.
Attached is an example project foo.zip.
setup.py is invoked as follows:
py setup.py bdist_wininst --install-script foo_postinstall.py
The installer shows that it successfully ran the
Michael Foord added the comment:
I still dislike moving tests around.
--
___
Python tracker
<http://bugs.python.org/issue10572>
___
___
Python-bugs-list mailin
Michael Foord added the comment:
I agree with Nick. There is a potential use case for parameterized tests as
well as sub tests, but it's not something we're going to rush into.
--
___
Python tracker
<http://bugs.python.
Michael Foord added the comment:
Patch looks fine, easy enough to change for unittest2 (if I ever have the time
for a new release!)
--
___
Python tracker
<http://bugs.python.org/issue22
New submission from Michael Dussere:
Our python is installed on a shared directory that is accessed through a
symbolic link.
$ which python3.4-config
/Produits/publics/x86_64.Linux.RH6/python/3.4.1/bin/python3.4-config
$ ls -al /Produits
lrwxrwxrwx 1 root root 13 Oct 31 2013 /Produits
Michael Foord added the comment:
It might have to be. There's no general purpose solution that will fit every
possible behaviour for a Python descriptor I'm afraid.
--
___
Python tracker
<http://bugs.python.o
Michael Foord added the comment:
And yes, there's deliberate proxy object support in mock.patch (django settings
being one specific use-case).
--
___
Python tracker
<http://bugs.python.org/is
Michael Foord added the comment:
testBaseClass, abstractTestClass and abstractBaseClass are all fine with me. I
wouldn't waste too much time bike-shedding it. If we need a decision let's go
with abstractTestClass.
--
___
Python trac
New submission from Michael Williamson:
The Python docs for the operator module include an example using map and
setitem to "Build a dictionary that maps the ordinals from 0 to 255 to their
character equivalents.":
d = {}
keys = range(256)
vals = map(chr, key
New submission from Michael Williamson:
In the docs for the try statement [1], part of the grammar is:
try1_stmt ::= "try" ":" suite
("except" [expression ["as" target]] ":" suite)+
["else" ":"
Michael Foord added the comment:
This seems like a reasonable improvement, I'd be in favour. I'd be *slightly*
concerned that a test can override an explicit verbosity setting of the user,
but I guess that annoyance is up to the test writer (they should check for an
explicit set
Michael Foord added the comment:
Yep. I have no qualms about allowing test cases to switch on buffering.
--
___
Python tracker
<http://bugs.python.org/issue22
Michael Williamson added the comment:
> Using 'expression' (or 'expr' in the ast doc) for what should be 'exceptions:
> identifier' or paranthesized tuple of identifiers;, is also too broad.
> However, that must be enforced in the compiler rather than t
New submission from Michael McAuliffe:
On Windows, I froze a script that uses multiprocessing with cx-freeze and
Python 3.4.1 that had freeze_support() in the "if __name__ == '__main__'"
section of the main module, and the resulting executable crashes with a
RuntimeError
Michael Foord added the comment:
Switching to Mock instead of MagicMock may help, as that doesn't have the magic
proxies at all. (patch has an argument to specify which class of Mock should be
used to create the mock object, MagicMock is just the default.)
Other wise using __slots__ wou
Michael Foord added the comment:
The patch looks good to me.
--
___
Python tracker
<http://bugs.python.org/issue21112>
___
___
Python-bugs-list mailing list
Unsub
Michael Foord added the comment:
I agree, load_tests should be honoured even when not invoked through discovery.
If that wasn't the case it was an unfortunate oversight on my part!
--
___
Python tracker
<http://bugs.python.org/is
Michael Foord added the comment:
I'd agree that a test run that actually runs zero tests almost always indicates
an error, and it would be better if this was made clear.
I have this problem a great deal with Go, where the test tools are awful, and
it's very easy to think
Michael Foord added the comment:
Thanks for this Kushal. It's not quite right though, count and index need to do
the same as other attributes looked up with __getattr__. In fact delegating to
__getattr__ is probably the easiest way of achieving that. (With the current
patch the calls wi
Michael Foord added the comment:
One of the use cases for side_effect is for dynamically changing the returned
value based on input - so your option 1 just doesn't work.
Using two line functions would make your code easier to read, and then your
"workarounds" would look nat
Michael Foord added the comment:
I'd be happy with a doc change from "fixture" to instance (or maybe add
instance in parentheses). I'd rather a simple change than making the
documentation much longer.
The reason for a separate instance per test is for test isolation. Each
Michael Foord added the comment:
What's the purpose of _removed_tests in your fix, it doesn't appear to be used?
--
___
Python tracker
<http://bugs.python.o
Michael Foord added the comment:
Ah yes, I see - sorry.
--
___
Python tracker
<http://bugs.python.org/issue11798>
___
___
Python-bugs-list mailing list
Unsub
Michael Foord added the comment:
Yep, those docs are just wrong. I'm trying to think of a concise rewording.
--
___
Python tracker
<http://bugs.python.org/is
Michael Foord added the comment:
I'm pretty sure this has been debated before (and the status quo is the
result). Trying to find the issue.
--
___
Python tracker
<http://bugs.python.org/is
Michael Foord added the comment:
Hmmm... TestTools has wasSuccessful return False on an unexpected success [1]
and I can't find an issue for any previous discussion.
I don't use unexpected success, so I have no particular horse in this race but
it seems more logical that wasSuccess
New submission from Michael Foord:
Reported as mock issue 221: http://code.google.com/p/mock/issues/detail?id=221
>>> from unittest.mock import Mock
>>> m = Mock()
>>> m.foo = 3
>>> del m.foo
>>> m.foo = 4
>>> del m.foo
Traceback (most rece
Michael Foord added the comment:
Having __debug__ True by default is unintuitive and not particularly useful.
However it is relatively well known, so although it is "rarely" used that
probably only means hundreds of thousands of piece of code. So it isn't going
to ch
Michael Foord added the comment:
Thanks for picking this up. /file/open/ should be fine.
--
___
Python tracker
<http://bugs.python.org/issue20222>
___
___
Pytho
New submission from Michael Gubser:
One can only set the ECDH curve name via SSLContext.set_ecdh_curve().
ssl.wrap_socket() doesn't have a parameter to use it for the wrapping of the
basic socket. Therefore one always has to do the detour over SSLContext.
--
components: Library
Michael Foord added the comment:
A "side effect" is a mechanism Mock provides for mocks to have special
behaviour when called.
http://docs.python.org/3.3/library/unittest.mock.html#unittest.mock.Mock.side_effect
The term is used very widely throughout the mock documentation,
Michael Foord added the comment:
Agreed.
--
___
Python tracker
<http://bugs.python.org/issue20145>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Michael Crusoe :
--
nosy: +Michael.Crusoe
___
Python tracker
<http://bugs.python.org/issue1222585>
___
___
Python-bugs-list mailing list
Unsubscribe:
Michael Foord added the comment:
Maybe making sentinels unpickleable would be a better solution. On the other
hand I'd love to be able to [properly] customise object creation when
unpickling. It would solve various other problems I've had from time to time.
But that's well ou
2101 - 2200 of 3026 matches
Mail list logo