Merge lp:~jml/pkgme/module-to-use into lp:pkgme

Proposed by Jonathan Lange
Status: Merged
Approved by: Jonathan Lange
Approved revision: 147
Merged at revision: 138
Proposed branch: lp:~jml/pkgme/module-to-use
Merge into: lp:pkgme
Diff against target: 0 lines
To merge this branch: bzr merge lp:~jml/pkgme/module-to-use
Reviewer Review Type Date Requested Status
James Westby Approve
Review via email: mp+122231@code.launchpad.net

Commit message

New module API that has useful things for Python clients

Description of the change

Inside every application, there is a library struggling to be free.

This takes a step toward that by taking the useful bits out of __init__ and bin.main and putting them into a new module, 'api'. I don't like the name much, but it's a start.

This will make it easier to re-use things and design something sane to be used by pkgme-service.

To post a comment you must log in.
Revision history for this message
James Westby (james-w) wrote :

51 +__version__ = '0.3.1'

This is duplicated now.

Otherwise I think this is ok.

Thanks,

James

review: Approve
Revision history for this message
Jonathan Lange (jml) wrote :

Fixed.

Revision history for this message
ISD Branch Mangler (isd-branches-mangler) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
ISD Branch Mangler (isd-branches-mangler) wrote :

The attempt to merge lp:~jml/pkgme/module-to-use into lp:pkgme failed. Below is the output from the failed tests.

./bin/py -m testtools.run pkgme.tests.test_suite
Tests running...
======================================================================
ERROR: pkgme.tests.test_python_backend.PythonBackendTests.test_all_info
----------------------------------------------------------------------
Traceback (most recent call last):
  File "pkgme/tests/test_python_backend.py", line 34, in test_all_info
    {"package_name": "foo"}, info.get_all(["package_name"]))
  File "pkgme/project_info.py", line 64, in get_all
    to_write=json.dumps(keys))
  File "pkgme/run_script.py", line 118, in run_script
    output = run_subprocess([script_path], cwd=cwd, env=env, to_write=to_write)
  File "pkgme/run_script.py", line 103, in run_subprocess
    raise ScriptFailed(cmd, retcode, output)
ScriptFailed: /tmp/tmpF4XHhE/pkgme/backends/python/all_info failed with returncode 1. Output:
 | usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
 | or: setup.py --help [cmd1 cmd2 ...]
 | or: setup.py --help-commands
 | or: setup.py cmd --help
 |
 | error: invalid command 'pkgme_info'
 |

Ran 247 tests in 9.294s
FAILED (failures=1)

Tree is up to date at revision 12 of branch bzr+ssh://bazaar.launchpad.net/+branch/ca-download-cache
no previously-included directories found matching '_build'
make: *** [test] Error 1

Revision history for this message
ISD Branch Mangler (isd-branches-mangler) wrote :

The attempt to merge lp:~jml/pkgme/module-to-use into lp:pkgme failed. Below is the output from the failed tests.

./bin/py -m testtools.run pkgme.tests.test_suite
Tests running...
======================================================================
ERROR: pkgme.tests.test_python_backend.PythonBackendTests.test_all_info
----------------------------------------------------------------------
Traceback (most recent call last):
  File "pkgme/tests/test_python_backend.py", line 33, in test_all_info
    info = info.get_all(['package_name'])
  File "pkgme/project_info.py", line 64, in get_all
    to_write=json.dumps(keys))
  File "pkgme/run_script.py", line 118, in run_script
    output = run_subprocess([script_path], cwd=cwd, env=env, to_write=to_write)
  File "pkgme/run_script.py", line 103, in run_subprocess
    raise ScriptFailed(cmd, retcode, output)
ScriptFailed: /tmp/tmpymCLTx/pkgme/backends/python/all_info failed with returncode 1. Output:
 | usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
 | or: setup.py --help [cmd1 cmd2 ...]
 | or: setup.py --help-commands
 | or: setup.py cmd --help
 |
 | error: invalid command 'pkgme_info'
 |

Ran 247 tests in 11.178s
FAILED (failures=1)

Tree is up to date at revision 13 of branch bzr+ssh://bazaar.launchpad.net/+branch/ca-download-cache
no previously-included directories found matching '_build'
make: *** [test] Error 1

Revision history for this message
ISD Branch Mangler (isd-branches-mangler) wrote :

The attempt to merge lp:~jml/pkgme/module-to-use into lp:pkgme failed. Below is the output from the failed tests.

./bin/py -m testtools.run pkgme.tests.test_suite
Tests running...
======================================================================
ERROR: pkgme.tests.test_python_backend.PythonBackendTests.test_all_info
----------------------------------------------------------------------
Traceback (most recent call last):
  File "pkgme/tests/test_python_backend.py", line 33, in test_all_info
    info = info.get_all(['package_name'])
  File "pkgme/project_info.py", line 64, in get_all
    to_write=json.dumps(keys))
  File "pkgme/run_script.py", line 118, in run_script
    output = run_subprocess([script_path], cwd=cwd, env=env, to_write=to_write)
  File "pkgme/run_script.py", line 103, in run_subprocess
    raise ScriptFailed(cmd, retcode, output)
ScriptFailed: /tmp/tmp33_z6d/pkgme/backends/python/all_info failed with returncode 1. Output:
 | Traceback (most recent call last):
 | File "<string>", line 1, in <module>
 | File "/tmp/tmp33_z6d/pkgme/__init__.py", line 29, in <module>
 | from .api import write_packaging
 | File "/tmp/tmp33_z6d/pkgme/api.py", line 27, in <module>
 | from pkgme import trace
 | File "/tmp/tmp33_z6d/pkgme/trace.py", line 4, in <module>
 | from fixtures import Fixture
 | ImportError: No module named fixtures
 |

Ran 247 tests in 9.086s
FAILED (failures=1)

Tree is up to date at revision 13 of branch bzr+ssh://bazaar.launchpad.net/+branch/ca-download-cache
no previously-included directories found matching '_build'
make: *** [test] Error 1

lp:~jml/pkgme/module-to-use updated
147. By Jonathan Lange

Don't import anything during 'pkgme' import time.

Preview Diff

Empty

Subscribers

People subscribed via source and target branches