This file is indexed.

/usr/share/doc/python-apt/html/tutorials/contributing.html is in python-apt-doc 0.9.3.12.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Contributing to python-apt &mdash; python-apt 0.9.3.12 documentation</title>
    
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '0.9.3.12',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="top" title="python-apt 0.9.3.12 documentation" href="../index.html" />
    <link rel="up" title="Tutorials" href="index.html" />
    <link rel="next" title="Python APT and C++" href="../c++/index.html" />
    <link rel="prev" title="Doing stuff apt-get does" href="apt-get.html" />
    <link rel="shortcut icon" type="image/png" href="../_static/py.png" />
 

  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="../c++/index.html" title="Python APT and C++"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="apt-get.html" title="Doing stuff apt-get does"
             accesskey="P">previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="../index.html">python-apt 0.9.3.12 documentation</a> &raquo;</li>

          <li><a href="index.html" accesskey="U">Tutorials</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="contributing-to-python-apt">
<h1>Contributing to python-apt<a class="headerlink" href="#contributing-to-python-apt" title="Permalink to this headline"></a></h1>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Author:</th><td class="field-body">Julian Andres Klode &lt;<a class="reference external" href="mailto:jak&#37;&#52;&#48;debian&#46;org">jak<span>&#64;</span>debian<span>&#46;</span>org</a>&gt;</td>
</tr>
<tr class="field-even field"><th class="field-name">Release:</th><td class="field-body">0.9.3.12</td>
</tr>
<tr class="field-odd field"><th class="field-name">Date:</th><td class="field-body">June 20, 2015</td>
</tr>
</tbody>
</table>
<p>Let&#8217;s say you need a new feature, you can develop it, and you want to get it
included in python-apt. Then be sure to follow the following guidelines.</p>
<div class="section" id="available-branches">
<h2>Available branches<a class="headerlink" href="#available-branches" title="Permalink to this headline"></a></h2>
<p>First of all, let&#8217;s talk a bit about the bzr branches of python-apt. In the
following parts, we will assume that you use bzr to create your changes and
submit them.</p>
<div class="section" id="distribution-branches">
<h3>Distribution branches<a class="headerlink" href="#distribution-branches" title="Permalink to this headline"></a></h3>
<dl class="docutils">
<dt><strong>debian-sid:</strong> <a class="reference external" href="http://bzr.debian.org/apt/python-apt/debian-sid">http://bzr.debian.org/apt/python-apt/debian-sid</a></dt>
<dd><p class="first">This is the official Debian branch of python-apt. All code which will be
uploaded to Debian is here. It is not as up-to-date as the mvo branch,
because this branch often gets updated just right before the release
happens.</p>
<p class="last">VCS-Browser: <a class="reference external" href="http://bzr.debian.org/loggerhead/apt/python-apt/debian-sid/changes">http://bzr.debian.org/loggerhead/apt/python-apt/debian-sid/changes</a></p>
</dd>
</dl>
<p><strong>debian-experimental:</strong> <a class="reference external" href="http://bzr.debian.org/apt/python-apt/debian-experimental">http://bzr.debian.org/apt/python-apt/debian-experimental</a></p>
<blockquote>
<div><p>This is another official Debian branch of python-apt, for releases
targetted at Debian experimental. This branch may contain unstable code
and may thus not work correctly.</p>
<p>VCS-Browser: <a class="reference external" href="http://bzr.debian.org/loggerhead/apt/python-apt/debian-experimental/changes">http://bzr.debian.org/loggerhead/apt/python-apt/debian-experimental/changes</a></p>
</div></blockquote>
<dl class="docutils">
<dt><strong>ubuntu:</strong> <tt class="docutils literal"><span class="pre">lp:~ubuntu-core-dev/python-apt/ubuntu</span></tt></dt>
<dd><p class="first">This is the official Ubuntu development branch. The same notes apply as
for the debian-sid branch above. For the Ubuntu release branches, replace
<tt class="docutils literal"><span class="pre">ubuntu</span></tt> with the version you want; for example, for lucid:
<tt class="docutils literal"><span class="pre">lp:~ubuntu-core-dev/python-apt/lucid</span></tt>.</p>
<p class="last">VCS-Browser: <a class="reference external" href="https://code.launchpad.net/~ubuntu-core-dev/python-apt/ubuntu">https://code.launchpad.net/~ubuntu-core-dev/python-apt/ubuntu</a></p>
</dd>
</dl>
</div>
<div class="section" id="important-personal-branches">
<h3>Important Personal branches<a class="headerlink" href="#important-personal-branches" title="Permalink to this headline"></a></h3>
<dl class="docutils">
<dt><strong>mvo:</strong> lp:~mvo/python-apt/mvo</dt>
<dd><p class="first">This is Michael Vogt&#8217;s branch. Most of the development of apt happens here,
as he is the lead maintainer of python-apt.</p>
<p>This branch is also available from Launchpads super mirror, via
<tt class="docutils literal"><span class="pre">lp:python-apt</span></tt>. Checkouts from Launchpad are generally faster and can
use the bzr protocoll.</p>
<p class="last">VCS-Browser: <a class="reference external" href="http://bazaar.launchpad.net/~mvo/python-apt/mvo/">http://bazaar.launchpad.net/~mvo/python-apt/mvo/</a></p>
</dd>
<dt><strong>jak:</strong> <a class="reference external" href="http://bzr.debian.org/users/jak/python-apt/jak">http://bzr.debian.org/users/jak/python-apt/jak</a></dt>
<dd><p class="first">This is Julian Andres Klode&#8217;s (the documentation author&#8217;s) branch. This
is the place where cleanup and documentation updates happen. It is based
off debian-sid. Most stuff happens in debian-sid now.</p>
<p class="last">VCS-Browser: <a class="reference external" href="http://bzr.debian.org/loggerhead/users/jak/python-apt/jak/">http://bzr.debian.org/loggerhead/users/jak/python-apt/jak/</a></p>
</dd>
</dl>
</div>
</div>
<div class="section" id="c-coding-style">
<h2>C++ Coding style<a class="headerlink" href="#c-coding-style" title="Permalink to this headline"></a></h2>
<p>This document gives coding conventions for the C++ code comprising
the C++ extensions of Python APT.  Please see the companion
informational PEP describing style guidelines for Python code (<span class="target" id="index-0"></span><a class="pep reference external" href="http://www.python.org/dev/peps/pep-0008"><strong>PEP 8</strong></a>).</p>
<p>Note, rules are there to be broken.  Two good reasons to break a
particular rule:</p>
<blockquote>
<div><ol class="arabic simple">
<li>When applying the rule would make the code less readable, even
for someone who is used to reading code that follows the rules.</li>
<li>To be consistent with surrounding code that also breaks it
(maybe for historic reasons) &#8211; although this is also an
opportunity to clean up someone else&#8217;s mess (in true XP style).</li>
</ol>
</div></blockquote>
<p>This part of the document is derived from <span class="target" id="index-1"></span><a class="pep reference external" href="http://www.python.org/dev/peps/pep-0007"><strong>PEP 7</strong></a> which was written by
Guido van Rossum.</p>
<div class="section" id="c-dialect">
<h3>C++ dialect<a class="headerlink" href="#c-dialect" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li>Use ISO standard C++ (the 1998 version of the standard).</li>
<li>Use C++ style // one-line comments for single-line comments.</li>
<li>No compiler warnings with <tt class="docutils literal"><span class="pre">gcc</span> <span class="pre">-std=c++98</span> <span class="pre">-Wall</span> <span class="pre">-Wno-write-strings</span></tt>. There
should also be no errors with <tt class="docutils literal"><span class="pre">-pedantic</span></tt> added.</li>
</ul>
</div>
<div class="section" id="code-lay-out">
<h3>Code lay-out<a class="headerlink" href="#code-lay-out" title="Permalink to this headline"></a></h3>
<ul>
<li><p class="first">Use 3-space indents, in files that already use them. In new source files,
that were created after this rule was introduced, use 4-space indents.</p>
<p>At some point, the whole codebase may be converted to use only
4-space indents.</p>
</li>
<li><p class="first">No line should be longer than 79 characters.  If this and the
previous rule together don&#8217;t give you enough room to code, your
code is too complicated &#8211; consider using subroutines.</p>
</li>
<li><p class="first">No line should end in whitespace.  If you think you need
significant trailing whitespace, think again &#8211; somebody&#8217;s
editor might delete it as a matter of routine.</p>
</li>
<li><p class="first">Function definition style: function name in column 2, outermost
curly braces in column 1, blank line after local variable
declarations:</p>
<div class="highlight-c"><div class="highlight"><pre><span class="k">static</span> <span class="kt">int</span> <span class="nf">extra_ivars</span><span class="p">(</span><span class="n">PyTypeObject</span> <span class="o">*</span><span class="n">type</span><span class="p">,</span> <span class="n">PyTypeObject</span> <span class="o">*</span><span class="n">base</span><span class="p">)</span>
<span class="p">{</span>
    <span class="kt">int</span> <span class="n">t_size</span> <span class="o">=</span> <span class="n">PyType_BASICSIZE</span><span class="p">(</span><span class="n">type</span><span class="p">);</span>
    <span class="kt">int</span> <span class="n">b_size</span> <span class="o">=</span> <span class="n">PyType_BASICSIZE</span><span class="p">(</span><span class="n">base</span><span class="p">);</span>

    <span class="n">assert</span><span class="p">(</span><span class="n">t_size</span> <span class="o">&gt;=</span> <span class="n">b_size</span><span class="p">);</span> <span class="cm">/* type smaller than base! */</span>
    <span class="p">...</span>
    <span class="k">return</span> <span class="mi">1</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
</div>
</li>
<li><p class="first">Code structure: one space between keywords like &#8216;if&#8217;, &#8216;for&#8217; and
the following left paren; no spaces inside the paren; braces as
shown:</p>
<div class="highlight-c"><div class="highlight"><pre><span class="k">if</span> <span class="p">(</span><span class="n">mro</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
    <span class="p">...</span>
<span class="p">}</span>
<span class="k">else</span> <span class="p">{</span>
    <span class="p">...</span>
<span class="p">}</span>
</pre></div>
</div>
</li>
<li><p class="first">The return statement should <em>not</em> get redundant parentheses:</p>
<div class="highlight-c"><div class="highlight"><pre><span class="k">return</span> <span class="n">Py_None</span><span class="p">;</span> <span class="cm">/* correct */</span>
<span class="k">return</span><span class="p">(</span><span class="n">Py_None</span><span class="p">);</span> <span class="cm">/* incorrect */</span>
</pre></div>
</div>
</li>
<li><p class="first">Function and macro call style: <tt class="docutils literal"><span class="pre">foo(a,</span> <span class="pre">b,</span> <span class="pre">c)</span></tt> &#8211; no space before
the open paren, no spaces inside the parens, no spaces before
commas, one space after each comma.</p>
</li>
<li><p class="first">Always put spaces around assignment, Boolean and comparison
operators.  In expressions using a lot of operators, add spaces
around the outermost (lowest-priority) operators.</p>
</li>
<li><p class="first">Breaking long lines: if you can, break after commas in the
outermost argument list.  Always indent continuation lines
appropriately, e.g.:</p>
<div class="highlight-c"><div class="highlight"><pre><span class="n">PyErr_Format</span><span class="p">(</span><span class="n">PyExc_TypeError</span><span class="p">,</span>
        <span class="s">&quot;cannot create &#39;%.100s&#39; instances&quot;</span><span class="p">,</span>
        <span class="n">type</span><span class="o">-&gt;</span><span class="n">tp_name</span><span class="p">);</span>
</pre></div>
</div>
</li>
<li><p class="first">When you break a long expression at a binary operator, the
operator goes at the end of the previous line, e.g.:</p>
<div class="highlight-c"><div class="highlight"><pre><span class="k">if</span> <span class="p">(</span><span class="n">type</span><span class="o">-&gt;</span><span class="n">tp_dictoffset</span> <span class="o">!=</span> <span class="mi">0</span> <span class="o">&amp;&amp;</span> <span class="n">base</span><span class="o">-&gt;</span><span class="n">tp_dictoffset</span> <span class="o">==</span> <span class="mi">0</span> <span class="o">&amp;&amp;</span>
    <span class="n">type</span><span class="o">-&gt;</span><span class="n">tp_dictoffset</span> <span class="o">==</span> <span class="n">b_size</span> <span class="o">&amp;&amp;</span>
    <span class="p">(</span><span class="kt">size_t</span><span class="p">)</span><span class="n">t_size</span> <span class="o">==</span> <span class="n">b_size</span> <span class="o">+</span> <span class="k">sizeof</span><span class="p">(</span><span class="n">PyObject</span> <span class="o">*</span><span class="p">))</span>
    <span class="k">return</span> <span class="mi">0</span><span class="p">;</span> <span class="cm">/* &quot;Forgive&quot; adding a __dict__ only */</span>
</pre></div>
</div>
</li>
<li><p class="first">Put blank lines around functions, structure definitions, and
major sections inside functions.</p>
</li>
<li><p class="first">Comments go before the code they describe.</p>
</li>
<li><p class="first">All functions and global variables should be declared static
unless they are to be part of a published interface</p>
</li>
</ul>
</div>
<div class="section" id="naming-conventions">
<h3>Naming conventions<a class="headerlink" href="#naming-conventions" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li>Use a <tt class="docutils literal"><span class="pre">Py</span></tt> prefix for public functions; never for static
functions.  The <tt class="docutils literal"><span class="pre">Py_</span></tt> prefix is reserved for global service
routines like <tt class="docutils literal"><span class="pre">Py_FatalError</span></tt>; specific groups of routines
(e.g. specific object type APIs) use a longer prefix,
e.g. <tt class="docutils literal"><span class="pre">PyString_</span></tt> for string functions.</li>
<li>Public functions and variables use MixedCase with underscores,
like this: <tt class="docutils literal"><span class="pre">PyObject_GetAttr</span></tt>, <tt class="docutils literal"><span class="pre">Py_BuildValue</span></tt>, <tt class="docutils literal"><span class="pre">PyExc_TypeError</span></tt>.</li>
<li>Internal functions and variables use lowercase with underscores, like
this: <tt class="docutils literal"><span class="pre">hashes_get_sha1.</span></tt></li>
<li>Occasionally an &#8220;internal&#8221; function has to be visible to the
loader; we use the _Py prefix for this, e.g.: <tt class="docutils literal"><span class="pre">_PyObject_Dump</span></tt>.</li>
<li>Macros should have a MixedCase prefix and then use upper case,
for example: <tt class="docutils literal"><span class="pre">PyString_AS_STRING</span></tt>, <tt class="docutils literal"><span class="pre">Py_PRINT_RAW</span></tt>.</li>
</ul>
</div>
<div class="section" id="documentation-strings">
<h3>Documentation Strings<a class="headerlink" href="#documentation-strings" title="Permalink to this headline"></a></h3>
<ul>
<li><p class="first">The first line of each function docstring should be a &#8220;signature
line&#8221; that gives a brief synopsis of the arguments and return
value.  For example:</p>
<div class="highlight-c"><div class="highlight"><pre><span class="n">PyDoc_STRVAR</span><span class="p">(</span><span class="n">myfunction__doc__</span><span class="p">,</span>
<span class="s">&quot;myfunction(name: str, value) -&gt; bool</span><span class="se">\n\n</span><span class="s">&quot;</span>
<span class="s">&quot;Determine whether name and value make a valid pair.&quot;</span><span class="p">);</span>
</pre></div>
</div>
<p>The signature line should be formatted using the format for function
annotations described in <span class="target" id="index-2"></span><a class="pep reference external" href="http://www.python.org/dev/peps/pep-3107"><strong>PEP 3107</strong></a>, whereas the annotations shall reflect
the name of the type (e.g. <tt class="docutils literal"><span class="pre">str</span></tt>). The leading <tt class="docutils literal"><span class="pre">def</span></tt> and the trailing
<tt class="docutils literal"><span class="pre">:</span></tt> as used for function definitions must not be included.</p>
<p>Always include a blank line between the signature line and the
text of the description.</p>
<p>If the return value for the function is always <tt class="docutils literal"><span class="pre">None</span></tt> (because
there is no meaningful return value), do not include the
indication of the return type.</p>
</li>
<li><p class="first">When writing multi-line docstrings, be sure to always use
string literal concatenation:</p>
<div class="highlight-c"><div class="highlight"><pre><span class="n">PyDoc_STRVAR</span><span class="p">(</span><span class="n">myfunction__doc__</span><span class="p">,</span>
<span class="s">&quot;myfunction(name, value) -&gt; bool</span><span class="se">\n\n</span><span class="s">&quot;</span>
<span class="s">&quot;Determine whether name and value make a valid pair.&quot;</span><span class="p">);</span>
</pre></div>
</div>
</li>
</ul>
</div>
</div>
<div class="section" id="python-coding-style">
<h2>Python Coding Style<a class="headerlink" href="#python-coding-style" title="Permalink to this headline"></a></h2>
<p>The coding style for all code written in python is <span class="target" id="index-3"></span><a class="pep reference external" href="http://www.python.org/dev/peps/pep-0008"><strong>PEP 8</strong></a>. Exceptions from
this rule are the documentation, where code is sometimes formatted differently
to explain aspects, and functions provided for 0.7 compatibility purposes.</p>
<p>When writing code, use tools like pylint, pyflakes, pychecker and pep8.py
(all available from Debian/Ubuntu) to verify that your code is
OK. Fix all the problems which seem reasonable, and mention the unfixed issues
when asking for merge.</p>
<p>In order to make the automatic generation of Python 3 code using 2to3 possible,
code written in Python may not utilize any functionality unsupported by 2to3 or
deprecated as of Python 2.6.</p>
</div>
<div class="section" id="submitting-your-patch">
<h2>Submitting your patch<a class="headerlink" href="#submitting-your-patch" title="Permalink to this headline"></a></h2>
<p>First of all, the patch you create should be based against the most current
branch of python-apt (debian-sid or debian-experimental). If it is a bugfix,
you should probably use debian-sid. If you choose the wrong branch, we will
ask you to rebase your patches against the correct one.</p>
<p>Once you have made your change, check that it:</p>
<blockquote>
<div><ul class="simple">
<li>conforms to <span class="target" id="index-4"></span><a class="pep reference external" href="http://www.python.org/dev/peps/pep-0008"><strong>PEP 8</strong></a> (checked with pep8.py). It should, at least not
introduce new errors. (and never have whitespace at end of line)</li>
<li>produces no new errors in pychecker, pyflakes and pylint (unless you
can&#8217;t fix them, but please tell so when requesting the merge, so it can
be fixed before hitting one of the main branches).</li>
<li>does not change the behaviour of existing code in a non-compatible way.</li>
</ul>
</div></blockquote>
<p>If your change follows all points of the checklist, you can commit it to your
repository. (You could commit it first, and check later, and then commit the
fixes, but commits should be logical and it makes no sense to have to commits
for one logical unit).</p>
<p>Once you have made all your changes,  you can run <tt class="docutils literal"><span class="pre">bzr</span> <span class="pre">send</span> <span class="pre">-o</span> <span class="pre">patch-name</span></tt>
to create a so called <em>merge-directive</em>, which contains your changes and
allows us to preserve the history of your changes. (But please replace patch-name
with something useful).</p>
<p>Now report a bug against the python-apt package, attach the merge directive
you created in the previous step, and tag it with &#8216;patch&#8217;. It might also be
a good idea to prefix the bug report with &#8216;[PATCH]&#8217;.</p>
<p>If your patch introduces new functions, parameters, etc. , but does not update
the content of this documentation, please CC. <a class="reference external" href="mailto:jak&#37;&#52;&#48;debian&#46;org">jak<span>&#64;</span>debian<span>&#46;</span>org</a>, and add a short
notice to the bug report. Also see <cite>Documentation updates</cite></p>
<p>Once your patch got merged, you can <em>pull</em> the branch into which it has been
merged into your local one. If you have made changes since you submitted your
patch, you may need to <em>merge</em> the branch instead.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If you plan to work on python-apt for a longer time, it may be a good
idea to publish your branch somewhere. Alioth (<a class="reference external" href="http://alioth.debian.org">http://alioth.debian.org</a>)
and Launchpad (<a class="reference external" href="https://launchpad.net">https://launchpad.net</a>) provide bzr hosting. You can also
use any webspace with ftp or sftp connection (for the upload). Then you do
not need to send <em>merge directives</em>, but you can point to your branch
instead.</p>
</div>
</div>
<div class="section" id="documentation-updates">
<h2>Documentation updates<a class="headerlink" href="#documentation-updates" title="Permalink to this headline"></a></h2>
<p>If you want to update the documentation, please follow the procedure as written
above. You can send your content in plain text, but reStructuredText is the
preferred format. I (Julian Andres Klode) will review your patch and include
it.</p>
</div>
<div class="section" id="example-patch-session">
<h2>Example patch session<a class="headerlink" href="#example-patch-session" title="Permalink to this headline"></a></h2>
<p>In the following example, we edit a file, create a merge directive (an enhanced
patch), and report a wishlist bug with this patch against the python-apt
package:</p>
<div class="highlight-sh"><div class="highlight"><pre>user@pc:~<span class="nv">$ </span>bzr clone http://bzr.debian.org/apt/python-apt/debian-sid/
user@pc:~<span class="nv">$ </span><span class="nb">cd </span>debian-sid
user@pc:~/debian-sid<span class="nv">$ </span>editor FILES
user@pc:~/debian-sid<span class="nv">$ </span>pep8.py FILES <span class="c"># PEP 8 check, see above.</span>
user@pc:~/debian-sid<span class="nv">$ </span>pylint -e FILES <span class="c"># Check with pylint</span>
user@pc:~/debian-sid<span class="nv">$ </span>pyflakes FILES  <span class="c"># Check with pyflakes</span>
user@pc:~/debian-sid<span class="nv">$ </span>pychecker FILES <span class="c"># Check with pychecker</span>
user@pc:~/debian-sid<span class="nv">$ </span>bzr commit
user@pc:~/debian-sid<span class="nv">$ </span>bzr send -o my-patch
user@pc:~/debian-sid<span class="nv">$ </span>reportbug --severity<span class="o">=</span>wishlist --tag<span class="o">=</span>patch --attach<span class="o">=</span>my-patch python-apt
user@pc:~/debian-sid<span class="nv">$ </span><span class="c"># Add --list-cc=jak@debian.org if you change docs.</span>
</pre></div>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../contents.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Contributing to python-apt</a><ul>
<li><a class="reference internal" href="#available-branches">Available branches</a><ul>
<li><a class="reference internal" href="#distribution-branches">Distribution branches</a></li>
<li><a class="reference internal" href="#important-personal-branches">Important Personal branches</a></li>
</ul>
</li>
<li><a class="reference internal" href="#c-coding-style">C++ Coding style</a><ul>
<li><a class="reference internal" href="#c-dialect">C++ dialect</a></li>
<li><a class="reference internal" href="#code-lay-out">Code lay-out</a></li>
<li><a class="reference internal" href="#naming-conventions">Naming conventions</a></li>
<li><a class="reference internal" href="#documentation-strings">Documentation Strings</a></li>
</ul>
</li>
<li><a class="reference internal" href="#python-coding-style">Python Coding Style</a></li>
<li><a class="reference internal" href="#submitting-your-patch">Submitting your patch</a></li>
<li><a class="reference internal" href="#documentation-updates">Documentation updates</a></li>
<li><a class="reference internal" href="#example-patch-session">Example patch session</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="apt-get.html"
                        title="previous chapter">Doing stuff <strong class="command">apt-get</strong> does</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="../c++/index.html"
                        title="next chapter">Python APT and C++</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/tutorials/contributing.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="../c++/index.html" title="Python APT and C++"
             >next</a> |</li>
        <li class="right" >
          <a href="apt-get.html" title="Doing stuff apt-get does"
             >previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="../index.html">python-apt 0.9.3.12 documentation</a> &raquo;</li>

          <li><a href="index.html" >Tutorials</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2009-2010, Julian Andres Klode &lt;jak@debian.org&gt;.
      Last updated on Jun 20, 2015.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
    </div>
  </body>
</html>