mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-25 11:04:01 +03:00
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.
|
# The short X.Y version.
|
||||||
# Getting version:
|
# Getting version:
|
||||||
with open('../src/dependency_injector/__init__.py') as init_file:
|
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.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = version
|
release = version
|
||||||
|
|
|
@ -11,6 +11,10 @@ Development version
|
||||||
-------------------
|
-------------------
|
||||||
- No features.
|
- No features.
|
||||||
|
|
||||||
|
3.2.2
|
||||||
|
-----
|
||||||
|
- Change name of version variable to follow PEP8: ``VERSION`` -> ``__version__``.
|
||||||
|
|
||||||
3.2.1
|
3.2.1
|
||||||
-----
|
-----
|
||||||
- Update ``services`` miniapp example.
|
- Update ``services`` miniapp example.
|
||||||
|
|
|
@ -12,7 +12,7 @@ framework can be installed from PyPi_:
|
||||||
pip install dependency_injector
|
pip install dependency_injector
|
||||||
|
|
||||||
# Installing particular version:
|
# Installing particular version:
|
||||||
pip install dependency-injector==3.0.0
|
pip install dependency-injector==3.2.2
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
Some components of *Dependency Injector* are implemented as C extension types.
|
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
|
.. code-block:: bash
|
||||||
|
|
||||||
>>> from dependency_injector import VERSION
|
>>> import dependency_injector
|
||||||
>>> VERSION
|
>>> dependency_injector.__version__
|
||||||
'3.0.0'
|
'3.2.2'
|
||||||
|
|
||||||
.. _PyPi: https://pypi.python.org/pypi/dependency_injector
|
.. _PyPi: https://pypi.python.org/pypi/dependency_injector
|
||||||
.. _GitHub: https://github.com/ets-labs/python-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()
|
description = readme_file.read()
|
||||||
|
|
||||||
# Getting requirements:
|
# Getting requirements:
|
||||||
with open('requirements.txt') as version:
|
with open('requirements.txt') as requirements_file:
|
||||||
requirements = version.readlines()
|
requirements = requirements_file.readlines()
|
||||||
|
|
||||||
# Getting version:
|
# Getting version:
|
||||||
with open('src/dependency_injector/__init__.py') as init_file:
|
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:
|
# Adding debug options:
|
||||||
if os.environ.get('DEPENDENCY_INJECTOR_DEBUG_MODE') == '1':
|
if os.environ.get('DEPENDENCY_INJECTOR_DEBUG_MODE') == '1':
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
"""Dependency injector top-level package."""
|
"""Dependency injector top-level package."""
|
||||||
|
|
||||||
VERSION = '3.2.1'
|
__version__ = '3.2.2'
|
||||||
"""Version number that follows semantic versioning.
|
"""Version number that follows semantic versioning.
|
||||||
|
|
||||||
:type: str
|
:type: str
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
import unittest2 as unittest
|
import unittest2 as unittest
|
||||||
|
|
||||||
from dependency_injector import VERSION
|
from dependency_injector import __version__
|
||||||
|
|
||||||
|
|
||||||
class VersionTest(unittest.TestCase):
|
class VersionTest(unittest.TestCase):
|
||||||
|
|
||||||
def test_version_follows_semantic_versioning(self):
|
def test_version_follows_semantic_versioning(self):
|
||||||
self.assertEquals(len(VERSION.split('.')), 3)
|
self.assertEquals(len(__version__.split('.')), 3)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user