Skip to content

Commit

Permalink
Bump version and update change log for 1.4.0 (#523)
Browse files Browse the repository at this point in the history
* 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`
  • Loading branch information
junkmd authored Apr 7, 2024
1 parent 0d43d18 commit 7fa88e1
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 18 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/autotest.yml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
15 changes: 0 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

<a id="ongoing-plans"></a>
### 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.
Expand Down
2 changes: 1 addition & 1 deletion comtypes/__init__.py
Original file line number Diff line number Diff line change
@@ -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 *
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 7fa88e1

Please sign in to comment.