private-attribute-cpp 1.3.2__tar.gz → 1.4.0__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-1.4.0/LICENSE +21 -0
- {private_attribute_cpp-1.3.2/private_attribute_cpp.egg-info → private_attribute_cpp-1.4.0}/PKG-INFO +4 -2
- {private_attribute_cpp-1.3.2 → private_attribute_cpp-1.4.0}/README.md +1 -1
- {private_attribute_cpp-1.3.2 → private_attribute_cpp-1.4.0}/private_attribute.cpp +805 -236
- private_attribute_cpp-1.4.0/private_attribute.pyi +200 -0
- {private_attribute_cpp-1.3.2 → private_attribute_cpp-1.4.0/private_attribute_cpp.egg-info}/PKG-INFO +4 -2
- {private_attribute_cpp-1.3.2 → private_attribute_cpp-1.4.0}/private_attribute_cpp.egg-info/SOURCES.txt +1 -0
- {private_attribute_cpp-1.3.2 → private_attribute_cpp-1.4.0}/setup.py +1 -1
- private_attribute_cpp-1.3.2/private_attribute.pyi +0 -50
- {private_attribute_cpp-1.3.2 → private_attribute_cpp-1.4.0}/MANIFEST.in +0 -0
- {private_attribute_cpp-1.3.2 → private_attribute_cpp-1.4.0}/picosha2.h +0 -0
- {private_attribute_cpp-1.3.2 → private_attribute_cpp-1.4.0}/private_attribute_cpp.egg-info/dependency_links.txt +0 -0
- {private_attribute_cpp-1.3.2 → private_attribute_cpp-1.4.0}/private_attribute_cpp.egg-info/not-zip-safe +0 -0
- {private_attribute_cpp-1.3.2 → private_attribute_cpp-1.4.0}/private_attribute_cpp.egg-info/top_level.txt +0 -0
- {private_attribute_cpp-1.3.2 → private_attribute_cpp-1.4.0}/setup.cfg +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Locked-chess-official
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
{private_attribute_cpp-1.3.2/private_attribute_cpp.egg-info → private_attribute_cpp-1.4.0}/PKG-INFO
RENAMED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: private_attribute_cpp
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.0
|
|
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
|
|
7
7
|
Author-email: 13140752715@example.com
|
|
8
8
|
License: MIT
|
|
9
9
|
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE
|
|
10
11
|
Dynamic: author
|
|
11
12
|
Dynamic: author-email
|
|
12
13
|
Dynamic: description
|
|
13
14
|
Dynamic: description-content-type
|
|
14
15
|
Dynamic: home-page
|
|
15
16
|
Dynamic: license
|
|
17
|
+
Dynamic: license-file
|
|
16
18
|
Dynamic: summary
|
|
17
19
|
|
|
18
20
|
# Private Attribute (c++ implementation)
|
|
@@ -247,8 +249,8 @@ TypeError: Can't instantiate abstract class MyClass without an implementation fo
|
|
|
247
249
|
- Finally the `_PrivateWrap` object will be recoveried to the original object.
|
|
248
250
|
- One class defined in another class cannot use another class's private attribute.
|
|
249
251
|
- One parent class defined an attribute which not in `__private_attrs__` or not a `PrivateAttrType` instance, the child class shouldn't contain the attribute in its `__private_attrs__`.
|
|
250
|
-
- When combine with other metaclass, be ensure that the parent metaclass has no classmethod that can set subclasses' attributes. If it has, it will fail on new metaclass because the new metaclass you defined and registered will be immutable.
|
|
251
252
|
- CPython may change "tp_getattro", "tp_setattro" and so on when you change the attribute "\_\_getattribute\_\_", "\_\_setattr\_\_" and so on. If you are fear about it, you can use `ensure_type` to reset those tp slots. For the other metaclasses, you can use `ensure_metaclass` to reset those tp slots. Also, don't set those methods on these classes in your code.
|
|
253
|
+
- `private_attribute.register_metaclass` must be called with the metaclass which support weakref.
|
|
252
254
|
|
|
253
255
|
## License
|
|
254
256
|
|
|
@@ -230,8 +230,8 @@ TypeError: Can't instantiate abstract class MyClass without an implementation fo
|
|
|
230
230
|
- Finally the `_PrivateWrap` object will be recoveried to the original object.
|
|
231
231
|
- One class defined in another class cannot use another class's private attribute.
|
|
232
232
|
- One parent class defined an attribute which not in `__private_attrs__` or not a `PrivateAttrType` instance, the child class shouldn't contain the attribute in its `__private_attrs__`.
|
|
233
|
-
- When combine with other metaclass, be ensure that the parent metaclass has no classmethod that can set subclasses' attributes. If it has, it will fail on new metaclass because the new metaclass you defined and registered will be immutable.
|
|
234
233
|
- CPython may change "tp_getattro", "tp_setattro" and so on when you change the attribute "\_\_getattribute\_\_", "\_\_setattr\_\_" and so on. If you are fear about it, you can use `ensure_type` to reset those tp slots. For the other metaclasses, you can use `ensure_metaclass` to reset those tp slots. Also, don't set those methods on these classes in your code.
|
|
234
|
+
- `private_attribute.register_metaclass` must be called with the metaclass which support weakref.
|
|
235
235
|
|
|
236
236
|
## License
|
|
237
237
|
|