Skip to content

all: Rename utarfile->tarfile and urequests->requests. - #702

Merged
dpgeorge merged 2 commits into
micropython:masterfrom
jimmo:umodule-rename
Jul 23, 2023
Merged

dpgeorge merged 2 commits into
micropython:masterfrom
jimmo:umodule-rename

Conversation

@jimmo

@jimmo jimmo commented Jul 21, 2023 •

Copy link
Copy Markdown
Member

Extends on #540, with four main differences:

  • Also renames utarfile
  • Makes urequests a separate package. Rather than having requests provide urequest, you have to explicitly require it.
  • Makes requests a package with __init__.py to allow extension in the future.
  • Update bundle-networking and mip to use requests.

Note that the unix port currently gets urequests via mip, so now it will only get requests. For backwards compatibility, when the submodule is updated we will might want to consider adding require("urequests") to unix/variants/manifest.py. All other ports currently get urequests via bundle-networking and so will now get both.

@jimmo

jimmo commented Jul 21, 2023

Copy link
Copy Markdown
Member Author

I haven't provided a wrapper for utarfile... not sure this is necessary?

@dpgeorge

Copy link
Copy Markdown
Member

I haven't provided a wrapper for utarfile... not sure this is necessary?

I'd say it's not necessary. tarfile-write support was only added recently (there hasn't been a MicroPython release with this in it yet) so I think it's fair enough to just rename it.

Users can easily provide their own utarfile -> tarfile wrapper if needed.

jimmo added 2 commits July 23, 2023 11:41
This is compatible with the CPython module, so should
be named tarfile.

Signed-off-by: Jim Mussared <[email protected]>
This module implements a subset of the Python requests module, and so
it should have the same name.

Added a backwards-compatibility wrapper to allow people to continue to use
`import urequests`. This lives in micropython/urequests.

Changed requests to be a package, so that we can implement extension
packages in the future for optional functionality.

Added a basic README.md to both.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <[email protected]>
@dpgeorge
dpgeorge merged commit 8513bfb into micropython:master Jul 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants