Change name of version variable to make it follow PEP8
This commit is contained in:
parent
d1531a8307
commit
b8ab88dcd5
|
@ -57,7 +57,7 @@ author = u'ETS Labs'
|
|||
# The short X.Y version.
|
||||
# Getting version:
|
||||
with open('../src/dependency_injector/__init__.py') as init_file:
|
||||
version = re.search('VERSION = \'(.*?)\'', init_file.read()).group(1)
|
||||
version = re.search('__version__ = \'(.*?)\'', init_file.read()).group(1)
|
||||
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = version
|
||||
|
|
|
@ -11,6 +11,10 @@ Development version
|
|||
-------------------
|
||||
- No features.
|
||||
|
||||
3.2.2
|
||||
-----
|
||||
- Change name of version variable to follow PEP8: ``VERSION`` -> ``__version__``.
|
||||
|
||||
3.2.1
|
||||
-----
|
||||
- Update ``services`` miniapp example.
|
||||
|
|
|
@ -12,7 +12,7 @@ framework can be installed from PyPi_:
|
|||
pip install dependency_injector
|
||||
|
||||
# Installing particular version:
|
||||
pip install dependency-injector==3.0.0
|
||||
pip install dependency-injector==3.2.2
|
||||
|
||||
.. note::
|
||||
Some components of *Dependency Injector* are implemented as C extension types.
|
||||
|
@ -33,9 +33,9 @@ Verification of currently installed version could be done using
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
>>> from dependency_injector import VERSION
|
||||
>>> VERSION
|
||||
'3.0.0'
|
||||
>>> import dependency_injector
|
||||
>>> dependency_injector.__version__
|
||||
'3.2.2'
|
||||
|
||||
.. _PyPi: https://pypi.python.org/pypi/dependency_injector
|
||||
.. _GitHub: https://github.com/ets-labs/python-dependency-injector
|
||||
|
|
6
setup.py
6
setup.py
|
@ -14,12 +14,12 @@ with open('README.rst') as readme_file:
|
|||
description = readme_file.read()
|
||||
|
||||
# Getting requirements:
|
||||
with open('requirements.txt') as version:
|
||||
requirements = version.readlines()
|
||||
with open('requirements.txt') as requirements_file:
|
||||
requirements = requirements_file.readlines()
|
||||
|
||||
# Getting version:
|
||||
with open('src/dependency_injector/__init__.py') as init_file:
|
||||
version = re.search('VERSION = \'(.*?)\'', init_file.read()).group(1)
|
||||
version = re.search('__version__ = \'(.*?)\'', init_file.read()).group(1)
|
||||
|
||||
# Adding debug options:
|
||||
if os.environ.get('DEPENDENCY_INJECTOR_DEBUG_MODE') == '1':
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
"""Dependency injector top-level package."""
|
||||
|
||||
VERSION = '3.2.1'
|
||||
__version__ = '3.2.2'
|
||||
"""Version number that follows semantic versioning.
|
||||
|
||||
:type: str
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
import unittest2 as unittest
|
||||
|
||||
from dependency_injector import VERSION
|
||||
from dependency_injector import __version__
|
||||
|
||||
|
||||
class VersionTest(unittest.TestCase):
|
||||
|
||||
def test_version_follows_semantic_versioning(self):
|
||||
self.assertEquals(len(VERSION.split('.')), 3)
|
||||
self.assertEquals(len(__version__.split('.')), 3)
|
||||
|
|
Loading…
Reference in New Issue