Bug 954152
Summary: | pymongo 2.5 available upstream | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Johan Hedin <johan.o.hedin> |
Component: | python-pymongo | Assignee: | Andrew McNabb <amcnabb> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 18 | CC: | amcnabb, johan.o.hedin, silas |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | python-pymongo-2.5.2-2.fc18 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-05-02 04:34:12 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Johan Hedin
2013-04-21 10:15:53 UTC
Thanks for letting me know. I've started a test build, so we'll see how it goes. 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 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. 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. 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. 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. 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. Builds cleanly on CentOS 6.4 x86_64 as well (for potential inclusion in EPEL). Should this go into Fedora 18 or just Fedora 19? 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 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 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). Done some tests on Fedora 18 x86_64 and the driver works as expected. Good job! So any arguments about whether or not this should go into Fedora 18? 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. 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. Thanks for the detailed explanation. I'm convinced. 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 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 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. |