let the user explicit choose between using bugs.launchpad.net and bugs.edge.launchpad.net

Bug #188298 reported by Markus Korn on 2008-02-02
4
Affects Status Importance Assigned to Milestone
python-launchpad-bugs
Wishlist
Markus Korn

Bug Description

bugs.edge.launchpad.net is a testing environment, a user of py-lp-bugs might be intrested in using the more stable bugs.launchpad.net even if he/she is member of "launchpad beta testers"

I suggest the following workflow:
>>> import launchpadbugs.connector as Connector
>>> Bug = Connector.ConnectBug()
>>> Bug.set_launchpad_version(<version>)

where <version> is one of these:
"default": respect user's seettings, if a user is member of "LP beta testers" use b.edge.lp.net otherwise use b.lp.net (default)
"stable": force usage of bugs.launchpad.net
"edge": force usage of bugs.edge.launchpad.net, if a user is not member of "launchpad beta testers" bug.commit() will raise in an "Not permitted"-error

any suggestions?

Markus

Markus Korn (thekorn) on 2008-02-02
Changed in python-launchpad-bugs:
assignee: nobody → thekorn
importance: Undecided → Wishlist

Markus Korn wrote:
> "edge": force usage of bugs.edge.launchpad.net, if a user
> is not member of "launchpad beta testers" bug.commit()
> will raise in an "Not permitted"-error

Everybody can now use edge.lp.net, even if you aren't logged in.

So it should just use edge in that case.

Markus Korn (thekorn) wrote :

Emilio, yes, but if you are not member of "LP beta testers" you can not add comments etc., so it is read only in this case,
or am I wrong?

Markus

Markus Korn wrote:
> Emilio, yes, but if you are not member of "LP beta testers" you can not add comments etc., so it is read only in this case,
> or am I wrong?

I don't really know, and I can't test it unless I either create a fake account,
or leave the beta testers team.

But I can ask on #launchpad :)

14:00 < pochu> It's now possible to everybody to view edge. Is it possible
to use it too? (e.g. report bugs, post comments...)
14:01 < Hobbsee> pochu: yes
14:02 < pochu> Thanks

Markus Korn (thekorn) wrote :

I added a branch where the user can choose wether he/she wants to use edge or not.

Example:
In [1]: import launchpadbugs.connector as Connector

In [2]: Bug = Connector.ConnectBug(method="html")

In [3]: b = Bug(123456)

In [4]: b.url
Out[4]: 'https://bugs.launchpad.net/ubuntu/+source/xine-lib/+bug/123456'

In [5]: from launchpadbugs.lpconstants import HTTPCONNECTION

In [6]: Bug.set_connection_mode(HTTPCONNECTION.MODE.EDGE)

In [7]: b = Bug(123456)

In [8]: b.url
Out[8]: 'https://bugs.edge.launchpad.net/ubuntu/+source/xine-lib/+bug/123456'

In [9]: Bug.set_connection_mode(HTTPCONNECTION.MODE.STABLE)

In [10]: b = Bug(url="https://bugs.edge.launchpad.net/ubuntu/+source/xine-lib/+bug/123456")

In [11]: b.url
Out[11]: 'https://bugs.launchpad.net/ubuntu/+source/xine-lib/+bug/123456'

In [12]: Bug.authentication = "/home/markus/.gnome2/epiphany/mozilla/epiphany/cookies.txt"

In [13]: Bug.set_connection_mode(HTTPCONNECTION.MODE.DEFAULT)

In [14]: b = Bug(123456)

In [15]: b.url
Out[15]: 'https://bugs.edge.launchpad.net/ubuntu/+source/xine-lib/+bug/123456'

In [16]: Bug.set_connection_mode(HTTPCONNECTION.MODE.STABLE)

In [17]: b = Bug(123456)

In [18]: b.url
Out[18]: 'https://bugs.launchpad.net/ubuntu/+source/xine-lib/+bug/123456'

In [19]:

So even if the user is member of "LP beta testers" the stable version of lp can be used with py-lp-bugs.
This would allow the scripts be more independent from the (frequent) changes to edge

Please test this, if this works this should land into .main as soon as possible.

Markus

Markus Korn (thekorn) on 2008-02-04
Changed in python-launchpad-bugs:
status: New → In Progress
Markus Korn (thekorn) wrote :

I tested this for a while now and it works for me like a charme.
Can anyone else please review this?
It would be nice to have such a switch in .main soon to provide the possibility of an "as stable as possible" interface to launchpad.net

Markus

Changed in python-launchpad-bugs:
status: In Progress → Fix Committed
Markus Korn (thekorn) on 2008-04-02
Changed in python-launchpad-bugs:
status: Fix Committed → In Progress
Daniel Hahler (blueyed) wrote :

I'd like to see support for "staging.launchpad.net", so that you can experiment with python-launchpad-bugs, without submitting any real bugs.
Should I file a new wish for it, or does it fit here, too?

In general, the user should just be able to set the "subdomain to use" ("edge", "", "staging").

Markus Korn (thekorn) wrote :

If anybody who is registered can use staging.launchpad.net (and by use I also mean login) than it fits here, if not please file a new bug.
So the question is: Can anybody use staging.launchpad.net or only members of ~launchpad-beta-testers

Markus

Markus Korn (thekorn) on 2008-04-09
Changed in python-launchpad-bugs:
milestone: none → intrepid
Daniel Hahler (blueyed) wrote :

I've asked in #launchpad and anyone can use staging.launchpad.net.

It would be very nice, to have this support, because it allows testing something, without accidentally submitting a bug (like described in bug 216964).

Markus Korn (thekorn) wrote :

The implementation described in comment #4 is now available in the intrepid.merge branch, please test it.
The ability to choose "staging" is not yet implemented as there authentication behaves a bit different.

Markus

Markus Korn (thekorn) wrote :

------------------------------------------------------------
revno: 107
committer: Markus Korn <email address hidden>
branch nick: python-launchpad-bugs
timestamp: Wed 2008-07-02 22:34:33 +0200
message:
  * Improved LPBugList and LPBugPage:
    This two classes have now a cleaner structure, filtering of bug lists
    with python-launchpad-bugs is now a lot easier. With
    LPBugList.set_progress_hook() it is now possible to visualize the
    process of fetching bug lists.
  * launchpadbugs/{tasksbase,html_bug.py,text_bug.py}: if a task is a
    bugwatch then task.remote returns the remote-url, otherwise it returns
    'None'
  * Improved error handling in python-launchpad-bugs and added
    infrastructure for unittests. This also contains some basic testcases in
    tests/ (LP: #189572)
  * Added ability to parse bugtracker overviews (LP: #203312)
  * It is now possible to filter bug lists based on milestones. This also
    implements a helper function to list all active milestones of a project
    in launchpad (LP: #200457)
  * Added function to filter buglists based on Bug.date_reported
    (LP: #185357)
  * added 'move-duplicates' written by Kjell Braden and 'README' to
    examples/ (LP: #208148)
  * launchpadbugs/attachmentsbase.py: LPAttachment.download() now also
    accepts an optional argument to specify the location where to download
    the attachment (LP: #242317)
  * Added method to let the user choose which version/server of launchpad to
    use, so it is possible to explicit use bugs.launchpad.net or
    bugs.edge.launchpad.net (LP: #188298)
  * launchpadbugs/html_bug.py: InfoTable: fixed parsing of milestones in
    read-only mode (LP: #243057)
  * Added functionality for adding new tasks to bug reports.
    With this implementation so far you are able to add 'project' and
    'distro' tasks, but unable to create bugwatches and change task
    attributes before committing the changes. (LP: #193853)
  * launchpadbugs/html_bug.py: Stephan Hermann fixed html connector to work
    with the newest launchpad rollout (LP: #243193, #244452)
    .
    Unfortunately this update breaks compatibilty. Please update your code
    to make use of the python-launchpad-bugs 0.3 API. It's worth it.
    ------------------------------------------------------------

Changed in python-launchpad-bugs:
status: In Progress → Fix Committed
Markus Korn (thekorn) wrote :

Fix released in py-lp-bugs 0.3

Changed in python-launchpad-bugs:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers