This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst | |
index b2dd32f925e..09396b87245 100644 | |
--- a/Doc/library/functions.rst | |
+++ b/Doc/library/functions.rst | |
@@ -1780,6 +1780,13 @@ are always available. They are listed here in alphabetical order. | |
the second argument is a type, ``issubclass(type2, type)`` must be true (this | |
is useful for classmethods). | |
+ When called directly within an ordinary method of a class, both arguments may | |
+ be omitted ("zero-argument :func:`super`"). In this case, *type* will be the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void _PyST_Dump(PySTEntryObject* ste, PyObject* prefix) | |
{ | |
const char *blocktype; | |
switch(ste->ste_type) { | |
case FunctionBlock: blocktype = "FunctionBlock"; break; | |
case ClassBlock: blocktype = "ClassBlock"; break; | |
case ModuleBlock: blocktype = "ModuleBlock"; break; | |
case AnnotationBlock: blocktype = "AnnotationBlock"; break; | |
case TypeVarBoundBlock: blocktype = "TypeVarBoundBlock"; break; | |
case TypeAliasBlock: blocktype = "TypeAliasBlock"; break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mainopt.json | |
============ | |
Performance version: 1.0.6 | |
Report on Linux-5.15.0-1028-aws-x86_64-with-glibc2.31 | |
Number of logical CPUs: 72 | |
Start date: 2023-02-13 15:59:52.702512 | |
End date: 2023-02-13 16:37:24.927583 | |
ic2opt.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~$ bench-jobs compare req-compile-bench-1664914413-esnow req-compile-bench-1664903905-esnow | |
All benchmarks: | |
=============== | |
+-------------------------+------------------------------------------------------------------+------------------------------------------------------------------+ | |
| Benchmark | req-compile-bench-1664914413-esnow/pyperformance-results.json.gz | req-compile-bench-1664903905-esnow/pyperformance-results.json.gz | | |
+=========================+==================================================================+==================================================================+ | |
| unpickle | 13.7 us | 13.2 us: 1.04x faster | | |
+-------------------------+------------------------------------------------------------------+------------------------------------------------------------------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/mypy/semanal.py b/mypy/semanal.py | |
index 7bac809..33d798f 100644 | |
--- a/mypy/semanal.py | |
+++ b/mypy/semanal.py | |
@@ -2943,21 +2943,9 @@ class SemanticAnalyzer(NodeVisitor): | |
if isinstance(base.node, TypeInfo): | |
# C.bar where C is a class | |
type_info = base.node | |
- elif isinstance(base.node, Var) and self.function_stack: | |
- # check for self.bar or cls.bar in method/classmethod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TransactionMiddleware: | |
def __init__(self, get_response): | |
self.get_response = get_response | |
def __call__(self, request): | |
with transaction.atomic(): | |
response = self.get_response(request) | |
if response.status_code == 500: | |
transaction.set_rollback() | |
return response |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Utility for pulling settings from the environment.""" | |
import os | |
from urllib.parse import urlparse | |
class EnvParser: | |
"""Utility for getting settings from the OS environ. | |
Instantiate with the name of an env var to get the current mode from (that | |
env var should be set to one of VALID_MODES, or not set), then call the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Jinja2Backend(jinja2backend.Jinja2): | |
def __init__(self, params): | |
self.context_processors = [ | |
import_string(p) | |
for p in params['OPTIONS'].pop('context_processors', []) | |
] | |
super(Jinja2Backend, self).__init__(params) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from logging.config import dictConfig | |
import logging | |
initial = { | |
'version': 1, | |
'disable_existing_loggers': False, | |
'handlers': { | |
'console': { | |
'class': 'logging.StreamHandler', | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/docs/topics/migrations.txt b/docs/topics/migrations.txt | |
index a0dc365..fae87a0 100644 | |
--- a/docs/topics/migrations.txt | |
+++ b/docs/topics/migrations.txt | |
@@ -148,6 +148,13 @@ developers (or your production servers) check out the code, they'll | |
get both the changes to your models and the accompanying migration at the | |
same time. | |
+.. versionadded:: 1.8 | |
+ |
NewerOlder