flow.record 3.18.dev2__py3-none-any.whl → 3.19.dev2__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.
@@ -83,8 +83,8 @@ class ElasticWriter(AbstractWriter):
83
83
  self.metadata_fields[arg_key[6:]] = arg_val
84
84
 
85
85
  def excepthook(self, exc: threading.ExceptHookArgs, *args, **kwargs) -> None:
86
- log.error("Exception in thread: %s", exc.exc_value.message)
87
- self.exception = exc.exc_value
86
+ log.error("Exception in thread: %s", exc)
87
+ self.exception = getattr(exc, "exc_value", exc)
88
88
  self.event.set()
89
89
  self.close()
90
90
 
@@ -33,6 +33,7 @@ UTC = timezone.utc
33
33
 
34
34
  PY_311_OR_HIGHER = sys.version_info >= (3, 11, 0)
35
35
  PY_312_OR_HIGHER = sys.version_info >= (3, 12, 0)
36
+ PY_313_OR_HIGHER = sys.version_info >= (3, 13, 0)
36
37
 
37
38
  TYPE_POSIX = 0
38
39
  TYPE_WINDOWS = 1
@@ -600,12 +601,18 @@ class record(FieldType):
600
601
  return data
601
602
 
602
603
 
603
- def _is_posixlike_path(path: Any):
604
- return isinstance(path, pathlib.PurePath) and "\\" not in (path._flavour.sep, path._flavour.altsep)
604
+ def _is_posixlike_path(path: Any) -> bool:
605
+ if isinstance(path, pathlib.PurePath):
606
+ obj = getattr(path, "parser", None) or path._flavour
607
+ return "\\" not in (obj.sep, obj.altsep)
608
+ return False
605
609
 
606
610
 
607
- def _is_windowslike_path(path: Any):
608
- return isinstance(path, pathlib.PurePath) and "\\" in (path._flavour.sep, path._flavour.altsep)
611
+ def _is_windowslike_path(path: Any) -> bool:
612
+ if isinstance(path, pathlib.PurePath):
613
+ obj = getattr(path, "parser", None) or path._flavour
614
+ return "\\" in (obj.sep, obj.altsep)
615
+ return False
609
616
 
610
617
 
611
618
  class path(pathlib.PurePath, FieldType):
@@ -684,17 +691,17 @@ class path(pathlib.PurePath, FieldType):
684
691
  return repr(str(self))
685
692
 
686
693
  @property
687
- def parent(self):
694
+ def parent(self) -> path:
688
695
  if self._empty_path:
689
696
  return self
690
697
  return super().parent
691
698
 
692
- def _pack(self):
699
+ def _pack(self) -> tuple[str, int]:
693
700
  path_type = TYPE_WINDOWS if isinstance(self, windows_path) else TYPE_POSIX
694
701
  return (str(self), path_type)
695
702
 
696
703
  @classmethod
697
- def _unpack(cls, data: tuple[str, str]):
704
+ def _unpack(cls, data: tuple[str, str]) -> posix_path | windows_path:
698
705
  path_, path_type = data
699
706
  if path_type == TYPE_POSIX:
700
707
  return posix_path(path_)
@@ -705,12 +712,12 @@ class path(pathlib.PurePath, FieldType):
705
712
  return posix_path(path_)
706
713
 
707
714
  @classmethod
708
- def from_posix(cls, path_: str):
715
+ def from_posix(cls, path_: str) -> posix_path:
709
716
  """Initialize a path instance from a posix path string using / as a separator."""
710
717
  return posix_path(path_)
711
718
 
712
719
  @classmethod
713
- def from_windows(cls, path_: str):
720
+ def from_windows(cls, path_: str) -> windows_path:
714
721
  """Initialize a path instance from a windows path string using \\ or / as a separator."""
715
722
  return windows_path(path_)
716
723
 
flow/record/version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '3.18.dev2'
16
- __version_tuple__ = version_tuple = (3, 18, 'dev2')
15
+ __version__ = version = '3.19.dev2'
16
+ __version_tuple__ = version_tuple = (3, 19, 'dev2')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: flow.record
3
- Version: 3.18.dev2
3
+ Version: 3.19.dev2
4
4
  Summary: A library for defining and creating structured data (called records) that can be streamed to disk or piped to other tools that use flow.record
5
5
  Author-email: Dissect Team <dissect@fox-it.com>
6
6
  License: Affero General Public License v3
@@ -20,29 +20,29 @@ Requires-Python: ~=3.9
20
20
  Description-Content-Type: text/markdown
21
21
  License-File: LICENSE
22
22
  License-File: COPYRIGHT
23
- Requires-Dist: msgpack >=0.5.2
24
- Requires-Dist: tzdata ; platform_system == "Windows"
25
- Provides-Extra: avro
26
- Requires-Dist: fastavro[snappy] ; extra == 'avro'
27
- Requires-Dist: cramjam <2.8.4 ; (platform_python_implementation == "PyPy" and python_version == "3.9") and extra == 'avro'
23
+ Requires-Dist: msgpack>=0.5.2
24
+ Requires-Dist: tzdata; platform_system == "Windows"
28
25
  Provides-Extra: compression
29
- Requires-Dist: lz4 ; extra == 'compression'
30
- Requires-Dist: zstandard ; extra == 'compression'
31
- Provides-Extra: duckdb
32
- Requires-Dist: duckdb ; extra == 'duckdb'
33
- Requires-Dist: pytz ; extra == 'duckdb'
26
+ Requires-Dist: lz4; extra == "compression"
27
+ Requires-Dist: zstandard; extra == "compression"
34
28
  Provides-Extra: elastic
35
- Requires-Dist: elasticsearch ; extra == 'elastic'
29
+ Requires-Dist: elasticsearch; extra == "elastic"
36
30
  Provides-Extra: geoip
37
- Requires-Dist: maxminddb ; extra == 'geoip'
31
+ Requires-Dist: maxminddb; extra == "geoip"
32
+ Provides-Extra: avro
33
+ Requires-Dist: cramjam<2.8.4; (platform_python_implementation == "PyPy" and python_version == "3.9") and extra == "avro"
34
+ Requires-Dist: fastavro[snappy]; extra == "avro"
35
+ Provides-Extra: duckdb
36
+ Requires-Dist: duckdb; extra == "duckdb"
37
+ Requires-Dist: pytz; extra == "duckdb"
38
38
  Provides-Extra: splunk
39
- Requires-Dist: httpx ; extra == 'splunk'
39
+ Requires-Dist: httpx; extra == "splunk"
40
40
  Provides-Extra: test
41
- Requires-Dist: flow.record[compression] ; extra == 'test'
42
- Requires-Dist: flow.record[avro] ; extra == 'test'
43
- Requires-Dist: flow.record[elastic] ; extra == 'test'
44
- Requires-Dist: duckdb ; (platform_python_implementation != "PyPy" and python_version < "3.12") and extra == 'test'
45
- Requires-Dist: pytz ; (platform_python_implementation != "PyPy" and python_version < "3.12") and extra == 'test'
41
+ Requires-Dist: flow.record[compression]; extra == "test"
42
+ Requires-Dist: flow.record[avro]; extra == "test"
43
+ Requires-Dist: flow.record[elastic]; extra == "test"
44
+ Requires-Dist: duckdb; (platform_python_implementation != "PyPy" and python_version < "3.12") and extra == "test"
45
+ Requires-Dist: pytz; (platform_python_implementation != "PyPy" and python_version < "3.12") and extra == "test"
46
46
 
47
47
  # flow.record
48
48
 
@@ -6,7 +6,7 @@ flow/record/packer.py,sha256=VelVqMXAfGvXbuk3wP5H8pkAH5pZqGAQygqXhS8b1ZE,6540
6
6
  flow/record/selector.py,sha256=ac0ALXILgZYGFXQKTe2y0Qm1PxdHXdHZc4cX3phseMw,21184
7
7
  flow/record/stream.py,sha256=sMm3xkyojmsQ7Skrx45J7uWkTN1GhFqSX71WBQyadqk,9625
8
8
  flow/record/utils.py,sha256=WuAUmoytJSVhy0fnt-z9VxX7gphKZGIjQgg87BVVLRw,3193
9
- flow/record/version.py,sha256=idUhatEtE4M6-sw8zyscqLeiBn-J3BYFBZhEuytgiNM,421
9
+ flow/record/version.py,sha256=GQIg1pe0S8lrlZysiCbMRmFiBIbfuz_U2GIET_wyiFQ,421
10
10
  flow/record/whitelist.py,sha256=-JUo_ZT2ZmRR1fuLfLhT0bNsATQQr-dPT83ba1ia-fk,716
11
11
  flow/record/adapter/__init__.py,sha256=0fhjxc0Jp5kXKaxDestDttu0MLczic2-3AYi3l1bYnI,1721
12
12
  flow/record/adapter/archive.py,sha256=d_HZkaVK2fdvUXrcSawP_keyn4i8rafpKjvB68lhMY0,941
@@ -14,7 +14,7 @@ flow/record/adapter/avro.py,sha256=jgjUDo04HufVHh5h1GSZRxvqqALlMoWgeXSA0Ba2i_g,6
14
14
  flow/record/adapter/broker.py,sha256=jqJj-CplOyyWvLhMec0xmQFpz3CbzlQOATjbNGXI86U,1522
15
15
  flow/record/adapter/csvfile.py,sha256=IigA_JB3sL8OP-eY75SbYRa691gnop7TbUF-SHnBAYQ,3466
16
16
  flow/record/adapter/duckdb.py,sha256=EX59AZERbJisTFeh6mF2FfpgTjxLIJnEdlH0C1ldHVI,1420
17
- flow/record/adapter/elastic.py,sha256=SM3C0QEL3yHqdQoXME8Bh0Z1KcHHUQXUTvUaMQ46nQk,7058
17
+ flow/record/adapter/elastic.py,sha256=cHL0IbEVt5RVScdMNo_wL7E5dZTyPeu1PSpS9pQFo1U,7057
18
18
  flow/record/adapter/jsonfile.py,sha256=dtSSH4Ly0oneWUNbOOtXV6NeGQrNx2HiENyNlzpmpYc,2791
19
19
  flow/record/adapter/line.py,sha256=RROPd4lnStCltGmncGdgG1swZ1XJ06A9jmjRNleBdj4,2639
20
20
  flow/record/adapter/mongo.py,sha256=5bGp35Rx9SvU3co07bFui-tKm1ZDPXJjwIc2PkXXy1g,3085
@@ -24,7 +24,7 @@ flow/record/adapter/sqlite.py,sha256=hXfvWyrlfrImaq7oYaixSCe-vFSMEqwMdyUr0vW8ge0
24
24
  flow/record/adapter/stream.py,sha256=27B8MJcMXN4v5d_NLnqsEOI4nlh1_ieu5MIxuJVGc8s,1725
25
25
  flow/record/adapter/text.py,sha256=Cawsucu0Xi0zYfHBm6K6ructTDqxR9XGauMsBFknKO8,1583
26
26
  flow/record/adapter/xlsx.py,sha256=EF7JGSf-m2yvgiVqBP5ck6Ita1mVpASuP1_v7kPVo9s,5254
27
- flow/record/fieldtypes/__init__.py,sha256=FfGqz3Y49r11PDwCZoqc4w-pnvIsLQjrjf1ozBeMW48,25736
27
+ flow/record/fieldtypes/__init__.py,sha256=2M3j3uonR1LNP6_XLSCTWKLleXvr4sd0mSA-San3yYc,26020
28
28
  flow/record/fieldtypes/credential.py,sha256=UnR9U9i___KjkhSI7mlv9EgWT9kgNGLq7y1Oqk5hnUo,112
29
29
  flow/record/fieldtypes/net/__init__.py,sha256=7FhBTH85SsRFZgSRYulI0Gy5Y69IHAac4NEMKNIWtkw,252
30
30
  flow/record/fieldtypes/net/ip.py,sha256=pE1Ys3EfPMcGEyg6xs5XFaaQ6000HpbiH5a-22iYhMc,2747
@@ -34,10 +34,10 @@ flow/record/fieldtypes/net/udp.py,sha256=NJ6JXEnMyTw3N8fTRS3dHi_cpOlWOBxPwCiQ-cq
34
34
  flow/record/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
35
  flow/record/tools/geoip.py,sha256=wv6_CcQkWGgOq4zYIzCcyTB_b4QhfGODHbg-Sg_2AYY,5218
36
36
  flow/record/tools/rdump.py,sha256=gnYecnABtzZdVMC1Dv03DKxDJI0FX18cjthl2Jn7vXg,9211
37
- flow.record-3.18.dev2.dist-info/COPYRIGHT,sha256=MemuVEitZl6nTA3wCiJXY3v-Y5cYgfCzTodptjpZ9Tw,298
38
- flow.record-3.18.dev2.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
39
- flow.record-3.18.dev2.dist-info/METADATA,sha256=hkIpqj8ROrDyAx3WtQ8OAC0O7GWcWEG_UFsiKNuAoXM,6434
40
- flow.record-3.18.dev2.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
41
- flow.record-3.18.dev2.dist-info/entry_points.txt,sha256=BYPSrpFXabKCvE97dU3Bj4G_cfozaxsxsN7IHu6Vkpo,93
42
- flow.record-3.18.dev2.dist-info/top_level.txt,sha256=mZX7nA6le1XNJV9ujgVL0yyesYwj3fMwHSm3zGwjNbU,5
43
- flow.record-3.18.dev2.dist-info/RECORD,,
37
+ flow.record-3.19.dev2.dist-info/COPYRIGHT,sha256=MemuVEitZl6nTA3wCiJXY3v-Y5cYgfCzTodptjpZ9Tw,298
38
+ flow.record-3.19.dev2.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
39
+ flow.record-3.19.dev2.dist-info/METADATA,sha256=HjxUWeQEM-J84cZxl7sO5FZ3yzrhvixC2eoNM_rawLo,6417
40
+ flow.record-3.19.dev2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
41
+ flow.record-3.19.dev2.dist-info/entry_points.txt,sha256=BYPSrpFXabKCvE97dU3Bj4G_cfozaxsxsN7IHu6Vkpo,93
42
+ flow.record-3.19.dev2.dist-info/top_level.txt,sha256=mZX7nA6le1XNJV9ujgVL0yyesYwj3fMwHSm3zGwjNbU,5
43
+ flow.record-3.19.dev2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.3.0)
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5