summaryrefslogtreecommitdiffstats
path: root/Objects/unionobject.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-42195: Disallow isinstance/issubclass for subclasses of genericaliases ↵Ken Jin2021-01-021-1/+1
| | | | | | | | | | | | | | in Union (GH-24059) Previously this didn't raise an error. Now it will: ```python from collections.abc import Callable isinstance(int, list | Callable[..., str]) ``` Also added tests in Union since there were previously none for stuff like ``isinstance(list, list | list[int])`` either. Backport to 3.9 not required. Automerge-Triggered-By: GH:gvanrossum
* bpo-42195: Ensure consistency of Callable's __args__ in collections.abc and ↵kj2020-12-131-3/+3
| | | | typing (GH-23060)
* bpo-42233: Add union type expression support for GenericAlias and fix ↵kj2020-11-091-5/+15
| | | | de-duplicating of GenericAlias (GH-23077)
* bpo-42099: Fix reference to ob_type in unionobject.c and ceval (GH-22829)Neil Schemenauer2020-10-271-1/+1
| | | * Use Py_TYPE() rather than o->ob_type.
* bpo-41991: Remove _PyObject_HasAttrId (GH-22629)Serhiy Storchaka2020-10-101-6/+7
| | | It can silence arbitrary exceptions.
* bpo-41428: Fix compiler warning in unionobject.c (GH-22416)Victor Stinner2020-09-261-3/+3
| | | | | | | Use Py_ssize_t type rather than int, to store lengths in unionobject.c. Fix the warning: Objects\unionobject.c(205,1): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
* bpo-41428: Fix compiler warnings in unionobject.c (GH-22388)Victor Stinner2020-09-231-3/+3
| | | | | | | | | | | | | | | | Use Py_ssize_t type rather than int, to store lengths in unionobject.c. Fix warnings: Objects\unionobject.c(189,71): warning C4244: '+=': conversion from 'Py_ssize_t' to 'int', possible loss of data Objects\unionobject.c(182,1): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data Objects\unionobject.c(205,1): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data Objects\unionobject.c(437,1): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
* bpo-41428: Implementation for PEP 604 (GH-21515)Maggie Moss2020-09-091-0/+464
See https://www.python.org/dev/peps/pep-0604/ for more information. Co-authored-by: Pablo Galindo <pablogsal@gmail.com>