Pythonista-Issues icon indicating copy to clipboard operation
Pythonista-Issues copied to clipboard

Not block websites

Open juster-0 opened this issue 4 years ago • 6 comments

Hi, Pythonista doesn't block restricted websites from "content restrictions". So you can download any forbidden content with modules such as requests and others.

System Information

  • Pythonista 3.3 (330025)
  • IOS 14.2
  • iPhone 11

juster-0 avatar Jan 02 '21 01:01 juster-0

Like parental controls? https://support.mozilla.org/en-US/kb/block-and-unblock-websites-parental-controls-firef

cclauss avatar Jan 02 '21 08:01 cclauss

Yes, like parental controls.

juster-0 avatar Jan 02 '21 21:01 juster-0

Does Python on Linux, macOS, or Windows support such a feature?

cclauss avatar Jan 02 '21 22:01 cclauss

@cclauss macOS and iOS have built-in parental controls that let you block certain websites (or only allow a specific list of websites). I think the complaint here is that Pythonista ignores these restrictions.

As far as I know, the iOS website restrictions affect Safari, web views, and all code that uses Apple's APIs for making web requests (like NSURLSession). All major Python HTTP libraries are built on top of low-level socket APIs, which aren't affected by these restrictions as far as I know.

There's probably no good way to fix this. Even if you reimplement all modules like urllib and requests on top of the Apple APIs (which would probably be quite difficult), the socket module would still be available. Blocking the socket module completely would limit Pythonista's functionality quite a bit, even for users who don't use the iOS website restriction features.

dgelessus avatar Jan 03 '21 00:01 dgelessus

Are we agreed that if Python on macOS does not block such sites then there should be no expectation that Python on iOS should block them either? Should this issue be closed?

cclauss avatar Jan 03 '21 07:01 cclauss

Agreed.

mikaelho avatar Jan 03 '21 16:01 mikaelho