Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Commits on Source (5)
Migrate to rethinkdb >=2.4.0
· b378f047
SirEdvin
authored
Mar 03, 2019
b378f047
Update python image version for linting and testing
· 1089ab52
SirEdvin
authored
Mar 03, 2019
1089ab52
Split testing into two image
· ea32b664
SirEdvin
authored
Mar 03, 2019
ea32b664
Bump version: 0.3.2 → 1.0.0
· 805764c4
SirEdvin
authored
Mar 03, 2019
805764c4
Fix gitlab CI package upload
· 1da29cf0
SirEdvin
authored
Mar 03, 2019
1da29cf0
Expand all
Hide whitespace changes
Inline
Side-by-side
.bumpversion.cfg
View file @
1da29cf0
[bumpversion]
current_version
=
0.3.2
current_version
=
1.0.0
commit
= True
tag
= True
...
...
.gitlab-ci.yml
View file @
1da29cf0
image
:
"
python:3.
6
"
image
:
"
python:3.
7
"
before_script
:
-
pip install
.
-
pip install -
r requirements-dev.txt
-
pip install
pipenv
-
pip
env
install -
d --system
stages
:
-
test
-
upload
check
-code
:
lint
-code
:
stage
:
test
script
:
make check
script
:
make lint
inspect-code
:
stage
:
test
script
:
make inspect
run-test-3.6
:
image
:
"
python:3.6"
stage
:
test
script
:
pytest
run-test-3.7
:
stage
:
test
script
:
pytest
upload-to-pypi
:
stage
:
upload
before_script
:
-
pip install twine
script
:
-
python setup.py bdist_wheel
-
twine upload dist/*
...
...
.pylintrc
View file @
1da29cf0
...
...
@@ -22,7 +22,7 @@ jobs=4
# List of plugins (as comma separated values of python modules names) to load,
# usually to register additional checkers.
load-plugins=
pylint_common
load-plugins=
# Pickle collected data for later comparisons.
persistent=yes
...
...
CHANGELOG.md
View file @
1da29cf0
...
...
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on
[
Keep a Changelog
](
http://keepachangelog.com/en/1.0.0/
)
and this project adheres to
[
Semantic Versioning
](
http://semver.org/spec/v2.0.0.html
)
.
## [1.0.0] - 2019-03-03
### Changed
-
Migrate to
`rethinkdb>=2.4.0`
## [0.3.1] - 2018-05-30
### Added
...
...
@@ -19,5 +25,5 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
-
Cleanup thread
[
1.0.0
]:
hthttps://gitlab.com/AnjiProject/repool-forked/compare/v0.3.1...v1.0.0
[
0.3.1
]:
hthttps://gitlab.com/AnjiProject/repool-forked/compare/v0.3.0...v0.3.1
\ No newline at end of file
Makefile
View file @
1da29cf0
check
:
lint
:
pylint repool_forked
pycodestyle repool_forked
mypy
--ignore-missing-imports
repool_forked
inspect
:
pipenv check
bandit
-r
repool_forked
pytest
:
pytest tests
\ No newline at end of file
Pipfile
0 → 100644
View file @
1da29cf0
[[source]]
name
=
"pypi"
url
=
"https://pypi.org/simple"
verify_ssl
=
true
[dev-packages]
pylint
=
">
=
2.1
.
1
"
mypy
=
">
=
0.641
"
pycodestyle
=
">
=
2.4
.
0
"
pytest
=
"~
=
3.7
.
1
"
pytest-cov
=
"~
=
2.5
.
1
"
pytest-sugar
=
"~
=
0.9
.
1
"
ipdb
=
'*'
ipython
=
'*'
pytest-profiling
=
'*'
bandit
=
"*"
[packages]
repool-forked
=
{
path
=
"."
}
[requires]
# python_version = "3.7"
Pipfile.lock
0 → 100644
View file @
1da29cf0
This diff is collapsed.
Click to expand it.
repool_forked/__init__.py
View file @
1da29cf0
...
...
@@ -4,7 +4,7 @@ __author__ = "Bogdan Gladyshev"
__copyright__
=
"
Copyright 2017, Bogdan Gladyshev
"
__credits__
=
[
"
Bogdan Gladyshev
"
]
__license__
=
"
MIT
"
__version__
=
"
0.3.2
"
__version__
=
"
1.0.0
"
__maintainer__
=
"
Bogdan Gladyshev
"
__email__
=
"
siredvin.dark@gmail.com
"
__status__
=
"
Production
"
repool_forked/pool.py
View file @
1da29cf0
...
...
@@ -4,20 +4,21 @@ from threading import Lock
from
typing
import
Optional
,
Any
,
Dict
,
Union
from
queue
import
Queue
import
rethinkdb
as
R
import
rethinkdb
from
tenacity
import
retry
,
retry_if_exception_type
,
stop_after_attempt
,
wait_exponential
__author__
=
"
Bogdan Gladyshev
"
__copyright__
=
"
Copyright 2017, Bogdan Gladyshev
"
__credits__
=
[
"
Bogdan Gladyshev
"
]
__license__
=
"
MIT
"
__version__
=
"
0.3.2
"
__version__
=
"
1.0.0
"
__maintainer__
=
"
Bogdan Gladyshev
"
__email__
=
"
siredvin.dark@gmail.com
"
__status__
=
"
Production
"
__all__
=
[
'
PoolException
'
,
'
ConnectionPool
'
]
__all__
=
[
'
PoolException
'
,
'
ConnectionPool
'
,
'
R
'
]
_log
=
logging
.
getLogger
(
__name__
)
R
=
rethinkdb
.
RethinkDB
()
RethinkDBConnection
=
Any
# pylint: disable=invalid-name
RETRY_ATTEMPTS
=
20
...
...
@@ -26,7 +27,7 @@ class PoolException(Exception):
pass
class
ConnectionWrapper
(
object
)
:
class
ConnectionWrapper
:
def
__init__
(
self
,
pool
:
'
ConnectionPool
'
,
conn
:
Optional
[
RethinkDBConnection
]
=
None
,
**
kwargs
)
->
None
:
...
...
@@ -73,7 +74,7 @@ class ConnectionContextManager:
self
.
pool
.
release
(
self
.
conn
)
class
ConnectionPool
(
object
)
:
class
ConnectionPool
:
"""
A rethinkDB connection pool
>>>
pool
=
ConnectionPool
()
>>>
with
pool
.
acquire
()
as
conn
:
...
...
requirements-dev.txt
deleted
100644 → 0
View file @
fbfa7ff0
pylint>=1.7.4
pylint-common>=0.2.5
mypy>=0.550
pycodestyle>=2.3.1
pytest>=3.3.1
pytest-sugar
twine>=1.9.1
\ No newline at end of file
setup.py
View file @
1da29cf0
...
...
@@ -20,7 +20,7 @@ from setuptools import setup, find_packages
setup
(
name
=
"
repool_forked
"
,
version
=
"
0.3.2
"
,
version
=
"
1.0.0
"
,
description
=
"
Connection pool for rethinkdb
"
,
author
=
"
Bogdan Gladyshev
"
,
author_email
=
'
siredivn.dark@gmail.com
'
,
...
...
@@ -28,8 +28,8 @@ setup(
license
=
'
GPLv3
'
,
packages
=
find_packages
(
exclude
=
[
'
tests
'
]),
install_requires
=
[
'
rethinkdb
'
,
'
tenacity
'
'
rethinkdb
>=2.4.0
'
,
'
tenacity
>=5.0.0
'
],
classifiers
=
[
'
Development Status :: 5 - Production/Stable
'
,
...
...