Commit Graph

35 Commits

Author SHA1 Message Date
C.A.M. Gerlach f613ad8801
Lint: Update outdated Python-Version on still-Draft PEPs (#2756)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2022-08-24 17:39:36 -05:00
Hugo van Kemenade a4329d46e7
PEP 558: fix footnote references (#2754)
* PEP 558: fix footnote references

* PEP 558: Remove orphaned footnote

* PEP 558: Remove redundant emacs metadata

* PEP 558: Fix code formatting

* PEP 558: Fix typos

* PEP 558: Update BPO redirects

* PEP 558: Convert to regular links
2022-08-17 08:26:55 +03:00
Adam Turner b0329c31b3
Several PEPs: Normalise `Post-History` (#2375) 2022-03-09 16:04:44 +00:00
Adam Turner 42f88f1ce2
Display list names in Resolution and Discussions-To headers (#2361) 2022-02-27 14:46:36 -08:00
Adam Turner 113e490701
Several PEPs: Use explicit `:pep:` and `:rfc:` roles (#2209) 2022-01-21 11:03:51 +00:00
Shantanu ace871d870
Various PEPs: fix typos (GH-2211)
Co-authored-by: hauntsaninja <>
2022-01-03 21:01:23 -08:00
Nick Coghlan cb8b62e1d0
PEP 558: remove lingering mentions of the 'view' API (#2204) 2021-12-23 13:04:55 +10:00
Nick Coghlan dedc9d250e
PEP 558: Adopt Python level semantics from PEP 667 (#2124)
* fast locals proxy never assumes the value cache is already up to date
* operations become O(n) as required to avoid that assumption
* remove `*View()` APIs from proposal due to algorithmic complexity issue
* add Python pseudo-code to the PEP 667 comparison section
* reword PEP 667 comparison section to focus on the remaining differences
  in the C API proposal
2021-12-23 09:25:51 +10:00
Nick Coghlan 9db8dc3e0f
PEP 558: Update PEP for implementation changes and PEP 667 (#2060)
* address remaining review comments from the July threads
* Rationale section renamed to Motivation
* Design Discussion section renamed to Rationale and Design Discussion
* kind enum is guaranteed to be at least 32 bits
* fast refs mapping is stored on the underlying frame
* delay initial cache refresh for each proxy instance to the
  first operation that needs it
* be specific about which operations always update the cache, and which
  update it if it hasn't been updated by this proxy instance
* eliminate more mentions of the old "dynamic snapshot" terminology
* add new rational/discussion section covering PEP 667 (including
  how the PEP 558 implementation could be turned into a PEP 667
  implementation if desired)
* make it clearer that proxy instances are ephemeral (lots of
  stale phrasing with "the" dating from when they stored on the frame)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2021-08-26 19:26:13 +10:00
Nick Coghlan 0e0321afaf
PEP 558: Incorporate review comments from python-dev posting (#2038)
- Fix miscellaneous typos
- Remove an outdated mention of possibly dropping suport for storing
  extra f_locals keys in optimised scopes
- Make it more explicit that accessing frame.f_locals in Python
  refreshes the f_locals cache on that frame
- Replace GetReturnsCopy with GetKind & other updates
- Reference Jan/Feb 2021 python-dev threads
- Note that read-only views on optimised frames have
  the same cache consistency limitations as the read/write
  proxy does.
2021-07-21 14:28:21 +02:00
Nick Coghlan f350ee5630
PEP 558: Update Discussions-To and copyright notice (#2037) 2021-07-18 14:56:28 +10:00
Nick Coghlan 1a27cad226
PEP 558: Update for fast locals proxy caching design changes (#2035)
Further implementation work on the fast locals proxy resulted
in treating the "f_locals" frame storage more as an implicitly
or explicitly updated cache, rather than treating it solely as a
dynamic snapshot.
2021-07-17 21:16:51 +10:00
Nick Coghlan f6c6e24976
PEP 558: adjustments after updating implementation (#2030)
* `pdb` stores `__return__` and `__exception__`` entries on
  arbitrary frames, so that feature needs to be preserved
* Some fast locals proxy operations will implicitly update the
  underlying shared mapping on the frame
* Anyone explicitly calling `LocalsToFast` is going to want the
  read/write proxy, not any of the read-only options (plus it's
  hard to fit an essay in an error message)
* Remove lingering reference to the removed `PyLocals_RefreshViews()`
2021-07-11 00:05:15 +10:00
Nick Coghlan 7b707b51a8
PEP 558: Fix typos in recently merged changes (#2021) 2021-07-08 18:03:09 -07:00
Nick Coghlan 70442b01a0
PEP 558: Make fast locals proxy independent of the legacy dynamic snapshot (#1787) 2021-06-27 17:37:01 +10:00
Brett Cannon bb4751379a
Many PEPs: Normalize the 'Created' field (#1805) 2021-02-09 08:54:26 -08:00
Marti Raudsepp 9b64c6ea75
Various typo/grammar/style fixes (#1789)
Changes detected by Topy (https://github.com/intgr/topy), all changes
verified by hand, false positives have been omitted.

These range from straight-out misspellings to debatable hyphen placement.
The hyphen changes are supported by grammar manuals of style.
2021-02-03 06:06:23 -08:00
Nick Coghlan 54a71cd7c3
PEP 558: Make it clear tracing mode is being eliminated (#1783)
The initial version of the PEP entrenched the tracing mode distinction,
and was worded accordingly.

Now that tracing mode is only relevant as a historical artifact that is
being eliminated, the wording should make that clear.

Also removes a stale mention of Python 3.9.
2021-01-27 23:59:56 +10:00
Nick Coghlan 1f1b67516a
PEP 558: Postpone to 3.10 (#1364)
Leaving as Draft as I'm still intending to work on it in the coming
months, it just wasn't ready in time for the 3.9 beta 1
deadline.
2020-06-30 22:21:31 +10:00
Nick Coghlan 37889fb456
PEP 558: Update proposed C API (#1302)
Also removes the exec() and eval() caveats on the reference implementation
(those have been migrated now, albeit not using a code structure that we
would genuinely want to merge).
2020-02-16 22:10:19 +10:00
Nick Coghlan 8dcf7fe49c
PEP 558: Fix mention of old locals() semantics (#1266)
When updating the PEP to specify independent snapshots for locals()
at function scope, I missed this reference to the old semantics
that returned a direct reference to the dynamic internal snapshot.
2020-01-02 02:30:39 +10:00
Nick Coghlan 475d6cdf8c
PEP 558: Add Discussions-To header for Discourse thread (#1265)
Also adjusts a Python version reference to account for two
releases taking place since the first draft of this PEP.
2019-12-31 15:13:30 +10:00
Nick Coghlan 54888058ce
PEP 558: Switch to independent snapshots at function scope (#1094)
* Switch to independent snapshots at function scope
* New public C API, PyEval_Get_PyLocals(), that matches the updated locals() builtin
* At function scope, PyEval_GetLocals() returns the internal shared mapping from inside the proxy (returning a borrowed reference means this API can't offer the new independent snapshot semantics)
2019-12-30 16:22:46 +10:00
Guido van Rossum ab10a8c5a9
PEP 558: Move target version to 3.9 (#1224) 2019-11-08 13:58:12 -08:00
Nick Coghlan 933fbf8626
PEP 558: Note compatibility constraints on locals(), other updates (#1069)
- new design discussion section to cover the requirement that the
  semantics of locals() itself at function scope be left alone
- propose a C level API that exactly matches Python level
  frame.f_locals semantics
- other minor text formatting and wording updates
2019-05-21 23:43:15 +10:00
Nick Coghlan 44f2986f8d
PEP 558: Remove dynamic frame semantics proposal (#1051)
Changing the frame API semantics based on whether or not a
tracing function is active is tricky to implement and hard
to document clearly, so this simplifies the proposal by
instead having the frame API always expose a write-through
proxy at function scope, and restricting the dynamic
snapshot behaviour to the locals() builtin.
2019-05-21 22:41:34 +10:00
Nick Coghlan 1b5d22cf78
PEP 558: Appoint BDFL-Delegate and other updates (#1008)
Also adds a link to the in-development reference implementation,
and makes the dynamic frame.f_locals behaviour an open question.
2019-04-24 09:04:37 +10:00
Nick Coghlan 4d9406ca17 PEP 558: Use correct function name 2017-10-22 16:22:13 +10:00
Nick Coghlan 5bf527ba1a PEP 558: markup fix 2017-10-22 16:18:56 +10:00
Nick Coghlan 9a8e590a52 PEP 558: Update to use a write-through proxy
It turns out that *any* write-back based design has
inherent flaws that make it difficult to build a source
debugger that reliably allows mutation of function local
variables.

So this switches to Nathaniel's suggested write-through
proxy idea, but constrains it to only applying when a
trace hook is installed. This means the official language
level semantics can just use the simpler model where
rebinding function local variables via locals() simply
isn't possible - only folks already working with frames
and trace functions will need to be aware of the semantics
of the write-through proxy.
2017-10-22 16:12:25 +10:00
Nick Coghlan 82e7688a22 PEP 558: Simplify the proposed locals() changes
We should be able to resolve the reported problems just
by changing how trace hooks work, rather than making
any fundamental changes to locals() or frame.f_locals.
2017-09-17 17:40:13 +10:00
Nick Coghlan 94e6606edb PEP 558: Update for conversation with Guido
- new open questions around how storage and updates
  will work
- note that we definitely *don't* want to return the
  write-through proxy from locals() at function scope
2017-09-08 16:14:04 -07:00
Guido van Rossum c04dd529ad Clarify bullets for Function scope (#403)
* Clarify bullets for Function scope

* fix backticks
2017-09-09 08:42:12 +10:00
Nick Coghlan 51fae75f34 PEP 558: add missing word 2017-09-08 14:58:29 -07:00
Nick Coghlan 6ac5975fdb PEP 558: Defined semantics for locals() 2017-09-08 14:55:50 -07:00