Pywbem

Latest version: v1.7.3

Safety actively analyzes 714815 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 7

1.7.0

------------

This version contains all fixes up to version 1.6.3.

Released: 2024-04-15

**Incompatible changes:**

* Dropped support for Python 3.5. (issue 2867)

* In order to make life easier for people that package pywbem into Linux
distros, vendorized the nocasedict and nocaselist packages. They have been
removed from the package dependencies. (issue 3141)

* The 'pywbem.ValueMapping' class will now raise a 'pywbem.ModelError' for any
missing or extra items in the 'Values' qualifier, compared to the 'ValueMap'
qualifier. Previously, 'IndexError' was raised. (issue 2991)

* Installation of this package using "setup.py" is no longer supported.
Use "pip" instead.

* Update to support urllib3 dependent package version 2.0+ for Python
version 3.7+ which limits the SSL library implementations (ex. OpenSSL,
libreSSL) and requires TLS protocol >=1.2 (ex. OpenSSL versions >= 1.1.1).
Pins urllib3 version to < 2.0 for Python versions < 3.7. Note that
pywbem 1.6 actually allows urllib3 version 2+ usage because the requirements version
specification was not pinned. However, the minimum Python
version for urllib3 version 2.0+ is now Python 3.7. If an older OpenSSL or
incompatible SSL library is used, the import of urllib3 package or
communication with a WBEM server can cause exceptions. See pywbem issue 1302
and the pywbem documentation
`trouble shooting <https://pywbem.readthedocs.io/en/stable/appendix.html#troubleshooting>`_
for more information.

**Bug fixes:**

* Addressed safety issues up to 2024-03-27.

* Addressed Dependabot issues up to 2024-03-27.

* Fixed a doc build issue with Sphinx 6.x (issue 2983) and addressed
some of the Sphinx warnings during doc build.

* Fixed coveralls issues with KeyError and HTTP 422 Unprocessable Entity.

* Circumvented the removal of Python 2.7 from the Github Actions plugin
setup-python, by using the Docker container python:2.7.18-buster instead.

* Fixed missing dependencies in minimum-constraints.txt.

* dev: Fixed UnboundLocalError for membername in Sphinx autodoc.

* Test: Circumvented a pip-check-reqs issue by excluding its version 2.5.0.

* Development: Fixed dependency issue with safety 3.0.0 by pinning it.

* Test: Upgraded GitHub Actions plugins to use node.js 20.

* Test: Fixed issues resulting from removal of support for pytest.warns(None)
in pytest version 8. (issue 3114)

* Fixed new Pylint issue for unused variable 'exp_result'. (issue 3113)

* Test: Fixed issue in test_recorder.py where format of OrderDict repl output
changed with python 3.12 (see issue 3097)

**Enhancements:**

* The 'pywbem.ValueMapping' class now allows controlling what should happen
when the 'Values' qualifier has missing or extra items compared to the
'ValueMap' qualifier, by means of a new 'values_default' parameter of
the respective factory methods. If 'values_default' is None (default), a
'pywbem.ModelError' is raised for missing or extra 'Values' items. If it
specifies a string value, missing items in the 'Values' qualifier are
filled up with that value, and extra items in the 'Values' qualifier are
truncated. (issue 2991)

* Add end-end test for indications where an OpenPegasus server in Docker
container is the WBEM Server and pywbem is both the client that creates
indication subscriptions the indication listener. This test uses the
OpenPegasus container used for other end-end tests.

* Split safety run out of "check" make target ino a separate "safety" make target
and moved its run to the end of the test workflow.

* Update handling of request exceptions in CIM_http.py to account for changes
to the urllib3 exceptions API that occurred in urllib3 version 2.0.0 and
keep the capability to handle the urllib3 exceptions API prior to versiion
2.0. (see issue 3006)

* Add end2end tests for operation timeout. (see issue 2181)

* Split safety runs into an 'install' and an 'all' run. The install run
uses a new minimum-constraints-install.txt file that contains just the
direct and indirect install dependencies and must succeed. The 'all' run
uses the minimum-constraints.txt file which includes the
minimum-constraints-install.txt file and that run must succeed when releasing
a version, but may fail otherwise (in scheduled runs or normal runs).
This reduces the burden of fixing safety issues that affect only development
packages.

* Document the issue and possible corrections for the pywbem listener possibly
losing indications. Modifies the indication tests in the examples directory
to give better visibility and control of what these examples are doing.
See the documentation troubleshooting section. See issue 3022.

**Cleanup:**

* Replaced the safety_ignore_opts in Makefile that is used as the basis for
ignoring safety issues with the use of a .safety_policy_file defined by
the safety utility.

* Add a number of new ignores for additions to the safety issues lise May
2003

* Clarified the use of the host parameter on the WBEMListener class. (see
issue 2995)

* Bring example pegasusindicationtest.py up to date and extend to be used
with WBEM server in a container. (see issue 2993)

* Update dev-requirements.txt, minimum-constraings.txt, .safety_policy.json for
new safety issues with GitPython and add ruamel-yaml.

* Disable cyclic-import pylint warning.

* Fix issue in pywbem_mock._base_provider where __repr__ had invalid parameter
(see issue 3036)

* Fix new feb 2024 safety issues, GitPython, Jinja2, JupyterLab. Added to
safety ignore and fixed in requirements files.

* Extend support to Python version 3.12 (see issue 3098). This includes
changes to package version requirements in requirements.txt,
dev-requirements.txt, minimum_constraints.txt

* Add ignore for gitpython new safety issue 2024-2.

* Moved the version constraints for the 'idna' package into the pywbem
installation dependencies since it is an indirect dependency (pywbem ->
requests -> idna).

* Changed the format of the README and README_PYPI files from RST to Markdown,
to address formatting issues with badges on the Github site (issue 3133).

1.6.0

------------

Released: 2023-01-14

**Bug fixes:**

* Fix issue where we could get HTTP retries upon HTTP read timeouts from
the server. Changed to not allow urllib3 to do retries on post
operations (the CIM/XML operations all use post and duplicates of
some operations (invoke, update) could cause data integrity issues).
(see issue 2951)

**Enhancements:**

* Support for Python 3.11. (issue 2904)

**Cleanup:**

* Ignore new safety issues for wheel, safety, and py packages and update
values in minimum-requirements.txt.

* Update github actions matrix to restore tests to running after github
update of ubuntu-latest to v 22.04. This is because python
versions 3.5 and 3.6 cannot be installed with setup-python github action for
CI tests and ubuntu-22.04. (see pywbemtools issue 1245 for details).

* Modify Makefile so safety check does not cause fatal github test failure.
(see issue 2970)

* Update the version of the OpenPegasus server Docker image used in tests to
the docker image kschopmeyer/openpegasus-server:0.1.2 which used OpenPegasus
2.14.3 located in the github OpenPegasus repository. This image is much
smaller (110 mb) but the same set of models and providers as the previous
image.

* Modifications and pylint ignore statements for new pylint test for
dict form dict(a=1) which is slower than {'a':1} and other new tests in
pylint 2.16.0

* Disable/fix Sphinx WARNING: reference not found messages. Hide about 270
msgs because they are probably a Sphinx issue. Fixe about 10 as they were
docstring formatting issues (see Issue 3065)

**Known issues:**

* See `list of open issues`_.

.. _`list of open issues`: https://github.com/pywbem/pywbem/issues

1.5.0

------------

This version contains all fixes up to version 1.4.2.

Released: 2022-10-12

**Incompatible changes:**

* Exceeding the 'WBEMConnection' timeout now results in raising
'pywbem.TimeoutError' in some cases where previously 'pywbem.ConnectionError'
was raised. (issue 2853)

* Changed the file permissions of `setup.py` to no longer be executable, in
order to encourage transition to use `pip install` instead of executing
`setup.py install`, which was deprecated by setuptools.

* The removal of internal symbols from the 'pywbem_mock' Python namespace may
cause name errors in your code, if you were using them.
(related to issue 2888)

* The pywbem_mock default instance writer (pywbem_mock/_instancewriteprovider.py)
added checks for creation/modification of instances to validate that the
reference properties of associations define existing instances if the
property values exist. Previously they validated only the correct value type.
(see issue 2908, extension to bidirectional inter-namespace associations)

**Bug fixes:**

* Fix issue where the DeepInheritance parameter not passed to the mocker
OpenEnumerateInstances method so the result is that the mocker always
uses the default (DeepInheritance=True). (see issue 2839)

* Test: Mitigated incorrect version of testfixtures package on Python 3.5
by pinning it to <6.4.0 on Python 3.5. (issue 2855)

* Documented that the pywbem MOF compiler does not support the "EmbeddedObject"
qualifier with a class definition. (issue 2340)

* Docs: Changes in autodocsumm and Sphinx versions to pick up final fix for
issue 2697.

* Re-enabled pylint on Python 3.5 (issue 2674)

* Increased pylint to >=2.10 on Python >=3.6 to pick up fixes in similarity
checker and enabled similarity checker again on pylint >=2.10
(issues 2672, 2673)

* Excluded setuptools 61.0.0 because it breaks installation via "setup.py install"
(issue 2871)

* Resolved new issues reported by Pylint 2.13 (issue 2870)

* Fixed that the added setup.py commands (test, leaktest, installtest) were not
displayed. They are now displayed at verbosity level 1 (using '-v').

* Previously, the sending of CIM request messages was retried in case no
response was received within the timeout. This could potentially have resulted
in executing operations multipe times. That is an issue for non-idempotent
operations such as instance creation/deletion or method invocation. Fixed
that by retrying now only during connection setup, but not for the sending
of CIM request messages. (issue 2853)

* Changed the default timeout of 'WBEMConnection' from 'None' to 30 seconds.
This prevents waiting for operation completion forever, by default.
(issue 2853)

* Pinned "certifi" to <2020.6.20 on Python 2.7 because the install test
using "setup.py install" started failing because it installed a version
of certifi on Python 2.7 that properly declares that it requires
Python >=3.6.

* Added a note to the install section of the documentation that installation
via `setup.py install` has been deprecated by setuptools.

* Removed internal symbols from 'pywbem_mock' Python namespace, and added the
'config' submodule to the 'pywbem_mock' Python namespace.
(related to issue 2888)

* Fixed invalid references in the documentation. As part of that, added class
'MOFWBEMConnection' to the 'pywbem' namespace, moved class
'IterQueryInstancesReturn' from the scope of method 'pywbem.IterQueryInstances'
to the 'pywbem' namespace.
(issue 2888).

* Fixed the name of the cythonized distribution archive.

* Fixed new formatting issues raised by flake8 5.0.

* Fixed issue in pywbem_mock/_wbemconnection_mock.py add_namespaces where
namespaces that are added with add_namespace() after an interop provider is
defined do not show up in the list of namespaces. It now uses
server.create_namespace() if the interop namespace and namespace provider
exist. (see issue 2865)

* Fixed a RecursionError exception raised by flake8 on Python 3.6 and 3.7.
(issue 2922)

* Fixed issue in pywbem_mock instancewrite providers where Create/Modify of
an instance with reference properties fails if host set in reference property
(i.e. CIMInstanceName). Now issues a warning and ignores the host value since
pywbem_mock does not handle cross-host associations. (see issue 2920)

* Fixed python syntax issue in example/pegasus_indication_test.py

**Enhancements:**

* Added support for the new 'CIM_WBEMServerNamespace' class used in the
DMTF WBEM Server Profile. In addition, the WBEMServer.create_namespace()
method now uses the same class name for the new namespace that is already
used for existing namespaces. (issue 2845)

* Docs: Clarified that the timeout parameter in 'WBEMConnection' is for
completing a CIM operation to a server or a CIM indication delivery to a
listener. (issue 2853)

* Improved the handling of exceptions raised by the "requests" and "urllib3"
packages in pywbem, so that more meaningful messages are used.
Exceeding the 'WBEMConnection' timeout now results in raising
'pywbem.TimeoutError' in some cases where previously 'pywbem.ConnectionError'
was raised. (issue 2853)

* Extend pywbem_mock creation of instances of associations to provide for
bidirectional inter-namespace associations. Previously cross-namespace
associations created in pywbem_mock were only visible in the namespace
in which they were created. (see issue 2908)

**Cleanup:**

* Removed support for Python 3.4. It had been deprecated since pywbem 1.0.0.
(issue 2829)

* Modified compiler and pywbem_mock to allow creating instances from
abstract classes because SNIA ignored DMTF rule making this illegal and many
MOF compilers also ignored it. Pywbem now issue a warning from the MOF
compiler if an instance of an abstract class is compiled but complete
the compile and another warning from pywbem_mock.CreateInstance if the
instance is for an abstract class. (see issue 2825)

* Fix issues in manual test run_cimoperations.py that resulted from changes
in the pywbem APIs. Since this was manual test it was not regularly used.
Changes included removing tests for extra parameters which now cause
failure of api.

* Clarify why the iterEnumerateInstances and IterEnumerateInstancePaths
always return the host name in the response. (see issue 2841)

* Changed build process for distribution archives to use the `build` package.

* Document a limitation in the IterQueryInstances request method (it delivers
instances for Open/Pull after the request to the server is complete). (see
issue 1801)

* Added security issues 50748, 50571, 50664, 50663, 50892, 50885, 50886 to
Makefile ignore list of new security issue August and September 2022.

* Fixed issue with mock namespace provider that would acreate the
same namespace twice under some conditions (i.e. same name property but
different path on CreateInstance. (see issue 2918)

1.4.0

------------

Released: 2022-01-01

**Bug fixes:**

* Aligned minimum versions of pip,setuptools,wheel with pywbemtools,
nocasedict,nocaselist. This increased the minimum version of pip
on Python 3.5 to fix an issue.

**Enhancements:**

* Improved verbosity of namespace creation and deletion: Added optional
'verbose' parameters to the create_namecpace() and delete_namespace() methods
of WBEMServer, and to the add_namecpace() and remove_namespace() methods of
FakedWBEMConnection (and subsequently to BaseProvider) in the mock support.

1.3.0

------------

This version contains all fixes up to version 1.2.1.

Released: 2021-12-04

**Incompatible changes:**

* The `WBEMListener.start()` method may raise new exceptions
`pywbem.ListenerPortError`, `pywbem.ListenerPromptError` and
`pywbem.ListenerCertificateError`. The `OSError` and `IOError` exceptions
raised in earlier versions may still be raised for other, less common cases.
For details, see the corresponding item in the Enhancements section, below.

* Changed 'SubscriptionManager.add_filter()' method to use the
'SourceNamespaces' property (allows multiple namespaces) of the
'CIM_IndicationFilter' class instead of the deprecated 'SourceNamespace'
property (allows only single namespace). This changed the name of the
positional 'source_namespace' parameter to 'source_namespaces`. The new
parameter allows both string and list of strings as values.

This change brings the subscription manager in line with the incorporation of
the 'SourceNamespaces' property made to this CIM class definition
by DMTF CIM schema release 2.22.0.

An optional 'source_namespace' keyword parameter has been added to the
'add_filter()'method to account for any case where a WBEM Server cannot
handle the SourceNamespaces property. The primary incompatibility will be
that the instance created for CIM_Indication filter now has a property named
'SourceNamespaces' instead of 'SourceNamespace'. See further comments below
and issue 2725.

* Changed the 'SubscriptionManager.add_filter()' method to no longer allow
specifying the 'filter_id' parameter for permanent filters. The documentation
had already disallowed that case, but the code allowed it. (issue 2757)

* Added code to fail compile or creation in pywbem_mock of instance of
Abstract class. Before this the WBEM server might fail the attempt but
the MOF compiler and pywbem_mock would build the instance
(see issue 2742).

* The new simplified format of the automatically generated 'Name' property of
owned indication filters causes existing filters with the old format to
be ignored and a Python warning of type 'pywbem.OldNameFilterWarning' will be
issued. Such owned filter instances need to be either removed as owned filters
with a prior version of pywbem, or as permanent filters with this version of
pywbem. (issue 2765)

* Removed the 'pywbem.WBEMSubscriptionManager.add_listener_destinations()'
method, because the new naming approach for listener destinations requires
either a name or an ID and that does not work well with supporting multiple
destinations in one method call. Use the new 'add_destination()' method
instead. (issue 2766)

* The new simplified format of the automatically generated 'Name' property of
owned listener destinations causes existing destinations with the old format
to be ignored and a Python warning of type 'pywbem.OldNameDestinationWarning'
will be issued. Such owned destination instances need to be either removed as
owned destinations with a prior version of pywbem, or as permanent
destinations with this version of pywbem. (issue 2766)

**Bug fixes:**

* Fixes bug in compiler where log of ModifyClass request failure was not
surrounded by verbose test (if p.parse.verbose:). See pywbemcli issue
395,

* Fixes issue where mock add_namespace() fails to correctly add the
namespace after a namespace provider has been installed. (see 2865)

* Fixes several issues in WBEMSubscriptionManager:

- Fixed the discrepancy between documentation and code in add_filter()
regarding 'filter_id', 'name' and ownership type: The only allowed
combinations are now owned filters with 'filter_id' and permanent filters
with 'name'. (issue 2757)
- add_filter() and add_destinations() methods can no longer modify
existing instances on the WBEM server. They can only create new instances.
- Modified the algorithm to determine owned filters and
instances so they are are correctly recovered from the WBEM server when the
WBEMSubscriptionManager is restarted (before this they could be returned
as not-owned object).
- Change to use WBEM server systemname as the value of the SystemName
property.
- Removed code that built instance path for new filter and destination
instances since that was used only to try to determine if instance existed
to make the create/modify decision.
- Added the client host as a component of the Name property for owned
filters and destinations. (issue 2701).
- Fix issue where windows indication throughput is very slow. It is in
the range of 1 indication every 2 seconds. The issue is not pywbem but
windows itself apparently because of hosts file and DNS configuration
such that using localhost builds in a delay. This can be fixed by using
an IP address 127.0.0.1 for the indication listener or modifying the hosts
table in windows. For this test we chose to just change the host name See
issue 528)
- Fixes issue with SubscriptionManager class where add_destinations loses
the input parameter owned if there are multiple urls in the listener_urls
parameter (see issue 2715)
- Fixes issue where add_subscription returned wrong instance if the
instance already exists. (See issue 2719)
- Fix issues in SubscriptionManager.add_destination to add optional parameter
which populates the destination PersistenceType property. (See issue 2712)
- Add capability to mock subscription providers to execute ModifyInstance
(See issue 2722)
- Fixed pywbem_mock and the MOF_compiler to test for creation or compile
of an instance with a creation class that has the Abstract qualifier. This
will fail since abstract classes cannot be instantiated. (see issue 2742)
- Removed use of unittest.Mock in pywbem_mock.FakedWBEMConnection to
use mock versions of _imethodcall and _methodcall and simply duck typed
the methods. (see issue 2755)
- Fixed issue in pywbem SubscriptionManager where duplicate add_destination()
resulted in good return rather than CIMError. The code where the
Name property is different but the URL the same was modified to test for
both URL and persistence type equality before returning the existing
instance. (See issue $ 2782)

* Fixes MOF compiler issue where the compiler was allowing array properties
to have corresponding instances instantiated with non-array values and
vice-versa. This now causes a parse error. (See issue 2786)

* Docs: Fixed an error with the autodocsumm and Sphinx 4.0.0. (issue 2697)

* Jupyter Notebook: Ignored safety issues 40380..40386 in order to continue
supporting it with Python 2.7. (issue 2703)

* Windows: Removed dependency on bash command in pip upgrade in Makefile.
(issue 2713)

* WBEM listener: Fixed the incorrect Content-Type header value 'text/html' that
was set in its export responses by changing that to 'text/xml'.
(part of issue 2729)

* WBEM listener: Removed the incorrect check for the Accept-Encoding header
value when processing export requests to be consistent with DSP0200 which
requires that WBEM listeners must support any value. (part of issue 2729)

* Fixed installation with setup.py on ubuntu for Python 2.7, 3.4, 3.5, by
pinning yamlloader to <1.0.0. (issue 2745)

* Mitigated Pylint issue 'deprecated-method' when using time.perf_counter()
on Python versions 3.6 and 3.7. (issue 2768)

* Mitigated new Pylint error 'not-an-iterable' when using 'WBEMServer'
properties that return lists and use deferred initialization. (issue 2770)

* Security - Added 42218 42253 42254 42297 42298 42203 to safety ignore list.
These were new safety issues 1 Nov 2021. The modules are all in development,
and Jupyter notebook.

* Fix incompatibility between Sphinx 1.8.5 (version for python <= 3.5) and
docutils 0.18. (See issue 2787).

* Modified dev-requirements and rtd-requirements to require Sphinx >= 3.54.

* Modify dev-requirements.txt to limit version of more-itertools to < 8.10.1
for python < 3.6. See issue 2796

* Fixed new issues raised by Pylint 2.12.1.

* Fixed error when installing virtualenv in install test on Python 2.7.

**Enhancements:**

* Improved the running of indication listeners via `WBEMListener.start()`:

- The method will now raise a new exception `pywbem.ListenerPortError` when
the port is in use, instead of the previous `socket.error` on Python 2 and
`OSError` on Python 3 that had confusing or unspecific error messages.

- The method will now raise a new exception `pywbem.ListenerCertificateError`
when using HTTPS and there is an issue with the server certificate file,
private key file, or invalid password for the private key file, instead of
the previous `ssl.SSLError` or `OSError` that had confusing or unspecific
error messages.

- The method will now raise a new exception `pywbem.ListenerPromptError`
when using HTTPS and the prompt for the password of the private key file
was interrupted or ended, instead of the previous `IOError` or `OSError`
that had unspecific error messages.

- If the private key file is protected with a password, the password prompt
now states the path name of the private key file in the prompt message.

- Add optional initialization parameter `url` to pywbem_mock
FakedWBEMConnection class. This allows a different URL than the default
http://FakedWBEMConnection:5988. With this, tests can be executed with
multiple simultaneous mock environments pywbem. (See issue 2711)

* Test: Added support for validating the structure of user-defined properties in
the easy-server server and vault files. As part of that, increased the minimum
version of the 'pytest-easy-server' package to 0.8.0. (issue 2660)

* Added providers to the pywbem_mock environment for the 3 classes required to
manage subscriptions in a WBEM server. (See issue 2704)

* Finalized the support for SI units that was experimental so far, i.e. the
'pywbem.siunit()' and 'pywbem.siunit_obj()' functions. (issue 2653)

* Modify 'SubscriptionManager.add_filter()' to use the CIM_IndicationFilter
property 'SourceNamespaces' in place of the deprecated 'SourceNamespace'. (see
issue 2725 and the **Incompatible changes:** section above)

* Added support for the ExportIndication export operation by extending
'WBEMConnection' to be able of targeting a WBEM listener instead of a WBEM
server, and by adding an 'ExportIndication()' method to 'WBEMConnection'.
The 'default_namespace' and 'use_pull_operations' init parameters and
properties are ignored when targeting a WBEM listener. (issue 2729)

* Test: Improved diff display when assertion in test_recorder.py fails.

* Added toleration support for WBEM servers that return a CIM status
CIM_ERR_FAILED when pywbem issues a pull operation and the server does not
support it. Note that DSP0200 requires the use of CIM status
CIM_ERR_NOT_SUPPORTED in this case, but at least one WBEM server returns
CIM_ERR_FAILED. (issue 2736)

* Added a 'copy()' method to 'WBEMConnection', 'FakedWBEMConnection',
'LogOperationRecorder', and 'TestClientRecorder'. The 'copy()' method returns
a copy of the object where user-specified attributes are copied and
any additional internal state is reset. In case of 'FakedWBEMConnection',
the repository and registries of the original object are reused by the
new object. (issue 2750)

* The init methods of 'WBEMConnection' and 'LogOperationRecorder'
now copy any mutable input arguments in order to ensure the new object is
decoupled from the user-provided objects. (related to issue 2750)

* Changed the WBEMConnection.timeout property to be settable. This allows
adjusting the timeout after the connection has been created. (issue 2752)

* Pylint: Removed pinning of Pylint to <2.7.0 because the performance issue
can also be addressed by disabling the similarity checker, and addressed
Pylint issues reported by Pylint 2.9. (issue 2672)

* Simplified the format of the automatically generated 'Name' property of owned
indication filters from:
``"pywbemfilter:" {ownership} ":" {client_host} ":" {submgr_id} ":" {filter_id} ":" {guid}``
to:
``"pywbemfilter:" {submgr_id} ":" {filter_id}``.
The client host was removed in order to allow different client systems to be
used. The ownership was removed because filters with an auto-generated Name
are always owned. The GUID was removed to make the name predictable and the
uniqueness it attempted to guarantee is now achieved by rejecting the creation
of filters with the same name. Overall, this change makes the name much more
suitable for use in CLI tools such as pywbemcli. (issue 2765)

* Added a `ToleratedSchemaIssueWarning` class with its base class `Warning`.
The new `ToleratedSchemaIssueWarning` is expected to be used where the
MOF compiler or code detects issues in the CIM Schema that are either
tolerated or corrected.

* Added a 'pywbem.WBEMSubscriptionManager.add_destination()' method
that makes the way the 'Name' property is created for listener destination
intances consistent with how that is now done for indication filters: There is
a new parameter 'name' that directly sets the 'Name' property for permanent
destinations, and a new parameter 'destination_id' that is used for creating
the 'Name' property for owned destinations. The format of the generated 'Name'
property has been changed from:
``"pywbemdestination:" {ownership} ":" {client_host} ":" {submgr_id} ":" {guid}``
to:
``"pywbemdestination:" {submgr_id} ":" {destination_id}``.
The client host was removed in order to allow different client systems to be
used. The ownership was removed because destinations with an auto-generated
Name are always owned. The GUID was removed to make the name predictable and
the uniqueness it attempted to guarantee is now achieved by rejecting the
creation of destinations with the same name. Overall, this change makes the
name much more suitable for use in CLI tools such as pywbemcli. (issue 2766)

* Fixed install error of PyYAML 6.0b1 on Python 2.7 during installtest, by
pinning it to <6.0.

* Fixed install error of wrapt 1.13.0 on Python 2.7 on Windows due to lack of
MS Visual C++ 9.0 on GitHub Actions, by pinning it to <1.13.

* Fixed install error of yanked jsonschema 4.0.0 on Python <3.7, by excluding it.

* Enhanced test matrix on GitHub Actions to always include Python 2.7 and
Python 3.4 on Ubuntu, and Python 2.7 and Python 3.5 on macOS and Windows.

* Support for Python 3.10: Added Python 3.10 in GitHub Actions tests, and in
package metadata.

**Cleanup:**

* Extend tests for SubscriptionManager to utilize pytest and cover error cases.

1.2.0

------------

This version contains all fixes up to pywbem 1.1.3.

Released: 2021-04-26

**Incompatible changes:**

* Unsupported CIM infrastructure versions returned in CIM-XML responses from
WBEM servers are now raised as a new exception `pywbem.CIMVersionError`, and
were previously raised as `pywbem.CIMXMLParseError`.
Unsupported DTD versions and CIM-XML protocol versions returned in CIM-XML
responses from WBEM servers are now raised as new exceptions
`pywbem.DTDVersionError` and `pywbem.ProtocolVersionError`, and were
previously ignored by pywbem.
Since these new exceptions are derived from `pywbem.VersionError` which is
derived from `pywbem.VersionError`, this change is only incompatible
if such unsupported versions were specifically handled by users.

* The `pywbem.WBEMServer.get_selected_profiles()` method now raises
`pywbem.ModelError` instead of `KeyError` when required properties were found
to be missing. This is an incompatible change for users that catch this
exception. (related to issue 2580).

* The operation recorder support added in pywbem 0.9 as an experimental feature
was changed to become internal.
As part of this, the "WBEM operation recording" section has been removed
from the documentation, the operation recorder specific classes are
no longer documented, and the operation recorder specific attributes and
methods of the 'WBEMConnection' class have been declared to be internal
and have been removed from the documentation.
The logging support which uses the operation recorder remains publicly
available. If you are using the operation recorder, please create an issue in
the issue tracker describing how you use it.

**Bug fixes:**

* MOF compiler: Fixed bug where MOF compiler did not correctly install a CIM schema
in a non-default namespace because it tried to get the qualifiers from the
default namespace. (see issue 2502)

* Test: Changed dependency on 'typed-ast' to match the needs of 'astroid' and to
install it only on CPython. This allows re-enabling PyPy3 on Travis.

* Test: Pinned psutil to <=5.6.3 on PyPy2+3 to avoid an installation error.

* Test: Increased the minimum version of 'pyzmq' on Python 3.9 to 19.0.0 to
avoid an installation error.

* Test: Circumvented unicode issue with lxml.etree.fromstring()/XML() on
Python 3.9 by passing in binary strings.

* Test: Adjusted _format()/_ascii2() testcases to PyPy3 behavior with binary vs
unicode results.

* Test: Suppressed pylint warning about 'tracemalloc' methods on PyPy.

* Test: Disabled leaktest in travis also on PyPy3 (in addition to PyPy2).

* Test: Disabled 'make resourcetest' in Travis on Pypy2+3, and suppressed Pylint
issues about using 'tracemalloc' methods and disabled its unit tests.

* Fixed the bug that pywbem allowed reference typed CIMQualifier and
CIMQualifierDeclaration objects. DSP0004 disallows reference types on
qualifiers and qualifier declarations. This fix now causes CIM-XML responses
received from a WBEM server with reference typed qualifier values and qualifier
declarations to raise `pywbem.CIMXMLParseError` from `WBEMConnection`
operations.

* Fixed a `DeprecationWarning` issued by urllib3 about using the
`whitelist_methods` parameter of `Retry`.

* Security: Increased minimum version of 'PyYAML' to 5.2 on Python 3.4 and to
5.3.1 on Python 2.7 and >=3.5 to address security issues reported by safety.
The relevant functions of 'PyYAML' are not used by pywbem, though.

* Security: Increased minimum version of 'urllib3' to 1.24.2 on Python 3.4 and
to 1.25.9 on Python 2.7 and >=3.5 to address security issues reported by
safety. To support these versions of 'urllib3', increased minimum version of
'requests' to 2.20.1 on Python 3.4 and to 2.22.0 on Python 2.7 and >=3.5.

* Security: Increased minimum versions of several packages that are needed only
for test or development of pywbem to address security issues reported by
safety: requests-toolbelt to 0.8.0; lxml to 4.6.2 (except for Python 3.4);
pylint to 2.5.2 and astroid to 2.4.0 on Python >=3.5; typed-ast to 1.3.2 on
Python 3.4; twine to 3.0.0 on Python >=3.6; pkginfo to 1.4.2; bleach to 3.1.2
on Python 3.4 and to 3.1.4 on Python 2.7 and Python >=3.5.

* Fixed issue on GitHub Actions with macos by no longer running "brew update"
in pywbem_os_setup.sh. (issue 2544)

* Docs: Fixed incorrect attribute name 'provider_classnames' in method provider
example. (issue 2564)

* Mitigated the coveralls HTTP status 422 by pinning coveralls-python to
<3.0.0.

* Test: Add tests to test_mof_compiler to test for errors where the namespace
name component of the namespace pragma is missing.

* In `CIMNamespaceProvider.post_register_setup()`, fixed an `AttributeError`
when accessing the 'Name' property of a CIM instance (related to issue 2580).

* In the `MOFCompiler` class, fixed that if a MOF instance already exists, the
ModifyInstance operation failed because the instance path was not specified.
The fix is to construct the instance path from the key properties in instance
specified in MOF. That fix has the limitation that it does not account for
instance providers that add key properties or that ignore provided key
properties (e.g. InstanceID). (issue 2586)

* Corrected issue in pywbem_mock where DeleteQualifier() was not checking whether
the qualifier was used in any classes in the namespace before being deleted.
(see 2585)

* Fixed an incorrect calculation of the min/max values for the server response
time in the statistics support of pywbem (issue 2599)

* Security - Add safety issue 40072 (lxml version 4.6,3) to safety ignore
list. No change to pywbem since we apparently do not use the affected
component (see issue 2645)

* Test: Pinned decorator package to python <=5.0.0 on Python 2+3.4 because
decorator 5.0.0 does not support python < 3.5 (see issue 2647)

* Fix pywem_mock issue with Delete class not calling providers to handle
the DeleteInstance (see issue 2643)

* Test: Workaround for BadStatusLine issue in test_WBEMListener_send_indications
test function. This is not a fix for the root cause of the issue. For details,
see pywbem issue 2659.

* Fixed installation of 'pywinpty' package on Python 2.7 by pinning it to <1.0.
It failed because it does not declare its supported Python versions.
(see issue 2680)

* Fixed that the test workflow ignored errors that occurred during 'make install'
and 'make develop', by splitting the multiple commands in these steps into
separate steps.

**Enhancements:**

* Finalized the pywbem mock support. (issue 2651)

* Logging: Added a value 'off' for the log destination in the
``pywbem.configure_logging()`` function that disables logging.
(part of issue 86)

* Improved exception handling during the parsing of CIM-XML responses received
from a WBEM server. Exceptions that were raised as TypeError or ValueError
during the creation of CIM objects that are part of the operation result, are
now raised as pywbem.CIMXMLParseError. Note that this is not an incompatible
change because users were already potentially getting pywbem.CIMXMLParseError
exceptions in other cases. (see issue 2512)

* Test: Added CIM-XML testcases in the area of instance paths. (see issue 2514)

* Docs: Clarified that `pywbem.type_from_name()` returns `CIMInstanceName` for
type name "reference", even though for use in CIM method parameters,
`CIMClassName` is also valid.

* Issued a new `pywbem.MissingKeybindingsWarning` warning if a `CIMInstanceName`
object that does not have any keybindings gets converted to CIM-XML by calling
its `tocimxml()` method, or gets converted to a WBEM URI by calling its
`to_wbem_uri()` method, or gets parsed from CIM-XML via an INSTANCENAME
element without keybindings. This is motivated by the fact that DSP0004 does
not allow instance paths without keys (section 8.2.5). (See issue 2514)

* Reduced memory consumption of CIM objects and CIM types by defining their
attributes to use Python slots. (see issue 2509)

* Reduced memory consumption of CIM objects by using lazy initialization of
dictionary-type attributes. This resulted in significant savings when the
attribute is typically unused, for example in ``CIMInstance.qualifiers``.
(see issue 2511)

* Added Python 3.9 to the supported Python versions and added tests for
it on Travis.

* Added a check for the DTDVERSION attribute value in CIM-XML responses from
WBEM servers to start with '2.'. A different version of the CIM-XML DTD
standard DSP0203 was never published, so this is not expected to be an
incompatible change.

* Unsupported versions for CIM infrastructure, DTD or protocol version returned
in CIM-XML responses from WBEM servers are now raised as new exceptions
`pywbem.CIMVersionError`, `pywbem.DTDVersionError`, and
`pywbem.ProtocolVersionError`, respectively. These new exceptions are
derived from the existing exception `pywbem.VersionError`. Previously,
unsupported CIM infrastructure versions were raised as
`pywbem.CIMXMLParseError`, and unsupported DTD or protocol versions were
ignored by pywbem.

* Removed the pinning of Pylint to 2.5.2 on Python >=3.5. Disabled the following
warnings that were newly reported by the latest version (2.6.0) of Pylint:
'signature-differs' because it does not recognize compatible signature changes;
'raise-missing-from' and 'super-with-arguments' because these issues cannot
reasonably be addressed as long as Python 2.7 is supported.

* In the makefile, added an ignore list for issues reported by safety along
with the reasons why each issue is ignored. This allowed enforcing that the
safety command reports no issues.

* Migrated from Travis and Appveyor to GitHub Actions. This required several
changes in package dependencies for development.

* Docs: Added examples to the `pywbem.siunit()` and `pywbem.siunit_obj()`
functions.

* Extend the MOF compiler so that the pywbem_mock can compile MOF containing
the namespace pragma that defines a namespace other than the one defined in
the compile_mof_string() or compile_mof_file() methods namespace parameter if
the namespace exists. Extend documentation on use of the namespace parameter
to reflect the behavior if the MOF contains a namespace pragma. Since the
code gives precedence to tha pragma over the namespace specified
in in the namespace parameter, the documentation reflects this. (see issue
2256 partial fix).

* The `pywbem.siunit()` function supported the PUnit format as defined in
DSP0004. It turned out that the CIM Schema used PUnit qualifiers with a
slightly extended format where the numeric modifiers were the middle instead
of just at the end. Extened the PUnit format supported by the `siunit()`
function accordingly. (issue 2574)

* Improved and fixed the messages in the compile log of class `MOFCompiler`
and ensured that the target namespace of the compiled objects is included
in the messages and added messages for changes to the target namespace
caused by 'pragma namespace' directives.

* The 'mof_compiler' script now displays the compiled objects and their target
namespace when specifying verbose mode (-v option).

* Improvements in `pywbem_mock.CIMNamespaceProvider` and `pywbem.WBEMServer` to
more cleanly handle Interop namespaces (related to issue 2580).

* Improvements in the log messages of the `MOFCompiler` class.
(related to issue 2586)

* Added a `close()` method to `pywbem.WBEMConnection` that closes the underlying
session of the 'requests' package. This avoids the ResourceWarning
'unclosed socket' that the 'requests' package issued so far when the Python
process terminates. Added the ability for `pywbem.WBEMConnection` to be used
as a context manager, that closes the connection at the end. (see issue 2591)

* Added a mechanism to suspend the statistics counting of server time if
one or more operations do not return the server response time, in order to
prevent incorrect interpretations of the counters when only a subset of the
operations returned server response time. (issue 2603)

* Added validation tests to pywbem_mock ModifyClass to limit classes
that can be modified (no subclasses, and no instances exist, and
correct superclass) (see issue 2447)

* Docs: Used 'autodocsumm' Sphinx extension for generating attribute and method
summary tables for classes in the documentation. Moved documentation of some
base classes into a new 'Base Classes' section in the appendix.

* Added a `conn_close()` method to the `pywbem.MOFCompiler` class that closes
the underlying connection. Used that function in the 'mof_compiler' script
to remove a ResourceWarning about unclosed sockets. (issue 2610)

* Added 'make perftest' to run performance tests. At this point, the performance
tests measure the sending of indications to the pywbem.WBEMListener.

* Test: Added support for end2end testing of WBEM servers based on server and
vault files of the 'easy-server' Python package. The server files can specify
WBEM servers and their expected supported functions. WBEM servers can be
somewhere in the network or can be containers on DockerHub which are
automatically pulled and started. At this point, the OpenPegasus container on
DockerHub is used and the end2end tests are run in the GitHub Actions test
workflow on Ubuntu (Docker is not available in GHithub Actions on Windows or
MacOS).

* Dev: Optimized the dependencies in the Makefile such that "make build" does
not execute the commands again on subsequent invocations. (issue 3167)

**Cleanup:**

* Test: Fixed all remaining ResourceWarnings during test. (issue 86)

* Test: Cleaned up DeprecationWarning for the propagation of key property values
introduced in pywbem 1.1.0. (see issue 2498)

* Add index section to generated documentation.

* Fixed new issues reported by pylint 2.7.0. At the same time, needed to
temporarily pin pylint to <2.7.0 and astroid to <2.5.0 due to massive
elongation of the run time of pylint in the pywbem project.

* Added tests for pywbem_mock ModifyClass request operation to test the
validation exceptions and correctness of modified class. (see issue 2210)

* Cleaned up TODOs noted in pywbem and pywbem_mock to fix any that were actually
bugs, etc. and either create issues or mark the others as FUTURE with more
explanation. (See issue 2491)

* Enforced that the pywbem source code does not contain any TODOs (pylint fixme).
Note that the pywbem test code may still contain TODOs.

* Removed remove_duplicate_setuptools.py script since the project is no longer
using Travis.

**Known issues:**

* On Python 3.4, the urllib3 package is pinned to <1.25.8 because 1.25.9 removed
Python 3.4 support. As a consequence,
`safety issue <https://github.com/pyupio/safety-db/blob/master/data/insecure_full.json>`_
38834 cannot be addressed on Python 3.4.

Page 1 of 7

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.