Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 23, 2023

Conversation

jimmo
Copy link
Member

@jimmo jimmo commented Jul 21, 2023

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
Copy link
Member Author

jimmo commented Jul 21, 2023

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

@dpgeorge
Copy link
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