Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/2.1.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
pgjones committed Jul 22, 2022
2 parents 81d2ed0 + dfdc7c6 commit ffb15ea
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
10 changes: 10 additions & 0 deletions CHANGES.rst
Expand Up @@ -24,6 +24,16 @@ Version 2.2.0
functions from wsgi.py. :pr:`2415`


Version 2.1.3
-------------

Unreleased

- Add ``os.PathLike`` as a supported type for
``werkzeug.datastructures.FileStorage`` in the typing information
file. It was already supported by the code. :pr:`2418`


Version 2.1.2
-------------

Expand Down
3 changes: 2 additions & 1 deletion docs/datastructures.rst
Expand Up @@ -122,7 +122,8 @@ Others

.. attribute:: filename

The filename of the file on the client.
The filename of the file on the client. Can be a ``str``, or an
instance of ``os.PathLike``.

.. attribute:: name

Expand Down
2 changes: 1 addition & 1 deletion src/werkzeug/datastructures.pyi
Expand Up @@ -896,7 +896,7 @@ class FileStorage:
def __init__(
self,
stream: Optional[IO[bytes]] = None,
filename: Optional[str] = None,
filename: Union[str, PathLike, None] = None,
name: Optional[str] = None,
content_type: Optional[str] = None,
content_length: Optional[int] = None,
Expand Down

0 comments on commit ffb15ea

Please sign in to comment.