From 7fa88e132f0b0aa3165db1a243e7ee623771ac90 Mon Sep 17 00:00:00 2001 From: Jun Komoda <45822440+junkmd@users.noreply.github.com> Date: Mon, 8 Apr 2024 08:16:09 +0900 Subject: [PATCH] Bump version and update change log for 1.4.0 (#523) * update `docs\source\conf.py` * update `comtypes\__init__.py` * remove completed plans from `README.md` * update change log for 1.4.0 * add auto-test workflow by GHA * fix workflow * update `CHANGES.txt` --- .github/workflows/autotest.yml | 30 ++++++++++++++++++++++++++++++ CHANGES.txt | 6 ++++++ README.md | 15 --------------- comtypes/__init__.py | 2 +- docs/source/conf.py | 4 ++-- 5 files changed, 39 insertions(+), 18 deletions(-) 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..4acb56d1 --- /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 diff --git a/CHANGES.txt b/CHANGES.txt index 82c397c9..66485db1 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,12 @@ 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. +* Add GitHub Actions auto-test workflow. By @junkmd. + Release 1.3.1 -------------- * Add type annotations to dynamically generated modules. By @junkmd. 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. 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 * 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.