-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
gh-105983: Add private mode support to webbrowser #105984
Conversation
support for incognito / private browsing
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
default value set in base class
removed %incognito since using %action for the implementation
tested on linux with
opera opens automatically with a private tab. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the feature suggestion.
I will take another look when you will remove unrelated changes :)
Misc/NEWS.d/next/Security/2023-06-22-09-14-45.gh-issue-105983.7osoHj.rst
Outdated
Show resolved
Hide resolved
…7osoHj.rst Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, also add tests for browsers that support it. And a doc note about this new feature.
Thank you for the quick response! 👍
@@ -604,6 +657,14 @@ def main(): | |||
for o, a in opts: | |||
if o == '-n': new_win = 1 | |||
elif o == '-t': new_win = 2 | |||
elif o == "-i": | |||
new_win = 3 | |||
elif o == "-b": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have -b
and -l
added? I am not opposed to this, but again: this feature is not related.
If you feel like adding this feature is a good idea (it looks like it might be), please open a new issue: explain the use-case and the "why".
But, let's keep this PR simple: only incognito
mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is related to the cmdline interface when webbroser main() func is called.
they belong also to the newly added incognito method.
therefore it is not a new feature from my perspective.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not resolved at all. These are separate new additions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do appreciate your contribution here!
As the PR author, you are in the best place to address the review by removing the code added to support --browser
.
That can be discussed in a separate issue. But if you don’t have the time, then someone else could complete the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for me this is a migration topic. the experts do know better what to do here. myself i dont see here in the working loop since i dont have this detailed knowledge of what being best on master code baseline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I don’t understand «migration». There are clear requests to remove some code that was added, to keep this PR focused on one thing. If you don’t want to pursue it, then someone else will have to volunteer.
i would suggest that someone else will do auto formatting with black (PEP08) |
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
i followed the approach of the given tests under Lib/test/test_webbrowser.py and added some more for parameter checking (as far i understood that is how it works). but since even the original tests i can not run here on my local machine (3 are failing) i created now a gist rather than releasing it. https://gist.github.com/kr-g/95a06df8f0fcf77ad10474724350e921 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove stuff unrelated to the issue.
@@ -604,6 +657,14 @@ def main(): | |||
for o, a in opts: | |||
if o == '-n': new_win = 1 | |||
elif o == '-t': new_win = 2 | |||
elif o == "-i": | |||
new_win = 3 | |||
elif o == "-b": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not resolved at all. These are separate new additions.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
I fetched the this PR and I made some changes, but now how can I make the PR on this PR ? |
gh-105983 merged contribution from amir for edge browser support
Thanks for the update! Some things still to do (I unresolved the relevant threads):
|
@kr-g There's not much point updating this branch from |
@kr-g As mentioned, there's no point updating this PR from |
i use the branch - therefore i merge from time to time. |
but anyway good to know the intention to kick me out of my own code. |
Hi @kr-g, we have no intention of kicking you out of your own code :) However, by keeping a PR open against the CPython repo, you are indicating that this patch is something you are actively seeking to be merged into the If the PR is closed, the branch will not be deleted, and you will be able to continue using it locally. You will not be kicked out of your own code in any way. However, the PR will no longer show up as an active, open PR against the CPython repo that maintainers should engage with and attempt to review. It sounds as though you are currently uninterested in addressing the comments of the reviewers here, so I'm going to close this. If I'm incorrect, and you are still interested in having this patch merged into the CPython |
i already said it some months ago that i see the "experts" here in charge to take over those topics because from my point of view thats an integration (or migration) issue to split the PR or rename a feature. i m not an expert and dont know what fits best on cpython baseline. but somehow this turns out to be ... well anyone can read and have an own idea about it. |
CPython is an open-source project maintained by volunteers, who have limited time to help PRs make it over the finish line. I'm afraid it's the responsibility of the author of the PR to ensure that it's of a quality suitable to be merged, not the responsibility of the CPython core developers. We've given you advice on the changes that would be required to get this into a state where it could be merged; in this instance, that's as much as we can do. |
since i have doubled the webbrowser code already in my own project that all is not of importance to me. in case it comes somewhere in time i dont bother. |
Support incognito / private browsing.