Skip to content

Commit

Permalink
[Doc] Fix lowercase DLL names and standardize uppercase X for varia…
Browse files Browse the repository at this point in the history
…ble version number
  • Loading branch information
Avasam committed Jul 24, 2023
1 parent e995411 commit d2d12e8
Show file tree
Hide file tree
Showing 39 changed files with 54 additions and 54 deletions.
2 changes: 1 addition & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Build 305, released 2022-11-06
from there. (#1908)

* Dropped support for allowing a bytes object to be passed where a COM BSTR
is expected - this support was accidental on the path from 2.x->3.x.
is expected - this support was accidental on the path from Python 2 -> 3.

* win32crypt's PyCERTSTORE.CertCloseStore()'s `Flags` argument has been
deprecated as it is likely to crash the process if
Expand Down
2 changes: 1 addition & 1 deletion Pythonwin/pywin/framework/mdi_pychecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
## the PATH. Example pychecker.bat:
##
## REM pychecker.bat
## C:\bin\python.exe C:\PYTHON23\Lib\site-packages\pychecker\checker.py %1 %2 %3 %4 %5 %6 %7 %8 %9
## C:\bin\python.exe C:\PythonXX\Lib\site-packages\pychecker\checker.py %1 %2 %3 %4 %5 %6 %7 %8 %9
##
## Adding it as default module in PythonWin:
##
Expand Down
2 changes: 1 addition & 1 deletion Pythonwin/pywin/idle/PyParse.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def set_str(self, str):
# no way to tell the differences between output, >>> etc and
# user input. Indeed, IDLE's first output line makes the rest
# look like it's in an unclosed paren!:
# Python 1.5.2 (#0, Apr 13 1999, ...
# Python X.X.X (#0, Apr 13 1999, ...

def find_good_parse_start(self, use_ps1, is_char_in_string=None):
str, pos = self.str, None
Expand Down
2 changes: 1 addition & 1 deletion adodbapi/adodbapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def getIndexedValue(obj, index):

from collections.abc import Mapping

# --- define objects to smooth out Python3000 <-> Python 2.x differences
# --- define objects to smooth out Python3000 <-> Python 2 differences
unicodeType = str
longType = int
StringTypes = str
Expand Down
4 changes: 2 additions & 2 deletions adodbapi/apibase.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
DateTime = type(NotImplemented) # should never be seen on win32
NullTypes = type(None)

# --- define objects to smooth out Python3 <-> Python 2.x differences
# --- define objects to smooth out Python3 <-> Python 2 differences
unicodeType = str
longType = int
StringTypes = str
Expand Down Expand Up @@ -55,7 +55,7 @@ def standardErrorHandler(connection, cursor, errorclass, errorvalue):
raise errorclass(errorvalue)


# Note: _BaseException is defined differently between Python 2.x and 3.x
# Note: _BaseException is defined differently between Python 2 and 3
class Error(_BaseException):
pass # Exception that is the base class of all other error
# exceptions. You can use this to catch all errors with one
Expand Down
2 changes: 1 addition & 1 deletion adodbapi/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
if verbose:
print(version)

# --- define objects to smooth out Python3 <-> Python 2.x differences
# --- define objects to smooth out Python3 <-> Python 2 differences
unicodeType = str # this line will be altered by 2to3.py to '= str'
longType = int # this line will be altered by 2to3.py to '= int'
StringTypes = str
Expand Down
4 changes: 2 additions & 2 deletions adodbapi/test/dbapi20.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
import time
import unittest

if sys.version[0] >= "3": # python 3.x
if sys.version[0] >= "3": # Python 3
_BaseException = Exception

def _failUnless(self, expr, msg=None):
self.assertTrue(expr, msg)

else: # python 2.x
else: # Python 2
from exceptions import Exception as _BaseException

def _failUnless(self, expr, msg=None):
Expand Down
2 changes: 1 addition & 1 deletion com/pythoncom.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Magic utility that "redirects" to pythoncomxx.dll
# Magic utility that "redirects" to pythoncomXX.dll
import pywintypes

pywintypes.__import_pywin32_system_module__("pythoncom", globals())
2 changes: 1 addition & 1 deletion com/win32com/client/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ def BuildCallList(
defArgVal = defUnnamedArg

argName = MakePublicAttributeName(argName)
# insanely long lines with an 'encoding' flag crashes python 2.4.0
# insanely long lines with an 'encoding' flag crashes Python 2.4.0
# keep 5 args per line
# This may still fail if the arg names are insane, but that seems
# unlikely. See also _BuildArgList()
Expand Down
6 changes: 3 additions & 3 deletions com/win32com/src/PythonCOMLoader.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// *sob* - a simple loader for pythoncomxx.dll - but this DLL has a
// manifest referencing the CRT whereas pythoncomxx.dll does not.
// *sob* - a simple loader for pythoncomXX.dll - but this DLL has a
// manifest referencing the CRT whereas pythoncomXX.dll does not.
#include "windows.h"
#include "tchar.h"

Expand Down Expand Up @@ -61,7 +61,7 @@ typedef HRESULT(STDAPICALLTYPE *PFNDllGetClassObject)(REFCLSID rclsid, REFIID ri
PFNDllGetClassObject pfnDllGetClassObject = NULL;

/////////////////////////////////////////////////////////////////////////////
// Loads pythoncomxx.dll after activating our context and delegates the call to it.
// Loads pythoncomXX.dll after activating our context and delegates the call to it.
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
if (pfnDllGetClassObject == 0) {
Expand Down
4 changes: 2 additions & 2 deletions com/win32com/src/include/PythonCOM.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@
#define PYCOM_EXPORT
#else
#ifdef BUILD_PYTHONCOM
/* We are building pythoncomxx.dll */
/* We are building pythoncomXX.dll */
#define PYCOM_EXPORT __declspec(dllexport)
#else
/* This module uses pythoncomxx.dll */
/* This module uses pythoncomXX.dll */
#define PYCOM_EXPORT __declspec(dllimport)
#ifndef _DEBUG
#pragma comment(lib, "pythoncom.lib")
Expand Down
4 changes: 2 additions & 2 deletions com/win32com/src/oleargs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ BOOL PyCom_VariantFromPyObject(PyObject *obj, VARIANT *var)
}
V_VT(var) = VT_BSTR;
}
// For 3.x, bool checks need to be above PyLong_Check, which now succeeds for booleans.
// For Python 3, bool checks need to be above PyLong_Check, which now succeeds for booleans.
else if (obj == Py_True) {
V_VT(var) = VT_BOOL;
V_BOOL(var) = VARIANT_TRUE;
Expand Down Expand Up @@ -593,7 +593,7 @@ static BOOL PyCom_SAFEARRAYFromPyObjectBuildDimension(PyObject *obj, SAFEARRAY *
static long PyCom_CalculatePyObjectDimension(PyObject *obItemCheck, long lDimension, PyObject *ppyobDimensionDictionary)
{
// Buffers are a special case - they define 1 new dimension.
// Buffers supported sequence semantics in 2.x, but for some reason memoryview objects
// Buffers supported sequence semantics in Python 2, but for some reason memoryview objects
// in py3k do not, so check separately
if (PYWIN_BUFFER_CHECK(obItemCheck))
return lDimension + 1;
Expand Down
2 changes: 1 addition & 1 deletion com/win32com/test/testGIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def test(fn):
if __name__ == "__main__":
test(BeginThreadsSimpleMarshal)
win32api.Sleep(500)
# Doing CoUninit here stop Pythoncom.dll hanging when DLLMain shuts-down the process
# Doing CoUninit here stop pythoncom.dll hanging when DLLMain shuts-down the process
pythoncom.CoUninitialize()
if pythoncom._GetInterfaceCount() != 0 or pythoncom._GetGatewayCount() != 0:
print(
Expand Down
2 changes: 1 addition & 1 deletion com/win32com/test/testPyComTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def _DumpFireds(self):


# A simple handler class that derives from object (ie, a "new style class") -
# only relevant for Python 2.x (ie, the 2 classes should be identical in 3.x)
# only relevant for Python 2 (ie, the 2 classes should be identical in Python 3)
class NewStyleRandomEventHandler(object):
def _Init(self):
self.fireds = {}
Expand Down
2 changes: 1 addition & 1 deletion com/win32comext/axdebug/src/PyIDebugStackFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ PyObject *PyIDebugStackFrame::GetLanguageString(PyObject *self, PyObject *args)
BSTR pbstrDescription;
BOOL flong;
// @pyparm int|fLong||If False, just the language name should be provided, eg, "Python". If True a full product
// description may be provided (eg, "Python 1.4 ActiveX Debugging Host")
// description may be provided (eg, "Python X.X ActiveX Debugging Host")
if (!PyArg_ParseTuple(args, "i:GetLanguageString", &flong))
return NULL;
PY_INTERFACE_PRECALL;
Expand Down
2 changes: 1 addition & 1 deletion com/win32comext/mapi/src/mapi_stub_library/StubUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ HMODULE LoadMailClientFromMSIData(HKEY hkeyMapiClient)

/*
* LoadMAPIFromSystemDir
* Fall back for loading System32\Mapi32.dll if all else fails
* Fall back for loading System32\mapi32.dll if all else fails
*/
HMODULE LoadMAPIFromSystemDir()
{
Expand Down
4 changes: 2 additions & 2 deletions com/win32comext/propsys/src/propsys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ static PyObject *PyPSGetPropertyFromPropertyStorage(PyObject *self, PyObject *ar
PROPERTYKEY key;
PROPVARIANT val;
PyObject *obbuf;
// @pyparm buffer|ps||Bytes or buffer (or str in python 2) containing a serialized property set (see <om
// @pyparm buffer|ps||Bytes or buffer (or str in Python 2) containing a serialized property set (see <om
// PyIPersistSerializedPropStorage.GetPropertyStorage>)
// @pyparm <o PyPROPERTYKEY>|key||Property to return
if (!PyArg_ParseTuple(args, "OO&:PSGetPropertyFromPropertyStorage", &obbuf, PyWinObject_AsPROPERTYKEY, &key))
Expand All @@ -446,7 +446,7 @@ static PyObject *PyPSGetNamedPropertyFromPropertyStorage(PyObject *self, PyObjec
TmpWCHAR name;
PROPVARIANT val;
PyObject *obname, *obbuf;
// @pyparm buffer|ps||Bytes or buffer (or str in python 2) containing a serialized property set (see <om
// @pyparm buffer|ps||Bytes or buffer (or str in Python 2) containing a serialized property set (see <om
// PyIPersistSerializedPropStorage.GetPropertyStorage>)
// @pyparm str|name||Property to return
if (!PyArg_ParseTuple(args, "OO:PSGetNamedPropertyFromPropertyStorage", &obbuf, &obname))
Expand Down
4 changes: 2 additions & 2 deletions pywin32_postinstall.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# postinstall script for pywin32
#
# copies PyWinTypesxx.dll and PythonCOMxx.dll into the system directory,
# copies pywintypesXX.dll and pythoncomXX.dll into the system directory,
# and creates a pth file
import glob
import os
Expand Down Expand Up @@ -69,7 +69,7 @@ def flush(self):
try:
# When this script is run from inside the bdist_wininst installer,
# file_created() and directory_created() are additional builtin
# functions which write lines to Python23\pywin32-install.log. This is
# functions which write lines to PythonXX\pywin32-install.log. This is
# a list of actions for the uninstaller, the format is inspired by what
# the Wise installer also creates.
file_created
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ def swig_sources(self, sources, ext=None):
# A class deriving from other than the default
swig_cmd.extend(["-com_interface_parent", interface_parent])

# This 'newer' check helps python 2.2 builds, which otherwise
# This 'newer' check helps Python 2.2 builds, which otherwise
# *always* regenerate the .cpp files, meaning every future
# build for any platform sees these as dirty.
# This could probably go once we generate .cpp into the temp dir.
Expand Down
2 changes: 1 addition & 1 deletion win32/Demos/OpenEncryptedFileRaw.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def ReadCallback(input_buffer, data, buflen):
fnamein, fnameout, f = data
## print fnamein, fnameout, buflen
f.write(input_buffer)
## python 2.3 throws an error if return value is a plain int
## Python 2.3 throws an error if return value is a plain int
return winerror.ERROR_SUCCESS


Expand Down
2 changes: 1 addition & 1 deletion win32/Demos/c_extension/win32_extension.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Note: this sample does nothing useful other than to show you how
// your own Python extension can link with and use the functions from
// pywintypesxx.dll
// pywintypesXX.dll
#include "Python.h"
#include "PyWinTypes.h"

Expand Down
2 changes: 1 addition & 1 deletion win32/Demos/win32cred_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
mc = win32cred.CredMarshalCredential(win32cred.UsernameTargetCredential, target)

# As of pywin32 301 this no longer works for markh and unclear when it stopped, or
# even if it ever did! # Fails in Python 2.7 too, so not a 3.x regression.
# even if it ever did! # Fails in Python 2.7 too, so not a Python 3 regression.
try:
th = win32security.LogonUser(
mc,
Expand Down
2 changes: 1 addition & 1 deletion win32/Demos/win32gui_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def _RegisterWndClass(self):
wc.cbWndExtra = win32con.DLGWINDOWEXTRA + struct.calcsize("Pi")
icon_flags = win32con.LR_LOADFROMFILE | win32con.LR_DEFAULTSIZE

## py.ico went away in python 2.5, load from executable instead
## py.ico went away in Python 2.5, load from executable instead
this_app = win32api.GetModuleHandle(None)
try:
wc.hIcon = win32gui.LoadIcon(this_app, 1) ## python.exe and pythonw.exe
Expand Down
2 changes: 1 addition & 1 deletion win32/Lib/dbi.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Use of objects created by this module should be replaced with native Python objects.
Dates are now returned as datetime.datetime objects, but will still accept PyTime
objects also.
Raw data for binary fields should be passed as buffer objects for Python 2.x,
Raw data for binary fields should be passed as buffer objects for Python 2,
and memoryview objects in Py3k.
"""

Expand Down
4 changes: 2 additions & 2 deletions win32/Lib/pywintypes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Magic utility that "redirects" to pywintypesxx.dll
# Magic utility that "redirects" to pywintypesXX.dll
import importlib.machinery
import importlib.util
import os
Expand Down Expand Up @@ -58,7 +58,7 @@ def __import_pywin32_system_module__(modname, globs):
# first (which is how we are here) or if, eg, win32api was imported
# first thereby implicitly loading the DLL.

# Sadly though, it doesn't quite work - if pywintypesxx.dll
# Sadly though, it doesn't quite work - if pywintypesXX.dll
# is in system32 *and* the executable's directory, on XP SP2, an
# import of win32api will cause Windows to load pywintypes
# from system32, where LoadLibrary for that name will
Expand Down
2 changes: 1 addition & 1 deletion win32/Lib/win32con.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
OFN_NOLONGNAMES = 262144
OFN_EXPLORER = 524288 # new look commdlg
OFN_NODEREFERENCELINKS = 1048576
OFN_LONGNAMES = 2097152 # force long names for 3.x modules
OFN_LONGNAMES = 2097152 # force long names for Python 3 modules
OFN_ENABLEINCLUDENOTIFY = 4194304 # send include message to callback
OFN_ENABLESIZING = 8388608
OFN_DONTADDTORECENT = 33554432
Expand Down
2 changes: 1 addition & 1 deletion win32/Lib/win32timezone.py
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ class RangeMap(dict):
the sorted list of keys.
One may supply keyword parameters to be passed to the sort function used
to sort keys (i.e. cmp [python 2 only], keys, reverse) as sort_params.
to sort keys (i.e. cmp [Python 2 only], keys, reverse) as sort_params.
Let's create a map that maps 1-3 -> 'a', 4-6 -> 'b'
>>> r = RangeMap({3: 'a', 6: 'b'}) # boy, that was easy
Expand Down
2 changes: 1 addition & 1 deletion win32/Lib/win32traceutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# then, switch to a DOS prompt, and type:
# C:>python.exe
# Python 1.4 etc...
# Python X.X.X (#0, Apr 13 1999, ...
# >>> import win32traceutil
# Redirecting output to win32trace remote collector
# >>> print "Hello"
Expand Down
2 changes: 1 addition & 1 deletion win32/help/win32net.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ <H2><A NAME="Introduction">Introduction</A></H2>
win32net called win32netcon that houses all of the constants needed by
the win32net modules.
<p>
Because of unicode support in python2.0, some of the string handling
Because of unicode support in Python 2.0, some of the string handling
done w/the examples are no longer necessary. Before one needed to
convert PyUnicode to a regular python string, before you could use
string functions with it. The examples will work w/both versions of
Expand Down
2 changes: 1 addition & 1 deletion win32/scripts/regsetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ def RegisterShellInfo(searchPaths):
"regsetup c:\\wierd\\spot\\1 c:\\wierd\\spot\\2"
Attempts to setup the core Python. Looks in some standard places,
as well as the 2 wierd spots to locate the core Python files (eg, Python.exe,
python14.dll, the standard library and Win32 Extensions.
pythonXX.dll, the standard library and Win32 Extensions).
"regsetup -a myappname . .\subdir"
Registers a new Pythonpath entry named myappname, with "C:\\I\\AM\\HERE" and
Expand Down
4 changes: 2 additions & 2 deletions win32/scripts/setup_d.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Install and register pythonxx_d.dll, pywintypesxx_d.dll and pythoncomxx_d.dll
# Install and register pythonXX_d.dll, pywintypesXX_d.dll and pythoncomXX_d.dll
#
# Assumes the _d files can be found in the same directory as this script
# or in the cwd.
Expand All @@ -14,7 +14,7 @@
def usage_and_die(rc):
print()
print("This script is designed to copy and register the Python debug")
print("binaries. It looks for pythonxx_d.dll, pythoncomxx_d.dll etc,")
print("binaries. It looks for pythonXX_d.dll, pythoncomXX_d.dll etc,")
print("and installs them to work correctly with Python debug builds.")
print()
print("You will generally find this script in the. zip file that")
Expand Down
2 changes: 1 addition & 1 deletion win32/src/PyTime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ PyObject *PyWin_NewTime(PyObject *timeOb)
PyObject *ret = PyDateTimeAPI->DateTime_FromTimestamp((PyObject *)(&PyWinDateTimeType), args, NULL);
if (ret == NULL) {
// datetime throws an OSError on failure, but for compatibility with
// Python 2.x, we turn that into a ValueError.
// Python 2, we turn that into a ValueError.
PyErr_Clear();
PyErr_SetString(PyExc_ValueError, "invalid timestamp");
}
Expand Down
6 changes: 3 additions & 3 deletions win32/src/PyUnicode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ BOOL PyWinObject_AsPfnAllocatedWCHAR(PyObject *stringObject, void *(*pfnAllocato
{
BOOL rc = TRUE;
if (PyBytes_Check(stringObject)) {
// XXX - this was ported from the python 2 string api - which I thought
// included the trailing \0. But the 3.x `Bytes` API does not (right?),
// XXX - this was ported from the Python 2 string api - which I thought
// included the trailing \0. But the Python 3 `Bytes` API does not (right?),
// so there's some trailing \0 confusion here.
Py_ssize_t cch = PyBytes_Size(stringObject);
const char *buf = PyBytes_AsString(stringObject);
Expand Down Expand Up @@ -175,7 +175,7 @@ void PyWin_AutoFreeBstr::SetBstr(BSTR bstr)
BOOL PyWinObject_AsBstr(PyObject *stringObject, BSTR *pResult, BOOL bNoneOK /*= FALSE*/, DWORD *pResultLen /*= NULL*/)
{
BOOL rc = TRUE;
// This used to support bytes as we moved to 3.x, but a BSTR has always been
// This used to support bytes as we moved to Python 3, but a BSTR has always been
// unicode (ie, you'd never *try* and use bytes to create it), so there's no
// sane b/w compat reason to support that any more.
if (PyUnicode_Check(stringObject)) {
Expand Down
6 changes: 3 additions & 3 deletions win32/src/PyWinTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ typedef Py_ssize_t Py_hash_t;
#include "mmsystem.h"

#ifdef BUILD_PYWINTYPES
/* We are building pywintypesxx.dll */
/* We are building pywintypesXX.dll */
#define PYWINTYPES_EXPORT __declspec(dllexport)
#else
/* This module uses pywintypesxx.dll */
/* This module uses pywintypesXX.dll */
#define PYWINTYPES_EXPORT __declspec(dllimport)
#if defined(_MSC_VER)
#if defined(DEBUG) || defined(_DEBUG)
Expand Down Expand Up @@ -116,7 +116,7 @@ PYWINTYPES_EXPORT PyObject *PyWin_SetBasicCOMError(HRESULT hr);
// *************
// strings, which are a bit of a mess!
//
// This has gone from 2.x ascii-only, to 2.x+3.x ascii-or-unicode, to 3.x unicode-only,
// This has gone from Python 2 ascii-only, to Py2+Py3k ascii-or-unicode, to Python 3 unicode-only,
// - this baggage means some strange APIs which convert to and from "char *" in various ways.
//
// A sizes/lengths are reported as a `DWORD` rather than a `Py_ssize_t`, that's what the callers
Expand Down
Loading

0 comments on commit d2d12e8

Please sign in to comment.