Skip to content

Commit a2adf44

Browse files
committed
Update to "ibmmq" V2 package
1 parent 16184a6 commit a2adf44

File tree

157 files changed

+55512
-15060
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+55512
-15060
lines changed

.coveragerc

Lines changed: 0 additions & 2 deletions
This file was deleted.

.github/ISSUE_TEMPLATE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Please include the following information in your ticket.
2+
3+
- Package version(s) that are affected by this issue.
4+
- MQ version and platform involved
5+
- A small code sample that demonstrates the issue.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Please ensure all items are complete before opening.
2+
3+
- [ ] Tick to sign-off your agreement to the [Developer's Certificate of Origin](https://github.com/ibm-messaging/mq-mqi-python/DCO1.1.txt)
4+
- [ ] You have added tests for any code changes
5+
- [ ] You have updated the [CHANGELOG.md](https://github.com/ibm-messaging/mq-mqi-python/CHANGELOG.md)
6+
- [ ] You have completed the PR template below:
7+
8+
## What
9+
10+
What was changed
11+
12+
## How
13+
14+
How the change was implemented or reasoning behind it
15+
16+
## Testing
17+
18+
How to test your changes work, not required for documentation changes.
19+
20+
## Issues
21+
22+
Links to the github issue(s) (if present) that this pull request is resolving.

.github/workflows/install-tests.yml

Lines changed: 0 additions & 70 deletions
This file was deleted.

.github/workflows/unit-tests.yml

Lines changed: 0 additions & 117 deletions
This file was deleted.

.gitignore

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,31 @@
1+
2+
# Directories and files used by edit/build/test tools
13
.coverage
24
.idea
35
.idea/*
46
.tox
57
.vscode
8+
dist/
69

7-
build/*
10+
# Where there might be some intermediate files
811
code/dist
12+
code/tests/secrets
913
code/develop-eggs/*
10-
code/MANIFEST
11-
dist
12-
docs/_build/
13-
MANIFEST
14-
15-
*pymqe.so
14+
build/*
1615

16+
# Temporary and binary files
1717
*.*~
1818
*.egg-info*
19+
__pycache__
1920
*.pyc
2021
*.pyo
2122
*.so
2223
*.swp
24+
**/secrets/*
25+
26+
# Some of my local tools
27+
archive
28+
tools.untracked
29+
30+
# Other local directories I may use
31+
issues

CHANGELOG.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
2+
# Changelog
3+
Newest updates are at the top of this file.
4+
5+
## 2025 Sep 10 - V2
6+
Initial release of the reworked PyMQI library for IBM MQ as `ibmmq`.
7+
8+
Apart from the change in package name, the main changes from the PyMQI V1 library implemented in this V2 release
9+
include:
10+
11+
### Basic requirements
12+
* Python 3.9 or later
13+
* Running on MQ 9.1 or later
14+
* Connecting to MQ 6 or later
15+
16+
Depending on what you are doing, older MQ versions may also work. But these are
17+
the oldest levels designed for.
18+
19+
### Removals
20+
* Removed 32-bit compile options
21+
* Removed support for Python 2
22+
* Removed use of the client-only library (libmqic) when building
23+
* The libmqm library is available everywhere and can do both client and local bindings.
24+
* Use MQ_CONNECT_MODE=CLIENT or CNO options to force the mode, if it's not automatic
25+
* Removed deprecated definitions that were duplicated across packages
26+
* eg MQCHT_CLNTCONN is only in CMQXC, not CMQC
27+
* Removed unused code eg MQAI
28+
29+
### Additions
30+
* Constant definitions (CMQ*.py) updated to current MQ level
31+
* And made platform-aware
32+
* Corrected some initial values in structures
33+
* Added CNO, CSP, BNO classes
34+
* Added asynchronous consume via MQCB/MQCTL operations
35+
* Added CTLO, CBC, CBD classes for async consume
36+
* Python methods: QueueManager.ctl(), QueueManager.cb(), Queue.cb()
37+
* Added MQDLTMH, MQDLTMP verbs
38+
* Python methods: QueueManager.dltmh(), QueueManager.dltmp()
39+
* Various bug fixes in existing property handling
40+
* Wildcard property processing in MQINQMP
41+
* Added CMQSTRC dicts for easy conversion of ints to MQI constant names
42+
* Added MQSUBRQ, MQSTAT verbs with corresponding classes mapping to their MQI structures
43+
* Python methods: Subscription.subrq() and QueueManager.stat()
44+
* Added DLH class + get_header() method
45+
* Added IIH, CIH classes
46+
* Added to_string() method for MQI structures/classes to convert byte arrays into real strings
47+
* Added get_name() method for queues and qmgrs
48+
* MQINQ takes lists of selectors in a single operation, and returns a selector-indexed dict of attribute values
49+
* Previous single-selector variant still available
50+
* Python methods: QueueManager.inquire(), Queue.inquire()
51+
* Added `inq` as alias to `inquire` method on queue and qmgr classes to more closely match MQI verb name
52+
* MQSET takes a dict of {selector:value}
53+
* Python method: Queue.set()
54+
* Previous single-selector variant still available
55+
* Connections permit handles to be shared across threads as default
56+
* Added put() as alias of pub() on topics, to better match use of MQPUT
57+
58+
* PCFExecute enhancements:
59+
* Constructor takes a reply_queue_name as an alternative to the model_queue_name. As you might want to use a fixed
60+
objectname.
61+
* It now does GET-CONVERT by default (when would you ever not want this?)
62+
* Can pass in a pre-opened command queue to constructor so it doesn't re-open on each command
63+
* Works against a z/OS queue manager without special application coding
64+
* Including CMDSCOPE(*) responses from QSGs
65+
66+
* All structure MQCHAR[] input parameters can be provided either by a Unicode (Python 3) string or (for backwards
67+
compatibility) as a byte array
68+
* For example, both `QName="ABC"` or `QName=b"ABC"` are valid.
69+
* OUTPUT fields are still - compatibly - given as the byte array. Conversion to strings is necessary if you want to
70+
process them that way. The new to_string() method on classes will do that for you. There is also a to_string()
71+
function to do the same work for specific strings.
72+
73+
* Most existing type annotations converted from comments to inline
74+
75+
### Tests and Examples
76+
* The `examples` contents have been cleaned up
77+
* They now use a consistent set of objects (mostly the DEV.* definitions from the developer config)
78+
* With `app` and `admin` users both defined with password="password"
79+
* Some essentially duplicated examples removed
80+
* Comments added to describe the purpose of each program
81+
* Some examples use variant approaches to connection and authentication
82+
* Examples added to demonstrate newer features
83+
* Async consume callbacks
84+
* Dead-letter header decoding
85+
* MQINQ/SET operations
86+
* Publish/Subscribe
87+
* The `tests` contents have been cleaned up
88+
* But not significantly enhanced for newer versions of MQ
89+
* Assume use of Python 3
90+
* Added script to start a container with the appropriate Developer configuration - `docker` and `podman` options
91+
92+
### Other comments
93+
* There has been substantial internal restructuring to split the original large \_\_init\__.py into separate files. It is
94+
now essentially one file per MQI structure (class) and per object type.
95+
* Many imports of the package including tests and examples now use "... as mq" to shorten the typing
96+
* Various other internal changes to make modules more maintainable in future
97+
* Added MQObject as superclass of queues, topics etc for potential future simplifications
98+
* The C module is considered an internal interface and has changed to match new requirements from the Python layer above
99+
it.
100+

DCO1.1.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Developer's Certificate of Origin 1.1
2+
3+
By making a contribution to this project, I certify that:
4+
5+
(a) The contribution was created in whole or in part by me and I
6+
have the right to submit it under the open source license
7+
indicated in the file; or
8+
9+
(b) The contribution is based upon previous work that, to the best
10+
of my knowledge, is covered under an appropriate open source
11+
license and I have the right under that license to submit that
12+
work with modifications, whether created in whole or in part
13+
by me, under the same open source license (unless I am
14+
permitted to submit under a different license), as indicated
15+
in the file; or
16+
17+
(c) The contribution was provided directly to me by some other
18+
person who certified (a), (b) or (c) and I have not modified
19+
it.
20+
21+
(d) I understand and agree that this project and the contribution
22+
are public and that a record of the contribution (including all
23+
personal information I submit with it, including my sign-off) is
24+
maintained indefinitely and may be redistributed consistent with
25+
this project or the open source license(s) involved.

0 commit comments

Comments
 (0)