Mercurial > p > roundup > code
view 3rdparty/bootstrap/docs/index.html @ 5525:bb7865241f8a
Make CSV import/export compatible across Python versions (also RDBMS journals) (issue 2550976, issue 2550975).
The roundup-admin export and import commands are used for migrating
between different database backends. It is desirable that they should
be usable also for migrations between Python 2 and Python 3, and in
some cases (e.g. with the anydbm backend) this may be required.
To be usable for such migrations, the format of the generated CSV
files needs to be stable, meaning the same as currently used with
Python 2. The export process uses repr() to produce the fields in the
CSV files and eval() to convert them back to Python data structures.
repr() of strings with non-ASCII characters produces different results
for Python 2 and Python 3.
This patch adds repr_export and eval_import functions to
roundup/anypy/strings.py which provide the required operations that
are just repr() and eval() in Python 2, but are more complicated in
Python 3 to use data representations compatible with Python 2. These
functions are then used in the required places for export and import.
repr() and eval() are also used in storing the dict of changed values
in the journal for the RDBMS backends. It is similarly desirable that
the database be compatible between Python 2 and Python 3, so that
export and import do not need to be used for a migration between
Python versions for non-anydbm back ends. Thus, this patch changes
rdbms_common.py in the places involved in storing journals in the
database, not just in those involved in import/export.
Given this patch, import/export with non-ASCII characters appear based
on some limited testing to work across Python versions, and an
instance using the sqlite backend appears to be compatible between
Python versions without needing import/export, *if* the sessions/otks
databases (which use anydbm) are deleted when changing Python version.
| author | Joseph Myers <jsm@polyomino.org.uk> |
|---|---|
| date | Sun, 02 Sep 2018 23:48:04 +0000 |
| parents | c109f7c1e477 |
| children |
line wrap: on
line source
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Bootstrap</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <!-- Le styles --> <link href="assets/css/bootstrap.css" rel="stylesheet"> <link href="assets/css/bootstrap-responsive.css" rel="stylesheet"> <link href="assets/css/docs.css" rel="stylesheet"> <link href="assets/js/google-code-prettify/prettify.css" rel="stylesheet"> <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <!-- Le fav and touch icons --> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png"> <link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png"> <link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png"> <link rel="shortcut icon" href="assets/ico/favicon.png"> </head> <body data-spy="scroll" data-target=".bs-docs-sidebar"> <!-- Navbar ================================================== --> <div class="navbar navbar-inverse navbar-fixed-top"> <div class="navbar-inner"> <div class="container"> <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="brand" href="./index.html">Bootstrap</a> <div class="nav-collapse collapse"> <ul class="nav"> <li class="active"> <a href="./index.html">Home</a> </li> <li class=""> <a href="./getting-started.html">Get started</a> </li> <li class=""> <a href="./scaffolding.html">Scaffolding</a> </li> <li class=""> <a href="./base-css.html">Base CSS</a> </li> <li class=""> <a href="./components.html">Components</a> </li> <li class=""> <a href="./javascript.html">JavaScript</a> </li> <li class=""> <a href="./customize.html">Customize</a> </li> </ul> </div> </div> </div> </div> <div class="jumbotron masthead"> <div class="container"> <h1>Bootstrap</h1> <p>Sleek, intuitive, and powerful front-end framework for faster and easier web development.</p> <p> <a href="assets/bootstrap.zip" class="btn btn-primary btn-large" >Download Bootstrap</a> </p> <ul class="masthead-links"> <li> <a href="http://github.com/twitter/bootstrap" >GitHub project</a> </li> <li> <a href="./getting-started.html#examples" >Examples</a> </li> <li> <a href="./extend.html" >Extend</a> </li> <li> Version 2.2.2 </li> </ul> </div> </div> <div class="bs-docs-social"> <div class="container"> <ul class="bs-docs-social-buttons"> <li> <iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=twitter&repo=bootstrap&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="100px" height="20px"></iframe> </li> <li> <iframe class="github-btn" src="http://ghbtns.com/github-btn.html?user=twitter&repo=bootstrap&type=fork&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="102px" height="20px"></iframe> </li> <li class="follow-btn"> <a href="https://twitter.com/twbootstrap" class="twitter-follow-button" data-link-color="#0069D6" data-show-count="true">Follow @twbootstrap</a> </li> <li class="tweet-btn"> <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://twitter.github.com/bootstrap/" data-count="horizontal" data-via="twbootstrap" data-related="mdo:Creator of Twitter Bootstrap">Tweet</a> </li> </ul> </div> </div> <div class="container"> <div class="marketing"> <h1>Introducing Bootstrap.</h1> <p class="marketing-byline">Need reasons to love Bootstrap? Look no further.</p> <div class="row-fluid"> <div class="span4"> <img class="marketing-img" src="assets/img/bs-docs-twitter-github.png"> <h2>By nerds, for nerds.</h2> <p>Built at Twitter by <a href="http://twitter.com/mdo">@mdo</a> and <a href="http://twitter.com/fat">@fat</a>, Bootstrap utilizes <a href="http://lesscss.org">LESS CSS</a>, is compiled via <a href="http://nodejs.org">Node</a>, and is managed through <a href="http://github.com">GitHub</a> to help nerds do awesome stuff on the web.</p> </div> <div class="span4"> <img class="marketing-img" src="assets/img/bs-docs-responsive-illustrations.png"> <h2>Made for everyone.</h2> <p>Bootstrap was made to not only look and behave great in the latest desktop browsers (as well as IE7!), but in tablet and smartphone browsers via <a href="./scaffolding.html#responsive">responsive CSS</a> as well.</p> </div> <div class="span4"> <img class="marketing-img" src="assets/img/bs-docs-bootstrap-features.png"> <h2>Packed with features.</h2> <p>A 12-column responsive <a href="./scaffolding.html#gridSystem">grid</a>, dozens of components, <a href="./javascript.html">JavaScript plugins</a>, typography, form controls, and even a <a href="./customize.html">web-based Customizer</a> to make Bootstrap your own.</p> </div> </div> <hr class="soften"> <h1>Built with Bootstrap.</h1> <p class="marketing-byline">For even more sites built with Bootstrap, <a href="http://builtwithbootstrap.tumblr.com/" target="_blank">visit the unofficial Tumblr</a> or <a href="./getting-started.html#examples">browse the examples</a>.</p> <div class="row-fluid"> <ul class="thumbnails example-sites"> <li class="span3"> <a class="thumbnail" href="http://soundready.fm/" target="_blank"> <img src="assets/img/example-sites/soundready.png" alt="SoundReady.fm"> </a> </li> <li class="span3"> <a class="thumbnail" href="http://kippt.com/" target="_blank"> <img src="assets/img/example-sites/kippt.png" alt="Kippt"> </a> </li> <li class="span3"> <a class="thumbnail" href="http://www.gathercontent.com/" target="_blank"> <img src="assets/img/example-sites/gathercontent.png" alt="Gather Content"> </a> </li> <li class="span3"> <a class="thumbnail" href="http://www.jshint.com/" target="_blank"> <img src="assets/img/example-sites/jshint.png" alt="JS Hint"> </a> </li> </ul> </div> </div> </div> <!-- Footer ================================================== --> <footer class="footer"> <div class="container"> <p>Designed and built with all the love in the world by <a href="http://twitter.com/mdo" target="_blank">@mdo</a> and <a href="http://twitter.com/fat" target="_blank">@fat</a>.</p> <p>Code licensed under <a href="http://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License v2.0</a>, documentation under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p> <p><a href="http://glyphicons.com">Glyphicons Free</a> licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.</p> <ul class="footer-links"> <li><a href="http://blog.getbootstrap.com">Blog</a></li> <li class="muted">·</li> <li><a href="https://github.com/twitter/bootstrap/issues?state=open">Issues</a></li> <li class="muted">·</li> <li><a href="https://github.com/twitter/bootstrap/wiki">Roadmap and changelog</a></li> </ul> </div> </footer> <!-- Le javascript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> <script src="assets/js/jquery.js"></script> <script src="assets/js/bootstrap-transition.js"></script> <script src="assets/js/bootstrap-alert.js"></script> <script src="assets/js/bootstrap-modal.js"></script> <script src="assets/js/bootstrap-dropdown.js"></script> <script src="assets/js/bootstrap-scrollspy.js"></script> <script src="assets/js/bootstrap-tab.js"></script> <script src="assets/js/bootstrap-tooltip.js"></script> <script src="assets/js/bootstrap-popover.js"></script> <script src="assets/js/bootstrap-button.js"></script> <script src="assets/js/bootstrap-collapse.js"></script> <script src="assets/js/bootstrap-carousel.js"></script> <script src="assets/js/bootstrap-typeahead.js"></script> <script src="assets/js/bootstrap-affix.js"></script> <script src="assets/js/holder/holder.js"></script> <script src="assets/js/google-code-prettify/prettify.js"></script> <script src="assets/js/application.js"></script> </body> </html>
