Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Use literal '/'s to build internal zip file paths #51

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 3 commits into from
Jan 17, 2018
Merged

Use literal '/'s to build internal zip file paths #51

merged 3 commits into from
Jan 17, 2018

Conversation

earhart
Copy link
Contributor

@earhart earhart commented Dec 7, 2017

Necessary in order to work on Windows

@bazel-io
Copy link

bazel-io commented Dec 7, 2017

Can one of the admins verify this patch?

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If your company signed a CLA, they designated a Point of Contact who decides which employees are authorized to participate. You may need to contact the Point of Contact for your company and ask to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot.
  • In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again.

@earhart
Copy link
Contributor Author

earhart commented Dec 7, 2017

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added cla: yes and removed cla: no labels Dec 7, 2017
@bazel-io
Copy link

Can one of the admins verify this patch?

@@ -60,12 +61,12 @@ def metadata(self):
with zipfile.ZipFile(self.path(), 'r') as whl:
# first check for metadata.json
try:
with whl.open(os.path.join(self._dist_info(), 'metadata.json')) as f:
with whl.open(posixpath.join(self._dist_info(), 'metadata.json')) as f:
Copy link

Choose a reason for hiding this comment

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

Is posixpath always available on Windows and other non-Posix platforms? From the zip specification and the code for the zipfile module, it appears that literal forward slash '/' is the only thing that can be used here, so we could safely simplify this if we wanted to:

with whl.open(self._dist_info() + '/metadata.json') as f

@duggelz
Copy link

duggelz commented Jan 13, 2018

Jenkins: test this please

@earhart
Copy link
Contributor Author

earhart commented Jan 13, 2018

I ran into this on Windows, and tested the fix there. :-) I don’t know about other non-Posix platforms, but other than Windows, I don’t know any that are supported by Bazel.

Using a literal slash should also work fine; want me to make the change?

@duggelz
Copy link

duggelz commented Jan 16, 2018

Yes, please go ahead and change to literal slashes.

@earhart earhart changed the title Use posixpath to build internal zip file paths Use literal '/'s to build internal zip file paths Jan 16, 2018
@earhart
Copy link
Contributor Author

earhart commented Jan 16, 2018

Done

@earhart
Copy link
Contributor Author

earhart commented Jan 17, 2018

FYI -- without write access to the repository, I can't actually merge the pull request myself; someone else will have to do that. :-)

@duggelz
Copy link

duggelz commented Jan 17, 2018

Jenkins: test this please

@duggelz
Copy link

duggelz commented Jan 17, 2018

@mattmoor I think the CI is wedged, and I don't have permission to force a merge.

@mattmoor
Copy link
Contributor

Test this please

@mattmoor
Copy link
Contributor

Oh, it got renamed. @davidstanke that's annoying :)

@mattmoor
Copy link
Contributor

This is the protected branch feature, you should be able to mess with it under Settings > Branches > master (edit button).

@mattmoor mattmoor merged commit 73a154a into bazel-contrib:master Jan 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.