Add lmdb and msgpack depends

Place ThreadedSession in 'datastore.deprecated'
pull/2099/head
tuxxy 2020-06-19 16:15:28 +02:00
parent 7545051ad9
commit 4026de543e
6 changed files with 617 additions and 359 deletions

View File

@ -12,18 +12,18 @@ umbral = "==0.1.3a2"
constant-sorrow = ">=0.1.0a9"
bytestring-splitter = ">=1.3.0"
hendrix = ">=3.2.5"
lmdb = "*"
# Cryptography
pyopenssl = "*"
cryptography = ">=2.3"
pysha3="*"
# Utilities
maya = "*"
sqlalchemy = "*"
marshmallow = "*"
msgpack = "*"
# Web
requests = "*"
flask = "*"
flask_sqlalchemy = "*"
# Third-Party Ethereum
py-evm = "*"
eth-tester = "*"
@ -36,6 +36,10 @@ click = ">=7.0"
colorama = "*"
tabulate = "*"
# Felix
flask_sqlalchemy = "*"
sqlalchemy = "*"
[dev-packages]
# Pytest
pytest = "*"

691
Pipfile.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,50 +1,136 @@
-i https://pypi.python.org/simple
apipkg==1.5
apipkg==1.5; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
appdirs==1.4.4
attrs==19.3.0
asn1crypto==1.3.0
attrs==19.3.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
autobahn==20.6.2; python_version >= '3.5'
automat==20.2.0
bandit==1.6.2
certifi==2020.4.5.1
cfgv==3.1.0
base58==2.0.1; python_version >= '3.5'
bitarray==1.2.2
blake2b-py==0.1.3
bytestring-splitter==2.2.0
cached-property==1.5.1
certifi==2020.6.20
cffi==1.14.0
cfgv==3.1.0; python_full_version >= '3.6.1'
chardet==3.0.4
coverage==5.1
click==7.1.2
coincurve==13.0.0
colorama==0.4.3
constant-sorrow==0.1.0a9
constantly==15.1.0
coverage==5.2
cryptography==2.9.2
cytoolz==0.10.1; implementation_name == 'cpython'
dateparser==0.7.6; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
decorator==4.4.2
distlib==0.3.0
execnet==1.7.1
distlib==0.3.1
eth-abi==2.1.1; python_version >= '3.6' and python_version < '4'
eth-account==0.5.2; python_version >= '3.6' and python_version < '4'
eth-bloom==1.0.3; python_version >= '3.5' and python_full_version != '3.5.2' and python_version < '4'
eth-hash[pycryptodome]==0.2.0
eth-keyfile==0.5.1
eth-keys==0.3.3
eth-rlp==0.1.2
eth-tester==0.5.0b1
eth-typing==2.2.1; python_version >= '3.5' and python_version < '4'
eth-utils==1.9.0; python_version >= '3.5' and python_full_version != '3.5.2' and python_version < '4'
execnet==1.7.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
filelock==3.0.12
gitdb==4.0.5
gitpython==3.1.3
greenlet==0.4.15
hypothesis==5.16.0
identify==1.4.19
idna==2.9
more-itertools==8.3.0
flask-sqlalchemy==2.4.3
flask==1.1.2
gitdb==4.0.5; python_version >= '3.4'
gitpython==3.1.3; python_version >= '3.4'
greenlet==0.4.16
hendrix==3.3.0
hexbytes==0.2.1; python_version >= '3.6' and python_version < '4'
humanize==2.5.0; python_version >= '3.5'
hyperlink==19.0.0
hypothesis==5.19.0
identify==1.4.21; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
idna==2.10; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
incremental==17.5.0
ipfshttpclient==0.6.0.post1; python_version >= '3.5'
itsdangerous==1.1.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
jinja2==2.11.2; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
jsonschema==3.2.0
lmdb==0.98
lru-dict==1.1.6
markupsafe==1.1.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
marshmallow==3.7.0
maya==0.6.1
more-itertools==8.4.0; python_version >= '3.5'
msgpack-python==0.5.6
msgpack==1.0.0
multiaddr==0.0.9; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
mypy-extensions==0.4.3
mypy==0.780
mypy==0.782
netaddr==0.8.0
nodeenv==1.4.0
packaging==20.4
packaging==20.4; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
parsimonious==0.8.1
pathtools==0.1.2
pbr==5.4.5
pluggy==0.13.1
pre-commit==2.4.0
py-solc-x==0.8.2
py==1.8.1
pendulum==2.1.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
pluggy==0.13.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
pre-commit==2.6.0
protobuf==3.12.2
py-ecc==4.0.0; python_version >= '3.5' and python_version < '4'
py-evm==0.3.0a18
py-geth==2.3.0
py-solc-x==0.10.0
py==1.9.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
pyasn1-modules==0.2.8
pyasn1==0.4.8
pychalk==2.0.1
pycparser==2.20; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
pycryptodome==3.9.8
pyethash==0.1.27
pyflakes==2.2.0
pyparsing==3.0.0a1
pytest-cov==2.9.0
pytest-forked==1.1.3
pyhamcrest==2.0.2; python_version >= '3.5'
pynacl==1.4.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
pyopenssl==19.1.0
pyparsing==2.4.7; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'
pyrsistent==0.16.0
pysha3==1.0.2
pytest-cov==2.10.0
pytest-forked==1.2.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
pytest-mock==3.1.1
pytest-twisted==1.12
pytest-xdist==1.32.0
pytest==5.4.3
python-dateutil==2.8.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'
pytz==2020.1
pytzdata==2019.3; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
pyyaml==5.3.1
requests==2.23.0
semantic-version==2.8.5
six==1.15.0
smmap==3.0.4
sortedcontainers==2.1.0
stevedore==2.0.0
regex==2020.6.8
requests==2.24.0
rlp==1.2.0
semantic-version==2.8.5; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
service-identity==18.1.0
six==1.15.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'
smmap==3.0.4; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
snaptime==0.2.4
sortedcontainers==2.2.2
sqlalchemy==1.3.18
stevedore==2.0.1; python_version >= '3.6'
tabulate==0.8.7
toml==0.10.1
toolz==0.10.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
trie==2.0.0a2; python_version >= '3.6' and python_version < '4'
twisted==20.3.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
txaio==20.4.1; python_version >= '3.5'
typed-ast==1.4.1
typing-extensions==3.7.4.2
urllib3==1.25.9
virtualenv==20.0.21
wcwidth==0.2.3
tzlocal==2.1
umbral==0.1.3a2
urllib3==1.25.9; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'
varint==1.0.2
virtualenv==20.0.26; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
watchdog==0.10.3
wcwidth==0.2.5
web3==5.11.1
websockets==8.1; python_full_version >= '3.6.1'
werkzeug==1.0.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
zope.interface==5.1.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'

View File

@ -42,7 +42,7 @@ from nucypher.characters.banners import FELIX_BANNER, NU_BANNER
from nucypher.characters.base import Character
from nucypher.config.constants import MAX_UPLOAD_CONTENT_LENGTH, TEMPLATES_DIR
from nucypher.crypto.powers import SigningPower, TransactingPower
from nucypher.datastore.threading import ThreadedSession
from nucypher.datastore.deprecated import ThreadedSession
from nucypher.utilities.logging import Logger

View File

@ -0,0 +1,31 @@
"""
This file is part of nucypher.
nucypher is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
nucypher is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with nucypher. If not, see <https://www.gnu.org/licenses/>.
"""
from sqlalchemy.orm import scoped_session, sessionmaker
class ThreadedSession:
def __init__(self, sqlalchemy_engine) -> None:
self.engine = sqlalchemy_engine
def __enter__(self):
session_factory = sessionmaker(bind=self.engine)
self.session = scoped_session(session_factory)
return self.session
def __exit__(self, exc_type, exc_val, exc_tb):
self.session.remove()

View File

@ -1,15 +1,15 @@
-i https://pypi.python.org/simple
appdirs==1.4.4
asn1crypto==1.3.0
attrs==19.3.0
autobahn==20.4.3
attrs==19.3.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
autobahn==20.6.2; python_version >= '3.5'
automat==20.2.0
base58==2.0.0
base58==2.0.1; python_version >= '3.5'
bitarray==1.2.2
blake2b-py==0.1.3
bytestring-splitter==2.2.0
cached-property==1.5.1
certifi==2020.4.5.1
certifi==2020.6.20
cffi==1.14.0
chardet==3.0.4
click==7.1.2
@ -18,80 +18,82 @@ colorama==0.4.3
constant-sorrow==0.1.0a9
constantly==15.1.0
cryptography==2.9.2
cytoolz==0.10.1 ; implementation_name == 'cpython'
dateparser==0.7.4
eth-abi==2.1.1
eth-account==0.5.2
eth-bloom==1.0.3
cytoolz==0.10.1; implementation_name == 'cpython'
dateparser==0.7.6; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
eth-abi==2.1.1; python_version >= '3.6' and python_version < '4'
eth-account==0.5.2; python_version >= '3.6' and python_version < '4'
eth-bloom==1.0.3; python_version >= '3.5' and python_full_version != '3.5.2' and python_version < '4'
eth-hash[pycryptodome]==0.2.0
eth-keyfile==0.5.1
eth-keys==0.3.3
eth-rlp==0.1.2
eth-tester==0.5.0b1
eth-typing==2.2.1
eth-utils==1.9.0
eth-typing==2.2.1; python_version >= '3.5' and python_version < '4'
eth-utils==1.9.0; python_version >= '3.5' and python_full_version != '3.5.2' and python_version < '4'
flask-sqlalchemy==2.4.3
flask==1.1.2
hendrix==3.3.0
hexbytes==0.2.1
humanize==2.4.0
hexbytes==0.2.1; python_version >= '3.6' and python_version < '4'
humanize==2.5.0; python_version >= '3.5'
hyperlink==19.0.0
idna==2.9
idna==2.10; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
incremental==17.5.0
ipfshttpclient==0.4.13.2
itsdangerous==2.0.0a1
jinja2==3.0.0a1
ipfshttpclient==0.6.0.post1; python_version >= '3.5'
itsdangerous==1.1.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
jinja2==2.11.2; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
jsonschema==3.2.0
lmdb==0.98
lru-dict==1.1.6
markupsafe==2.0.0a1
marshmallow==3.6.1
markupsafe==1.1.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
marshmallow==3.7.0
maya==0.6.1
msgpack-python==0.5.6
multiaddr==0.0.9
msgpack==1.0.0
multiaddr==0.0.9; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
mypy-extensions==0.4.3
netaddr==0.7.19
netaddr==0.8.0
parsimonious==0.8.1
pathtools==0.1.2
pendulum==2.1.0
pendulum==2.1.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
protobuf==3.12.2
py-ecc==4.0.0
py-evm==0.3.0a17
py-ecc==4.0.0; python_version >= '3.5' and python_version < '4'
py-evm==0.3.0a18
py-geth==2.3.0
pyasn1-modules==0.2.8
pyasn1==0.4.8
pychalk==2.0.1
pycparser==2.20
pycryptodome==3.9.7
pycparser==2.20; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
pycryptodome==3.9.8
pyethash==0.1.27
pyhamcrest==2.0.2
pynacl==1.4.0
pyhamcrest==2.0.2; python_version >= '3.5'
pynacl==1.4.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
pyopenssl==19.1.0
pyrsistent==0.16.0
pysha3==1.0.2
python-dateutil==2.8.1
python-dateutil==2.8.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'
pytz==2020.1
pytzdata==2019.3
regex==2020.5.14
requests==2.23.0
pytzdata==2019.3; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
regex==2020.6.8
requests==2.24.0
rlp==1.2.0
semantic-version==2.8.5
semantic-version==2.8.5; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
service-identity==18.1.0
six==1.15.0
six==1.15.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'
snaptime==0.2.4
sortedcontainers==2.1.0
sqlalchemy==1.3.17
sortedcontainers==2.2.2
sqlalchemy==1.3.18
tabulate==0.8.7
toolz==0.10.0
trie==2.0.0a1
twisted==20.3.0
txaio==20.4.1
toolz==0.10.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
trie==2.0.0a2; python_version >= '3.6' and python_version < '4'
twisted==20.3.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
txaio==20.4.1; python_version >= '3.5'
typing-extensions==3.7.4.2
tzlocal==2.1
umbral==0.1.3a2
urllib3==1.25.9
urllib3==1.25.9; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'
varint==1.0.2
watchdog==0.10.2
web3==5.11.0
websockets==8.1
werkzeug==1.0.1
zope.interface==5.1.0
watchdog==0.10.3
web3==5.11.1
websockets==8.1; python_full_version >= '3.6.1'
werkzeug==1.0.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
zope.interface==5.1.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'