How to use incremental - 10 common examples

To help you get started, we’ve selected a few incremental examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github twisted / incremental / tests / test_version.py View on Github external
def test_baseWithPrerelease(self):
        """
        The base version includes 'preX' for versions with prereleases.
        """
        self.assertEqual(Version("foo", 1, 0, 0, prerelease=8).base(),
                          "1.0.0pre8")
github twisted / incremental / tests / test_version.py View on Github external
def test_getVersionStringWithPrerelease(self):
        """
        L{getVersionString} includes the prerelease, if any.
        """
        self.assertEqual(
            getVersionString(Version("whatever", 8, 0, 0, prerelease=1)),
            "whatever 8.0.0pre1")
github twisted / incremental / tests / test_version.py View on Github external
def test_versionComparison(self):
        """
        Versions can be compared for equality and order.
        """
        va = Version("dummy", 1, 0, 0)
        vb = Version("dummy", 0, 1, 0)
        self.assertTrue(va > vb)
        self.assertTrue(vb < va)
        self.assertTrue(va >= vb)
        self.assertTrue(vb <= va)
        self.assertTrue(va != vb)
        self.assertTrue(vb == Version("dummy", 0, 1, 0))
        self.assertTrue(vb == vb)
github twisted / incremental / tests / test_version.py View on Github external
def test_getVersionStringWithRevision(self):
        """
        L{getVersionString} includes the discovered revision number.
        """
        self.svnEntries.child(b"format").setContent(b"9\n")
        self.svnEntries.child(b"entries").setContent(VERSION_10_ENTRIES)
        version = getVersionString(self.getVersion())
        self.assertEqual(
            "twisted_python_versions_package 1.0.0+r22715",
            version)
        self.assertTrue(isinstance(version, type("")))
github twisted / incremental / tests / test_version.py View on Github external
def test_infComparison(self):
        """
        L{_inf} is equal to L{_inf}.

        This is a regression test.
        """
        self.assertEqual(_inf, _inf)
github twisted / incremental / tests / test_version.py View on Github external
def test_disallowBuggyComparisons(self):
        """
        The package names of the Version objects need to be the same,
        """
        self.assertRaises(IncomparableVersions,
                          operator.eq,
                          Version("dummy", 1, 0, 0),
                          Version("dumym", 1, 0, 0))
github twisted / klein / src / klein / _version.py View on Github external
"""
Provides klein version information.
"""

# This file is auto-generated! Do not edit!
# Use `python -m incremental.update klein` to change this file.

from incremental import Version

__version__ = Version("klein", 19, 6, 0)
__all__ = ["__version__"]
github twisted / twisted / src / twisted / web / http.py View on Github external
return self is not other
        return NotImplemented


    def __hash__(self):
        """
        A C{Request} is hashable so that it can be used as a mapping key.

        @return A C{int} based on the instance's identity.
        """
        return id(self)



Request.getClientIP = deprecated(
    Version("Twisted", "NEXT", 0, 0),
    replacement="getClientAddress",
)(Request.getClientIP)

Request.noLongerQueued = deprecated(
    Version("Twisted", 16, 3, 0))(Request.noLongerQueued)


class _DataLoss(Exception):
    """
    L{_DataLoss} indicates that not all of a message body was received. This
    is only one of several possible exceptions which may indicate that data
    was lost.  Because of this, it should not be checked for by
    specifically; any unexpected exception should be treated as having
    caused data loss.
    """
github Kitware / VTK / ThirdParty / Twisted / vtkTwisted / src / twisted / web / __init__.py View on Github external
Twisted Web: HTTP clients and servers, plus tools for implementing them.

Contains a L{web server} (including an
L{HTTP implementation}, a
L{resource model}), and
a L{web client}.
"""

from incremental import Version
from twisted.python.deprecate import deprecatedModuleAttribute

from twisted._version import __version__ as version
__version__ = version.short()

deprecatedModuleAttribute(
    Version("Twisted", 16, 0, 0),
    "Use twisted.__version__ instead.",
    "twisted.web", "__version__")
github twisted / twisted / src / twisted / web / http.py View on Github external
"""
        A C{Request} is hashable so that it can be used as a mapping key.

        @return A C{int} based on the instance's identity.
        """
        return id(self)



Request.getClientIP = deprecated(
    Version("Twisted", "NEXT", 0, 0),
    replacement="getClientAddress",
)(Request.getClientIP)

Request.noLongerQueued = deprecated(
    Version("Twisted", 16, 3, 0))(Request.noLongerQueued)


class _DataLoss(Exception):
    """
    L{_DataLoss} indicates that not all of a message body was received. This
    is only one of several possible exceptions which may indicate that data
    was lost.  Because of this, it should not be checked for by
    specifically; any unexpected exception should be treated as having
    caused data loss.
    """



class PotentialDataLoss(Exception):
    """
    L{PotentialDataLoss} may be raised by a transfer encoding decoder's

incremental

A small library that versions your Python projects.

MIT
Latest version published 4 months ago

Package Health Score

91 / 100
Full package analysis