Skip to content

Commit 8a4f095

Browse files
committed
Updating the docs in dev/ for branch: main, commit 1181156 [skip ci]
1 parent 151a45c commit 8a4f095

484 files changed

Lines changed: 1649 additions & 893 deletions

File tree

Some content is hidden

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

dev/_sources/changelog/v3.0.0.rst.txt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ The major breaking changes with the version 3.0 release are:
88
* Minimum required pydicom version is 3.0
99
* Changed :attr:`~pynetdicom.presentation.StoragePresentationContexts` to match DCMTK
1010
implementation
11+
* Various small changes required to support IPv6
1112

1213
Changes
1314
-------
@@ -18,6 +19,36 @@ Changes
1819
* Updated SOP classes to version 2025b of the DICOM Standard
1920
* P-DATA PDUs received during association release are now added to the normal DIMSE
2021
messaging queue
22+
* The following changes have been made in order to support IPv6 connections:
23+
24+
* Changed :meth:`AE.associate()<pynetdicom.ae.ApplicationEntity.associate>` to accept
25+
either a str or tuple[str, int, int] as the `addr` parameter.
26+
* Changed :meth:`AE.associate()<pynetdicom.ae.ApplicationEntity.associate>` to accept
27+
either a tuple[str, int] or tuple[str, int, int, int] as the `bind_address` keyword
28+
parameter.
29+
* Changed :meth:`AE.make_server()<pynetdicom.ae.ApplicationEntity.associate>` and
30+
:meth:`AE.start_server()<pynetdicom.ae.ApplicationEntity.associate>` to
31+
accept either a tuple[str, int] or tuple[str, int, int, int] as the `address`
32+
parameter.
33+
* Added :class:`~pynetdicom.transport.AddressInformation`
34+
* :attr:`ServiceUser.address<pynetdicom.association.ServiceUser.address>` and
35+
:attr:`ServiceUser.port<pynetdicom.association.ServiceUser.port>` are now
36+
read-only properties.
37+
* Added :attr:`ServiceUser.address_info
38+
<pynetdicom.association.ServiceUser.address_info>`.
39+
* Changed :meth:`pynetdicom.transport.AssociationSocket` to accept an
40+
:class:`~pynetdicom.transport.AddressInformation` instance as the `address`
41+
keyword parameter.
42+
* :attr:`RequestHandler.local<pynetdicom.transport.RequestHandler.local>` and
43+
:attr:`RequestHandler.remote<pynetdicom.transport.RequestHandler.remote>` now
44+
return an :class:`~pynetdicom.transport.AddressInformation` instance
45+
* Added :attr:`T_CONNECT.address_info<pynetdicom.transport.T_CONNECT.address_info>`
46+
* :attr:`A_ASSOCIATE.calling_presentation_address
47+
<pynetdicom.pdu_primitives.A_ASSOCIATE.calling_presentation_address>` and
48+
:attr:`A_ASSOCIATE.called_presentation_address
49+
<pynetdicom.pdu_primitives.A_ASSOCIATE.called_presentation_address>` are both now
50+
set using an :class:`~pynetdicom.transport.AddressInformation` instance
51+
2152

2253
Enhancements
2354
------------
@@ -26,6 +57,8 @@ Enhancements
2657
absent from the N-CREATE-RQ can now be done by adding it to the returned *Attribute
2758
List* dataset (it'll be removed from the dataset prior to sending) (:issue:`995`)
2859
* Added debugging handlers for the remaining DIMSE-N messages
60+
* Added :attr:`_config.DEFAULT_BIND_ADDRESS<pynetdicom._config.DEFAULT_BIND_ADDRESS>`
61+
* Added support for IPv6 connections (:issue:`984`)
2962

3063

3164
Fixes

dev/_sources/reference/config.rst.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Configuration Options (:mod:`pynetdicom._config`)
1111
:toctree: generated/
1212

1313
CODECS
14+
DEFAULT_BIND_ADDRESS
1415
ENFORCE_UID_CONFORMANCE
1516
LOG_HANDLER_LEVEL
1617
LOG_REQUEST_IDENTIFIERS
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pynetdicom.\_config.DEFAULT\_BIND\_ADDRESS
2+
==========================================
3+
4+
.. currentmodule:: pynetdicom._config
5+
6+
.. autodata:: DEFAULT_BIND_ADDRESS

dev/_sources/reference/generated/pynetdicom.association.ServiceUser.rst.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
.. autosummary::
2929

3030
~ServiceUser.accepted_common_extended
31+
~ServiceUser.address
3132
~ServiceUser.ae_title
3233
~ServiceUser.asynchronous_operations
3334
~ServiceUser.extended_negotiation
@@ -38,6 +39,7 @@
3839
~ServiceUser.is_requestor
3940
~ServiceUser.maximum_length
4041
~ServiceUser.mode
42+
~ServiceUser.port
4143
~ServiceUser.requested_contexts
4244
~ServiceUser.role_selection
4345
~ServiceUser.sop_class_common_extended
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
pynetdicom.transport.AddressInformation
2+
=======================================
3+
4+
.. currentmodule:: pynetdicom.transport
5+
6+
.. autoclass:: AddressInformation
7+
8+
9+
.. automethod:: __init__
10+
11+
12+
.. rubric:: Methods
13+
14+
.. autosummary::
15+
16+
~AddressInformation.__init__
17+
~AddressInformation.from_addr_port
18+
~AddressInformation.from_tuple
19+
20+
21+
22+
23+
24+
.. rubric:: Attributes
25+
26+
.. autosummary::
27+
28+
~AddressInformation.address
29+
~AddressInformation.address_family
30+
~AddressInformation.as_tuple
31+
~AddressInformation.is_ipv4
32+
~AddressInformation.is_ipv6
33+
34+

dev/_sources/reference/generated/pynetdicom.transport.T_CONNECT.rst.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
.. autosummary::
2525

2626
~T_CONNECT.address
27+
~T_CONNECT.address_info
2728
~T_CONNECT.result
2829

2930

dev/_sources/reference/transport.rst.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ communication with peer AEs.
1717

1818
AssociationSocket
1919
AssociationServer
20+
AddressInformation
2021
RequestHandler
2122
ThreadedAssociationServer
2223
T_CONNECT

dev/_sources/tutorials/create_scu.rst.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ This tutorial is intended for people who are new to *pynetdicom*. In it you'll:
1313
* Learn how to perform some basic troubleshooting of associations
1414
* Modify your AE to be an Echo SCU
1515

16-
The tutorial is written for *pynetdicom* 2.0 and higher, which supports Python
17-
3.7+. You can tell which version of *pynetdicom* you have by running
16+
The tutorial is written for *pynetdicom* 3.0 and higher, which supports Python
17+
3.10+. You can tell which version of *pynetdicom* you have by running
1818
the following command::
1919

2020
$ python -m pynetdicom --version
2121

22-
If you get an error or if your version is earlier than 2.0, then install or
22+
If you get an error or if your version is earlier than 3.0, then install or
2323
upgrade *pynetdicom* by following the instructions in the
2424
:doc:`installation guide</tutorials/installation>`. For
2525
this tutorial we'll also be using the :doc:`echoscp<../apps/echoscp>`

dev/_sources/user/ae.rst.txt

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,15 +221,22 @@ Specifying the network port
221221
In general it shouldn't be necessary to specify the port when acting as an SCU,
222222
as by default *pynetdicom* will use the first port available. To specify the
223223
port number manually you can use the *bind_address* keyword parameter when
224-
requesting an association, which takes a 2-tuple of (:class:`str` *host*,
225-
:class:`int` *port*):
224+
requesting an association, which takes:
225+
226+
* For IPv4 or IPv6 a 2-tuple of (:class:`str` *host*, :class:`int` *port*), with the
227+
`flowinfo` and `scope_id` defaulting to ``0`` for IPv6, or,
228+
* For IPv6 a 4-tuple of (:class:`str` *host*, :class:`int` *port*, :class:`int`
229+
flowinfo, :class:`int` scope_id)
226230

227231
.. doctest::
228232

229233
>>> from pynetdicom import AE
230234
>>> ae = AE()
231235
>>> ae.add_requested_context('1.2.840.10008.1.1')
232236
>>> assoc = ae.associate("127.0.0.1", 11112, bind_address=("127.0.0.1", 11113)) # doctest: +SKIP
237+
>>> assoc.release()
238+
>>> assoc = ae.associate("::1", 11112, bind_address=("::1", 11113)) # doctest: +SKIP
239+
>>> assoc.release()
233240

234241
.. note::
235242

@@ -497,15 +504,22 @@ to see the requirements for implementations of the ``evt.EVT_USER_ID`` handler.
497504
Specifying the bind address
498505
...........................
499506
The bind address for the server socket is specified by the *address*
500-
parameter to :meth:`~pynetdicom.ae.ApplicationEntity.start_server` as
501-
(str *host*, int *port*).
507+
parameter to :meth:`~pynetdicom.ae.ApplicationEntity.start_server` as:
508+
509+
* For IPv4 or IPv6 a 2-tuple of (:class:`str` *host*, :class:`int` *port*), with the
510+
`flowinfo` and `scope_id` defaulting to ``0`` for IPv6, or,
511+
* For IPv6 a 4-tuple of (:class:`str` *host*, :class:`int` *port*, :class:`int`
512+
flowinfo, :class:`int` scope_id)
502513

503514
.. code-block:: python
504515
505516
>>> from pynetdicom import AE
506517
>>> ae = AE()
507518
>>> ae.add_supported_context('1.2.840.10008.1.1')
508-
>>> ae.start_server(("127.0.0.1", 11112))
519+
>>> server = ae.start_server(("127.0.0.1", 11112), block=False)
520+
>>> server.shutdown()
521+
>>> server = ae.start_server(("::1", 11112), block=False)
522+
>>> server.shutdown()
509523
510524
511525
Association

dev/_sources/user/association.rst.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,15 @@ method, which returns an :class:`Association` thread:
2323
ae = AE()
2424
ae.add_requested_context(Verification)
2525
26-
# Associate with the peer at IP address 127.0.0.1 and port 11112
26+
# Associate with the peer at IPv4 address 127.0.0.1 and port 11112
27+
# IPv6 is also supported
2728
assoc = ae.associate("127.0.0.1", 11112)
2829
2930
# Release the association
3031
if assoc.is_established:
3132
assoc.release()
3233
33-
This sends an association request to the IP address ``127.0.0.1`` on port
34+
This sends an association request to the IPv4 address ``127.0.0.1`` on port
3435
``11112`` with the request containing the presentation contexts from
3536
:attr:`AE.requested_contexts<pynetdicom.ae.ApplicationEntity.requested_contexts>`
3637
and the default *Called AE Title* parameter of ``'ANY-SCP'``.
@@ -96,7 +97,7 @@ also acting as a Storage SCP), plus a *User Identity Negotiation* item:
9697
ae = AE()
9798
# Contexts supported as a Storage SCP - requires Role Selection
9899
# Note that we are limited to a maximum of 128 contexts.
99-
# StoragePresentationContexts includes 120, it is therefore
100+
# StoragePresentationContexts includes 120, it is therefore
100101
# possible to add 8 additional presentation contexts if needed.
101102
ae.requested_contexts = StoragePresentationContexts
102103
# Contexts proposed as a QR SCU
@@ -343,7 +344,7 @@ method:
343344
ae = AE()
344345
ae.add_supported_context(Verification)
345346
346-
# Listen for association requests
347+
# Listen for association requests on a IPv4 address, IPv6 is also supported
347348
ae.start_server(("127.0.0.1", 11112))
348349
349350
The above is suitable as an implementation of the Verification Service

0 commit comments

Comments
 (0)