Skip to content

Commit b12d3a7

Browse files
committed
Address reviewer comments.
1 parent 776008d commit b12d3a7

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

peps/pep-0810.rst

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1410,14 +1410,16 @@ Allowing the filter to force lazy imports even when globally disabled
14101410
---------------------------------------------------------------------
14111411

14121412
As lazy imports allow some forms of circular imports that would otherwise
1413-
fail, as an intentional and desireable thing (especially for typing-related
1414-
imports), the suggestion was made to add a way to override the global
1415-
disable, like allowing the lazy imports filter to override the global
1416-
disable the way it can override a global enable. The risk here is that we
1417-
end up in a confusing situation where some things are overridden and others
1418-
are not depending on the relevant priority as we perceive them now, and that
1419-
we'll need new ways to disable or enable as the use of lazy imports evolves.
1420-
The global disable is not expected to see commonplace use, but be more of a
1413+
fail, as an intentional and desirable thing (especially for typing-related
1414+
imports), there was a suggestion to add a way to override the global disable
1415+
and force particular imports to be lazy, for instance by calling the lazy
1416+
imports filter even if lazy imports are globally disabled.
1417+
1418+
This approach could a complex hierarchy of the different "override" systems,
1419+
making it much harder to analyze and reason about the code. Additionally,
1420+
this may require additional complexity to introduce finer-grained systems to
1421+
enable or disable particular imports as the use of lazy imports evolves. The
1422+
global disable is not expected to see commonplace use, but be more of a
14211423
debugging and selective testing tool for those who want to tightly control
14221424
their dependency on lazy imports. We think it's reasonable for package
14231425
mantainers, as they update packages to adopt lazy imports, to decide to

0 commit comments

Comments
 (0)