diff --git a/ptvp35/__init__.py b/ptvp35/__init__.py index 10b00c4..e5649da 100644 --- a/ptvp35/__init__.py +++ b/ptvp35/__init__.py @@ -1,3 +1,17 @@ +# Licensed under MIT License. Copyright: 2022-2023 PARRRATE TNV. + +__all__ = ( + 'KVFactory', + 'KVJson', + 'DbConnection', + 'DbFactory', + 'Db', + 'Transaction', + 'TransactionView', + 'FutureContext', +) + + import abc import asyncio import concurrent.futures @@ -11,17 +25,6 @@ from functools import wraps from io import StringIO, UnsupportedOperation from typing import IO, Any, Callable, TypeVar -__all__ = ( - 'KVFactory', - 'KVJson', - 'DbConnection', - 'DbFactory', - 'Db', - 'Transaction', - 'TransactionView', - 'FutureContext', -) - class Request: __slots__ = ( @@ -191,7 +194,7 @@ class NightlyWarning(Warning): enabled = True -TDecoratedNightly = TypeVar('TDecoratedNightly', bound=Callable | type | bool) +TDecoratedNightly = TypeVar('TDecoratedNightly', bound=Callable | type | None) def nightly(decorated: TDecoratedNightly = None, prefix: str = '', stacklevel=2) -> TDecoratedNightly: diff --git a/ptvp35/instrumentation.py b/ptvp35/instrumentation.py index 70bad40..e230b02 100644 --- a/ptvp35/instrumentation.py +++ b/ptvp35/instrumentation.py @@ -1,10 +1,12 @@ +import ptvp35 from rainbowadn.instrument import Instrumentation -from .__init__ import * + +__all__ = ('InstrumentDiskWrites', 'NightlyInstrumentation') class InstrumentDiskWrites(Instrumentation): def __init__(self, /): - super().__init__(DbConnection, '_write_to_disk_sync') + super().__init__(ptvp35.DbConnection, '_write_to_disk_sync') def on_write(self, line: str, /) -> None: pass diff --git a/setup.py b/setup.py index 3de9e21..e108777 100644 --- a/setup.py +++ b/setup.py @@ -2,11 +2,11 @@ from setuptools import setup setup( name='ptvp35', - version='1.1rc1', + version='1.1rc2', packages=['ptvp35'], url='https://gitea.ongoteam.net/PTV/ptvp35', license='MIT', author='PARRRATE TNV', author_email='', - description='' + description='', ) diff --git a/traced_example.py b/traced_example.py index 3afdf5b..9ea86c0 100644 --- a/traced_example.py +++ b/traced_example.py @@ -4,8 +4,8 @@ import sys import threading from contextlib import ExitStack -from ptvp35 import DbConnection, DbFactory, KVJson -from ptvp35.instrumentation import InstrumentDiskWrites, NightlyInstrumentation +from ptvp35 import * +from ptvp35.instrumentation import * async def aprint(*args, **kwargs):