encommon 0.12.2__py3-none-any.whl → 0.12.3__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.
@@ -213,13 +213,3 @@ def test_Timers_raises(
213
213
  _reason = str(reason.value)
214
214
 
215
215
  assert _reason == 'unique'
216
-
217
-
218
- _raises = raises(ValueError)
219
-
220
- with _raises as reason:
221
- timers.delete('dne')
222
-
223
- _reason = str(reason.value)
224
-
225
- assert _reason == 'unique'
@@ -240,13 +240,3 @@ def test_Windows_raises(
240
240
  _reason = str(reason.value)
241
241
 
242
242
  assert _reason == 'unique'
243
-
244
-
245
- _raises = raises(ValueError)
246
-
247
- with _raises as reason:
248
- windows.delete('dne')
249
-
250
- _reason = str(reason.value)
251
-
252
- assert _reason == 'unique'
encommon/times/timers.py CHANGED
@@ -423,12 +423,33 @@ class Timers:
423
423
  """
424
424
  Delete the timer from the internal dictionary reference.
425
425
 
426
+ .. note::
427
+ This is a graceful method, will not raise exception
428
+ when the provided unique value does not exist.
429
+
426
430
  :param unique: Unique identifier for the related child.
427
431
  """
428
432
 
429
433
  timers = self.__timers
430
434
 
431
- if unique not in timers:
432
- raise ValueError('unique')
435
+ group = self.__group
436
+
437
+ session = self.store_session
438
+
439
+
440
+ if unique in timers:
441
+ del timers[unique]
442
+
433
443
 
434
- del timers[unique]
444
+ _table = TimersTable
445
+ _group = _table.group
446
+ _unique = _table.unique
447
+
448
+ (session.query(_table)
449
+ .filter(_unique == unique)
450
+ .filter(_group == group)
451
+ .delete())
452
+
453
+
454
+ session.commit()
455
+ session.close()
encommon/times/windows.py CHANGED
@@ -488,12 +488,33 @@ class Windows:
488
488
  """
489
489
  Delete the window from the internal dictionary reference.
490
490
 
491
+ .. note::
492
+ This is a graceful method, will not raise exception
493
+ when the provided unique value does not exist.
494
+
491
495
  :param unique: Unique identifier for the related child.
492
496
  """
493
497
 
494
498
  windows = self.__windows
495
499
 
496
- if unique not in windows:
497
- raise ValueError('unique')
500
+ group = self.__group
501
+
502
+ session = self.store_session
503
+
504
+
505
+ if unique in windows:
506
+ del windows[unique]
507
+
498
508
 
499
- del windows[unique]
509
+ _table = WindowsTable
510
+ _group = _table.group
511
+ _unique = _table.unique
512
+
513
+ (session.query(_table)
514
+ .filter(_unique == unique)
515
+ .filter(_group == group)
516
+ .delete())
517
+
518
+
519
+ session.commit()
520
+ session.close()
encommon/version.txt CHANGED
@@ -1 +1 @@
1
- 0.12.2
1
+ 0.12.3
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: encommon
3
- Version: 0.12.2
3
+ Version: 0.12.3
4
4
  Summary: Enasis Network Common Library
5
5
  License: MIT
6
6
  Classifier: Programming Language :: Python :: 3
@@ -1,7 +1,7 @@
1
1
  encommon/__init__.py,sha256=VoXUcphq-gcXCraaU47EtXBftF6UVuQPMGr0fuCTt9A,525
2
2
  encommon/conftest.py,sha256=zoshfXjo2y_NsmWSHErOaTZx7A5tSYxNAhUf4TmUZKE,1827
3
3
  encommon/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- encommon/version.txt,sha256=9ILQbk7oMVjkKZnc-VHVkJhh2tfgMxfesrHi3dXEYnQ,7
4
+ encommon/version.txt,sha256=AaUH7akWhj0sVsbSSxOYXId2QERbsT4nJpLWfM8z8Fc,7
5
5
  encommon/config/__init__.py,sha256=iZdbW7A4m7iN4xt5cEeQqo0Klqs-CaPLdD5ocLmUYi8,856
6
6
  encommon/config/config.py,sha256=ldq1LfXGq0kfZwmlWE9mGG_hCdRuLT98QyLqnZY6ms8,5312
7
7
  encommon/config/files.py,sha256=ueXiKTOqlQ4GKUT9lLyOlE-tfr6QAkSxdUs0VPbwEnE,2385
@@ -28,21 +28,21 @@ encommon/times/duration.py,sha256=LTROiKcRXvPcs2Gz9KaB5Cmxo9NXd3TcMo5-jnTxPo0,10
28
28
  encommon/times/params.py,sha256=qwfy7cw9_UlWUm2xWm1aRjJJZzZp36w3Bo3Rc-HU2hM,3515
29
29
  encommon/times/parse.py,sha256=DXoT_NyWL2Ea_j3vlGHMDY-5P6NBeYHyGhJoiavgBS0,6144
30
30
  encommon/times/timer.py,sha256=19dt7A5nJEUdr_0p3WDFGO-Q49OHt3sgPW4R2zHoScU,2901
31
- encommon/times/timers.py,sha256=dtwPGpCkNFDoydzgpq33bl_xkcLWzHUUhK94MaYNGCs,8784
31
+ encommon/times/timers.py,sha256=4kdLBFpUyZefgiIaMrIyh5Tex7eP8aPAMZOV2yvH4B8,9219
32
32
  encommon/times/times.py,sha256=FBOAVY1H21OV4BjGHj6iJrYbGQpSkWPj3Ss2Vepdvu4,9682
33
33
  encommon/times/utils.py,sha256=PJ5QsKb3_pYEnD3Sz81d8QDhYQtTIj4HJfMoC9gNwmo,3100
34
34
  encommon/times/window.py,sha256=3ctrDd0UWvnwrqxRZf7M-mVeEYVWvet6GZTj17YQ9sU,8526
35
- encommon/times/windows.py,sha256=2MdZPMkkkDUvec70EtlakHPtYA31UHmYKaaVgCVJ994,10277
35
+ encommon/times/windows.py,sha256=PiBASTU-E06R37nM2Ozl6cJidkEhTm3Sox9R-1aKkw0,10713
36
36
  encommon/times/test/__init__.py,sha256=PjrnBYT0efyvbaGeNx94dm3tP3EVHUHSVs-VGeLEv5g,218
37
37
  encommon/times/test/test_duration.py,sha256=ofCBdQ4-tOKP5W5U2xyTaZrCVvD-dWEgnYoCvZ99MuA,4189
38
38
  encommon/times/test/test_params.py,sha256=kHvs-WvKfPQCdCDnPU9tAyMVXmzH3eUjwQN-QdWBeh4,1407
39
39
  encommon/times/test/test_parse.py,sha256=ozP8PBgIsqdknK8cEtlYA3KusKnJzbjfAUKhcFv_eFk,4054
40
40
  encommon/times/test/test_timer.py,sha256=A5pBmkd1i71LTpG-uA9-9UGNJUK8tkw6by8Adm0AbGE,1400
41
- encommon/times/test/test_timers.py,sha256=7PC9WgA4_HcgW7zH6I7UxaRsLrxzMx48VfHw176RNaA,3919
41
+ encommon/times/test/test_timers.py,sha256=Kj5AgzNTCNb2vEep2zpTED6JpJ_1S5j-Kt1Bm17zkdg,3761
42
42
  encommon/times/test/test_times.py,sha256=vxEtXI9gYFlWnBLsyPyi17a96MJzgcI79SCy8U1Co8I,1748
43
43
  encommon/times/test/test_utils.py,sha256=WkzHJY6zOt02Ujg5FItOo1nPtktz5ss8ODmG1tRQaaw,2056
44
44
  encommon/times/test/test_window.py,sha256=Sx_fd0J1ofaFx52t-uWz9Isa9KqBxPFnynzfGfiG7uo,6098
45
- encommon/times/test/test_windows.py,sha256=dY7QYQ5BCBfAGotHrmkWkPGjRsI2od-8PbWkPwZ-QIM,4643
45
+ encommon/times/test/test_windows.py,sha256=YJJ3-vN4bs2cGCUcGyo8-w4mQlt7fxuek17xCpvZRE8,4484
46
46
  encommon/types/__init__.py,sha256=L1pdigJyPNPEoAkkbCHM9IhmFtU2GjFRxHMRTAnPqKk,667
47
47
  encommon/types/dicts.py,sha256=lC2FmPzMEj9L73jUjf3o6OVQ-LqK_3gp5nBwYibdGfo,2265
48
48
  encommon/types/empty.py,sha256=n5y5maXkcM3xNYNYGK6iqvk98ivQSeguaedwc0HoMv4,2739
@@ -66,8 +66,8 @@ encommon/utils/test/test_match.py,sha256=QagKpTFdRo23-Y55fSaJrSMpt5jIebScKbz0h8t
66
66
  encommon/utils/test/test_paths.py,sha256=1yiZp5PCxljGk0J6fwIfWOUl-KWz40INybrwrN3JIog,1945
67
67
  encommon/utils/test/test_sample.py,sha256=sHAeWOL1mchTGYGQaFK_A3Z28tThuULumm9kQebnIdk,1710
68
68
  encommon/utils/test/test_stdout.py,sha256=TA7xQuFoPZUYW2l00e04MGp4P9gHkkVxVflvPlhpQXg,4878
69
- encommon-0.12.2.dist-info/LICENSE,sha256=otnXKCtMjPlbHs0wgZ_BWULrp3g_2dWQJ6icRk9nkgg,1071
70
- encommon-0.12.2.dist-info/METADATA,sha256=grKBX9PyQwrEEi6QCS-FvraKKbLQgEMftCFFMTOrrhU,3362
71
- encommon-0.12.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
72
- encommon-0.12.2.dist-info/top_level.txt,sha256=bP8q7-5tLDNm-3XPlqn_bDENfYNug5801H_xfz3BEAM,9
73
- encommon-0.12.2.dist-info/RECORD,,
69
+ encommon-0.12.3.dist-info/LICENSE,sha256=otnXKCtMjPlbHs0wgZ_BWULrp3g_2dWQJ6icRk9nkgg,1071
70
+ encommon-0.12.3.dist-info/METADATA,sha256=5RkTVhFWumQfNpvq9gKZXlfFKO-zgDTaInEX1yj9oX8,3362
71
+ encommon-0.12.3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
72
+ encommon-0.12.3.dist-info/top_level.txt,sha256=bP8q7-5tLDNm-3XPlqn_bDENfYNug5801H_xfz3BEAM,9
73
+ encommon-0.12.3.dist-info/RECORD,,