Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > 9955584118b2135ac21554fe39454ae6 > files > 318

python2-bson-3.7.2-1.mga7.armv7hl.rpm


<!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="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Compatibility Policy &#8212; PyMongo 3.7.2 documentation</title>
    <link rel="stylesheet" href="_static/pydoctheme.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></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>
    <script type="text/javascript" src="_static/language_data.js"></script>
    
    <script type="text/javascript" src="_static/sidebar.js"></script>
    
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="API Documentation" href="api/index.html" />
    <link rel="prev" title="Frequently Asked Questions" href="faq.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <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="api/index.html" title="API Documentation"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="faq.html" title="Frequently Asked Questions"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">PyMongo 3.7.2 documentation</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="compatibility-policy">
<h1>Compatibility Policy<a class="headerlink" href="#compatibility-policy" title="Permalink to this headline">¶</a></h1>
<div class="section" id="semantic-versioning">
<h2>Semantic Versioning<a class="headerlink" href="#semantic-versioning" title="Permalink to this headline">¶</a></h2>
<p>PyMongo’s version numbers follow <a class="reference external" href="http://semver.org/">semantic versioning</a>: each version number
is structured “major.minor.patch”. Patch releases fix bugs, minor releases
add features (and may fix bugs), and major releases include API changes that
break backwards compatibility (and may add features and fix bugs).</p>
</div>
<div class="section" id="deprecation">
<h2>Deprecation<a class="headerlink" href="#deprecation" title="Permalink to this headline">¶</a></h2>
<p>Before we remove a feature in a major release, PyMongo’s maintainers make an
effort to release at least one minor version that <em>deprecates</em> it. We add
“<strong>DEPRECATED</strong>” to the feature’s documentation, and update the code to raise a
<a class="reference external" href="https://docs.python.org/2/library/exceptions.html#exceptions.DeprecationWarning">DeprecationWarning</a>. You can ensure your code is future-proof by running
your code with the latest PyMongo release and looking for DeprecationWarnings.</p>
<p>Starting with Python 2.7, the interpreter silences DeprecationWarnings by
default. For example, the following code uses the deprecated <code class="docutils literal notranslate"><span class="pre">insert</span></code>
method but does not raise any warning:</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># &quot;insert.py&quot;</span>
<span class="kn">from</span> <span class="nn">pymongo</span> <span class="kn">import</span> <span class="n">MongoClient</span>

<span class="n">client</span> <span class="o">=</span> <span class="n">MongoClient</span><span class="p">()</span>
<span class="n">client</span><span class="o">.</span><span class="n">test</span><span class="o">.</span><span class="n">test</span><span class="o">.</span><span class="n">insert</span><span class="p">({})</span>
</pre></div>
</div>
<p>To print deprecation warnings to stderr, run python with “-Wd”:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ python -Wd insert.py
insert.py:4: DeprecationWarning: insert is deprecated. Use insert_one or insert_many instead.
  client.test.test.insert({})
</pre></div>
</div>
<p>You can turn warnings into exceptions with “python -We”:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ python -We insert.py
Traceback (most recent call last):
  File &quot;insert.py&quot;, line 4, in &lt;module&gt;
    client.test.test.insert({})
  File &quot;/home/durin/work/mongo-python-driver/pymongo/collection.py&quot;, line 2906, in insert
    &quot;instead.&quot;, DeprecationWarning, stacklevel=2)
DeprecationWarning: insert is deprecated. Use insert_one or insert_many instead.
</pre></div>
</div>
<p>If your own code’s test suite passes with “python -We” then it uses no
deprecated PyMongo features.</p>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last">The Python documentation on <a class="reference external" href="https://docs.python.org/2/library/warnings.html">the warnings module</a>,
and <a class="reference external" href="https://docs.python.org/2/using/cmdline.html#cmdoption-W">the -W command line option</a>.</p>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Compatibility Policy</a><ul>
<li><a class="reference internal" href="#semantic-versioning">Semantic Versioning</a></li>
<li><a class="reference internal" href="#deprecation">Deprecation</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="faq.html"
                        title="previous chapter">Frequently Asked Questions</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="api/index.html"
                        title="next chapter">API Documentation</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="_sources/compatibility-policy.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <div class="searchformwrapper">
    <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>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <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="api/index.html" title="API Documentation"
             >next</a> |</li>
        <li class="right" >
          <a href="faq.html" title="Frequently Asked Questions"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">PyMongo 3.7.2 documentation</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright MongoDB, Inc. 2008-present. MongoDB, Mongo, and the leaf logo are registered trademarks of MongoDB, Inc.
    </div>
  </body>
</html>