Skip to content

Instantly share code, notes, and snippets.

@adiroiban
Created October 23, 2020 21:28
Show Gist options
  • Save adiroiban/ed7cc38f775a575421787eb088f63a46 to your computer and use it in GitHub Desktop.
Save adiroiban/ed7cc38f775a575421787eb088f63a46 to your computer and use it in GitHub Desktop.
pydoctor private deprecations
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html>
<head>
<title>_trial_temp.test : API documentation</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link rel="stylesheet" type="text/css" href="bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="apidocs.css" />
</head>
<body>
<nav class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">
_trial_temp API Documentation
</a>
</div>
</div>
</nav>
<div id="showPrivate">
<button class="btn btn-link" onclick="togglePrivate()">Toggle Private API</button>
</div>
<div class="container">
<div class="page-header">
<h1 class="module"><code>_trial_temp.test</code> <small>module documentation</small></h1>
<span id="partOf">
Part of <code><a href="_trial_temp.html" class="code" data-type="Package">_trial_temp</a></code>
</span>
</div>
<div class="extrasDocstring">
</div>
<div class="moduleDocstring">
<div class="undocumented">Undocumented</div>
</div>
<div id="splitTables">
<table class="children sortable" id="id2">
<tr class="function">
<td>Function</td>
<td><a href="_trial_temp.test.html#foo" class="code" data-type="Function">foo</a></td>
<td><span>text in foo docstring</span></td>
</tr><tr class="class">
<td>Class</td>
<td><a href="_trial_temp.test.Baz.html" class="code" data-type="Class">Baz</a></td>
<td><span class="undocumented">Undocumented</span></td>
</tr><tr class="function private">
<td>Function</td>
<td><a href="_trial_temp.test.html#_bar" class="code" data-type="Function">_bar</a></td>
<td><span>should also appear in _bar output</span></td>
</tr>
</table>
</div>
<div id="childList">
<div class="basefunction">
<a name="_trial_temp.test.foo">
</a>
<a name="foo">
</a>
<div class="functionHeader">
def
foo():
</div>
<div class="docstring functionBody">
<div><p>text in foo docstring</p></div>
</div>
</div><div class="basefunction private">
<a name="_trial_temp.test._bar">
</a>
<a name="_bar">
</a>
<div class="functionHeader">
@deprecate.deprecated(incremental.Version('Twisted', 16, 0, 0))<br />
def
_bar():
</div>
<div class="docstring functionBody">
<div><p>should also appear in _bar output</p></div>
</div>
</div>
</div>
<address>
<a href="index.html">API Documentation</a> for _trial_temp, generated by <a href="https://github.com/twisted/pydoctor/">pydoctor</a> at 2020-10-23 22:25:36.
</address>
</div>
<script src="pydoctor.js" type="text/javascript"></script>
</body>
</html>
from twisted.python.deprecate import deprecated
from incremental import Version
from twisted.python import deprecate
import incremental
@deprecated(Version('Twisted', 15, 0, 0), 'Baz')
def foo():
'text in foo docstring'
@deprecate.deprecated(incremental.Version('Twisted', 16, 0, 0))
def _bar():
'should also appear in _bar output'
@deprecated(Version('Twisted', 14, 2, 3), replacement='stuff')
class Baz:
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment