Changes by Michael Foord :
--
resolution: -> fixed
stage: commit review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Michael Stahl added the comment:
we carry a patch in LibreOffice for exactly this problem:
http://cgit.freedesktop.org/libreoffice/core/tree/external/python3/python-3.3.0-i42553.patch.2
this was found many years ago in OOo:
https://issues.apache.org/ooo/show_bug.cgi?id=42553
there is at least
New submission from Michael Stahl:
building with MSVC2012 and the Windows SDK 8.0 fails
according to this page, the fci.lib is no longer available
and cabinet.lib should be used instead:
http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/3b85f36e-dffe-4589-adc3-13673b349812/
&quo
Michael Foord added the comment:
You can use kwargs.pop instead of the two step fetch and delete.
For the test, could you add an assert that the name is used. Can you add an
extra underscore to the method name, to make it: test_create_autospec_with_name
--
nosy: +michael.foord
New submission from Michael Foord:
A common problem with unittest.mock.Mock is to mistype an assert method.
Because mocks create attributes on demand your test will pass without error.
We should raise an AttributeError if you access any attribute name (that
doesn't exist) starting with a
New submission from Michael Foord:
stopall does not always stop all patches to single target
http://code.google.com/p/mock/issues/detail?id=226
What steps will reproduce the problem?
python code to reproduce error
import mock
def myfunc():
return 'hello'
m = mock.patch('
Michael Foord added the comment:
Personally I don't think it looks ugly and that it is a point worth calling
out. Other opinions welcomed.
--
___
Python tracker
<http://bugs.python.org/is
Michael Foord added the comment:
Looks good to me, but please change qobj and add a NEWS entry.
--
___
Python tracker
<http://bugs.python.org/issue21222>
___
___
Michael Foord added the comment:
Patch looks good to me.
--
___
Python tracker
<http://bugs.python.org/issue18566>
___
___
Python-bugs-list mailing list
Unsub
New submission from Michael Foord:
What steps will reproduce the problem?
>>> import mock
>>> a_mock = mock.MagicMock()
>>> no_attribute = mock.PropertyMock(side_effect=AttributeError)
>>> type(a_mock).property = no_attribute
What is the expected outpu
New submission from Michael Foord:
What steps will reproduce the problem?
>>> foo = Mock(name='foo')
>>> prop = PropertyMock(name='prop')
>>> type(foo).prop = prop
>>> foo.attach_mock(prop, 'prop')
>&
New submission from Michael Foord:
Printing call args produces non-deterministic results, making them more or less
useless in doctests.
kwargs_string = ', '.join([
'%s=%r' % (key, value) for key, value in kwargs.items()
])
should be:
kwargs_string = '
Michael Foord added the comment:
Yes to ordered kwargs! I would very much like to be able to order the keyword
args in the order they were passed in, information which is currently lost.
--
___
Python tracker
<http://bugs.python.org/issue21
Michael Foord added the comment:
It needs a NEWS entry, but looks good to me.
--
___
Python tracker
<http://bugs.python.org/issue21238>
___
___
Python-bugs-list m
New submission from Michael Foord:
mock_open returns a mock object suitable for using as a mock file handle. File
handles support iteration, so mock_open should support that. If possible it
should be integrated with the current read/readlines support (only if
possible), so the suggested patch
Michael Foord added the comment:
Needs a test.
--
___
Python tracker
<http://bugs.python.org/issue21256>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Michael Foord :
--
components: +Library (Lib)
versions: +Python 3.5
___
Python tracker
<http://bugs.python.org/issue21262>
___
___
Python-bugs-list m
New submission from Michael Foord:
A shortcut for asserting that the call_count of a mock is 0.
--
assignee: kushal.das
messages: 216546
nosy: kushal.das, michael.foord
priority: normal
severity: normal
stage: needs patch
status: open
title: assert_not_called method for mocks
type
New submission from Michael Foord:
The unittest.mock.call object could have args/kwargs attributes to easily
access the arguments it was called with.
--
messages: 216585
nosy: michael.foord
priority: normal
severity: normal
status: open
title: Provide args and kwargs attributes on mock
Changes by Michael Foord :
--
assignee: -> michael.foord
components: +Library (Lib)
nosy: +kushal.das
stage: -> needs patch
type: -> behavior
versions: +Python 3.5
___
Python tracker
<http://bugs.python.or
New submission from Michael Foord:
The unittest.mock.call object inherits methods from tuple that prevent you
using them as normal call attributes. They should be overridden.
--
assignee: michael.foord
messages: 216587
nosy: kushal.das, michael.foord
priority: normal
severity: normal
Changes by Michael Foord :
--
nosy: +kushal.das
versions: +Python 3.5 -Python 3.3
___
Python tracker
<http://bugs.python.org/issue18622>
___
___
Python-bugs-list m
New submission from Michael Foord:
unittest.mock.Mock.reset_mock deliberately doesn't reset the return_value and
side_effect. It would be nice if it gained parameters so that it *could*.
--
assignee: michael.foord
components: Library (Lib)
messages: 216588
nosy: kusha
New submission from Michael Boldischar:
Here is my code:
self._image_set_number = Spinbox(self._ramp_group, from_=0, to=999,
command=self.reset_rep, format="%03.0f")
self._repetition_change = Spinbox(self._ramp_group, from_=00, to=99,
format="%02.0f")
On Linux, th
Changes by Michael Boldischar :
--
components: +Tkinter
versions: +Python 2.7
___
Python tracker
<http://bugs.python.org/issue21303>
___
___
Python-bugs-list m
Changes by Michael Boldischar :
--
type: -> behavior
___
Python tracker
<http://bugs.python.org/issue21303>
___
___
Python-bugs-list mailing list
Unsubscrib
Michael Boldischar added the comment:
Windows 7 64-bit:
python --version
Python 2.7.6
Debian 7 Linux 64-bit:
$ python --version
Python 2.7.3
--
___
Python tracker
<http://bugs.python.org/issue21
Michael Boldischar added the comment:
Windows 7 64-bit:
>>> root.tk.eval('info patchlevel')
'8.5.2'
Debian 7 Linux 64-bit:
root.tk.eval('info patchlevel')
'8.5.11'
--
___
P
Michael Stahl added the comment:
(note that i haven't used any Solaris myself since 2011)
* the #ifdef SOLARIS block still exists in current hg checkout
* according to comment http://bugs.python.org/msg18910 the SOLARIS
macro can not be defined during a build of python itself, so:
Michael Foord added the comment:
I agree with Antoine's review comments. With those changes in place, ok to
commit.
--
___
Python tracker
<http://bugs.python.org/is
Michael Foord added the comment:
Not sure, but I guess it would be easy to find out. It will need some digging
into to find out where the actual bug is. It shouldn't be hard to find though.
--
___
Python tracker
<http://bugs.python.org/is
Michael Foord added the comment:
It looks like the simplest fix would be to change "NameError:" to "NameError",
as the problem is that they're (sometimes!?) on separate lines.
This still tests what we want to test.
--
Michael Foord added the comment:
Mock objects detect when another mock is added as a "child", but they don't
currently detect that a function created by autospec has been added. It should
be a fairly easy fix.
--
assignee: -
Changes by Michael Foord :
--
nosy: +kushal.das
stage: -> needs patch
versions: +Python 3.5
___
Python tracker
<http://bugs.python.org/issue21478>
___
___
Py
New submission from Michael Cohen:
Argparse has an option to set the custom help formatter class as a kwarg. For
example one can define:
class MyHelpFormatter(argparse.RawDescriptionHelpFormatter):
def add_argument(self, action):
if action.dest != "SUPPRESS":
Changes by Michael Haubenwallner :
--
nosy: +haubi
___
Python tracker
<http://bugs.python.org/issue10656>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Michael Haubenwallner :
--
nosy: +haubi
___
Python tracker
<http://bugs.python.org/issue16189>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Michael Haubenwallner :
--
nosy: +haubi
___
Python tracker
<http://bugs.python.org/issue13493>
___
___
Python-bugs-list mailing list
Unsubscribe:
Michael Haubenwallner added the comment:
Doing it this way strictly requires runtime-linking to be enabled, to have "the
main executable" and the module use the same runtime instance of the
libpython${VERSION}.so symbols.
Instead, "the main executable" better should
Michael Haubenwallner added the comment:
Well, they should not be identical, as they are for different use cases.
"pkg-config python" is to build an application containing a python interpreter
(like python$EXE):
+ Link against libpython.so. Additionally,
+ re-export symbols from li
Changes by Michael Haubenwallner :
--
nosy: +haubi
___
Python tracker
<http://bugs.python.org/issue21272>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Michael Haubenwallner :
--
nosy: +haubi
___
Python tracker
<http://bugs.python.org/issue17454>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Michael Haubenwallner :
Removed file: http://bugs.python.org/file32542/python-tip-aix-absbuilddir.patch
___
Python tracker
<http://bugs.python.org/issue18
Michael Haubenwallner added the comment:
issue#10656 is the out-of-source part already.
--
___
Python tracker
<http://bugs.python.org/issue18235>
___
___
Pytho
Changes by Michael Haubenwallner :
--
hgrepos: +246
___
Python tracker
<http://bugs.python.org/issue10656>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Michael Haubenwallner :
--
hgrepos: +247
___
Python tracker
<http://bugs.python.org/issue16189>
___
___
Python-bugs-list mailing list
Unsubscribe:
Michael Foord added the comment:
Yep, patch.dict wasn't designed with stopall in mind so it needs adding. Thanks
for pointing this out and your fix.
Your patch isn't quite right, those operations shouldn't be inside the try
excepts. (And there are no tests.)
Changes by Michael Haubenwallner :
--
hgrepos: +248
___
Python tracker
<http://bugs.python.org/issue19521>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Michael Haubenwallner :
--
title: "Out of tree" build fails on AIX 5.3 -> "Out of tree" build fails on AIX
versions: +Python 3.4, Python 3.5
___
Python tracker
<http://
Changes by Michael Haubenwallner :
--
hgrepos: -246
___
Python tracker
<http://bugs.python.org/issue10656>
___
___
Python-bugs-list mailing list
Unsubscribe:
Michael Haubenwallner added the comment:
Basically the same as Tristan's patch, with a little improvement to not rely on
PATH to find makexp_aix within ld_so_aix.
Thanks!
--
Added file:
http://bugs.python.org/file35476/issue10656-out-of-source-build-on-aix.
Changes by Michael Haubenwallner :
--
hgrepos: -247
___
Python tracker
<http://bugs.python.org/issue16189>
___
___
Python-bugs-list mailing list
Unsubscribe:
Michael Haubenwallner added the comment:
Problem here is that LDSHARED points to $(BINLIBDEST)/config/ld_so_aix, but it
should be $(LIBPL)/ld_so_aix.
Although an independent problem, this diff shares context with file#35476, so
this patch depends on issue #10656.
--
keywords: +patch
Changes by Michael Haubenwallner :
--
hgrepos: -248
___
Python tracker
<http://bugs.python.org/issue19521>
___
___
Python-bugs-list mailing list
Unsubscribe:
Michael Haubenwallner added the comment:
Patch including configure update now.
--
Added file:
http://bugs.python.org/file35479/issue19521-parallel-build-race-on-aix.patch
___
Python tracker
<http://bugs.python.org/issue19
New submission from Michael Haubenwallner:
On the way to fix issue#15590 especially for AIX, I've discovered that the
values provided by config.status used to substitute @TOKEN@ in python-config,
python.pc as well as python-config.py may contain references to Makefile
variables not
Changes by Michael Haubenwallner :
--
hgrepos: +249
___
Python tracker
<http://bugs.python.org/issue21660>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Michael Haubenwallner :
--
keywords: +patch
Added file: http://bugs.python.org/file35481/6510f2df0d81.diff
___
Python tracker
<http://bugs.python.org/issue21
Michael Haubenwallner added the comment:
So this diff - depending on issue#21660 - now drops showing any $LIBS from
python-config, as python-modules usually do not link against any python-known
libraries.
Instead, now there is a new configure variable LINKFORMODULE, which is shown by
python
Changes by Michael Haubenwallner :
--
keywords: +patch
Added file: http://bugs.python.org/file35485/32143cda4d80.diff
___
Python tracker
<http://bugs.python.org/issue15
Michael Haubenwallner added the comment:
For AIX, with both these configure variants:
$ configure --prefix=/prefix --enable-shared CC=gcc CXX=g++ OPT=
$ configure --prefix=/prefix --enable-shared --without-computed-gotos
CC=xlc_r CXX=xlC_r OPT=
the output changes like this
Michael Haubenwallner added the comment:
Now for --disable-shared:
For AIX, with both these configure variants:
$ configure --prefix=/prefix --disable-shared CC=gcc CXX=g++ OPT=
$ configure --prefix=/prefix --disable-shared --without-computed-gotos
CC=xlc_r CXX=xlC_r OPT=
the output
Michael Haubenwallner added the comment:
Erm, the latter should read:
For Linux, with this configure variant:
$ configure --prefix=/prefix --disable-shared CC=gcc CXX=g++
Now reading GNU ld manpage for Linux:
> $ PKG_CONFIG_PATH=/prefix/lib/pkgconfig pkg-config --libs python-3.4
&g
Changes by Michael Haubenwallner :
--
hgrepos: +251
___
Python tracker
<http://bugs.python.org/issue19521>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Michael Haubenwallner :
--
hgrepos: +252
___
Python tracker
<http://bugs.python.org/issue10656>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Michael Haubenwallner :
--
hgrepos: +253
___
Python tracker
<http://bugs.python.org/issue16189>
___
___
Python-bugs-list mailing list
Unsubscribe:
Michael Foord added the comment:
That's better - thanks. Another minor tweak needed though. stopall should only
stop patches that were started with "start", not those used as context managers
or decorators (or they will be stopped twice!).
See how the main patch object only
Michael Haubenwallner added the comment:
Hmm... instead of reversing the order while keeping in _generate_posix_vars(),
feels like it would have been better to move the code from 2000 back to
_init_posix() where it originally was, without changing the order - because now
for sysconfig within
Michael Foord added the comment:
What specifically are you saying is in the wrong order?
--
___
Python tracker
<http://bugs.python.org/issue21692>
___
___
Pytho
Michael Foord added the comment:
That looks great - thanks! I'll get it committed shortly.
--
___
Python tracker
<http://bugs.python.org/issue21600>
___
___
Michael Foord added the comment:
As David points out - in your example the "actual call" made is
m.some_method('foo', 'bar'). Your assertion (the expectation) is
m.some_method.assert_called_once_with('foo', 'baz').
So the traceback is correct
Michael Foord added the comment:
I haven't reviewed the patch in detail, but I've had a scan through and it
looks *great*. A quick and dirty check that it's "correct" is to compare the
number of tests run before and after the patch - and if the numbers differ
ver
Michael Foord added the comment:
Those should be turned into mixins, or someone could implement issue 14534.
--
___
Python tracker
<http://bugs.python.org/issue21
Michael Foord added the comment:
If you're writing a mixin you don't need to derive from TestCase, you just
derive from object. The point of this feature is to allow TestCase subclasses
to be "base classes" instead of b
Michael Foord added the comment:
My suggested solution is a class decorator you use on your base class that
means "don't run tests from this class".
@unittest.base_class
class MyTestBase(TestCase):
pass
Not quite sure how that's sophisticated or confusing... Are yo
Michael Foord added the comment:
Zachary: Inheriting from TestCase in your mixin is actually an anti-pattern.
And yes, most people seem to do it (most people seem to misunderstand how to
use mixins, which is why I like this approach of having a way of explicitly
marking base classes
Michael Foord added the comment:
To be honest, even though I understand it, I find the mixin pattern hard to
read. You derive from object, but call methods (the assert methods for example)
that don't exist in the class (or its inheritance chain).
My experience, with even experienced P
Michael Grünewald added the comment:
Cannot reproduce that with Ubuntu 12.04. Python 2.7 returned ";" under both
Windows 7 and Ubuntu 12.04.
Can you verify that there was no space before the semicolon? Otherwise the
semicolon gets treated as the beginning of an inli
Michael Foord added the comment:
A python script should be fine - this is what unittest2 does and I haven't had
any requests from Windows users for a binary.
--
___
Python tracker
<http://bugs.python.org/is
Michael Edwards added the comment:
I'm attaching my own bug repro script for Eric. Is this sufficient? I can
demonstrate the entire resulting Namespace, but the problem is that argparse
doesn't even produce a Namespace. The cases I show simply fail.
--
nosy: +Michael.Edw
New submission from Michael Birtwell:
If you partially iterate over a tarfile then try and restart iteration of that
tarfile it will continue from where it left off rather than restarting from the
beginning.
I've only tried this with the tarfile implementation in python 2.7 but the 3.x
Michael Birtwell added the comment:
Embarrassingly as soon as I uploaded that patch I found a problem with it. I
hadn't taken in to account the special case for the first member.
Here's a replacement patch
--
type: -> behavior
Added file:
http://bugs.python.org/file2820
Michael Birtwell added the comment:
Here's a patch on the tarfile's unittest module.
--
Added file:
http://bugs.python.org/file28203/test-tarfile-restart-iteration.patch
___
Python tracker
<http://bugs.python.o
Michael Foord added the comment:
Changing the signature of tearDown would be backwards incompatible.
addSuccessCleanup is an interesting idea - cleanup functions that are only
executed if the test passes. (What to do if a cleanup function raises an
exception though? And when do these get
Michael Foord added the comment:
Well, addSuccessCleanup *would* be an api for adding a cleanup - one that is
only called on success. So the cleanup is skipped on failure or error, which
was the original use case.
"Additional consideration that the need to leave the test results is a use
New submission from Michael Edwards:
When running parse_args, ArgumentParser is liberal in accepting parameters.
Partial matches will be accepted as arguments
(in the included example, --test bob, --tester bob, --testers bob all set the
testers argument)
Perhaps this is documented, but it
Michael Foord added the comment:
Seems reasonable.
--
assignee: -> michael.foord
___
Python tracker
<http://bugs.python.org/issue16709>
___
___
Python-bugs-lis
Michael Foord added the comment:
TextTestResult could decorate a raw stream (and not redecorate an already
decorated one).
--
assignee: -> michael.foord
nosy: +michael.foord
___
Python tracker
<http://bugs.python.org/issu
Michael Foord added the comment:
It smells like a feature to me (it isn't a direct "bug" fix anyway). It can be
applied to earlier versions of Python through a new unittest2 release.
--
versions: +Python 3.5 -Python 2.7, Python
New submission from Michael Schurter:
Title says it all; patch has the fix. No need for an ACKS entry
--
files: argparse-docs-typo.patch
keywords: patch
messages: 178348
nosy: schmichael
priority: normal
severity: normal
status: open
title: Fix argparse docs typo: "an special actio
Changes by Michael Schurter :
--
assignee: -> docs@python
components: +Documentation
nosy: +docs@python
___
Python tracker
<http://bugs.python.org/issu
Michael Foord added the comment:
Agreed and it should be easy to implement.
--
keywords: +gsoc
___
Python tracker
<http://bugs.python.org/issue16935>
___
___
Pytho
Michael Herrmann added the comment:
Hi,
is it correct that this bug no longer appears in Python 2.7.3? I checked the
changelogs of 2.7, but couldn't find anything.
Thanks!
Michael
--
nosy: +mherrmann.at
___
Python tracker
<http://bugs.py
Michael Foord added the comment:
I think you're correct - although I wonder if *anyone*, *ever* will be helped
by the change. :-)
--
___
Python tracker
<http://bugs.python.org/is
Michael Foord added the comment:
You mean like mock.ANY ?
--
___
Python tracker
<http://bugs.python.org/issue17063>
___
___
Python-bugs-list mailing list
Unsub
Michael Foord added the comment:
Oh, you want the assert_called_with call to *return* the objects compared with
the placeholder?
Well, mock.ANY already exists and you can pull the arguments out for individual
assertions using some_mock.call_args.
args, kwargs = some_mock.call_args
Michael Foord added the comment:
Yes there are definitely room for documentation improvements.
And, yes - pulling the args out from some_mock.call_args "boils down to doing
the matching by hand". You only do it when you *want* to do the matching by
hand.
Your use case I would wr
Michael Foord added the comment:
Wow, impressive work Antoine - thanks. I am a little concerned that this relies
on Python 3 only features of inspect, and *in fact* relies on bug fixes in
Python 3.4 to work. That means it would be hard / impossible for the backport
"mock" to ha
Michael Foord added the comment:
I am concerned that this feature changes the TestResult API in a backwards
incompatible way. There are (quite a few) custom TestResult objects that just
implement the API and don't inherit from TestResult. I'd like to try this new
code with (for ex
Michael Foord added the comment:
Note, some brief discussion on the "testing in python" mailing list:
http://lists.idyll.org/pipermail/testing-in-python/2013-January/005356.html
--
___
Python tracker
<http://bugs.python.o
2001 - 2100 of 3026 matches
Mail list logo