PySerials 0.0.0.dev41__py3-none-any.whl → 0.0.0.dev42__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PySerials
3
- Version: 0.0.0.dev41
3
+ Version: 0.0.0.dev42
4
4
  Requires-Python: >=3.10
5
5
  Requires-Dist: jsonschema <5,>=4.21.0
6
6
  Requires-Dist: referencing >=0.35.1
@@ -8,7 +8,7 @@ Requires-Dist: jsonpath-ng <2,>=1.6.1
8
8
  Requires-Dist: ruamel.yaml <0.18,>=0.17.32
9
9
  Requires-Dist: ruamel.yaml.string <1,>=0.1.1
10
10
  Requires-Dist: tomlkit <0.12,>=0.11.8
11
- Requires-Dist: MDit ==0.0.0.dev38
12
- Requires-Dist: ExceptionMan ==0.0.0.dev38
11
+ Requires-Dist: MDit ==0.0.0.dev39
12
+ Requires-Dist: ExceptionMan ==0.0.0.dev39
13
13
  Requires-Dist: ProtocolMan ==0.0.0.dev2
14
14
 
@@ -2,7 +2,7 @@ pyserials/__init__.py,sha256=Ze6ur7qP-581-UYBZ6CjoC34YmLBv4d3jg-16qxCa9U,191
2
2
  pyserials/compare.py,sha256=j62A1UIiAm08_xONlbZmU2EcH1GMEpDyEQH66dZ2YMM,1297
3
3
  pyserials/format.py,sha256=dTukpab6WHSyVRQ9SteY5fhr3GFjWFboEl-1cw_udVY,1729
4
4
  pyserials/nested_dict.py,sha256=4LsdRWsRknmZv65UDbsyiNGYtG8rxh-F0EdXQNvpUOY,5257
5
- pyserials/property_dict.py,sha256=mWwTF3GscDYKCmGoUNYjdRGg86nu5hQFvSmWNNybYfI,1511
5
+ pyserials/property_dict.py,sha256=LJKRVtLAOXH91BnVaII2BOvSjbezmDYOM3KXhTiY_sc,2010
6
6
  pyserials/read.py,sha256=uucYQH1V4GStwRgRZ2eQIXkH4ukB5qz0EA885grwi68,6592
7
7
  pyserials/update.py,sha256=tgkd7mywiYvm2tE_jPjuRWYsAoQ2Ap4NQ-OCI0ui9n0,21625
8
8
  pyserials/validate.py,sha256=ti0D_yLzB_HELvf1d5qrarx1Ac-opBMN1Xh5lADRAQU,3664
@@ -12,7 +12,7 @@ pyserials/exception/_base.py,sha256=IdaZwBPBYgiUaWnvN0eMXvQQBqLbN1t766034CK7Hlc,
12
12
  pyserials/exception/read.py,sha256=QyG6ulExXH9u8oDRjUfter70SMDVQqL4nig5s-JzWN4,9252
13
13
  pyserials/exception/update.py,sha256=P0js2-iY2fgO_KLdqedgWE3TTS5Xz15cusZY_wuKIW4,4222
14
14
  pyserials/exception/validate.py,sha256=7UkQEEqCa8HJ20gpTFnLDhT3P5OPLD2oD9fUK2Jcuns,7466
15
- PySerials-0.0.0.dev41.dist-info/METADATA,sha256=vLn0IPw1pWFcyjBjQjmP-PEFe0lfx9AKQpJKlGPXxfc,438
16
- PySerials-0.0.0.dev41.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
17
- PySerials-0.0.0.dev41.dist-info/top_level.txt,sha256=SAks7WjSjdkv3i9Hvt4gY_P7VQbhhYJN5mf5dqx1aao,10
18
- PySerials-0.0.0.dev41.dist-info/RECORD,,
15
+ PySerials-0.0.0.dev42.dist-info/METADATA,sha256=2H6vBfZ-w4XB6oDkMggguozQR09vsCEcGo6wroNaTQk,438
16
+ PySerials-0.0.0.dev42.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
17
+ PySerials-0.0.0.dev42.dist-info/top_level.txt,sha256=SAks7WjSjdkv3i9Hvt4gY_P7VQbhhYJN5mf5dqx1aao,10
18
+ PySerials-0.0.0.dev42.dist-info/RECORD,,
@@ -55,6 +55,19 @@ class PropertyDict:
55
55
  return self._data != other._data
56
56
 
57
57
  def __deepcopy__(self, memo):
58
- # Use `deepcopy` on the internal dictionary to copy its contents
58
+ # Dynamically handle subclass instantiation with additional arguments
59
+ cls = type(self)
60
+ # Deepcopy the data dictionary
59
61
  copied_data = _copy.deepcopy(self._data, memo)
60
- return PropertyDict(copied_data)
62
+ # Capture extra attributes (everything except `_data`)
63
+ extra_attrs = {
64
+ key: _copy.deepcopy(value, memo)
65
+ for key, value in self.__dict__.items()
66
+ if key != "_data"
67
+ }
68
+ # Create a new instance
69
+ obj = cls.__new__(cls) # Avoid calling __init__ directly
70
+ obj._data = copied_data # Set _data directly
71
+ # Restore extra attributes
72
+ obj.__dict__.update(extra_attrs)
73
+ return obj