Skip to content
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

New URI functions #3587

Merged
merged 1 commit into from
Aug 1, 2023
Merged

New URI functions #3587

merged 1 commit into from
Aug 1, 2023

Conversation

andreyaksenov
Copy link
Contributor

@andreyaksenov andreyaksenov commented Jul 18, 2023

  • Reworked documentation for the URI module and added the new API (escape, unescape, encoding options): Module uri
  • Mentioned the URI module in the HTTP client docs: HTTP method

@andreyaksenov andreyaksenov linked an issue Jul 18, 2023 that may be closed by this pull request
@andreyaksenov andreyaksenov force-pushed the uri-encoding branch 6 times, most recently from f87bb88 to f801171 Compare July 19, 2023 08:18
@andreyaksenov andreyaksenov force-pushed the uri-encoding branch 2 times, most recently from a6e4e73 to ece505e Compare July 21, 2023 12:18
Copy link
Member

@ligurio ligurio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Andrey, thanks!
LGTM

Copy link
Contributor

@p7nov p7nov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -116,7 +116,8 @@ In certain circumstances, a Unix domain socket may be used
where a URI is expected, for example, "unix/:/tmp/unix_domain_socket.sock" or
simply "/tmp/unix_domain_socket.sock".

A method for parsing URIs is illustrated in :ref:`Module uri <uri-parse>`.
The :ref:`uri <uri-parse>` module provides functions that convert URI strings into their
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe link to the module page, not a specific function?


[scheme:]scheme-specific-part[#fragment]
The URI module provides functions that convert URI strings into their
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe leave a link to the resource where URI is defined and explained?


* Pass custom encoding options using the :ref:`uri_encoding_opts <uri_encoding_opts>` object.

:param string: a string to be encoded
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:param string: a string to be encoded
:param string: a string to encode


* Pass custom encoding options using the :ref:`uri_encoding_opts <uri_encoding_opts>` object.

:param string: a string to be decoded
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
:param string: a string to be decoded
:param string: a string to decode

The ``uri_components`` object is used in the following functions:

* The :ref:`uri.parse() <uri-parse>` function returns the ``uri_components`` object.
* The :ref:`uri.format() <uri-format>` function accepts the ``uri_components`` object as the parameter.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

an as argument?

@andreyaksenov andreyaksenov merged commit 9f1781e into latest Aug 1, 2023
1 check passed
@andreyaksenov andreyaksenov deleted the uri-encoding branch August 1, 2023 11:48
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.

Document a new functions to encode and decode parts of URI
3 participants