GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-105983: Add private mode support to webbrowser by kr-g · Pull Request #105984 · python/cpython

Conversation

@kr-g

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

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Support incognito / private browsing.

  • Issue: Support private mode in webbrowser #105983

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kr-g
browser incognito mode
814309a
support for incognito / private browsing
@bedevere-bot bedevere-bot added the awaiting review label Jun 22, 2023
@bedevere-bot

bedevere-bot commented Jun 22, 2023

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@blurb-it
📜🤖 Added by blurb_it.
2a67e33
@AlexWaygood AlexWaygood changed the title webbrowser incognito mode gh-105983: webbrowser incognito mode Jun 22, 2023
@bedevere-bot bedevere-bot mentioned this pull request Jun 22, 2023
Support private mode in webbrowser #105983
Closed
kr-g added 2 commits June 22, 2023 11:15
@kr-g
Merge branch 'main' into kr-g-browser-incognito
9d2fcfe
@kr-g
browser incognito mode
46d06d4
default value set in base class
@arhadthedev

arhadthedev commented Jun 22, 2023

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kr-g
removed unused flag
7baebe5
removed %incognito since using %action for the implementation
@kr-g

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sobolevn
sobolevn requested changes Jun 22, 2023
View reviewed changes

@sobolevn sobolevn left a comment

Copy link
Copy Markdown
Member

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 :)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/webbrowser.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/webbrowser.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Misc/NEWS.d/next/Security/2023-06-22-09-14-45.gh-issue-105983.7osoHj.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added awaiting core review and removed awaiting review labels Jun 22, 2023
kr-g and others added 3 commits June 22, 2023 13:24
@kr-g
reverted changes cause by formatting with black
b9079f4
@kr-g @sobolevn
Update Misc/NEWS.d/next/Security/2023-06-22-09-14-45.gh-issue-105983.…
f04f255
…7osoHj.rst

Co-authored-by: Nikita Sobolev <[email protected]>
@kr-g
doc text
7eaa455
sobolevn
sobolevn reviewed Jun 22, 2023
View reviewed changes

@sobolevn sobolevn left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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! 👍

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

@sobolevn sobolevn Jun 22, 2023

Copy link
Copy Markdown
Member

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@kr-g kr-g Jun 22, 2023

Copy link
Copy Markdown
Author

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@terryjreedy terryjreedy Jun 22, 2023

Copy link
Copy Markdown
Member

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@merwok merwok Jun 22, 2023

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@merwok merwok Jun 23, 2023

Copy link
Copy Markdown
Member

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@kr-g kr-g Jun 23, 2023

Copy link
Copy Markdown
Author

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@merwok merwok Oct 18, 2023

Copy link
Copy Markdown
Member

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kr-g

kr-g commented Jun 22, 2023

Copy link
Copy Markdown
Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sobolevn
sobolevn reviewed Jun 22, 2023
View reviewed changes
Comment thread Lib/webbrowser.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@kr-g @sobolevn
Update Lib/webbrowser.py
9e4ee59
Co-authored-by: Nikita Sobolev <[email protected]>
@kr-g

kr-g commented Jun 22, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kr-g
kr-g requested a review from sobolevn June 22, 2023 12:50
terryjreedy
terryjreedy requested changes Jun 22, 2023
View reviewed changes

@terryjreedy terryjreedy left a comment

Copy link
Copy Markdown
Member

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

@terryjreedy terryjreedy Jun 22, 2023

Copy link
Copy Markdown
Member

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot bedevere-bot added awaiting changes and removed awaiting core review labels Jun 22, 2023
@bedevere-bot

bedevere-bot commented Jun 22, 2023

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@terryjreedy
terryjreedy requested review from hugovk and zooba June 22, 2023 20:02
@terryjreedy terryjreedy changed the title gh-105983: webbrowser incognito mode gh-105983: Support webbrowser incognito mode Jun 22, 2023
@merwok merwok changed the title gh-105983: Support webbrowser private mode gh-105983: Add private mode support to webbrowser Jun 26, 2023
kr-g added 3 commits June 27, 2023 07:49
@kr-g
added incognito mode documentation
a4657c7
@kr-g
Merge branch 'main' into kr-g-browser-incognito
0f4b11f
@kr-g
Merge branch 'kr-g-browser-incognito' of https://github.com/kr-g/cpython
9580689
 into kr-g-browser-incognito
@AmirNakhaeii

AmirNakhaeii commented Jun 28, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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 ?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

kr-g added 9 commits June 30, 2023 14:16
@kr-g
merged branch from amir
3684723
@kr-g
removed
2d7a9c5
@kr-g
Merge pull request #1 from kr-g/amir-contrib
993f387
gh-105983 merged contribution from amir for edge browser support
@kr-g
corrected incognito var
9bb7124
@kr-g
added missing help text
2130631
@kr-g
added microsoft edge to the browser list
f8364db
@kr-g
reworked browser list option
d1de67c
@kr-g
Merge branch 'python:main' into kr-g-browser-incognito
994fe23
@kr-g
Merge branch 'main' into kr-g-browser-incognito
a43bd63
@hugovk

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...)
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

kr-g added 3 commits July 18, 2023 08:47
@kr-g
Merge branch 'python:main' into kr-g-browser-incognito
3cd8d82
@kr-g
Merge branch 'python:main' into kr-g-browser-incognito
5f0afcb
@kr-g
Merge branch 'python:main' into kr-g-browser-incognito
9408b3a
@hugovk

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kr-g
Merge branch 'python:main' into kr-g-browser-incognito
394265c
@hugovk

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kr-g

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kr-g

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@AlexWaygood

AlexWaygood commented Oct 19, 2023

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 :)

hugovk reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@AlexWaygood AlexWaygood closed this Oct 19, 2023
@kr-g

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@AlexWaygood

AlexWaygood commented Oct 19, 2023

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kr-g

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.

2trvl reacted with eyes emoji
All reactions
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@hugovk hugovk mentioned this pull request Nov 3, 2023
Add section on keeping CI green python/devguide#1215
Merged
@kr-g kr-g mentioned this pull request Oct 7, 2024
webbrowser: Add options for private mode #77119
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ronaldoussoren ronaldoussoren ronaldoussoren left review comments
@hugovk hugovk hugovk left review comments
@arhadthedev arhadthedev arhadthedev left review comments
@sobolevn sobolevn Awaiting requested review from sobolevn
@zooba zooba Awaiting requested review from zooba
@merwok merwok Awaiting requested review from merwok
@terryjreedy terryjreedy Awaiting requested review from terryjreedy
+1 more reviewer
@DBJim DBJim DBJim left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting change review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

11 participants

@kr-g @bedevere-bot @arhadthedev @terryjreedy @ronaldoussoren @AmirNakhaeii @hugovk @AlexWaygood @merwok @sobolevn @DBJim
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.