private-attribute-cpp 2.1.21__tar.gz → 2.1.23__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.
- {private_attribute_cpp-2.1.21/private_attribute_cpp.egg-info → private_attribute_cpp-2.1.23}/PKG-INFO +1 -1
- {private_attribute_cpp-2.1.21 → private_attribute_cpp-2.1.23}/private_attribute.cpp +23 -47
- {private_attribute_cpp-2.1.21 → private_attribute_cpp-2.1.23}/private_attribute.pyi +1 -1
- {private_attribute_cpp-2.1.21 → private_attribute_cpp-2.1.23/private_attribute_cpp.egg-info}/PKG-INFO +1 -1
- {private_attribute_cpp-2.1.21 → private_attribute_cpp-2.1.23}/setup.py +1 -1
- {private_attribute_cpp-2.1.21 → private_attribute_cpp-2.1.23}/LICENSE +0 -0
- {private_attribute_cpp-2.1.21 → private_attribute_cpp-2.1.23}/MANIFEST.in +0 -0
- {private_attribute_cpp-2.1.21 → private_attribute_cpp-2.1.23}/README.md +0 -0
- {private_attribute_cpp-2.1.21 → private_attribute_cpp-2.1.23}/picosha2.h +0 -0
- {private_attribute_cpp-2.1.21 → private_attribute_cpp-2.1.23}/private_attribute_cpp.egg-info/SOURCES.txt +0 -0
- {private_attribute_cpp-2.1.21 → private_attribute_cpp-2.1.23}/private_attribute_cpp.egg-info/dependency_links.txt +0 -0
- {private_attribute_cpp-2.1.21 → private_attribute_cpp-2.1.23}/private_attribute_cpp.egg-info/not-zip-safe +0 -0
- {private_attribute_cpp-2.1.21 → private_attribute_cpp-2.1.23}/private_attribute_cpp.egg-info/top_level.txt +0 -0
- {private_attribute_cpp-2.1.21 → private_attribute_cpp-2.1.23}/setup.cfg +0 -0
- {private_attribute_cpp-2.1.21 → private_attribute_cpp-2.1.23}/tests/test_attr_classify_owner.py +0 -0
- {private_attribute_cpp-2.1.21 → private_attribute_cpp-2.1.23}/tests/test_class_private_attrs.py +0 -0
- {private_attribute_cpp-2.1.21 → private_attribute_cpp-2.1.23}/tests/test_gc_collect.py +0 -0
- {private_attribute_cpp-2.1.21 → private_attribute_cpp-2.1.23}/tests/test_private_abc.py +0 -0
- {private_attribute_cpp-2.1.21 → private_attribute_cpp-2.1.23}/tests/test_private_attrs.py +0 -0
- {private_attribute_cpp-2.1.21 → private_attribute_cpp-2.1.23}/tests/test_private_func.py +0 -0
- {private_attribute_cpp-2.1.21 → private_attribute_cpp-2.1.23}/tests/test_private_inheritance.py +0 -0
- {private_attribute_cpp-2.1.21 → private_attribute_cpp-2.1.23}/tests/test_private_method.py +0 -0
- {private_attribute_cpp-2.1.21 → private_attribute_cpp-2.1.23}/tests/test_private_wrap.py +0 -0
- {private_attribute_cpp-2.1.21 → private_attribute_cpp-2.1.23}/tests/test_slots_cycle.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: private_attribute_cpp
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.23
|
|
4
4
|
Summary: A Python package that provides a way to define private attributes in C++ implementation.
|
|
5
5
|
Home-page: https://github.com/Locked-chess-official/private_attribute_cpp
|
|
6
6
|
Author: HuangHaoHua
|
|
@@ -3854,7 +3854,7 @@ PrivateAttrType_del(PyObject* cls) noexcept
|
|
|
3854
3854
|
PyType_Type.tp_dealloc(cls);
|
|
3855
3855
|
}
|
|
3856
3856
|
|
|
3857
|
-
static const char* PrivateAttrBase_doc = "The class to help
|
|
3857
|
+
static const char* PrivateAttrBase_doc = "The class to help creating private attribute. It does not have any special behavior.";
|
|
3858
3858
|
|
|
3859
3859
|
// PrivateAttrBase
|
|
3860
3860
|
static PyObject*
|
|
@@ -4374,45 +4374,32 @@ PrivateModule_get_PrivateAttrBase(PyObject* /*self*/, void* /*closure*/) noexcep
|
|
|
4374
4374
|
return NULL;
|
|
4375
4375
|
}
|
|
4376
4376
|
AllData::store_module_self[AllData::kPrivateAttrBaseKey] = base;
|
|
4377
|
-
|
|
4378
|
-
it = AllData::store_module_self.find(AllData::kPrivateAttrBaseKey);
|
|
4377
|
+
return base;
|
|
4379
4378
|
}
|
|
4380
4379
|
PyObject* PrivateAttrBase = it->second.get();
|
|
4381
4380
|
Py_INCREF(PrivateAttrBase);
|
|
4382
4381
|
return PrivateAttrBase;
|
|
4383
4382
|
}
|
|
4384
4383
|
|
|
4385
|
-
static int
|
|
4386
|
-
PyList_AppendString(PyObject* list, const char* str) noexcept
|
|
4387
|
-
{
|
|
4388
|
-
PyObject* obj = PyUnicode_InternFromString(str);
|
|
4389
|
-
if (!obj) return -1;
|
|
4390
|
-
if (PyList_Append(list, obj) < 0) {
|
|
4391
|
-
Py_DECREF(obj);
|
|
4392
|
-
return -1;
|
|
4393
|
-
}
|
|
4394
|
-
Py_DECREF(obj);
|
|
4395
|
-
return 0;
|
|
4396
|
-
}
|
|
4397
|
-
|
|
4398
4384
|
static PyObject*
|
|
4399
4385
|
PrivateModule_dir(PyObject* self, PyObject* /*args*/) noexcept
|
|
4400
4386
|
{
|
|
4401
4387
|
PyObject* parent_dir = PyObject_CallMethod((PyObject*)&PyModule_Type, "__dir__", "O", self);
|
|
4402
4388
|
if (!parent_dir) return NULL;
|
|
4403
|
-
PyObject* attr_list =
|
|
4389
|
+
PyObject* attr_list = Py_BuildValue("[ssssssss]",
|
|
4390
|
+
"PrivateWrapProxy",
|
|
4391
|
+
"PrivateAttrType",
|
|
4392
|
+
"PrivateAttrBase",
|
|
4393
|
+
"prepare",
|
|
4394
|
+
"postprocess",
|
|
4395
|
+
"register_metaclass",
|
|
4396
|
+
"ensure_type",
|
|
4397
|
+
"ensure_metaclass"
|
|
4398
|
+
);
|
|
4404
4399
|
if (!attr_list) {
|
|
4405
4400
|
Py_DECREF(parent_dir);
|
|
4406
4401
|
return NULL;
|
|
4407
4402
|
}
|
|
4408
|
-
PyList_AppendString(attr_list, "PrivateWrapProxy");
|
|
4409
|
-
PyList_AppendString(attr_list, "PrivateAttrType");
|
|
4410
|
-
PyList_AppendString(attr_list, "PrivateAttrBase");
|
|
4411
|
-
PyList_AppendString(attr_list, "prepare");
|
|
4412
|
-
PyList_AppendString(attr_list, "postprocess");
|
|
4413
|
-
PyList_AppendString(attr_list, "register_metaclass");
|
|
4414
|
-
PyList_AppendString(attr_list, "ensure_type");
|
|
4415
|
-
PyList_AppendString(attr_list, "ensure_metaclass");
|
|
4416
4403
|
PyObject* result = PySequence_Concat(parent_dir, attr_list);
|
|
4417
4404
|
Py_DECREF(parent_dir);
|
|
4418
4405
|
Py_DECREF(attr_list);
|
|
@@ -4723,36 +4710,25 @@ PrivateModule_exec(PyObject* m) noexcept
|
|
|
4723
4710
|
if (!private_attr_base) {
|
|
4724
4711
|
return -1;
|
|
4725
4712
|
}
|
|
4726
|
-
|
|
4713
|
+
Py_DECREF(private_attr_base);
|
|
4714
|
+
PyObject* all = Py_BuildValue("[ssssssss]",
|
|
4715
|
+
"PrivateWrapProxy",
|
|
4716
|
+
"PrivateAttrType",
|
|
4717
|
+
"PrivateAttrBase",
|
|
4718
|
+
"prepare",
|
|
4719
|
+
"postprocess",
|
|
4720
|
+
"register_metaclass",
|
|
4721
|
+
"ensure_type",
|
|
4722
|
+
"ensure_metaclass"
|
|
4723
|
+
);
|
|
4727
4724
|
if (!all) {
|
|
4728
|
-
Py_DECREF(private_attr_base);
|
|
4729
4725
|
return -1;
|
|
4730
4726
|
}
|
|
4731
4727
|
if (PyModule_AddObject(m, "__all__", all) < 0) {
|
|
4732
4728
|
Py_DECREF(all);
|
|
4733
|
-
Py_DECREF(private_attr_base);
|
|
4734
4729
|
return -1;
|
|
4735
4730
|
}
|
|
4736
|
-
/* all contains:
|
|
4737
|
-
* PrivateWrapProxy
|
|
4738
|
-
* PrivateAttrType
|
|
4739
|
-
* PrivateAttrBase
|
|
4740
|
-
* prepare
|
|
4741
|
-
* postprocess
|
|
4742
|
-
* register_metaclass
|
|
4743
|
-
* ensure_type
|
|
4744
|
-
* ensure_metaclass
|
|
4745
|
-
*/
|
|
4746
|
-
PyList_AppendString(all, "PrivateWrapProxy");
|
|
4747
|
-
PyList_AppendString(all, "PrivateAttrType");
|
|
4748
|
-
PyList_AppendString(all, "PrivateAttrBase");
|
|
4749
|
-
PyList_AppendString(all, "prepare");
|
|
4750
|
-
PyList_AppendString(all, "postprocess");
|
|
4751
|
-
PyList_AppendString(all, "register_metaclass");
|
|
4752
|
-
PyList_AppendString(all, "ensure_type");
|
|
4753
|
-
PyList_AppendString(all, "ensure_metaclass");
|
|
4754
4731
|
|
|
4755
|
-
Py_DECREF(private_attr_base);
|
|
4756
4732
|
AllData::store_module_self[AllData::kModuleSelfKey] = m; // store module self
|
|
4757
4733
|
|
|
4758
4734
|
return 0;
|
|
@@ -102,7 +102,7 @@ class PrivateAttrType(type):
|
|
|
102
102
|
private_func: Callable[[int, str], str]|None = None) -> PrivateAttrType: ...
|
|
103
103
|
|
|
104
104
|
class PrivateAttrBase(metaclass=PrivateAttrType):
|
|
105
|
-
"The class to help
|
|
105
|
+
"The class to help creating private attribute. It does not have any special behavior."
|
|
106
106
|
__slots__ = ()
|
|
107
107
|
__private_attrs__ = ()
|
|
108
108
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: private_attribute_cpp
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.23
|
|
4
4
|
Summary: A Python package that provides a way to define private attributes in C++ implementation.
|
|
5
5
|
Home-page: https://github.com/Locked-chess-official/private_attribute_cpp
|
|
6
6
|
Author: HuangHaoHua
|
|
@@ -24,7 +24,7 @@ readme = open('README.md').read()
|
|
|
24
24
|
|
|
25
25
|
setup(
|
|
26
26
|
name='private_attribute_cpp',
|
|
27
|
-
version='2.1.
|
|
27
|
+
version='2.1.23',
|
|
28
28
|
author="HuangHaoHua",
|
|
29
29
|
author_email="13140752715@example.com",
|
|
30
30
|
description='A Python package that provides a way to define private attributes in C++ implementation.',
|
|
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
|
{private_attribute_cpp-2.1.21 → private_attribute_cpp-2.1.23}/tests/test_attr_classify_owner.py
RENAMED
|
File without changes
|
{private_attribute_cpp-2.1.21 → private_attribute_cpp-2.1.23}/tests/test_class_private_attrs.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{private_attribute_cpp-2.1.21 → private_attribute_cpp-2.1.23}/tests/test_private_inheritance.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|