f3d 2.3.0rc5__cp39-cp39-win_amd64.whl → 3.0.0rc5__cp39-cp39-win_amd64.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.

Potentially problematic release.


This version of f3d might be problematic. Click here for more details.

f3d/__init__.py CHANGED
@@ -2,10 +2,11 @@
2
2
  # Refer to python/__init__.py.in source file
3
3
 
4
4
  import os
5
- import sys
6
5
  import re
6
+ import sys
7
7
  import warnings
8
8
  from pathlib import Path
9
+ from typing import Any, Iterable, Mapping, Union
9
10
 
10
11
  F3D_ABSOLUTE_DLLS = [
11
12
  #
@@ -27,50 +28,43 @@ from .pyf3d import *
27
28
  # Automatically load plugins for the user
28
29
  Engine.autoload_plugins()
29
30
 
30
- # TODO: Delete this in 3.0, it's there for retrocompatibility with old class naming
31
- engine = Engine
32
- options = Options
33
- loader = Loader
34
- image = Image
35
- interactor = Interactor
36
- window = Window
37
- camera = Camera
38
- camera_state_t = CameraState
39
- utils = Utils
40
-
41
- __version__ = "2.3.0"
31
+ __version__ = "3.0.0"
42
32
 
43
33
 
44
34
  ################################################################################
45
35
  # monkey patch `options.update`
46
36
 
47
37
 
48
- def f3d_options_update(self, arg):
38
+ def _f3d_options_update(
39
+ self, arg: Union[Mapping[str, Any], Iterable[tuple[str, Any]]]
40
+ ) -> None:
49
41
  try:
50
42
  for k, v in arg.items():
51
43
  self[k] = v
52
44
  return
53
- except AttributeError:
45
+ except AttributeError: # `arg` doesn't have `.items()`
54
46
  pass
55
47
 
56
48
  try:
57
49
  for k, v in arg:
58
50
  self[k] = v
59
51
  return
60
- except AttributeError:
52
+ except TypeError: # `arg` isn't iterable
53
+ pass
54
+ except ValueError: # `arg` isn't iterable of pairs
61
55
  pass
62
56
 
63
- raise ValueError(f"cannot update {self} from {args}")
57
+ raise ValueError(f"cannot update {self} from {arg}")
64
58
 
65
59
 
66
- Options.update = f3d_options_update
60
+ Options.update = _f3d_options_update
67
61
 
68
62
 
69
63
  ################################################################################
70
64
  # add deprecated warnings
71
65
 
72
66
 
73
- def deprecated_decorator(f, reason):
67
+ def _deprecated_decorator(f, reason):
74
68
  def g(*args, **kwargs):
75
69
  warnings.warn(reason, DeprecationWarning, 2)
76
70
  return f(*args, **kwargs)
@@ -78,14 +72,15 @@ def deprecated_decorator(f, reason):
78
72
  return g
79
73
 
80
74
 
81
- def add_deprecation_warnings():
75
+ def _add_deprecation_warnings():
82
76
  for f3d_class in (
83
77
  Camera,
84
- Loader,
78
+ Scene,
85
79
  Options,
86
80
  Interactor,
87
81
  Engine,
88
82
  Window,
83
+ Image,
89
84
  ):
90
85
  for name, member in f3d_class.__dict__.items():
91
86
  if callable(member) and member.__doc__:
@@ -93,7 +88,7 @@ def add_deprecation_warnings():
93
88
  if m:
94
89
  reason = m.group(1) or ""
95
90
  msg = f"{f3d_class.__qualname__}.{name} is deprecated{reason}"
96
- setattr(f3d_class, name, deprecated_decorator(member, msg))
91
+ setattr(f3d_class, name, _deprecated_decorator(member, msg))
97
92
 
98
93
 
99
- add_deprecation_warnings()
94
+ _add_deprecation_warnings()
f3d/__init__.pyi ADDED
@@ -0,0 +1,34 @@
1
+ from __future__ import annotations
2
+ from f3d.pyf3d import Camera
3
+ from f3d.pyf3d import CameraState
4
+ from f3d.pyf3d import Engine
5
+ from f3d.pyf3d import Image
6
+ from f3d.pyf3d import InteractionBind
7
+ from f3d.pyf3d import Interactor
8
+ from f3d.pyf3d import LibInformation
9
+ from f3d.pyf3d import Log
10
+ from f3d.pyf3d import Mesh
11
+ from f3d.pyf3d import Options
12
+ from f3d.pyf3d import ReaderInformation
13
+ from f3d.pyf3d import Scene
14
+ from f3d.pyf3d import Utils
15
+ from f3d.pyf3d import Window
16
+ import os as os
17
+ import pathlib
18
+ from pathlib import Path
19
+ import re as re
20
+ import sys as sys
21
+ import warnings as warnings
22
+ from . import pyf3d
23
+ __all__ = ['Camera', 'CameraState', 'Engine', 'F3D_ABSOLUTE_DLLS', 'F3D_RELATIVE_DLLS', 'Image', 'InteractionBind', 'Interactor', 'LibInformation', 'Log', 'Mesh', 'Options', 'Path', 'ReaderInformation', 'Scene', 'Utils', 'Window', 'abs_path', 'os', 'pyf3d', 're', 'root', 'sys', 'warnings']
24
+ def _add_deprecation_warnings():
25
+ ...
26
+ def _deprecated_decorator(f, reason):
27
+ ...
28
+ def _f3d_options_update(self, arg: typing.Union[typing.Mapping[str, typing.Any], typing.Iterable[tuple[str, typing.Any]]]) -> None:
29
+ ...
30
+ F3D_ABSOLUTE_DLLS: list = ['D:/a/f3d-superbuild/f3d-superbuild/fsbb/install/bin', 'D:/a/f3d-superbuild/f3d-superbuild/fsbb/install/lib', 'C:/Users/runneradmin/AppData/Local/Temp/tmp83kz9abj/build/bin']
31
+ F3D_RELATIVE_DLLS: list = list()
32
+ __version__: str = '3.0.0'
33
+ abs_path: str = 'C:/Users/runneradmin/AppData/Local/Temp/tmp83kz9abj/build/bin'
34
+ root: pathlib.WindowsPath # value = WindowsPath('C:/Users/runneradmin/AppData/Local/Temp/tmp83kz9abj/build/f3d')
f3d/bin/f3d.dll CHANGED
Binary file
f3d/bin/vcruntime140.dll CHANGED
Binary file
f3d/bin/zlib.dll CHANGED
Binary file
Binary file