Jelle Zijlstra 
								
							 
						 
						
							
							
								
								
							
							
							
								
							
							
								6a285f94c6 
								
							 
						 
						
							
							
								
								Revert "gh-135228: When @dataclass(slots=True) replaces a dataclass, make the original class collectible ( #136893 )" ( #137014 )  
							
							... 
							
							
							
							This reverts commit 46cbdf967a 
							
						 
						
							2025-07-23 08:13:19 -07:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Jelle Zijlstra 
								
							 
						 
						
							
							
								
								
							
							
							
								
							
							
								46cbdf967a 
								
							 
						 
						
							
							
								
								gh-135228: When @dataclass(slots=True) replaces a dataclass, make the original class collectible ( #136893 )  
							
							... 
							
							
							
							An interesting hack, but more localized in scope than #135230 .
This may be a breaking change if people intentionally keep the original class around
when using `@dataclass(slots=True)`, and then use `__dict__` or `__weakref__` on the
original class.
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com> 
							
						 
						
							2025-07-21 21:43:34 -07:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Serhiy Storchaka 
								
							 
						 
						
							
							
								
								
							
							
							
								
							
							
								2602d8ae98 
								
							 
						 
						
							
							
								
								gh-71339: Use new assertion methods in tests (GH-129046)  
							
							
							
						 
						
							2025-05-22 13:17:22 +03:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Jelle Zijlstra 
								
							 
						 
						
							
							
								
								
							
							
							
								
							
							
								bb5ec6ea6e 
								
							 
						 
						
							
							
								
								gh-82129: Improve annotations for make_dataclass() ( #133406 )  
							
							... 
							
							
							
							Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Carl Meyer <carl@oddbird.net> 
							
						 
						
							2025-05-05 08:21:32 -07:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Bénédikt Tran 
								
							 
						 
						
							
							
								
								
							
							
							
								
							
							
								1d5dc5f1c3 
								
							 
						 
						
							
							
								
								gh-132396: Resolve 'redefinition of unused name' errors in `Lib/test/` ( #132397 )  
							
							... 
							
							
							
							Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> 
							
						 
						
							2025-04-18 18:14:54 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Bénédikt Tran 
								
							 
						 
						
							
							
								
								
							
							
							
								
							
							
								45c447bf91 
								
							 
						 
						
							
							
								
								gh-132515: de-duplicate test_dataclass_derived_generic_from_slotted_base ( #132516 )  
							
							
							
						 
						
							2025-04-14 15:06:38 +00:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Jelle Zijlstra 
								
							 
						 
						
							
							
								
								
							
							
							
								
							
							
								dc6d66f44c 
								
							 
						 
						
							
							
								
								gh-105499: Merge typing.Union and types.UnionType ( #105511 )  
							
							... 
							
							
							
							Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Ken Jin <kenjin@python.org>
Co-authored-by: Carl Meyer <carl@oddbird.net> 
							
						 
						
							2025-03-04 11:44:19 -08:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Jelle Zijlstra 
								
							 
						 
						
							
							
								
								
							
							
							
								
							
							
								1d251b8339 
								
							 
						 
						
							
							
								
								gh-128184: Fix display of signatures with ForwardRefs ( #130815 )  
							
							... 
							
							
							
							Co-authored-by: sobolevn <mail@sobolevn.me> 
							
						 
						
							2025-03-04 06:58:37 -08:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victorien 
								
							 
						 
						
							
							
								
								
							
							
							
								
							
							
								3e3a4d2315 
								
							 
						 
						
							
							
								
								gh-118974: Add decorator argument to make_dataclass (gh-122723)  
							
							... 
							
							
							
							This is to allow the `dataclasses.make_dataclass` infrastructure to be used with another decorator that's compliant with `typing.dataclass_transform`. The new `decorator` argument to `dataclasses.make_dataclass` is `dataclasses.dataclass`, which used to be hard coded. 
							
						 
						
							2024-10-01 09:51:51 -04:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									sobolevn 
								
							 
						 
						
							
							
								
								
							
							
							
								
							
							
								9c7657f099 
								
							 
						 
						
							
							
								
								gh-113878: Add doc parameter to dataclasses.field (gh-114051)  
							
							... 
							
							
							
							If using `slots=True`, the `doc` parameter ends up in the `__slots__` dict. The `doc` parameter is also in the corresponding `Field` object. 
							
						 
						
							2024-09-27 12:20:49 -04:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Bénédikt Tran 
								
							 
						 
						
							
							
								
								
							
							
							
								
							
							
								5e7eba09bc 
								
							 
						 
						
							
							
								
								gh-89683: add tests for deepcopy on frozen dataclasses (gh-123098)  
							
							... 
							
							
							
							Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com> 
							
						 
						
							2024-09-26 21:15:28 +00:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Eric V. Smith 
								
							 
						 
						
							
							
								
								
							
							
							
								
							
							
								5c6e3b7150 
								
							 
						 
						
							
							
								
								gh-90562: Support zero argument super with dataclasses when slots=True (gh-124455)  
							
							... 
							
							
							
							Co-authored-by: @wookie184
Co-authored-by: Carl Meyer <carl@oddbird.net> 
							
						 
						
							2024-09-24 21:26:26 -04:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									sobolevn 
								
							 
						 
						
							
							
								
								
							
							
							
								
							
							
								ac918ccad7 
								
							 
						 
						
							
							
								
								gh-123935: Fix typo in _get_slots in dataclasses.py ( #123941 )  
							
							
							
						 
						
							2024-09-12 10:29:06 +03:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									sobolevn 
								
							 
						 
						
							
							
								
								
							
							
							
								
							
							
								75e72822a3 
								
							 
						 
						
							
							
								
								gh-91126: Docs and tests for slotted dataclasses with __init_subclass__ ( #123342 )  
							
							
							
						 
						
							2024-09-01 13:25:34 +03:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Jelle Zijlstra 
								
							 
						 
						
							
							
								
								
							
							
							
								
							
							
								7b7b90d1ce 
								
							 
						 
						
							
							
								
								gh-119180: Add annotationlib module to support PEP 649 ( #119891 )  
							
							... 
							
							
							
							Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> 
							
						 
						
							2024-07-23 21:16:50 +00:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Aditya Borikar 
								
							 
						 
						
							
							
								
								
							
							
							
								
							
							
								bf4ff3ad2e 
								
							 
						 
						
							
							
								
								gh-119260: Clarify is_dataclass Behavior for Subclasses in Documentation and Tests ( #119480 )  
							
							... 
							
							
							
							Co-authored-by: Carl Meyer <carl@oddbird.net> 
							
						 
						
							2024-05-29 17:26:22 +00:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Steven Troxler 
								
							 
						 
						
							
							
								
								
							
							
							
								
							
							
								6ec371223d 
								
							 
						 
						
							
							
								
								gh-119581: Add a test of InitVar with name shadowing ( #119582 )  
							
							
							
						 
						
							2024-05-28 18:18:57 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Nikita Sobolev 
								
							 
						 
						
							
							
								
								
							
							
							
								
							
							
								fa9b9cb113 
								
							 
						 
						
							
							
								
								gh-118033: Fix __weakref__ not set for generic dataclasses ( #118099 )  
							
							
							
						 
						
							2024-05-09 11:36:17 +03:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									et-repositories 
								
							 
						 
						
							
							
								
								
							
							
							
								
							
							
								75935746be 
								
							 
						 
						
							
							
								
								gh-116647: Fix recursive child in dataclasses ( #116790 )  
							
							
							
						 
						
							2024-03-19 08:58:40 -06:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Aviel Boag 
								
							 
						 
						
							
							
								
								
							
							
							
								
							
							
								a22d05f04c 
								
							 
						 
						
							
							
								
								gh-105866: fix dataclass with slots=True, weakref_slot=True ( #105870 )  
							
							... 
							
							
							
							Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Carl Meyer <carl@oddbird.net> 
							
						 
						
							2024-03-18 18:53:14 -06:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Nikita Sobolev 
								
							 
						 
						
							
							
								
								
							
							
							
								
							
							
								4297d7301b 
								
							 
						 
						
							
							
								
								gh-115285: Fix test_dataclasses with -OO mode ( #115286 )  
							
							
							
						 
						
							2024-02-12 21:31:07 +03:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Nikita Sobolev 
								
							 
						 
						
							
							
								
								
							
							
							
								
							
							
								b6000d2874 
								
							 
						 
						
							
							
								
								gh-109409: Fix inheritance of frozen dataclass from non-frozen dataclass mixins (gh-109437)  
							
							... 
							
							
							
							Fix inheritance of frozen dataclass from non-frozen dataclass mixins 
							
						 
						
							2023-10-12 09:05:23 -04:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Serhiy Storchaka 
								
							 
						 
						
							
							
								
								
							
							
							
								
							
							
								5b9a3fd6a0 
								
							 
						 
						
							
							
								
								gh-110273: dataclasses.replace() now raise TypeError for all invalid arguments (GH-110274)  
							
							... 
							
							
							
							dataclasses.replace() now raises TypeError instead of ValueError if
specify keyword argument for a field declared with init=False or miss keyword
argument for required InitVar field. 
							
						 
						
							2023-10-04 09:20:14 +03:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victor Stinner 
								
							 
						 
						
							
							
								
								
							
							
							
								
							
							
								14d6e197cc 
								
							 
						 
						
							
							
								
								gh-108303: Create Lib/test/test_dataclasses/ directory ( #108978 )  
							
							... 
							
							
							
							Move test_dataclasses.py and its "dataclass_*.py" modules into the
new Lib/test/test_dataclasses/ subdirectory. 
							
						 
						
							2023-09-06 15:54:16 +02:00