Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Cpython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sip
Cpython
Commits
b4378948
Unverified
Commit
b4378948
authored
2 years ago
by
Shantanu
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
gh-95105: Return Iterator from wsgiref.types.InputStream.__iter__ (#95106)
parent
936f71e5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Lib/wsgiref/types.py
+2
-2
2 additions, 2 deletions
Lib/wsgiref/types.py
Misc/NEWS.d/next/Library/2022-07-21-19-55-49.gh-issue-95105.BIX2Km.rst
+1
-0
1 addition, 0 deletions
...ext/Library/2022-07-21-19-55-49.gh-issue-95105.BIX2Km.rst
with
3 additions
and
2 deletions
Lib/wsgiref/types.py
+
2
−
2
View file @
b4378948
"""
WSGI-related types for static type checking
"""
from
collections.abc
import
Callable
,
Iterable
from
collections.abc
import
Callable
,
Iterable
,
Iterator
from
types
import
TracebackType
from
typing
import
Any
,
Protocol
,
TypeAlias
...
...
@@ -35,7 +35,7 @@ class InputStream(Protocol):
def
read
(
self
,
size
:
int
=
...,
/
)
->
bytes
:
...
def
readline
(
self
,
size
:
int
=
...,
/
)
->
bytes
:
...
def
readlines
(
self
,
hint
:
int
=
...,
/
)
->
list
[
bytes
]:
...
def
__iter__
(
self
)
->
Itera
ble
[
bytes
]:
...
def
__iter__
(
self
)
->
Itera
tor
[
bytes
]:
...
class
ErrorStream
(
Protocol
):
"""
WSGI error stream as defined in PEP 3333
"""
...
...
This diff is collapsed.
Click to expand it.
Misc/NEWS.d/next/Library/2022-07-21-19-55-49.gh-issue-95105.BIX2Km.rst
0 → 100644
+
1
−
0
View file @
b4378948
:meth:`wsgiref.types.InputStream.__iter__` should return ``Iterator[bytes]``, not ``Iterable[bytes]``. Patch by Shantanu Jain.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment