Skip to content

Conversation

wojdyr
Copy link
Contributor

@wojdyr wojdyr commented Jan 15, 2017

Fix for #4298.
I made a patch for conda/core/portability.py. I don't know if anything else should be changed (conda-build?). I tested it only on one example, so it's not much tested.

Doing binary_replace() in three variants may affect performance - no idea how
much.


The path placeholder may be stored in binaries in different encodings.
This change adds support for UTF16 or UTF32 to the already supported
UTF8 encoding. It should cover wchar_t and wxString (from wxWidgets
library).

Apparently the placeholder was not substituted on Windows,
and this has not changed. I only moved the call to
replace_pyzzer_entry_point_shebang() out of binary_replace()
to avoid calling it more than once.
Removed has_pyzzer_entry_point() - it was redundant as the same check
is done inside of replace_pyzzer_entry_point_shebang().

The path placeholder may be stored in binaries in different encodings.
This change adds support for UTF16 or UTF32 to the already supported
UTF8 encoding. It should cover wchar_t and wxString (from wxWidgets
library).

Apparently this the placeholder was not substituted on Windows,
and this has not changed. I only moved the call to
replace_pyzzer_entry_point_shebang() out of binary_replace()
to avoid calling it more than once.
Removed has_pyzzer_entry_point() - it was redundant as the same check
is done inside of replace_pyzzer_entry_point_shebang().

Doing binary_replace() 3 times can affect performance - no idea how
much.
@kalefranz kalefranz changed the base branch from master to master-hold April 28, 2017 22:31
@kalefranz
Copy link
Contributor

Apologies it's been a while since I've had some time to spend here. Finally getting open PRs down to a manageable level.

Definitely appreciate the PR and am sympathetic to the problem being addressed. Like you I think though, not 100% yet on the implementation.

I'm wondering if we could avoid three file scans by compiling a more sophisticated regex. I'm thinking something like http://stackoverflow.com/questions/15175142/how-can-i-do-multiple-substitutions-using-regex-in-python

If you want to spend a little more time here, that'd be awesome. Otherwise, I'll take a crack at it when I get a chance.

If you do, I'd like to target the PR to the upcoming 4.4 release. To do that, something like

git reset --hard origin/4.4.x
git cherry-pick 46d3087387e88da17a08fd8e2c8787ff23b9cf08
git push --force

@wojdyr
Copy link
Contributor Author

wojdyr commented May 2, 2017

Thanks for looking into it. Yes, scanning files three times is not good. I won't get a chance to do anything here this week, but I'll try to get back to it at some point. Of course I don't mind if you beat me to it.

@github-actions
Copy link

github-actions bot commented Aug 19, 2021

Hi there, thank you for your contribution to Conda!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue in the latest version of Conda
  2. Comment that the issue is still reproducible and include:
  • What version of Conda you reproduced the issue on
  • What OS and version you reproduced the issue on
  • What steps you followed to reproduce the issue
  1. It would also be helpful to have the output of the following commands available:
  • conda info
  • conda config --show-sources
  • conda list --show-channel-urls

NOTE: If this issue was closed prematurely, please leave a comment and we will gladly reopen the issue.

In case this issue was originally about a project that is covered by the Anaconda issue tracker (e.g. Anaconda, Miniconda, packages built by Anaconda, Inc. like Anaconda Navigator etc), please reopen the issue there again.

Thanks!

@github-actions github-actions bot added the stale [bot] marked as stale due to inactivity label Aug 19, 2021
@github-actions
Copy link

Hi again!
This pull request has been closed since it has not had recent activity. Please don't hesitate to leave a comment if that was done prematurely.
Thank you for your contribution.

@github-actions github-actions bot added the stale::closed [bot] closed after being marked as stale label Sep 19, 2021
@github-actions github-actions bot closed this Sep 19, 2021
@github-actions github-actions bot added the locked [bot] locked due to inactivity label Sep 19, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants