Merge lp:~cmiller/desktopcouch/api-break-find-port into lp:desktopcouch

Proposed by Chad Miller
Status: Merged
Approved by: dobey
Approved revision: 266
Merged at revision: 267
Proposed branch: lp:~cmiller/desktopcouch/api-break-find-port
Merge into: lp:desktopcouch
Diff against target: 31 lines (+26/-0)
1 file modified
desktopcouch/__init__.py (+26/-0)
To merge this branch: bzr merge lp:~cmiller/desktopcouch/api-break-find-port
Reviewer Review Type Date Requested Status
dobey (community) Approve
Eric Casteleijn (community) Approve
Review via email: mp+48522@code.launchpad.net

Commit message

Re-add desktopcouch.find* functions that should be deprecated. (LP: #710424)

To post a comment you must log in.
Revision history for this message
Eric Casteleijn (thisfred) :
review: Approve
Revision history for this message
dobey (dobey) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'desktopcouch/__init__.py'
2--- desktopcouch/__init__.py 2010-11-19 00:45:03 +0000
3+++ desktopcouch/__init__.py 2011-02-03 17:59:01 +0000
4@@ -1,1 +1,27 @@
5 """Desktopcouch."""
6+
7+
8+## Deprecated ##
9+def find_port(*args, **kwargs):
10+ """[Deprecated] Find the port in use by the personal couchdb, optionally
11+ starting it up if not running."""
12+ import desktopcouch.application.platform as platform
13+ import warnings
14+ warnings.warn(
15+ 'Deprecated function; use desktopcouch.application.platform.find_port'
16+ ' instead.', DeprecationWarning, stacklevel=2)
17+
18+ return platform.find_port(*args, **kwargs)
19+
20+
21+## Deprecated ##
22+def find_pid(*args, **kwargs):
23+ """[Deprecated] Find the process ID in use by the personal couchdb,
24+ optionally starting it up if not running."""
25+ import desktopcouch.application.platform as platform
26+ import warnings
27+ warnings.warn(
28+ 'Deprecated function; use desktopcouch.application.platform.find_pid'
29+ ' instead.', DeprecationWarning, stacklevel=2)
30+
31+ return platform.find_pid(*args, **kwargs)

Subscribers

People subscribed via source and target branches