Skip to content

Conversation

@hartb
Copy link
Contributor

@hartb hartb commented Jan 22, 2020

The Creating custom channels doc refers to "using a file:// URL",
and the conda code uses urllib.parse.urlsplit to parse 'file://'
channel references.

A proper file://-URI-based reference to a local (linux) file should
include 3 back-to-back slashes (/), but the example only uses 2.

The parsing actually goes slightly wrong when used as in the example,
though in a way that (accidentally) doesn't matter:

>>> from conda.common.url import path_to_url

>>> path_to_url('/opt/channel')
'file:///opt/channel'

>>> from conda.common.path import url_to_path

>>> url_to_path('file:///opt/channel')
'/opt/channel'

>>> url_to_path('file://opt/channel')
'//opt/channel'                         <= note extra leading slash

Fix the example to specify the file URL properly, and make a minor
formatting tweak in the same section.

The _Creating custom channels_ doc refers to "using a `file://` URL",
and the conda code uses `urllib.parse.urlsplit` to parse 'file://'
channel references.

A proper `file://`-URI-based reference to a local (linux) file should
include 3 back-to-back slashes (`/`), but the example only uses 2.

The parsing actually goes slightly wrong when used as in the example,
though in a way that (accidentally) doesn't matter:

```
>>> from conda.common.url import path_to_url

>>> path_to_url('/opt/channel')
'file:///opt/channel'

>>> from conda.common.path import url_to_path

>>> url_to_path('file:///opt/channel')
'/opt/channel'

>>> url_to_path('file://opt/channel')
'//opt/channel'                         <= note extra leading slash
```

Fix the example to specify the file URL properly, and make a minor
formatting tweak in the same section.
@hartb hartb requested a review from a team as a code owner January 22, 2020 19:52
@cla-bot
Copy link

cla-bot bot commented Jan 22, 2020

We require contributors to sign our Contributor License Agreement, and we don't have one on file for @hartb. In order for us to review and merge your code, please e-sign the PDF at https://conda.io/en/latest/contributing.html#conda-contributor-license-agreement. We then need to manually verify your signature. We will ping the bot to refresh the PR status when we have confirmed your signature.

@hartb
Copy link
Contributor Author

hartb commented Jan 22, 2020

Hello! I signed the CLA just before putting up the PR. Maybe the signature hadn't completely processed yet. Will wait a bit to see if the PR is updated when the signature registers.

@hartb
Copy link
Contributor Author

hartb commented Jan 22, 2020

I believe the AppVeyor builds' test failures are unrelated to this change:

tests/test_fetch.py::TestDownload::test_download_httperror FAILED

and

tests/core/test_solve.py::test_cuda_fail_1 FAILED

@angloyna
Copy link
Contributor

@cla-bot check

@cla-bot cla-bot bot added the cla-signed [bot] added once the contributor has signed the CLA label Jul 28, 2020
@cla-bot
Copy link

cla-bot bot commented Jul 28, 2020

The cla-bot has been summoned, and re-checked this pull request!

@angloyna angloyna merged commit ac5e7cc into conda:master Jul 31, 2020
@github-actions
Copy link

Hi there, thank you for your contribution to Conda!

This pull request has been automatically locked since it has not had recent activity after it was closed.

Please open a new issue or pull request if needed.

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Aug 20, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 20, 2021
@kenodegard kenodegard added type::documentation request for improved documentation and removed tag::documentation labels Jan 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla-signed [bot] added once the contributor has signed the CLA locked [bot] locked due to inactivity type::documentation request for improved documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants