Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1244145 - Update python2-mock AND python3-mock to 2.0
Summary: Update python2-mock AND python3-mock to 2.0
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-mock
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Praveen Kumar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1270079 1341262 1346143
Blocks: 1279789 1301384
TreeView+ depends on / blocked
 
Reported: 2015-07-17 10:09 UTC by Pierre-YvesChibon
Modified: 2016-08-18 23:19 UTC (History)
10 users (show)

Fixed In Version: python-mock-2.0.0-1.fc24 python-mock-2.0.0-1.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-20 17:50:01 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Pierre-YvesChibon 2015-07-17 10:09:18 UTC
Description of problem:
The current version in rawhide is 1.0.1-5.fc23 while upstream is now at 1.1.4

Could you see about updating rawhide ?

(Note: 1.1.3 was broken, 1.1.4 looks better, it does require setuptools >= 17.1 but rawhide seems to be up to date for this)

Comment 1 Julien Enselme 2015-09-28 09:14:03 UTC
Hi,

mock 1.3.0 was release on 2015-07-23 (https://pypi.python.org/pypi/mock/1.3.0). Can you please update rawhide?

Comment 3 Praveen Kumar 2015-10-18 11:34:09 UTC
I updated spec file and for python3 build it's only passing for rawhide not for f23 branch because of python3-pbr package is not available for f23 branch.

f23: http://koji.fedoraproject.org/koji/taskinfo?taskID=11493605

What would be better option, should be update python2 package (python3 flag disabled) and for other branch and rawhide have both packages?

Comment 4 Alan Pevec 2015-11-12 10:51:55 UTC
> I updated spec file and for python3 build it's only passing for rawhide not
> for f23 branch because of python3-pbr package is not available for f23
> branch.

@mrunge I'll update PBR in f23,
we were not doing that b/c upsteam OpenStack stable/kilo branch (which f23 corresponds to) has upper cap pbr>=0.6,!=0.7,<1.0
https://github.com/openstack/requirements/blob/stable/kilo/global-requirements.txt#L91
but latest PBR should work, I'll confirm it in -override before pushing the update.

Comment 5 Alan Pevec 2015-11-12 13:02:28 UTC
openstack-keystone f23 scratch rebuild with python-pbr-1.8.1-1.fc23 in buildroot worked

Comment 6 Praveen Kumar 2015-12-01 09:27:24 UTC
Latest version of mock need 'funcsigs'[0] which is not built in fedora and also failing rawhide bits[1]

[0] https://github.com/testing-cabal/mock/blob/master/requirements.txt#L1
[1] http://koji.fedoraproject.org/koji/taskinfo?taskID=12021349

Comment 7 Haïkel Guémar 2015-12-02 23:31:29 UTC
To unblock the situation, I submitted a package review for funcsigs. It should be a trivial one.

Comment 8 Paul Belanger 2016-02-10 15:24:19 UTC
Anything I can do to help move this along?

Comment 9 Praveen Kumar 2016-02-11 06:40:47 UTC
As per my understanding mock is now core module for python3, for python2 I will update it to latest version.

Comment 10 Paul Belanger 2016-02-11 14:13:10 UTC
Great, thanks for the update.

Comment 11 Matthias Runge 2016-02-22 08:00:37 UTC
Any update here?

Comment 12 Jan Kurik 2016-02-24 13:26:15 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 13 Alan Pevec 2016-02-26 10:50:17 UTC
(In reply to Praveen Kumar from comment #9)
> As per my understanding mock is now core module for python3, for python2 I
> will update it to latest version.

mock is available in py3 in different namespace unittest.mock so having python3-mock is fine and should be kept to not break existing code using it
Also, upstream mock says
"This package contains a rolling backport of the standard library mock code compatible with Python 2.6 and up, and 3.2 and up."
so there is value to provide those updates ahead of python core libs update.

Comment 14 Matthias Runge 2016-03-01 11:50:03 UTC
It looks like Haïkel already updated this for rawhide, I guess, this can be closed then?

Comment 15 Julien Enselme 2016-03-04 09:16:52 UTC
Can we have this in f24? I just tried to build a package that requires python-mock 1.3.0 with fedpkg mockbuild and I got this error:

Error: No Package found for python-mock >= 1.3.0
Error: No Package found for python3-mock >= 1.3.0

I'd like to avoid waiting for f25 before getting this update.

Comment 16 Matthias Runge 2016-03-04 09:20:04 UTC
just pushed it to f24 and submitted a build
http://koji.fedoraproject.org/koji/taskinfo?taskID=13225011

Comment 17 Kamil Páral 2016-04-13 07:53:56 UTC
Can we get a newer python-mock in F23? Version 1.0.1 and above fixes a bug I care about:
https://github.com/testing-cabal/mock/issues/190

Also please note that there is now mock 2.0.0 available:
https://github.com/testing-cabal/mock/releases

But for F23, getting at least 1.1.0 would help.

Comment 18 Lukas Brabec 2016-05-04 11:16:13 UTC
mock_open() in mock 1.0.1 doesn't mimic builtin open() properly. 

read() of builtin open() reads a file (or part of it) and keeps pointer into file, and so without seek you cannot read() whole file more than one time. However the read() of mock_open() can be called again and again.

Python xml parser reads file in an infinite loop by chunks using read(65536) and breaks the loop when nothing was read. Unfortunately the behaviour of mock 1.0.1 causes infinite loop and breaks the xml parsing.

Please, bump the version in F23 to at least 1.1.0

Comment 19 Matthias Runge 2016-05-04 11:53:27 UTC
Praveen, is that something you can do?

Comment 20 Praveen Kumar 2016-05-16 16:29:38 UTC
Apologize for very late response.

http://koji.fedoraproject.org/koji/buildinfo?buildID=765092

Comment 21 James Hogarth 2016-05-31 12:34:33 UTC
PyPi mock is now at 2.0 

https://pypi.python.org/pypi/mock

One of the tests a package I maintain (python-acme) is calling assert_called_once() which was added here:

https://github.com/testing-cabal/mock/issues/342

Naturally I can skip the test, but of course I'd rather not skip upstream tests where possible.

Can you please issue an update to rawhide/f24/f23 with the new version?

Comment 22 James Hogarth 2016-05-31 15:33:02 UTC
Changing the blocker to point to the funcsigs 1.0+ bug as mock 2.0 needs that and the review was only against the old 0.4 revision so not valid for this bug.

Comment 23 Praveen Kumar 2016-06-13 13:10:17 UTC
I will update this package tomorrow morning and create update request.

Comment 24 Praveen Kumar 2016-06-14 06:12:45 UTC
I updated spec and it build fine with rawhide ( http://koji.fedoraproject.org/koji/buildinfo?buildID=772640) but failed in f24 because funcsigs 1.0+ not updated for f24 branch ( http://koji.fedoraproject.org/koji/packageinfo?packageID=21510 ).

Comment 25 Fedora Update System 2016-07-05 10:53:00 UTC
python-mock-2.0.0-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-439ff07550

Comment 26 Fedora Update System 2016-07-05 11:03:45 UTC
python-mock-2.0.0-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-e3a7ea1156

Comment 27 Fedora Update System 2016-07-06 06:24:53 UTC
python-mock-2.0.0-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-e3a7ea1156

Comment 28 Fedora Update System 2016-07-09 15:58:34 UTC
python-mock-2.0.0-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-439ff07550

Comment 29 Fedora Update System 2016-07-20 17:49:56 UTC
python-mock-2.0.0-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 30 Fedora Update System 2016-08-18 23:19:35 UTC
python-mock-2.0.0-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.