Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | bpo-40389: Improve repr of typing.Optional (#19714) | Vlad Serebrennikov | 2020-04-30 | 1 | -1/+1 |
| | |||||
* | Add test cases for dataclasses. (#17909) | Karthikeyan Singaravelan | 2020-01-09 | 1 | -0/+19 |
| | | | | | | | | * Add test cases for dataclasses. * Add test for repr output of field. * Add test for ValueError to be raised when both default and default_factory are passed. | ||||
* | bpo-34776: Fix dataclasses to support __future__ "annotations" mode (#9518) | Yury Selivanov | 2019-12-09 | 1 | -0/+12 |
| | |||||
* | bpo-38431: Fix __repr__ method of InitVar to work with typing objects. ↵ | Samuel Colvin | 2019-10-13 | 1 | -0/+2 |
| | | | | | | (GH-16702) | ||||
* | Unmark files as executable that can't actually be executed. (GH-15353) | Greg Price | 2019-08-21 | 1 | -0/+0 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are plenty of legitimate scripts in the tree that begin with a `#!`, but also a few that seem to be marked executable by mistake. Found them with this command -- it gets executable files known to Git, filters to the ones that don't start with a `#!`, and then unmarks them as executable: $ git ls-files --stage \ | perl -lane 'print $F[3] if (!/^100644/)' \ | while read f; do head -c2 "$f" | grep -qxF '#!' \ || chmod a-x "$f"; \ done Looking at the list by hand confirms that we didn't sweep up any files that should have the executable bit after all. In particular * The `.psd` files are images from Photoshop. * The `.bat` files sure look like things that can be run. But we have lots of other `.bat` files, and they don't have this bit set, so it must not be needed for them. Automerge-Triggered-By: @benjaminp | ||||
* | bpo-37868: Improve is_dataclass for instances. (GH-15325) | Eric V. Smith | 2019-08-20 | 1 | -0/+26 |
| | |||||
* | Fix typos in docs, comments and test assert messages (#14872) | Min ho Kim | 2019-07-21 | 1 | -3/+3 |
| | |||||
* | bpo-33569 Preserve type information with dataclasses.InitVar (GH-8927) | Augusto Hack | 2019-06-03 | 1 | -0/+6 |
| | |||||
* | bpo-36766: Typos in docs and code comments (GH-13116) | penguindustin | 2019-05-06 | 1 | -1/+1 |
| | |||||
* | bpo-36678: Rename duplicate tests in test_dataclasses (GH-12899) | Windson yang | 2019-04-22 | 1 | -15/+3 |
| | |||||
* | bpo-35960: Fix dataclasses.field throwing away empty metadata. (GH-11815) | Christopher Hunt | 2019-02-12 | 1 | -2/+12 |
| | |||||
* | bpo-33947: dataclasses no longer can raise RecursionError in repr (GF9916) | Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి) | 2018-10-19 | 1 | -0/+86 |
| | | | The reprlib code was copied here instead of importing reprlib. I'm not sure if we really need to avoid the import, but since I expect dataclasses to be more common that reprlib, it seems wise. Plus, the code is small. | ||||
* | bpo-34363: dataclasses.asdict() and .astuple() now handle fields which are ↵ | Eric V. Smith | 2018-09-14 | 1 | -0/+79 |
| | | | | namedtuples. (GH-9151) | ||||
* | bpo-34213: Allow dataclasses to work with a field named 'object'. (GH-8452) | Vadim Pushtaev | 2018-08-12 | 1 | -0/+50 |
| | |||||
* | bpo-34184: Fix running Lib/test/test_dataclasses.py as a script. (GH-8382) | Serhiy Storchaka | 2018-07-23 | 1 | -5/+5 |
| | |||||
* | bpo-33805: Improve error message of dataclasses.replace() (GH-7580) | Dong-hee Na | 2018-06-23 | 1 | -0/+16 |
| | |||||
* | bpo-33796: Ignore ClassVar for dataclasses.replace(). (GH-7488) | Eric V. Smith | 2018-06-07 | 1 | -85/+120 |
| | |||||
* | bpo-33536: Validate make_dataclass() field names. (GH-6906) | Eric V. Smith | 2018-05-16 | 1 | -108/+165 |
| | |||||
* | bpo-33453: Handle string type annotations in dataclasses. (GH-6768) | Eric V. Smith | 2018-05-16 | 1 | -2/+151 |
| | |||||
* | Clean up and enhance frozen dataclass tests. (GH-6380) | Eric V. Smith | 2018-04-05 | 1 | -27/+38 |
| | | | | | * Add a test for frozen with unhashable field value. * Improve a comment. | ||||
* | Allow dynamic creation of generic dataclasses (GH-6319) | Ivan Levkivskyi | 2018-03-31 | 1 | -1/+18 |
| | |||||
* | bpo-33175: dataclasses should look up __set_name__ on class, not instance ↵ | Eric V. Smith | 2018-03-29 | 1 | -5/+34 |
| | | | | (GH-6305) | ||||
* | bpo-33141: Have dataclasses.Field pass through __set_name__ to any default ↵ | Eric V. Smith | 2018-03-26 | 1 | -0/+42 |
| | | | | | argument. (GH-6260) This is part of PEP 487 and the descriptor protocol. | ||||
* | Minor fixes to dataclass tests. (GH-6243) | Eric V. Smith | 2018-03-26 | 1 | -42/+41 |
| | | | Also, re-enable a test for ClassVars with default_factory. | ||||
* | Trivial improvements to dataclasses tests. (GH-6234) | Eric V. Smith | 2018-03-25 | 1 | -2/+3 |
| | |||||
* | Fix invalid escape sequence: use raw string. (GH-6225) | Eric V. Smith | 2018-03-25 | 1 | -1/+1 |
| | |||||
* | bpo-32505: dataclasses: raise TypeError if a member variable is of type ↵ | Eric V. Smith | 2018-03-22 | 1 | -0/+43 |
| | | | | | Field, but doesn't have a type annotation. (GH-6192) If a dataclass has a member variable that's of type Field, but it doesn't have a type annotation, raise TypeError. | ||||
* | Add 'Field' to dataclasses.__all__. (GH-6182) | Eric V. Smith | 2018-03-21 | 1 | -4/+5 |
| | | | | - Add missing 'Field' to __all__. - Improve tests to catch this. | ||||
* | bpo-32896: Fix error when subclassing a dataclass with a field that uses a ↵ | Eric V. Smith | 2018-03-21 | 1 | -0/+49 |
| | | | | | default_factory (GH-6170) Fix the way that new annotations in a class are detected. | ||||
* | bpo-33100: Dataclasses now handles __slots__ and default values correctly. ↵ | Eric V. Smith | 2018-03-20 | 1 | -0/+42 |
| | | | | | (GH-6152) If the class has a member that's a MemberDescriptorType, it's not a default value, it's from that member being in __slots__. | ||||
* | bpo-32953: Dataclasses: frozen should not be inherited for non-dataclass ↵ | Eric V. Smith | 2018-03-19 | 1 | -24/+75 |
| | | | | | | | derived classes (#6147) If a non-dataclass derives from a frozen dataclass, allow attributes to be set. Require either all of the dataclasses in a class hierarchy to be frozen, or all non-frozen. Store `@dataclass` parameters on the class object under `__dataclass_params__`. This is needed to detect frozen base classes. | ||||
* | bpo-32960: For dataclasses, disallow inheriting frozen from non-frozen ↵ | Eric V. Smith | 2018-02-27 | 1 | -23/+61 |
| | | | | | classes and vice-versa, (GH-5919) This restriction will be relaxed at a future date. | ||||
* | Fix 'deecorator' typo in test/test_dataclasses (GH-5899) | Terry Jan Reedy | 2018-02-26 | 1 | -1/+1 |
| | |||||
* | bpo-32929: Dataclasses: Change the tri-state hash parameter to the boolean ↵ | Eric V. Smith | 2018-02-26 | 1 | -116/+124 |
| | | | | | unsafe_hash. (#5891) unsafe_hash=False is now the default. It is the same behavior as the old hash=None parameter. unsafe_hash=True will try to add __hash__. If it already exists, TypeError is raised. | ||||
* | Exhaustively test dataclass hashing when no hash= value is provided. This is ↵ | Eric V. Smith | 2018-02-23 | 1 | -0/+73 |
| | | | | in anticipation of changing how non-default hashing is handled. (#5834) | ||||
* | Fix trivial typo in test_dataclasses.py. (GH-5398) | Eric V. Smith | 2018-01-29 | 1 | -1/+1 |
| | |||||
* | bpo-32513: Make it easier to override dunders in dataclasses. (GH-5366) | Eric V. Smith | 2018-01-28 | 1 | -212/+452 |
| | | | Class authors no longer need to specify repr=False if they want to provide a custom __repr__ for dataclasses. The same thing applies for the other dunder methods that the dataclass decorator adds. If dataclass finds that a dunder methods is defined in the class, it will not overwrite it. | ||||
* | bpo-32279: Add additional params to make_dataclass(), pass through to ↵ | Eric V. Smith | 2018-01-06 | 1 | -0/+17 |
| | | | | dataclass(). (gh-5117) | ||||
* | bpo-32278: Allow dataclasses.make_dataclass() to omit type information. ↵ | Eric V. Smith | 2018-01-06 | 1 | -0/+14 |
| | | | | (gh-5115) | ||||
* | bpo-32499: Add dataclasses.is_dataclass(obj), which returns True if obj is a ↵ | Eric V. Smith | 2018-01-06 | 1 | -16/+21 |
| | | | | dataclass or an instance of one. (#5113) | ||||
* | bpo-32427: Expose dataclasses.MISSING object. (#5045) | Eric V. Smith | 2017-12-29 | 1 | -3/+49 |
| | |||||
* | bpo-32259: Make a TypeError message when unpack non-iterable more specific. ↵ | Serhiy Storchaka | 2017-12-26 | 1 | -1/+1 |
| | | | | (#4903) | ||||
* | bpo-32297: Few misspellings found in Python source code comments. (#4803) | Mike | 2017-12-14 | 1 | -1/+1 |
| | | | | | | | | * Fix multiple typos in code comments * Add spacing in comments (test_logging.py, test_math.py) * Fix spaces at the beginning of comments in test_logging.py | ||||
* | Use raw strings for regex to avoid invalid escape sequences. (GH-4741) | Eric V. Smith | 2017-12-06 | 1 | -2/+2 |
| | |||||
* | bpo-32214: Implement PEP 557: Data Classes (#4704) | Eric V. Smith | 2017-12-04 | 1 | -0/+2076 |