Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve a circular import error in obscure configuarations. #711

Merged
merged 2 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions src/memray/_memray.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -107,25 +107,25 @@ class TemporalAllocationRecord:
intervals: List[Interval]

class AllocatorType(enum.IntEnum):
MALLOC: int
FREE: int
CALLOC: int
REALLOC: int
POSIX_MEMALIGN: int
ALIGNED_ALLOC: int
MEMALIGN: int
VALLOC: int
PVALLOC: int
MMAP: int
MUNMAP: int
PYMALLOC_MALLOC: int
PYMALLOC_CALLOC: int
PYMALLOC_REALLOC: int
PYMALLOC_FREE: int
MALLOC = 1
FREE = 2
CALLOC = 3
REALLOC = 4
POSIX_MEMALIGN = 5
ALIGNED_ALLOC = 6
MEMALIGN = 7
VALLOC = 8
PVALLOC = 9
MMAP = 10
MUNMAP = 11
PYMALLOC_MALLOC = 12
PYMALLOC_CALLOC = 13
PYMALLOC_REALLOC = 14
PYMALLOC_FREE = 15

class FileFormat(enum.IntEnum):
ALL_ALLOCATIONS: int
AGGREGATED_ALLOCATIONS: int
ALL_ALLOCATIONS = 1
AGGREGATED_ALLOCATIONS = 2

def start_thread_trace(frame: FrameType, event: str, arg: Any) -> None: ...

Expand Down Expand Up @@ -235,16 +235,16 @@ class Tracker:
def greenlet_trace(event: str, args: Any) -> None: ...

class PymallocDomain(enum.IntEnum):
PYMALLOC_RAW: int
PYMALLOC_MEM: int
PYMALLOC_OBJECT: int
PYMALLOC_RAW = 1
PYMALLOC_MEM = 2
PYMALLOC_OBJECT = 3

def size_fmt(num: int, suffix: str = "B") -> str: ...

class SymbolicSupport(enum.IntEnum):
NONE: int
FUNCTION_NAME_ONLY: int
TOTAL: int
NONE = 1
FUNCTION_NAME_ONLY = 2
TOTAL = 3

def get_symbolic_support() -> SymbolicSupport: ...

Expand Down
6 changes: 5 additions & 1 deletion src/memray/_metadata.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
from __future__ import annotations

import typing
from dataclasses import dataclass
from datetime import datetime

from ._memray import FileFormat
if typing.TYPE_CHECKING:
from ._memray import FileFormat


@dataclass
Expand Down
Loading