550 Commits

Author SHA1 Message Date
Michael Bienia
a178201eea * lpapiwrapper.py:
Add a Archive wrapper class.
2009-07-22 14:26:27 +02:00
Michael Bienia
fcf86d2ad2 * lpapiwrapper.py:
Move getUbuntu{Development,}Series from LpApiWrapper to Distribution
  and rename it to get{Development,}Series
* pull-lp-source, requestsync:
  Updated for the above mention change.
2009-07-22 13:43:53 +02:00
Michael Bienia
30915541e4 * lpapiwrapper.py:
- Move getUbuntuArchive() from LpApiWrapper to Distribution and rename it to
    getMainArchive()
2009-07-22 12:23:36 +02:00
Michael Bienia
046798d12b * lpapiwrapper.py:
Move isLpTeamMember from LpApiWrapper to PersonTeam where it belongs
2009-07-22 12:04:14 +02:00
Michael Bienia
d63b782aec * lpapiwrapper.py:
- Add a check for cached LP API URLs instead of blindly fetching it
2009-07-22 11:54:31 +02:00
Michael Bienia
adf3557967 * lpapiwrapper.py:
- Update some doc strings
  - Update PersonTeam to the new BaseWrapper
2009-07-22 11:47:22 +02:00
Michael Bienia
f0ca5053fe * lpapiwrapper.py:
- Rewrite BaseWrapper.__new__() again to make it more generic
  - Add a Distribution wrapper class
2009-07-22 11:27:28 +02:00
Michael Bienia
884024ddd8 * lpapiwrapper.py:
- Rename _PersonTeam to PersonTeam and make it a sub-class of BaseWrapper.
2009-07-19 16:17:02 +02:00
Michael Bienia
974deb0a9a * lpapiwrapper.py:
- Rename _SourcePackage to SourcePackage and make it a sub-class of BaseWrapper
2009-07-19 15:59:43 +02:00
Michael Bienia
682d7be285 * lpapiwrapper.py:
- Replace _UbuntuSeries with DistroSeries
2009-07-19 15:49:14 +02:00
Michael Bienia
c397ad9f7b * lpapiwrapper.py:
- add a base class for all wrapper classes
  - add a wrapper class for "distro_series"
2009-07-19 15:40:07 +02:00
Michael Bienia
6799633ca3 * lpapiwrapper.py: Add a wrapper class for a person or team LP object. 2009-07-10 10:38:06 +02:00
Michael Bienia
638950f184 * lpapiwrapper.py:
- fix getUbuntuSourcePackage()
2009-07-02 13:21:01 +02:00
Michael Bienia
a0ae5a2e23 * lpapiwrapper.py:
- Add _UbuntuSeries and _SourcePackage wrapper classes for proper type checking
* functions.py: Removed
  - Move the remaining functions to lpapiwrapper.py
* buildd, requestsync:
  - Updated for the new function location
2009-07-02 13:05:16 +02:00
Michael Bienia
e139944b3a * lpapiwrapper.py:
canUploadPackage(): Assume 'universe' as component if the package doesn't
  exist (yet) in Ubuntu (needed for checking sponsorship when requesting syncs
  of new packages).
* requestsync: use canUploadPackage() from LpApiWrapper
2009-06-27 11:58:05 +02:00
Michael Bienia
0684698c98 * Make Launchpad.login() return itself. 2009-06-18 23:16:36 +02:00
Michael Bienia
c6a040f85f * ubuntutools/lp/functions.py: Remove some now obsolete functions. 2009-06-12 00:49:48 +02:00
Michael Bienia
d4f6f9079e * ubuntutools/lp/lpapiwrapper.py: Add a method to enforce a login through the LP API. 2009-06-12 00:33:23 +02:00
Michael Bienia
5d9ef43b25 * pull-lp-source: Use the new LpApiWrapper class. 2009-06-12 00:14:22 +02:00
Michael Bienia
d35077e14e * ubuntutools/lp/lpapiwrapper.py:
+ Wrap access to launchpad.me
  + Implement canUploadPackage() in LpApiWrapper
2009-06-11 22:51:52 +02:00
Michael Bienia
81c1cf50df * ubuntutools/lp/lpapiwrapper.py:
Make getUbuntuSourcePackage a classmethod
* buildd:
  Remove unneeded variables
2009-06-11 21:18:52 +02:00
Michael Bienia
f03f0ec72a * ubuntutools/lp/functions.py: Make the default values of the function not use
a value fetched from LP. Instead fetch the default value during call time.
  This way the functions module doesn't require to use LP API during module
  load.
* buildd: Move the import of ubuntutools.lp.functions to the other module
  inclusion.
2009-06-11 20:36:11 +02:00
Michael Bienia
40f749c91b * ubuntutools/lp/lpapiwrapper.py: Rewrite some functions from functions.py in a
OO-way and add caching
* ubuntutools/lp/functions.py: Use the lpapiwrapper.py where applicable and
  mark the rewritten functions as deprecated
* ubuntutools/lp/udtexceptions.py: Add PocketDoesNotExistException
* buildd: Make use of LpApiWrapper
2009-06-11 20:23:30 +02:00
Michael Bienia
39211b67e0 * ubuntutools/lp/lpapiwrapper.py: Implement a singleton for LP API access (with lazy initialisation)
* ubuntutools/lp/functions.py: Use the new singleton
2009-06-11 16:33:47 +02:00
Jonathan Davies
7eb81c1185 Removed (superseded by Launchpad API support)
* ubuntutools/lp/cookie.py
 * ubuntutools/lp/urlopener.py

And removed references from these files as necessary:
 * requestsync
 * ubuntutools/lp/functions.py
2009-06-09 10:19:58 +01:00
Michael Bienia
f760b4e845 * buildd: Use LP API for retrying or rescoring of builds. 2009-06-09 10:34:21 +02:00
Jonathan Davies
6a17e7c6c7 * ubuntutools/packages.py: Created checkIsInDebian() function.
* requestsync: Adapt to use new function above.
* update-maintainer: Rewrote in Python and adapted to use Maintainer
  field spec approved by the Technical Board at:
  - https://lists.ubuntu.com/archives/ubuntu-devel/2009-May/028213.html
2009-05-31 21:45:35 +01:00
Jonathan Davies
ed15916481 buildd: Implemented partial launchpadlib support (displays build status
and arches for now).
2009-05-28 05:53:45 -04:00
Jonathan Davies
5ba877aefd urlopener module no longer needed. 2009-05-28 03:10:08 -04:00
Jonathan Davies
6c2e20d030 Removed FIXME comment - connection problem this end. 2009-05-27 18:25:00 -04:00
Jonathan Davies
a876414c25 ubuntutools/lp/functions.py: Improved error messages, and made prettier functions. 2009-05-27 18:07:46 -04:00
Jonathan Davies
2e747436a7 * ubuntutools/lp/libsupport.py: Fail if we're unable to import launchpadlib
(we need it to run stuff).
2009-05-27 16:48:32 -04:00
Iain Lane
d134469ed3 Convert _findMember to use newly efficient isLPTeamMember, and remove name argument since we always just check launchpad.me anyway. Remove TeamNotFoundException which is now never thrown (false is just returned instead). 2009-05-17 16:06:26 +01:00
Anders Kaseorg
f762242ebb * ubuntutools/lp/functions.py:
- Simplify isLPTeamMember.

<Laney> andersk: what does super_teams do?
<andersk> Laney: I found super_teams using dir(launchpad.me).  It
returns the collection of teams that the person is a member of.  I'm
not sure it's actually documented.
<Laney> andersk: I've found the documentation to be a bit
lacking. Does it count indirect memberships too?
<andersk> Laney: yes, it appears to.
<Laney> andersk: If that's right then your version is better than mine
<Laney> andersk: Could you prepare a branch for merging? I'd just do
it directly but I'm a bit busy now so can't, and I'm afraid I'll
forget
2009-05-10 17:41:03 -04:00
Iain Lane
4b8839ef15 - Correct bug supervisor team to ubuntu-bugcontrol
- Remove team names from sponsorship message - makes the function much
    simpler

Also check if teams are valid using is_valid.
2009-05-09 21:08:46 +01:00
Iain Lane
b4cd975dc8 * ubuntutools/lp/lp_functions.py,
ubuntutools/lp/udtexceptions.py:
  - Add new public functions that expose features from LP API
  - Modify isLPTeamMember to use LP API
* requestsync
  - Use new functions to check if user can upload requested package directly
    instead of checking team membership
  - Default to current development release if no release is specified on
    commandline
* buildd
  - Check if user has upload privileges instead of checking for team
    membership when seeing if operations are permitted
2009-05-09 20:09:56 +01:00
Luca Falavigna
d830c5a4c1 Add per-package upload permission checks. 2009-02-19 23:59:12 +01:00
Loïc Minier
4276d59cbc Import urllib2 and sys in lp/functions.py, fixing requestsync. 2009-02-06 12:13:59 +01:00
Jonathan Davies
18a289f7ec * Removed ubuntutools/misc.py's mkdir function - superseded by
os.makedirs().
2009-01-26 09:34:09 +00:00
Jonathan Davies
a6c88f7e6a Merge in Iain's changes. 2009-01-25 10:11:06 +00:00
Jonathan Davies
64a93270d2 * ubuntutools/lp: Added copyright to functions.py and various corrections to
other files.
2009-01-25 10:04:06 +00:00
Iain Lane
354a42b669 ubuntutools/lp/functions.py: Rename urlopener import as it conflicts with
a variable, causing an error.
2009-01-25 01:05:02 +00:00
Jonathan Davies
fc706eafe0 ubuntutools/lp/libsupport.py: Added glob to imports. 2009-01-21 10:50:26 +00:00
Jonathan Davies
88abaa56cf More module reorganzation. 2009-01-19 22:37:27 +00:00
Jonathan Davies
6f0f40360f * ubuntutools/lplibsupport.py: Correct copyright.
* manage-credentials: Changed imports for new files.
2009-01-19 17:57:46 +00:00
Jonathan Davies
66e11f7e49 * common.py: Split into multiple files in ubuntutools/.
* buildd: Converted new imports.
2009-01-19 17:55:00 +00:00
Jonathan Davies
59aac908c1 * Moved common.py to ubuntutools/ subdirectory to avoid possible conflicts
in Python packaging and fixed all imports as necessary.
2009-01-17 11:23:08 +00:00
Siegfried-Angel Gevatter Pujals
0dc2681b17 Move ubuntutools/common.py to common.py. 2008-08-11 22:53:25 +02:00
Jonathan Patrick Davies
d3f18b8ec7 * buildd: Imported from Martin Pitt's scripts at:
http://people.ubuntu.com/~pitti/scripts/buildd.py
* ubuntutools/common.py: Python module to be used to enable the use of cookies
  to authenticate with Launchpad.
* debian/ubuntu-dev-tools.install: Added line to install common.py above to
  the correct location.
2008-08-11 21:48:40 +01:00
Siegfried-Angel Gevatter Pujals
ba584a2699 Rename new binary to python-ubuntutools (ubuntutools is a namespace now). Minor changes. 2008-02-18 17:33:02 +01:00