Skip to content

Commit

Permalink
Fixed a circular import between `win32comext.axscript.client.framewor…
Browse files Browse the repository at this point in the history
…k` and `win32comext.axscript.client.error` (#2381)
  • Loading branch information
Avasam authored Oct 6, 2024
1 parent e285748 commit 303acfd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ https://mhammond.github.io/pywin32_installers.html.
Coming in build 308, as yet unreleased
--------------------------------------

* Fixed a circular import between `win32comext.axscript.client.framework` and `win32comext.axscript.client.error` (#2381, @Avasam)

Build 307, released 2024-10-04
------------------------------
### Release process changes
Expand Down
10 changes: 7 additions & 3 deletions com/win32comext/axscript/client/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@
import traceback
import warnings
from types import TracebackType
from typing import TYPE_CHECKING

import pythoncom
import win32com.server.util
import winerror
from win32com.axscript import axscript
from win32com.server.exception import COMException
from win32comext.axscript.client.debug import DebugManager
from win32comext.axscript.client.framework import AXScriptCodeBlock, COMScript
from win32comext.axscript.server.axsite import AXSite

if TYPE_CHECKING:
# Prevent circular imports
from win32comext.axscript.client.debug import DebugManager
from win32comext.axscript.client.framework import AXScriptCodeBlock, COMScript
from win32comext.axscript.server.axsite import AXSite

debugging = 0

Expand Down
6 changes: 3 additions & 3 deletions com/win32comext/axscript/client/framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
import win32com.server.util
import winerror
from win32com.axscript import axscript
from win32com.server.exception import COMException, IsCOMServerException

from . import error # axscript.client.error


def RemoveCR(text):
Expand All @@ -32,9 +35,6 @@ def RemoveCR(text):
SCRIPTTEXT_ISEXPRESSION = 0x00000020
SCRIPTTEXT_ISPERSISTENT = 0x00000040

from win32com.server.exception import COMException, IsCOMServerException

from . import error # ax.client.error

state_map = {
axscript.SCRIPTSTATE_UNINITIALIZED: "SCRIPTSTATE_UNINITIALIZED",
Expand Down

0 comments on commit 303acfd

Please sign in to comment.