classcore 1.9__tar.gz → 1.10__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.
Files changed (24) hide show
  1. {classcore-1.9 → classcore-1.10}/PKG-INFO +1 -1
  2. {classcore-1.9 → classcore-1.10}/sources/classcore/__init__.py +1 -1
  3. {classcore-1.9 → classcore-1.10}/sources/classcore/exceptions.py +9 -1
  4. {classcore-1.9 → classcore-1.10}/sources/classcore/nomina.py +5 -0
  5. {classcore-1.9 → classcore-1.10}/sources/classcore/standard/__.py +3 -5
  6. {classcore-1.9 → classcore-1.10}/sources/classcore/standard/classes.py +35 -4
  7. {classcore-1.9 → classcore-1.10}/.gitignore +0 -0
  8. {classcore-1.9 → classcore-1.10}/LICENSE.txt +0 -0
  9. {classcore-1.9 → classcore-1.10}/README.rst +0 -0
  10. {classcore-1.9 → classcore-1.10}/pyproject.toml +0 -0
  11. {classcore-1.9 → classcore-1.10}/sources/classcore/__/__init__.py +0 -0
  12. {classcore-1.9 → classcore-1.10}/sources/classcore/__/doctab.py +0 -0
  13. {classcore-1.9 → classcore-1.10}/sources/classcore/__/imports.py +0 -0
  14. {classcore-1.9 → classcore-1.10}/sources/classcore/__/nomina.py +0 -0
  15. {classcore-1.9 → classcore-1.10}/sources/classcore/decorators.py +0 -0
  16. {classcore-1.9 → classcore-1.10}/sources/classcore/factories.py +0 -0
  17. {classcore-1.9 → classcore-1.10}/sources/classcore/py.typed +0 -0
  18. {classcore-1.9 → classcore-1.10}/sources/classcore/standard/__init__.py +0 -0
  19. {classcore-1.9 → classcore-1.10}/sources/classcore/standard/behaviors.py +0 -0
  20. {classcore-1.9 → classcore-1.10}/sources/classcore/standard/decorators.py +0 -0
  21. {classcore-1.9 → classcore-1.10}/sources/classcore/standard/dynadoc.py +0 -0
  22. {classcore-1.9 → classcore-1.10}/sources/classcore/standard/modules.py +0 -0
  23. {classcore-1.9 → classcore-1.10}/sources/classcore/standard/nomina.py +0 -0
  24. {classcore-1.9 → classcore-1.10}/sources/classcore/utilities.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: classcore
3
- Version: 1.9
3
+ Version: 1.10
4
4
  Summary: Foundational class factories and decorators.
5
5
  Project-URL: Homepage, https://github.com/emcd/python-classcore
6
6
  Project-URL: Documentation, https://emcd.github.io/python-classcore
@@ -62,7 +62,7 @@ from .factories import *
62
62
 
63
63
 
64
64
  __version__: __.typx.Annotated[ str, __.ddoc.Visibilities.Reveal ]
65
- __version__ = '1.9'
65
+ __version__ = '1.10'
66
66
 
67
67
 
68
68
  standard.finalize_module(
@@ -22,12 +22,20 @@
22
22
 
23
23
 
24
24
  from . import __
25
+ from . import nomina as _nomina
25
26
  from . import standard as _standard
26
27
 
27
28
 
29
+ exception_mutables_default = (
30
+ '__cause__', '__context__', '__suppress_context__', '__traceback__' )
31
+ exception_visibles_default = (
32
+ *exception_mutables_default, _nomina.is_public_identifier )
33
+
34
+
28
35
  class Omniexception(
29
36
  _standard.Object, BaseException,
30
- instances_visibles = ( '__cause__', '__context__' ),
37
+ instances_mutables = exception_mutables_default,
38
+ instances_visibles = exception_visibles_default,
31
39
  ):
32
40
  ''' Base exception for package. '''
33
41
 
@@ -204,3 +204,8 @@ ClassInitializer: __.typx.TypeAlias = __.typx.Annotated[
204
204
  ],
205
205
  __.ddoc.Doc( ''' Initializer to use with metaclass. ''' ),
206
206
  ]
207
+
208
+
209
+ def is_public_identifier( name: str ) -> bool:
210
+ ''' Is Python identifier public? '''
211
+ return not name.startswith( '_' )
@@ -20,13 +20,11 @@
20
20
 
21
21
  ''' Common constants, imports, and utilities. '''
22
22
 
23
+ # ruff: noqa: F403
23
24
 
24
- from ..__ import * # noqa: F403
25
25
 
26
-
27
- def is_public_identifier( name: str ) -> bool:
28
- ''' Is Python identifier public? '''
29
- return not name.startswith( '_' )
26
+ from ..__ import *
27
+ from ..nomina import is_public_identifier
30
28
 
31
29
 
32
30
  def provide_error_class( name: str ) -> type[ Exception ]:
@@ -205,7 +205,16 @@ class DataclassObjectMutable( metaclass = DataclassMutable ):
205
205
  'class instance conceal' )
206
206
 
207
207
 
208
- class Protocol( __.typx.Protocol, metaclass = ProtocolClass ):
208
+ class Protocol(
209
+ __.typx.Protocol,
210
+ metaclass = ProtocolClass,
211
+ class_mutables = (
212
+ '_abc_cache',
213
+ '_abc_negative_cache',
214
+ '_abc_negative_cache_version',
215
+ '_abc_registry',
216
+ ),
217
+ ):
209
218
  ''' Standard base protocol class. '''
210
219
 
211
220
  _dynadoc_fragments_ = (
@@ -215,7 +224,15 @@ class Protocol( __.typx.Protocol, metaclass = ProtocolClass ):
215
224
 
216
225
 
217
226
  class ProtocolMutable(
218
- __.typx.Protocol, metaclass = ProtocolClass, instances_mutables = '*'
227
+ __.typx.Protocol,
228
+ metaclass = ProtocolClass,
229
+ class_mutables = (
230
+ '_abc_cache',
231
+ '_abc_negative_cache',
232
+ '_abc_negative_cache_version',
233
+ '_abc_registry',
234
+ ),
235
+ instances_mutables = '*',
219
236
  ):
220
237
  ''' Base protocol class with mutable instance attributes. '''
221
238
 
@@ -226,7 +243,14 @@ class ProtocolMutable(
226
243
 
227
244
 
228
245
  class DataclassProtocol(
229
- __.typx.Protocol, metaclass = ProtocolDataclass,
246
+ __.typx.Protocol,
247
+ metaclass = ProtocolDataclass,
248
+ class_mutables = (
249
+ '_abc_cache',
250
+ '_abc_negative_cache',
251
+ '_abc_negative_cache_version',
252
+ '_abc_registry',
253
+ ),
230
254
  ):
231
255
  ''' Standard base protocol dataclass. '''
232
256
 
@@ -237,7 +261,14 @@ class DataclassProtocol(
237
261
 
238
262
 
239
263
  class DataclassProtocolMutable(
240
- __.typx.Protocol, metaclass = ProtocolDataclassMutable,
264
+ __.typx.Protocol,
265
+ metaclass = ProtocolDataclassMutable,
266
+ class_mutables = (
267
+ '_abc_cache',
268
+ '_abc_negative_cache',
269
+ '_abc_negative_cache_version',
270
+ '_abc_registry',
271
+ ),
241
272
  ):
242
273
  ''' Base protocol dataclass with mutable instance attributes. '''
243
274
 
File without changes
File without changes
File without changes
File without changes