[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2022-02-07 Thread Jakub Wilk


Change by Jakub Wilk :


--
nosy: +jwilk

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-11-04 Thread Eryk Sun


Change by Eryk Sun :


--
Removed message: https://bugs.python.org/msg405693

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-11-04 Thread Eryk Sun


Change by Eryk Sun :


--
nosy: +AlexWaygood, Anthony Sottile, BTaskaya, barry, brett.cannon, eric.smith, 
gousaiyang, gvanrossum, levkivskyi, lukasz.langa, methane, miss-islington, 
pablogsal, serhiy.storchaka, steven.daprano, terry.reedy, veky 
-ahmedsayeed1982, ezio.melotti, vstinner
versions: +Python 3.10 -Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-11-04 Thread Ahmed Sayeed


Ahmed Sayeed  added the comment:

With this patch (not sure yet whether it's relevant) in place:  
... http://www-look-4.com/category/computers/
diff --git a/gdb/testsuite/lib/gdbserver-support.exp 
b/gdb/testsuite/lib/gdbserver-support.
Exp https://komiya-dental.com/health/healthy-foods/
index a2cc80f28d..7b9c0eef6e 100644
--- a/gdb/testsuite/lib/gdbserver-support.exp 
http://www.iu-bloomington.com/services/travel-services/
+++ b/gdb/testsuite/lib/gdbserver-support.exp
@@ -451,8 +451,10 @@ proc gdbserver_exit { is_mi } { 
https://waytowhatsnext.com/technology/korean-technology/
# We use expect rather than gdb_expect because
# we want to suppress printing exception messages, otherwise, 
http://www.wearelondonmade.com/category/health/
# remote_expect, invoked by gdb_expect, prints the exceptions.
+   set read_prompt 0
expect { http://www.jopspeech.com/category/property/
-i "$gdb_spawn_id" -re "$gdb_prompt $" {
+   set read_prompt 1 http://joerg.li/category/technology/
exp_continue
}
-i "$server_spawn_id" eof { 
http://connstr.net/property/mars-researches/
@@ -463,6 +465,7 @@ proc gdbserver_exit { is_mi } {
warning "Timed out waiting for EOF in server after 
$monitor_exit" http://the-hunters.org/category/technology/
}
}   
+   gdb_assert {$read_prompt}
}
 } http://embermanchester.uk/health/social-privacy/
 close_gdbserver
...
and running in parallel with: http://fishingnewsletters.co.uk/category/shopping/
...
$ stress -c 5 http://www.slipstone.co.uk/category/services/
...
I ran into:
...
(gdb) PASS: gdb.multi/multi-target.exp: continue: non-stop=on: inferior 2 
http://www.logoarts.co.uk/category/travel/
Remote debugging from host ::1, port 34088^M
Process build/gdb/testsuite/outputs/gdb.multi/multi-target/multi-target 
created; pid http://www.go-mk-websites.co.uk/category/shopping/  = 8649^M
monitor exit^M
(gdb) Killing process(es): 8649^M 
http://www.acpirateradio.co.uk/technology/facetime/
#9 0x16a2c57 in pop_all_targets_at_and_above(strata) 
/home/vries/gdb_versions/devel/src/gdb/target.c:678 
http://www.mconstantine.co.uk/category/shopping/
#10 0x1442749 in remote_unpush_target  
http://www.compilatori.com/tech/xiaomi/ 
/home/vries/gdb_versions/devel/src/gdb/remote.c:5522
#11 0x1458c16 in remote_target::readchar(int) 
/home/vries/gdb_versions/devel/src/gdb/remote.c:9137 
https://www.webb-dev.co.uk/sports/how-to-choose-sportwear/ 
#12 0x145b25b in remote_target::getpkt_or_notif_sane_1(std::vector > >*, int, int, int*)

--
components: +Unicode -Interpreter Core
nosy: +ahmedsayeed1982, ezio.melotti, vstinner -AlexWaygood, Anthony Sottile, 
BTaskaya, barry, brett.cannon, eric.smith, gousaiyang, gvanrossum, levkivskyi, 
lukasz.langa, methane, miss-islington, pablogsal, serhiy.storchaka, 
steven.daprano, terry.reedy, veky
versions: +Python 3.8 -Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-10-17 Thread Alex Waygood


Change by Alex Waygood :


--
nosy: +AlexWaygood

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-10-17 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I think it would help if we could enable some future feature globally by 
command line option or environment variable, without modifying all source 
files. It would allow users to quickly test their code base for compatibility 
with future changes. The problem currently is that nobody bothers to add "from 
__future__ import ...", so we have surprises every time when try to make it by 
default.

A tool which automatically adds or removes "from __future__ import ..." in 
files could help too.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-10-16 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Now that we're in 3.11, people are starting to notice that stringy annotations 
are not the default (see #45499 for example).

What can we do to get PEP 649 moving forward?

--
nosy: +steven.daprano

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-05-21 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

> May I ask, is this going forward? I installed 3.11-dev, it's not there 
> (though __future__ claims it should be). I understand if it isn't done yet, 
> just want to know if there's risk it will be postponed again (or even given 
> up).


We are still waiting a ruling on PEP 649. If it gets rejected, and no more 
ideas arises (before beta cut for 3.11), I guess we could move on and resolve 
this issue again.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-05-21 Thread Vedran Čačić

Vedran Čačić  added the comment:

May I ask, is this going forward? I installed 3.11-dev, it's not there (though 
__future__ claims it should be). I understand if it isn't done yet, just want 
to know if there's risk it will be postponed again (or even given up).

--
nosy: +veky

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-04-27 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-04-25 Thread miss-islington


miss-islington  added the comment:


New changeset f84f1b5c638eeb6e13c287fe5ebf3a7d2fdb60e9 by Saiyang Gou in branch 
'master':
bpo-38605: Update __future__ module doc as `annotations` is now "mandatory in 
3.11" (GH-25602)
https://github.com/python/cpython/commit/f84f1b5c638eeb6e13c287fe5ebf3a7d2fdb60e9


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-04-25 Thread Saiyang Gou


Change by Saiyang Gou :


--
pull_requests: +24318
pull_request: https://github.com/python/cpython/pull/25602

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-04-25 Thread Anthony Sottile


Change by Anthony Sottile :


--
nosy: +Anthony Sottile
nosy_count: 14.0 -> 15.0
pull_requests: +24316
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/25596

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-04-23 Thread Guido van Rossum


Guido van Rossum  added the comment:

I don't like adding a flag.  In the PEP-563-by-default world we didn't need a 
flag.  Perhaps once Larry implements inspect.get_annotations() (issue43817) we 
can make inspect.signature() always call that?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-04-23 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

> Hopefully Batuhan has a recollection of what I am thinking of, there was some 
> significant delay while we figured out what to do about some of these.

The major one that I'd recall is that inspect.signature() just uses whatever is 
in __annotations__ instead of resolving those. Now that __future__.annotations 
is not the default one, we can add a new option named 'resolve_annotations' and 
call typing.get_type_hints when activated. Here is a quick demo;

from __future__ import annotations

import inspect

def foo(a: int, b: int) -> str:
...

def _get_annotations(func, **signature_opts):
signature = inspect.signature(func, **signature_opts)
return {
param.name: param.annotation
for param in signature.parameters.values()  
}

print('bare: ', _get_annotations(foo))
print('annotations resolved: ', _get_annotations(foo, resolve_annotations=True))


bare: {'a': 'int', 'b': 'int'}
annotations resolved: {'a': , 'b': }

This would be a clear feature for both PEP 563 users + people who are still 
using string annotations mixed with normal ones. What do you think Guido?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-04-23 Thread Guido van Rossum


Guido van Rossum  added the comment:

I haven't followed this precisely, but I recall that when we first made PEP 563 
the default, we had to fix a number of bugs in various library modules (e.g. 
inspect) that were only apparent when `from __future__ import annotations` was 
used. I hope we're not throwing away those bugfixes. Hopefully Batuhan has a 
recollection of what I am thinking of, there was some significant delay while 
we figured out what to do about some of these.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-04-21 Thread STINNER Victor


STINNER Victor  added the comment:

> New changeset b0544ba77cf86074fb1adde00558c67ca75eeea1 by Pablo Galindo in 
> branch 'master':

Copy of the NEWS entry:

Revert making ``from __future__ import annotations`` the default. This follows
the Steering Council decision to postpone PEP 563 changes to at least Python
3.11. See the original email for more information regarding the decision:
https://mail.python.org/archives/list/python-...@python.org/thread/CLVXXPQ2T2LQ5MP2Y53VVQFCXYWQJHKZ/.
Patch by Pablo Galindo.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-04-21 Thread STINNER Victor


Change by STINNER Victor :


--
title: [typing] PEP 563: Postponed evaluation of annotations: enable it by 
default in Python 3.10 -> [typing] PEP 563: Postponed evaluation of 
annotations: enable it by default in Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com