Bug 954152 - pymongo 2.5 available upstream
Summary: pymongo 2.5 available upstream
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pymongo
Version: 18
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Andrew McNabb
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-21 10:15 UTC by Johan Hedin
Modified: 2013-07-10 01:23 UTC (History)
3 users (show)

Fixed In Version: python-pymongo-2.5.2-2.fc18
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-05-02 04:34:12 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Johan Hedin 2013-04-21 10:15:53 UTC
Description of problem:
pymongo 2.5 is available upstream and contain a lot of bugfixes compared to 2.3 that is in Fedora 18/19 (most of the fixes were resolved in 2.4).

Comment 1 Andrew McNabb 2013-04-22 23:21:17 UTC
Thanks for letting me know. I've started a test build, so we'll see how it goes.

Comment 2 Andrew McNabb 2013-04-22 23:28:40 UTC
It looks like the tests have an ImportError:

======================================================================
ERROR: Failure: ImportError (cannot import name host)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/loader.py", line 413, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/builddir/build/BUILD/pymongo-2.5/test/test_auth.py", line 32, in <module>
    from test import version, host, port
ImportError: cannot import name host

Comment 3 Johan Hedin 2013-04-23 06:34:11 UTC
Thanks for the quick response! I'll try to look in to the failure ASAP.

I successfully rebuild the 2.3 SRPM with pymongo 2.4.2 a while ago but perhaps there are some other changes in 2.5.

Comment 4 Johan Hedin 2013-04-23 19:28:10 UTC
Ok, here whats going on; The build error is in the %check section of the spec-file where the nose test is run.

In 2.5 there apparently are a lot of more test that require a running a mongod to succeed. These test (and old ones) try to include the "port" and "host" variables from __init__.py that the spec-file clears. Thus the error.

When I removed the clearing of __init__.py and started to exclude the new tests that require a running mongod I got the feeling that at the end there would not be any tests left besides the bson test. So I stopped.

So, do we really need the tests under %check when running it require almost all tests to be excluded?

If I remove the %check section, the RPM is build successfully. Only tested on x86_64 so far.

Comment 5 Andrew McNabb 2013-04-23 20:03:22 UTC
There actually are a number of tests that get run, and it's best to run any tests that can succeed. It's probably best to just add some new tests to exclude.

Comment 6 Johan Hedin 2013-04-23 20:08:54 UTC
Ok, point taken.

I'll continue to add failing tests to the exclude list until the test passes or I get to some other error.

Will get back here with a working spec-file or with more questions.

Comment 7 Johan Hedin 2013-04-23 20:35:46 UTC
Ok, working spec-file fixed with the following %check-section:

%check
# Exclude tests that require an active MongoDB connection
 exclude='(^test_binary$'
exclude+='|^test_collection$'
exclude+='|^test_common$'
exclude+='|^test_connection$'
exclude+='|^test_cursor$'
exclude+='|^test_database$'
exclude+='|^test_grid_file$'
exclude+='|^test_gridfs$'
exclude+='|^test_json_util$'
exclude+='|^test_master_slave_connection$'
exclude+='|^test_pooling$'
exclude+='|^test_pooling_gevent$'
exclude+='|^test_pymongo$'
exclude+='|^test_read_preferences$'
exclude+='|^test_replica_set_connection$'
exclude+='|^test_son_manipulator$'
exclude+='|^test_threads$'
exclude+='|^test_threads_replica_set_connection$'
exclude+='|^test_uri_options$'
exclude+='|^test_delegated_auth$'
exclude+='|^test_auth_from_uri$'
exclude+='|^test_auto_start_request$'
exclude+='|^test_connect$'
exclude+='|^test_constants$'
exclude+='|^test_contextlib$'
exclude+='|^test_copy_db$'
exclude+='|^test_database_names$'
exclude+='|^test_disconnect$'
exclude+='|^test_document_class$'
exclude+='|^test_drop_database$'
exclude+='|^test_equality$'
exclude+='|^test_fork$'
exclude+='|^test_from_uri$'
exclude+='|^test_fsync_lock_unlock$'
exclude+='|^test_get_db$'
exclude+='|^test_getters$'
exclude+='|^test_host_w_port$'
exclude+='|^test_interrupt_signal$'
exclude+='|^test_iteration$'
exclude+='|^test_nested_request$'
exclude+='|^test_network_timeout$'
exclude+='|^test_network_timeout_validation$'
exclude+='|^test_operation_failure_with_request$'
exclude+='|^test_operation_failure_without_request$'
exclude+='|^test_repr$'
exclude+='|^test_request_threads$'
exclude+='|^test_timeouts$'
exclude+='|^test_tz_aware$'
exclude+='|^test_use_greenlets$'
exclude+='|^test_with_start_request$'
exclude+='|^test_replica_set_connection_alias$'
exclude+='|^test_auto_reconnect_exception_when_read_preference_is_secondary$'
exclude+='|^test_get_db$'
exclude+='|^test_interrupt_signal$'
exclude+='|^test_ipv6$'
exclude+='|^test_iteration$'
exclude+='|^test_kill_cursor_explicit_primary$'
exclude+='|^test_kill_cursor_explicit_secondary$'
exclude+='|^test_nested_request$'
exclude+='|^test_network_timeout$'
exclude+='|^test_operations$'
exclude+='|^test_pinned_member$'
exclude+='|^test_properties$'
exclude+='|^test_schedule_refresh$'
exclude+='|^test_auto_auth_login$'
exclude+='|^test_safe_insert$'
exclude+='|^test_safe_update$'
exclude+='|^test_threading$'
exclude+='|^test_server_disconnect$'
exclude+='|^test_config_ssl$'
exclude+=')'
pushd test
nosetests --exclude="$exclude"
popd

I removed the clearing of __init__.py and then just added failing tests to the exclude until I got a clean build. Only tested on Fedora 18 x86_64.

Comment 8 Johan Hedin 2013-04-23 20:43:41 UTC
Builds cleanly on CentOS 6.4 x86_64 as well (for potential inclusion in EPEL).

Comment 9 Andrew McNabb 2013-04-24 20:26:41 UTC
Should this go into Fedora 18 or just Fedora 19?

Comment 10 Fedora Update System 2013-04-24 20:33:32 UTC
python-pymongo-2.5-4.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/python-pymongo-2.5-4.fc19

Comment 11 Fedora Update System 2013-04-24 20:37:52 UTC
python-pymongo-2.5-4.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/python-pymongo-2.5-4.fc18

Comment 12 Fedora Update System 2013-04-25 03:43:04 UTC
Package python-pymongo-2.5-4.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing python-pymongo-2.5-4.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-6573/python-pymongo-2.5-4.fc19
then log in and leave karma (feedback).

Comment 13 Johan Hedin 2013-04-26 23:23:53 UTC
Done some tests on Fedora 18 x86_64 and the driver works as expected.

Good job!

Comment 14 Andrew McNabb 2013-05-01 21:53:43 UTC
So any arguments about whether or not this should go into Fedora 18?

Comment 15 Johan Hedin 2013-05-01 23:31:29 UTC
I'll vote for this to go into Fedora 18. I thought you already made up your mind earlier when you added the package to Fedora 18 testing so I didn't bother writing it explicitly. Sorry :-)

I have apps written for pymongo 2.1 that have survived upgrades of the driver all the way up to 2.4.2 without breaking anything. When looking at the Changelog for 2.5 there are no specific issues that indicate any changes in old behavior from 2.4.2.

There is a small note about some rarely used exception that changed a bit between 2.3 and 2.4 but it was not anything that hit us in our apps.

So I'll say its quite safe to push this as a stable update in Fedora 18.

Comment 16 Fedora Update System 2013-05-02 04:34:14 UTC
python-pymongo-2.5-4.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 Andrew McNabb 2013-05-02 15:40:25 UTC
Thanks for the detailed explanation. I'm convinced.

Comment 18 Fedora Update System 2013-06-12 19:38:00 UTC
python-pymongo-2.5.2-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/python-pymongo-2.5.2-1.fc18

Comment 19 Fedora Update System 2013-06-20 16:05:26 UTC
python-pymongo-2.5.2-2.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/python-pymongo-2.5.2-2.fc18

Comment 20 Fedora Update System 2013-07-10 01:23:38 UTC
python-pymongo-2.5.2-2.fc18 has been pushed to the Fedora 18 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.