From 3a174d165a1126c34934319d20b3ab6de501201e Mon Sep 17 00:00:00 2001 From: junkmd Date: Sun, 7 Apr 2024 23:10:15 +0900 Subject: [PATCH 1/7] update `docs\source\conf.py` --- docs/source/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index afb9f25e..f7585442 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -48,9 +48,9 @@ # built documents. # # The short X.Y version. -version = '1.3' +version = '1.4' # The full version, including alpha/beta/rc tags. -release = '1.3.1' +release = '1.4.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. From 8b9ee7a6995468552288a9c4e31a7ef035d7cbaa Mon Sep 17 00:00:00 2001 From: junkmd Date: Sun, 7 Apr 2024 23:10:15 +0900 Subject: [PATCH 2/7] update `comtypes\__init__.py` --- comtypes/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comtypes/__init__.py b/comtypes/__init__.py index 0deb3445..884b9440 100644 --- a/comtypes/__init__.py +++ b/comtypes/__init__.py @@ -1,5 +1,5 @@ # comtypes version numbers follow semver (http://semver.org/) and PEP 440 -__version__ = "1.3.1" +__version__ = "1.4.0" import atexit from ctypes import * From 3d80d8a26d65b8c83495bea9cd510aa207e749a7 Mon Sep 17 00:00:00 2001 From: junkmd Date: Sun, 7 Apr 2024 23:10:15 +0900 Subject: [PATCH 3/7] remove completed plans from `README.md` --- README.md | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/README.md b/README.md index cd503e11..95f755dd 100644 --- a/README.md +++ b/README.md @@ -48,21 +48,6 @@ But these third-parties are not required as a prerequisite for runtime. Tracking issues, reporting bugs and contributing to the codebase and documentation are on GitHub at: https://github.com/enthought/comtypes - -### Ongoing plans -#### In friendly modules, the names that were used as aliases for `ctypes.c_int` will be used for enumeration types implemented with `enum` -`comtypes.client.GetModule` generates two `Python` modules in the `comtypes.gen` package with a single call. - -A first wrapper module is created with a long name that is derived from the type library guid, version number and lcid. It contains interface classes, coclasses, constants, and structures. -A second friendly module is created with a shorter name derived from the type library name itself. It imports items from the wrapper module, and will be the module returned from `GetModule`. - -In the current `comtypes` specification, if a COM type kind is defined as an enumeration type, that type name is used as an alias for [`ctypes.c_int`](https://docs.python.org/3/library/ctypes.html#ctypes.c_int) in the wrapper module, and that symbol is imported into the friendly module. -In future release, in friendly modules, their names will no longer be aliases for `c_int`. Instead, they will be defined as enumerations implemented with [`enum`](https://docs.python.org/3/library/enum.html). - -When imported into the friendly module, the wrapper module will be aliased with an abstracted name (`__wrapper_module__`). This allows users to continue using the old definitions by modifying the import sections of their codebase. - -Please refer to [the GitHub issue](https://github.com/enthought/comtypes/issues/345) for details. - ## For Enterprise Available as part of the Tidelift Subscription. From 5b58318de0e9ce81cc6aff737cb98095d139138e Mon Sep 17 00:00:00 2001 From: junkmd Date: Sun, 7 Apr 2024 23:10:15 +0900 Subject: [PATCH 4/7] update change log for 1.4.0 --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 82c397c9..9e09ebee 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,11 @@ Comtypes CHANGELOG ================== +Release 1.4.0 +-------------- +* Add enumeration definitions in generated friendly modules. By @junkmd. +* Add descriptions to ``index.rst`` about the enumeration types. By @junkmd. + Release 1.3.1 -------------- * Add type annotations to dynamically generated modules. By @junkmd. From 2ab6c4b85bfdaf5301e9b496e36c742cf2c5d67f Mon Sep 17 00:00:00 2001 From: junkmd Date: Mon, 8 Apr 2024 00:02:04 +0900 Subject: [PATCH 5/7] add auto-test workflow by GHA --- .github/workflows/autotest.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/autotest.yml diff --git a/.github/workflows/autotest.yml b/.github/workflows/autotest.yml new file mode 100644 index 00000000..a3e9320f --- /dev/null +++ b/.github/workflows/autotest.yml @@ -0,0 +1,30 @@ +on: + pull_request: + branches: [main] + push: + branches: [main] + +jobs: + tests: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [windows-latest, windows-2019] + python-version: [3.7, 3.8, 3.9, 3.10, 3.11, 3.12] + architecture: ['x86', 'x64'] + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + architecture: ${{ matrix.architecture }} + - name: install comtypes + run: | + pip install --upgrade setuptools + python setup.py install + pip uninstall comtypes -y + python test_pip_install.py + - name: unittest comtypes + run: | + python -m unittest discover -v -s ./comtypes/test -t comtypes\test From da8e2e90ca3081f37261430ef7119ca125eaa6ea Mon Sep 17 00:00:00 2001 From: junkmd Date: Mon, 8 Apr 2024 00:06:00 +0900 Subject: [PATCH 6/7] fix workflow --- .github/workflows/autotest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/autotest.yml b/.github/workflows/autotest.yml index a3e9320f..4acb56d1 100644 --- a/.github/workflows/autotest.yml +++ b/.github/workflows/autotest.yml @@ -10,7 +10,7 @@ jobs: strategy: matrix: os: [windows-latest, windows-2019] - python-version: [3.7, 3.8, 3.9, 3.10, 3.11, 3.12] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] architecture: ['x86', 'x64'] steps: - uses: actions/checkout@v3 From 9e5b67f9ecb4aa433983e67530bd4f40ecd9a421 Mon Sep 17 00:00:00 2001 From: junkmd Date: Mon, 8 Apr 2024 00:26:08 +0900 Subject: [PATCH 7/7] update `CHANGES.txt` --- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.txt b/CHANGES.txt index 9e09ebee..66485db1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -5,6 +5,7 @@ Release 1.4.0 -------------- * Add enumeration definitions in generated friendly modules. By @junkmd. * Add descriptions to ``index.rst`` about the enumeration types. By @junkmd. +* Add GitHub Actions auto-test workflow. By @junkmd. Release 1.3.1 --------------