Skip to content

Commit

Permalink
Remove temporary win32com.server.policy reexports hack
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Oct 5, 2024
1 parent 842fbef commit bf873c8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 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
--------------------------------------

* Remove temporary `win32com.server.policy` reexports hack (#2344, @Avasam)

Build 307, released 2024-10-04
------------------------------
### Release process changes
Expand Down
12 changes: 0 additions & 12 deletions com/win32com/server/policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,15 +803,3 @@ def _import_module(mname):
# Eeek - result of _import_ is "win32com" - not "win32com.a.b.c"
# Get the full module from sys.modules
return sys.modules[mname]


#######
#
# Temporary hacks until all old code moves.
#
# These have been moved to a new source file, but some code may
# still reference them here. These will end up being removed.
try:
from .dispatcher import DispatcherTrace, DispatcherWin32trace
except ImportError: # Quite likely a frozen executable that doesn't need dispatchers
pass
5 changes: 3 additions & 2 deletions com/win32comext/axdebug/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import sys

import win32api
import win32com.server.dispatcher
import win32com.server.policy
import win32com.server.util
import winerror
Expand Down Expand Up @@ -58,9 +59,9 @@ def RaiseNotImpl(who=None):
raise COMException(scode=winerror.E_NOTIMPL)


class Dispatcher(win32com.server.policy.DispatcherWin32trace):
class Dispatcher(win32com.server.dispatcher.DispatcherWin32trace):
def __init__(self, policyClass, object):
win32com.server.policy.DispatcherTrace.__init__(self, policyClass, object)
win32com.server.dispatcher.DispatcherTrace.__init__(self, policyClass, object)
import win32traceutil # Sets up everything.

# print(f"Object with win32trace dispatcher created ({object})")
Expand Down

0 comments on commit bf873c8

Please sign in to comment.