[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-06-04 Thread STINNER Victor
STINNER Victor added the comment: New changeset ca612a9728b83472d9d286bbea74972d426ed344 by Victor Stinner in branch 'master': bpo-36778: Remove outdated comment from CodePageTest (GH-13807) https://github.com/python/cpython/commit/ca612a9728b83472d9d286bbea74972d426ed344 --

[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-06-04 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +13692 pull_request: https://github.com/python/cpython/pull/13807 ___ Python tracker ___

[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 3aef48e3157f52a8bcdbacf47a35d0016348735e by Victor Stinner in branch 'master': bpo-36778: Update cp65001 codec documentation (GH-13240) https://github.com/python/cpython/commit/3aef48e3157f52a8bcdbacf47a35d0016348735e --

[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-10 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +13150 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-09 Thread STINNER Victor
STINNER Victor added the comment: > Since we aren't backporting ARM32 changes, I don't think it's important to > fix this test in 3.7. I am trying to get the buildbot tests for Windows > ARM32 to zero errors. Ok, thanks. I close the issue. -- resolution: -> fixed stage: patch

[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-09 Thread Paul Monson
Paul Monson added the comment: Thanks Victor! Since we aren't backporting ARM32 changes, I don't think it's important to fix this test in 3.7. I am trying to get the buildbot tests for Windows ARM32 to zero errors. Windows IoT Core runs on Raspberry Pi and similar devices:

[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-09 Thread STINNER Victor
STINNER Victor added the comment: Paul Monson: Your initial issue has been fixed in the master branch. I'm not sure what are Windows IoT Core and Windows Nano Server. Do you care of Python 3.7? If someone wants to support running test_site with ANSI code page set to 65001, I suggest to fix

[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-09 Thread STINNER Victor
STINNER Victor added the comment: About the ANSI code page, Lib/encodings/__init__.py calls _winapi.GetACP() to avoid relying on locale.getpreferredencoding() which lies when UTF-8 Mode is enabled: import _winapi ansi_code_page = "cp%s" % _winapi.GetACP()

[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-09 Thread STINNER Victor
STINNER Victor added the comment: New changeset d267ac20c309e37d85a986b4417aa8ab4d05dabc by Victor Stinner in branch 'master': bpo-36778: cp65001 encoding becomes an alias to utf_8 (GH-13230) https://github.com/python/cpython/commit/d267ac20c309e37d85a986b4417aa8ab4d05dabc --

[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-09 Thread Inada Naoki
Inada Naoki added the comment: > I dislike lying in the locale module. This change is basically useless with > my PR 13230. Note that Python produce "cpNNN" encoding name, not Windows.

[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-09 Thread Paul Monson
Paul Monson added the comment: Sorry that was supposed to say: I can verify that PR 13230 fixes the issue with test_startup_imports on Windows IoT Core ARM32 -- ___ Python tracker

[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-09 Thread Paul Monson
Paul Monson added the comment: I can verify that PR 13110 fixes the issue with test_startup_imports on Windows IoT Core ARM32 -- ___ Python tracker ___

[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-09 Thread Eryk Sun
Eryk Sun added the comment: > I dislike lying in the locale module. This change is basically useless > with my PR 13230. Yes, functionally it's no different than using 'cp65001' as an alias. That said, the CRT special cases 65001 as "utf8": >>> locale.setlocale(locale.LC_CTYPE, '')

[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-09 Thread STINNER Victor
STINNER Victor added the comment: > Python could similarly special case CP_UTF8 as "utf-8" in > _locale._getdefaultlocale. I dislike lying in the locale module. This change is basically useless with my PR 13230. -- ___ Python tracker

[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-09 Thread STINNER Victor
STINNER Victor added the comment: My PR 13110 (avoid functools) makes codecs.lookup('cp65001').encode() made 2.7x slower: https://github.com/python/cpython/pull/13110#issuecomment-491095964 417 ns +- 17 ns My PR 13230 (remove cp65001.py) makes it 1.5x faster :-)

[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-09 Thread STINNER Victor
STINNER Victor added the comment: I wrote PR 13230 to remove Lib/encodings/cp65001.py and simply reuse Lib/encodings/utf_8.py. -- ___ Python tracker ___

[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-09 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +13138 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-08 Thread Inada Naoki
Inada Naoki added the comment: @Eryk I didn't say new Terminal will cause this issue. I know ConsoeIO too. I just meant Microsoft use cp65001 more widely for better UTF-8 support nowadays. So I want to make cp65001 as alias of UTF-8. > Python could similarly special case CP_UTF8 as

[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-08 Thread Eryk Sun
Eryk Sun added the comment: > FYI, I expect cp65001 will be used more widely in near future, [...] > It seems use `SetConsoleOutputCP(65001)` and `SetConsoleCP(65001)`. Unless PYTHONLEGACYWINDOWSSTDIO is defined, Python 3.6+ doesn't use the console's codepage-based interface (except for

[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-08 Thread Paul Monson
Paul Monson added the comment: Removing import functools from cp65001.py fixes test_startup_imports. Victor proposed this PR: https://github.com/python/cpython/pull/13110 but new test_codecs fails because it's passing self on to the lambda I think. I tried to build on Victor's change but

[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-08 Thread Paul Monson
Change by Paul Monson : -- pull_requests: +13122 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-08 Thread Steve Dower
Steve Dower added the comment: The XP/Vista change is just context - we don't have to worry about OS that old any more. If we remove the functools.partial call, does that help? -- ___ Python tracker

[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-08 Thread Paul Monson
Paul Monson added the comment: cp65001 is the default codepage on Windows IoT Core and Windows NanoServer. There is also an option in control panel in Windows desktop 1809 (version 17763) and greater which changes the default codepage to cp65001. 1. Run control.exe 2. Click Clock and

[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-06 Thread Inada Naoki
Inada Naoki added the comment: FYI, I expect cp65001 will be used more widely in near future, because non UTF-8 default encoding reduced Developer eXperience, and Microsoft try to improve DX recent years. Today, Microsoft announced new Terminal application. It seems use

[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-06 Thread Paul Monson
Paul Monson added the comment: > Okay. The test verifies work done to minimize interpreter startup time, but > probably the relative cost of importing functools (and thus collections et > al) isn't significant compared to the overall cost of spawning a process in a > Windows desktop

[issue36778] test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001

2019-05-06 Thread Paul Monson
Change by Paul Monson : -- title: test_site.StartupImportTests.test_startup_imports fails if default code page is not cp1252 -> test_site.StartupImportTests.test_startup_imports fails if default code page is cp65001 ___ Python tracker