FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-105983: Add private mode support to webbrowser by kr-g · Pull Request #105984 · python/cpython · GitHub

/ cpython Public

gh-105983: Add private mode support to webbrowser - #105984

Closed
kr-g wants to merge 40 commits into
python:mainfrom
kr-g:kr-g-browser-incognito
Closed

gh-105983: Add private mode support to webbrowser#105984
kr-g wants to merge 40 commits into
python:mainfrom
kr-g:kr-g-browser-incognito

Conversation

kr-g commented Jun 22, 2023
edited by terryjreedy
Loading

Copy link
Copy Markdown

Support incognito / private browsing.

support for incognito / private browsing

Copy link
Copy Markdown

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

AlexWaygood changed the title webbrowser incognito mode gh-105983: webbrowser incognito mode Jun 22, 2023

Copy link
Copy Markdown
Member

@sobolevn @zooba (as recent committers into Lib/webbrowser.py)

removed %incognito since using %action for the implementation

kr-g commented Jun 22, 2023

Copy link
Copy Markdown
Author

tested on linux with

  • chromium
  • firefox
  • epiphany

opera opens automatically with a private tab.
konqueror seams not offer such a feature.

sobolevn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks a lot for the feature suggestion.

I will take another look when you will remove unrelated changes :)

Comment thread Lib/webbrowser.py Outdated
Comment thread Lib/webbrowser.py Outdated

sobolevn left a comment
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Please, also add tests for browsers that support it. And a doc note about this new feature.

Thank you for the quick response! 👍

Comment thread Lib/webbrowser.py
elif o == '-t': new_win = 2
elif o == "-i":
new_win = 3
elif o == "-b":

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This is not resolved at all. These are separate new additions.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Agreed

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

kr-g commented Jun 22, 2023

Copy link
Copy Markdown
Author

i would suggest that someone else will do auto formatting with black (PEP08)

Comment thread Lib/webbrowser.py Outdated
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>

kr-g commented Jun 22, 2023
edited
Loading

Copy link
Copy Markdown
Author

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

kr-g requested a review from sobolevn June 22, 2023 12:50

terryjreedy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Remove stuff unrelated to the issue.

Comment thread Lib/webbrowser.py
elif o == '-t': new_win = 2
elif o == "-i":
new_win = 3
elif o == "-b":

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This is not resolved at all. These are separate new additions.

Copy link
Copy Markdown

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 have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

terryjreedy requested review from hugovk and zooba June 22, 2023 20:02
terryjreedy changed the title gh-105983: webbrowser incognito mode gh-105983: Support webbrowser incognito mode Jun 22, 2023
merwok changed the title gh-105983: Support webbrowser private mode gh-105983: Add private mode support to webbrowser Jun 26, 2023

AmirNakhaeii commented Jun 28, 2023
edited
Loading

Copy link
Copy Markdown

it is possible to fetch the PR to a local repo.

in case you dont know how:

please follow up here https://github.com/progit/progit2/releases -> search for "Pull Request Refs" (in release 2.1.404 it is from page 196 onwards).

the next section "Pull Requests on Pull Requests" describes how depending changes/ extensions can be made.

so ... for any other browser not covered so far (like e.g. MacOSXOSAScript mentioned by @ronaldoussoren) ... it would be great if the "finder" of that gap could provide also some code here.

Thanks

I fetched the this PR and I made some changes, but now how can I make the PR on this PR ?

hugovk commented Jun 30, 2023

Copy link
Copy Markdown
Member

Thanks for the update! Some things still to do (I unresolved the relevant threads):

  • Don't fallback to open_new, raise an exception instead
  • Remove -b and -l options
  • "Incognito" is more of a Google Chrome name, let's primarily name as "private", but can also mention "incognito" to help when searching (I can't seem to find where I earlier commented this...)

hugovk commented Sep 19, 2023

Copy link
Copy Markdown
Member

@kr-g There's not much point updating this branch from main unless the unresolved items are addressed.

hugovk commented Oct 18, 2023

Copy link
Copy Markdown
Member

@kr-g As mentioned, there's no point updating this PR from main unless the other issues are going to be resolved. Otherwise we let's close this, and we can re-open it when those issues have been addressed.

kr-g commented Oct 19, 2023

Copy link
Copy Markdown
Author

@kr-g As mentioned, there's no point updating this PR from main unless the other issues are going to be resolved. Otherwise we let's close this, and we can re-open it when those issues have been addressed.

i use the branch - therefore i merge from time to time.
i m aware that you dont.
there is no reason to tell that in addition.
just unsubscribe. thanks.

kr-g commented Oct 19, 2023

Copy link
Copy Markdown
Author

@kr-g As mentioned, there's no point updating this PR from main unless the other issues are going to be resolved. Otherwise we let's close this, and we can re-open it when those issues have been addressed.

but anyway good to know the intention to kick me out of my own code.

Copy link
Copy Markdown
Member

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 main branch, and would like CPython maintainers to engage with. If you are not interested in addressing the comments of the reviewers here, that is your right, but you cannot expect for this PR to be kept open indefinitely.

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 main branch, please let us know, and we can reopen the PR :)

kr-g commented Oct 19, 2023

Copy link
Copy Markdown
Author

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.
there is no need to discuss further. also these lines are already too much.

Copy link
Copy Markdown
Member

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.

kr-g commented Oct 19, 2023

Copy link
Copy Markdown
Author

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.
but as of today i m pissed off by the time used for this all.
i unsubscribe now from this thread and delete the repo on my side.
if someone whats to pick up the last word, or write sort of poetry. thats also fine with me.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.


Back | FazBrowse Home | New Git URL