From eceb7a49a17310629ffbfded9d4960162bdbafa5 Mon Sep 17 00:00:00 2001 From: scaramallion Date: Thu, 30 May 2024 10:23:26 +1000 Subject: [PATCH] Prepare for v2.1 release --- .github/workflows/publish-pypi-deploy.yml | 26 +++++++++-------------- docs/changelog/v2.1.0.rst | 8 +++---- docs/user/association.rst | 11 ---------- pynetdicom/_version.py | 4 ++-- pynetdicom/presentation.py | 17 ++++++++++++--- pyproject.toml | 3 +-- 6 files changed, 31 insertions(+), 38 deletions(-) diff --git a/.github/workflows/publish-pypi-deploy.yml b/.github/workflows/publish-pypi-deploy.yml index df85f807f..c7a3d7e5e 100644 --- a/.github/workflows/publish-pypi-deploy.yml +++ b/.github/workflows/publish-pypi-deploy.yml @@ -36,13 +36,6 @@ jobs: name: wheels path: dist/ - - name: Publish package to Test PyPi - uses: pypa/gh-action-pypi-publish@master - with: - user: __token__ - password: ${{ secrets.TEST_PYPI_PASSWORD }} - repository_url: https://test.pypi.org/legacy/ - - name: Set up test environment run: | poetry install --no-interaction --extras tests @@ -57,20 +50,21 @@ jobs: python -c "import pytest; pytest.main(['--pyargs', 'pynetdicom.tests'])" deploy: - name: Upload package to PyPI - needs: - - build_and_test + name: Upload wheels to PyPI + needs: [ build_and_test ] runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/project/pylibjpeg-libjpeg/ + permissions: + id-token: write steps: - - name: Download the package files + - name: Download the wheels uses: actions/download-artifact@v4 with: - name: wheels path: dist/ + merge-multiple: true - name: Publish package to PyPi - uses: pypa/gh-action-pypi-publish@master - with: - user: __token__ - password: ${{ secrets.PYPI_PASSWORD }} + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/docs/changelog/v2.1.0.rst b/docs/changelog/v2.1.0.rst index 41f3d65c1..1ad238c77 100644 --- a/docs/changelog/v2.1.0.rst +++ b/docs/changelog/v2.1.0.rst @@ -13,9 +13,9 @@ Fixes * Sanitise filenames for received datasets for non-conformant SOP Instance UIDs (:issue:`823`) * Fixed :attr:~pynetdicom._config.LOG_REQUEST_IDENTIFIERS` not applying to - meth:`Association.send_c_find()`, - meth:`Association.send_c_move()` and - meth:`Association.send_c_get()` (:issue:`911`) + :meth:`Association.send_c_find()`, + :meth:`Association.send_c_move()` and + :meth:`Association.send_c_get()` (:issue:`911`) Enhancements @@ -35,7 +35,7 @@ Enhancements * Added a check to :meth:`~pynetdicom.association.Association.send_c_store` to ensure that the *Transfer Syntax UID* matches the encoding of the dataset (:issue:`891`) -* Updated SOP Classes to version 2023e of the DICOM Standard +* Updated SOP Classes to version 2024b of the DICOM Standard Changes diff --git a/docs/user/association.rst b/docs/user/association.rst index df2750abf..42ead28a6 100644 --- a/docs/user/association.rst +++ b/docs/user/association.rst @@ -213,10 +213,6 @@ Handlers can also be bound and unbound from events in an existing TLS ... -.. warning:: - - TLS v1.3 is not currently supported - The client socket used for the association can be wrapped in TLS by supplying the *tls_args* keyword parameter to :meth:`~pynetdicom.ae.ApplicationEntity.associate`: @@ -493,10 +489,6 @@ unaffected. TLS ... -.. warning:: - - TLS v1.3 is not currently supported - The client sockets generated by the association server can also be wrapped in TLS by supplying a :class:`ssl.SSLContext` instance via the *ssl_context* keyword parameter: @@ -516,9 +508,6 @@ keyword parameter: ssl_cx.verify_mode = ssl.CERT_REQUIRED ssl_cx.load_cert_chain(certfile='server.crt', keyfile='server.key') ssl_cx.load_verify_locations(cafile='client.crt') - # Python 3.7+ w/ OpenSSL 1.1.0g+, other versions may require a different - # method to set the TLS version - check the Python documentation - ssl_cx.maximum_version = ssl.TLSVersion.TLSv1_2 server = ae.start_server(("127.0.0.1", 11112), block=False, ssl_context=ssl_cx) diff --git a/pynetdicom/_version.py b/pynetdicom/_version.py index 73bdd6902..067fb2b72 100644 --- a/pynetdicom/_version.py +++ b/pynetdicom/_version.py @@ -4,10 +4,10 @@ # pynetdicom version -__version__ = "2.1.0.dev0" +__version__ = "2.1.0" # DICOM Standard version used for SOP classes and instances -__dicom_version__: str = "2023e" +__dicom_version__: str = "2024b" VERSION_PATTERN = r""" v? diff --git a/pynetdicom/presentation.py b/pynetdicom/presentation.py index a2de25b14..0b84cfa98 100644 --- a/pynetdicom/presentation.py +++ b/pynetdicom/presentation.py @@ -129,7 +129,14 @@ class PresentationContextTuple(NamedTuple): (False, True): CONTEXT_REJECTED, # Invalid }, } - +# Transfer Syntaxes not in pydicom v2.4 +_PYDICOM_ADDITIONS = [ + "1.2.840.10008.1.2.4.201", # HTJ2KLossless + "1.2.840.10008.1.2.4.202", # HTJ2KLosslessRPCL + "1.2.840.10008.1.2.4.203", # HTJ2K + "1.2.840.10008.1.2.4.204", # JPIPHTJ2KReferenced + "1.2.840.10008.1.2.4.205", # JPIPHTJ2KReferencedDeflate +] class PresentationContext: """A Presentation Context primitive. @@ -282,10 +289,14 @@ def add_transfer_syntax(self, syntax: Union[None, str, bytes, UID]) -> None: "A non-conformant UID has been added to 'transfer_syntax'" ) - if not syntax.is_private and not syntax.is_transfer_syntax: + if ( + not syntax.is_private + and not syntax.is_transfer_syntax + and syntax not in _PYDICOM_ADDITIONS + ): LOGGER.warning( "A UID has been added to 'transfer_syntax' that is not a " - "transfer syntax" + f"transfer syntax: '{syntax}'" ) self._transfer_syntax.append(syntax) diff --git a/pyproject.toml b/pyproject.toml index 8878eba0a..46f12ad62 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,6 @@ include = [ "pynetdicom/tests/dicom_files/*", "pynetdicom/apps/qrscp/default.ini", "pynetdicom/py.typed", - "LICENCE", ] @@ -40,7 +39,7 @@ maintainers = [ ] name = "pynetdicom" readme = "README.rst" -version = "2.1.0.dev0" +version = "2.1.0" [tool.poetry.dependencies]