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

Add __all__ to w3lib.url package #55

Merged
merged 2 commits into from Apr 11, 2016
Merged

Add __all__ to w3lib.url package #55

merged 2 commits into from Apr 11, 2016

Conversation

redapple
Copy link
Contributor

Fixes #54

@codecov-io
Copy link

Current coverage is 89.91%

Merging #55 into master will increase coverage by +0.03% as of 9eb9187

Powered by Codecov. Updated on successful CI builds.

@@ -264,3 +264,8 @@ def any_to_uri(uri_or_path):
return path_to_file_uri(uri_or_path)
u = urlparse(uri_or_path)
return uri_or_path if u.scheme else path_to_file_uri(uri_or_path)


__all__ = ["add_or_replace_parameter", "any_to_uri", "file_uri_to_path",
Copy link
Member

Choose a reason for hiding this comment

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

what do you think about adding deprecated and semi-private function here as well?
urljoin_rfc, is_url, url_query_parameter are missing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

any other you had in mind?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(ok, seems I did not push latest local changes)

Copy link
Member

Choose a reason for hiding this comment

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

Exposing variables like _safe_chars could have made sense, but import * doesn't import them anyways, so no need to add them to __all__.

What's wrong with exposing urljoin_rfc? Not exposing it may break some code. The whole __all__ fix is needed for backwards compatibility, so why fix it for some functions but not with others?

Copy link
Member

Choose a reason for hiding this comment

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

You already fixed that :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nothing wrong, just that "exposing" is explicitly may keep people using it while we don't recommend it.
I added it anyway

@kmike kmike merged commit 812f4f6 into master Apr 11, 2016
@kmike kmike deleted the url-all branch April 11, 2016 14:56
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.

None yet

3 participants