Commit c4b347cd by Owo Sugiana

Penggantian ZopeTransactionExtension() dengan register()

1 parent 74705157
0.2.1 7-11-2019
---------------
- Menyesuaikan zope.sqlalchemy 1.2 yang mengganti nama ZopeTransactionExtension
menjadi ZopeTransactionEvents. Kita menggantinya dengan register().
0.2 31-1-2019 0.2 31-1-2019
------------- -------------
- Penambahan field users.api_key. - Penambahan field users.api_key.
......
...@@ -3,11 +3,12 @@ from sqlalchemy.orm import ( ...@@ -3,11 +3,12 @@ from sqlalchemy.orm import (
scoped_session, scoped_session,
) )
from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.ext.declarative import declarative_base
from zope.sqlalchemy import ZopeTransactionExtension from zope.sqlalchemy import register
ZTE = ZopeTransactionExtension() session_factory = sessionmaker()
DBSession = scoped_session(sessionmaker(extension=ZTE)) DBSession = scoped_session(session_factory)
register(DBSession)
Base = declarative_base() Base = declarative_base()
......
...@@ -20,6 +20,7 @@ version = line.split()[0] ...@@ -20,6 +20,7 @@ version = line.split()[0]
requires = [ requires = [
'pytz', 'pytz',
'sqlalchemy', 'sqlalchemy',
'zope.sqlalchemy',
'ziggurat_foundations', 'ziggurat_foundations',
'psycopg2-binary', 'psycopg2-binary',
'pyramid', 'pyramid',
...@@ -27,11 +28,6 @@ requires = [ ...@@ -27,11 +28,6 @@ requires = [
] ]
def run(cmd):
if subprocess.call(cmd) != 0:
sys.exit()
setup( setup(
name='opensipkd-base', name='opensipkd-base',
version=version, version=version,
...@@ -44,7 +40,7 @@ setup( ...@@ -44,7 +40,7 @@ setup(
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
], ],
keywords='web pyramid pylons', keywords='web pyramid pylons',
packages=setuptools.find_packages(), packages=find_packages(),
zip_safe=False, zip_safe=False,
install_requires=requires, install_requires=requires,
) )
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!