Re: Intent to restrict to secure contexts: navigator.geolocation
Richard Barnes در تاریخ جمعه ۲۱ اکتبر ۲۰۱۶ ساعت ۲۳:۲۰:۰۰ (UTC+3:30) نوشت: > The geolocation API allows web pages to request the user's geolocation, > drawing from things like GPS on mobile, and doing WiFi / IP based > geolocation on desktop. > > Due to the privacy risks associated with this functionality, I would like > to propose that we restrict this functionality to secure contexts [1]. > > Our telemetry for geolocation is a little rough, but we can derive some > upper bounds. According to telemetry from Firefox 49, the geolocation > permissions prompt has been shown around 4.6M times [2], on about 3B page > loads [3]. Around 21% of these requests were (1) from "http:" origins, and > (2) granted by the user. So the average rate of permissions being granted > to non-secure origins per pageload is 4.6M * 21% / 3B = 0.0319%. > > Access to geolocation from non-secure contexts is already disabled in > Chrome [4] and WebKit [5]. > > Please send any comments on this proposal by Friday, October 28. > > Relevant bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1072859 > > [1] https://www.w3.org/TR/secure-contexts/ > [2] https://mzl.la/2eeoWm9 > [3] https://mzl.la/2eoiIAw > [4] https://codereview.chromium.org/1530403002/ > [5] https://trac.webkit.org/changeset/200686 ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Adopting the black Python code style
I'm disappointed by that. On Mon, Oct 19, 2020 at 2:00 PM Ricky Stewart wrote: > > On Monday, October 19, 2020 at 8:53:59 AM UTC-5, Andrew Halberstadt wrote: > > No, black now has a `--skip-string-normalization` flag, which I would be > > all for using in our code base. Not sure if that was the plan here or not. > > > > -Andrew > > > > p.s It took a great deal of convincing from the community to get this flag > > added, as the maintainers precisely wanted to prevent conversations like > > this current one from happening :p. > > On Thu, Oct 15, 2020 at 5:23 PM Mike Hommey wrote: > > > > > Is black still opiniated about string types and insisting to use double > > > quotes, when we mostly settled on single quotes? > > > > > > On Mon, Oct 12, 2020 at 10:00:56AM -0700, Ricky Stewart wrote: > > > > Hello everyone, > > > > > > > > If you don't write Python code in mozilla-central, you can stop reading > > > now. > > > > > > > > On October 19, 2020 we will be officially adopting the black Python > > > style for all our Python code in mozilla-central. > > > > > > > > black (https://black.readthedocs.io/en/stable/) is an opinionated, > > > fast, and correct auto-formatter for Python. It is an increasingly popular > > > autoformatter which might be considered the de facto standard for Python > > > code (like clang-format and jslint are for C++ and JS). It is already used > > > by several Mozilla projects, including Release Engineering, Lando, and > > > moz-phab. > > > > > > > > black makes it easy for us to reliably format all our Python code in a > > > consistent way, making the codebase easier to read on the whole and > > > allowing us to spend more time in code review discussing substantive > > > issues > > > over trivial formatting matters. > > > > > > > > This policy change will affect all Python code in-tree, including > > > sandboxed Python code used by the build system (.configure, .build, and > > > .mozbuild files). > > > > > > > > As part of this policy change, we plan on doing a one-time auto-reformat > > > on October 19 of all Python code in the entire repository. In addition, > > > mach lint ( > > > https://firefox-source-docs.mozilla.org/code-quality/lint/linters/black.html) > > > and reviewbot will be updated to print warnings for Python source files > > > that violate the black style. Just like with C/C++ or Rust, we won’t > > > backout offending changes but instead will do regular refreshes of the > > > tree. > > > > > > > > If there are any questions, please let me know! > > > > > > > > Ricky > > > > ___ > > > > dev-platform mailing list > > > > dev-pl...@lists.mozilla.org > > > > https://lists.mozilla.org/listinfo/dev-platform > > > ___ > > > dev-platform mailing list > > > dev-pl...@lists.mozilla.org > > > https://lists.mozilla.org/listinfo/dev-platform > > > > > --skip-string-normalization does exist, but the plan is not to use it. While > there is a cost associated with reformatting many (but not all) of the > strings in our Python code to be consistent with the black style, we don't > think that that cost outweighs the benefit of doing so. > ___ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Adopting the black Python code style
On Monday, October 19, 2020 at 8:53:59 AM UTC-5, Andrew Halberstadt wrote: > No, black now has a `--skip-string-normalization` flag, which I would be > all for using in our code base. Not sure if that was the plan here or not. > > -Andrew > > p.s It took a great deal of convincing from the community to get this flag > added, as the maintainers precisely wanted to prevent conversations like > this current one from happening :p. > On Thu, Oct 15, 2020 at 5:23 PM Mike Hommey wrote: > > > Is black still opiniated about string types and insisting to use double > > quotes, when we mostly settled on single quotes? > > > > On Mon, Oct 12, 2020 at 10:00:56AM -0700, Ricky Stewart wrote: > > > Hello everyone, > > > > > > If you don't write Python code in mozilla-central, you can stop reading > > now. > > > > > > On October 19, 2020 we will be officially adopting the black Python > > style for all our Python code in mozilla-central. > > > > > > black (https://black.readthedocs.io/en/stable/) is an opinionated, > > fast, and correct auto-formatter for Python. It is an increasingly popular > > autoformatter which might be considered the de facto standard for Python > > code (like clang-format and jslint are for C++ and JS). It is already used > > by several Mozilla projects, including Release Engineering, Lando, and > > moz-phab. > > > > > > black makes it easy for us to reliably format all our Python code in a > > consistent way, making the codebase easier to read on the whole and > > allowing us to spend more time in code review discussing substantive issues > > over trivial formatting matters. > > > > > > This policy change will affect all Python code in-tree, including > > sandboxed Python code used by the build system (.configure, .build, and > > .mozbuild files). > > > > > > As part of this policy change, we plan on doing a one-time auto-reformat > > on October 19 of all Python code in the entire repository. In addition, > > mach lint ( > > https://firefox-source-docs.mozilla.org/code-quality/lint/linters/black.html) > > > > and reviewbot will be updated to print warnings for Python source files > > that violate the black style. Just like with C/C++ or Rust, we won’t > > backout offending changes but instead will do regular refreshes of the > > tree. > > > > > > If there are any questions, please let me know! > > > > > > Ricky > > > ___ > > > dev-platform mailing list > > > dev-pl...@lists.mozilla.org > > > https://lists.mozilla.org/listinfo/dev-platform > > ___ > > dev-platform mailing list > > dev-pl...@lists.mozilla.org > > https://lists.mozilla.org/listinfo/dev-platform > > --skip-string-normalization does exist, but the plan is not to use it. While there is a cost associated with reformatting many (but not all) of the strings in our Python code to be consistent with the black style, we don't think that that cost outweighs the benefit of doing so. ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Adopting the black Python code style
No, black now has a `--skip-string-normalization` flag, which I would be all for using in our code base. Not sure if that was the plan here or not. -Andrew p.s It took a great deal of convincing from the community to get this flag added, as the maintainers precisely wanted to prevent conversations like this current one from happening :p. On Thu, Oct 15, 2020 at 5:23 PM Mike Hommey wrote: > Is black still opiniated about string types and insisting to use double > quotes, when we mostly settled on single quotes? > > On Mon, Oct 12, 2020 at 10:00:56AM -0700, Ricky Stewart wrote: > > Hello everyone, > > > > If you don't write Python code in mozilla-central, you can stop reading > now. > > > > On October 19, 2020 we will be officially adopting the black Python > style for all our Python code in mozilla-central. > > > > black (https://black.readthedocs.io/en/stable/) is an opinionated, > fast, and correct auto-formatter for Python. It is an increasingly popular > autoformatter which might be considered the de facto standard for Python > code (like clang-format and jslint are for C++ and JS). It is already used > by several Mozilla projects, including Release Engineering, Lando, and > moz-phab. > > > > black makes it easy for us to reliably format all our Python code in a > consistent way, making the codebase easier to read on the whole and > allowing us to spend more time in code review discussing substantive issues > over trivial formatting matters. > > > > This policy change will affect all Python code in-tree, including > sandboxed Python code used by the build system (.configure, .build, and > .mozbuild files). > > > > As part of this policy change, we plan on doing a one-time auto-reformat > on October 19 of all Python code in the entire repository. In addition, > mach lint ( > https://firefox-source-docs.mozilla.org/code-quality/lint/linters/black.html) > and reviewbot will be updated to print warnings for Python source files > that violate the black style. Just like with C/C++ or Rust, we won’t > backout offending changes but instead will do regular refreshes of the tree. > > > > If there are any questions, please let me know! > > > > Ricky > > ___ > > dev-platform mailing list > > dev-platform@lists.mozilla.org > > https://lists.mozilla.org/listinfo/dev-platform > ___ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform > ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform