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

Remove temporary win32com.server.policy reexports hack marked for removal over 25 years ago #2344

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ https://mhammond.github.io/pywin32_installers.html.
Coming in build 308, as yet unreleased
--------------------------------------

* Remove temporary `win32com.server.policy` reexports hack (#2344, @Avasam)
* Fixed a circular import between `win32comext.axscript.client.framework` and `win32comext.axscript.client.error` (#2381, @Avasam)

Build 307, released 2024-10-04
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
Loading