/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to doc/developers/code-style.txt

  • Committer: Jelmer Vernooij
  • Date: 2018-11-18 18:23:32 UTC
  • mto: This revision was merged to the branch mainline in revision 7197.
  • Revision ID: jelmer@jelmer.uk-20181118182332-viz1qvqese2mo9i6
Fix some more Bazaar references.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
***********************
2
 
Bazaar Code Style Guide
 
2
Breezy Code Style Guide
3
3
***********************
4
4
 
5
5
Code layout
77
77
Python versions
78
78
===============
79
79
 
80
 
Bazaar supports Python from 2.6 through 2.7, and in the future we want to
81
 
support Python 3.  Avoid using language features added in
82
 
2.7, or features deprecated in Python 3.0.  (You can check v3
83
 
compatibility using the ``-3`` option of Python2.6.)
84
 
 
 
80
Breezy supports Python 2.7 and Python 3.5 or later.
85
81
 
86
82
hasattr and getattr
87
83
===================
193
189
   being leaked); merely having a del method inhibits Python gc; the
194
190
   warnings appear to users and upset them; they can also break tests that
195
191
   are checking what appears on stderr.
196
 
  
 
192
 
197
193
In short, just don't use ``__del__``.
198
194
 
199
195
Cleanup methods
239
235
Registries
240
236
==========
241
237
 
242
 
Several places in Bazaar use (or will use) a registry, which is a
 
238
Several places in Breezy use (or will use) a registry, which is a
243
239
mapping from names to objects or classes.  The registry allows for
244
240
loading in registered code only when it's needed, and keeping
245
241
associated information such as a help string or description.
395
391
Test coverage
396
392
=============
397
393
 
398
 
All code should be exercised by the test suite.  See the `Bazaar Testing
 
394
All code should be exercised by the test suite.  See the `Breezy Testing
399
395
Guide <http://www.breezy-vcs.org/developers/testing.html>`_ for detailed
400
396
information about writing tests.
401
397
 
409
405
 
410
406
Rationale:
411
407
 
412
 
* It makes the behaviour vary depending on whether bzr is run with -O
 
408
* It makes the behaviour vary depending on whether brz is run with -O
413
409
  or not, therefore giving a chance for bugs that occur in one case or
414
410
  the other, several of which have already occurred: assertions with
415
411
  side effects, code which can't continue unless the assertion passes,