1.1rc2: instrumentation fix
This commit is contained in:
parent
369882c85c
commit
c520ef646a
@ -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:
|
||||
|
@ -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
|
||||
|
4
setup.py
4
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='',
|
||||
)
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user