xobjects 0.5.10__tar.gz → 0.5.12__tar.gz
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.
- {xobjects-0.5.10/xobjects.egg-info → xobjects-0.5.12}/PKG-INFO +1 -1
- xobjects-0.5.12/xobjects/_version.py +1 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/xobjects/hybrid_class.py +5 -3
- {xobjects-0.5.10 → xobjects-0.5.12/xobjects.egg-info}/PKG-INFO +1 -1
- xobjects-0.5.10/xobjects/_version.py +0 -1
- {xobjects-0.5.10 → xobjects-0.5.12}/Architecture.md +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/LICENSE +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/MANIFEST.in +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/Readme.md +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/pyproject.toml +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/setup.cfg +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/setup.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/tests/test_align.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/tests/test_array.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/tests/test_buffer.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/tests/test_capi.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/tests/test_chunk.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/tests/test_common.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/tests/test_context_opencl.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/tests/test_hybrid_class.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/tests/test_kernel.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/tests/test_linked_array.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/tests/test_nplike_arrays.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/tests/test_ref.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/tests/test_scalars.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/tests/test_shared_memory.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/tests/test_strides.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/tests/test_string.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/tests/test_struct.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/tests/test_to_dict.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/tests/test_typeutils.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/tests/test_unionref.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/xobjects/__init__.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/xobjects/_patch_pyopencl_array.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/xobjects/array.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/xobjects/capi.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/xobjects/context.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/xobjects/context_cpu.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/xobjects/context_cupy.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/xobjects/context_pyopencl.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/xobjects/general.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/xobjects/headers/atomicadd.h +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/xobjects/headers/common.h +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/xobjects/linkedarray.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/xobjects/ref.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/xobjects/scalar.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/xobjects/specialize_source.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/xobjects/string.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/xobjects/struct.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/xobjects/test_helpers.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/xobjects/typeutils.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/xobjects/union.py +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/xobjects.egg-info/SOURCES.txt +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/xobjects.egg-info/dependency_links.txt +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/xobjects.egg-info/entry_points.txt +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/xobjects.egg-info/requires.txt +0 -0
- {xobjects-0.5.10 → xobjects-0.5.12}/xobjects.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.5.12"
|
|
@@ -169,7 +169,7 @@ class MetaHybridClass(type):
|
|
|
169
169
|
|
|
170
170
|
setattr(new_class, pyname, _FieldOfDressed(fname, _XoStruct))
|
|
171
171
|
|
|
172
|
-
new_class._fields =
|
|
172
|
+
new_class._fields = [ff.name for ff in _XoStruct._fields]
|
|
173
173
|
|
|
174
174
|
_XoStruct._DressingClass = new_class
|
|
175
175
|
|
|
@@ -295,9 +295,11 @@ class HybridClass(metaclass=MetaHybridClass):
|
|
|
295
295
|
|
|
296
296
|
defaults = {}
|
|
297
297
|
for field in obj._XoStruct._fields:
|
|
298
|
-
|
|
298
|
+
if dft := getattr(self, f"_default_{field.name}", None):
|
|
299
|
+
defaults[field.name] = dft
|
|
300
|
+
continue
|
|
299
301
|
try:
|
|
300
|
-
defaults[name] = field.get_default()
|
|
302
|
+
defaults[field.name] = field.get_default()
|
|
301
303
|
except (TypeError, ValueError):
|
|
302
304
|
# The above can fail with different error types
|
|
303
305
|
# if a field type is dynamic.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.5.10"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|