[issue41330] Inefficient error-handle for CJK encodings

2020-07-31 Thread Ma Lin
Ma Lin added the comment: At least fix this bug: the error-handler object is not cached, it needs to be looked up from a dict every time, which is very inefficient. The code: https://github.com/python/cpython/blob/v3.9.0b4/Modules/cjkcodecs/multibytecodec.c#L81-L98 I will submit a

[issue41451] Cannot subclass typing.Generic with __weakref__ slot in Python 3.6

2020-07-31 Thread Joshua Oreman
Joshua Oreman added the comment: The problem appears to be occurring when the base class is subscripted, not when it's inherited. I can reproduce this issue on Python 3.6.10 by just evaluating Base[T]. 'del Base.__slots__' after Base is constructed seems to work around the issue, and allow

[issue41453] A possible reference leak in _locale.localeconv()

2020-07-31 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +20843 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21699 ___ Python tracker ___

[issue41451] Cannot subclass typing.Generic with __weakref__ slot in Python 3.6

2020-07-31 Thread Joshua Bronson
Joshua Bronson added the comment: Whittled this down to an even more minimal repro: """Repro for Python 3.6 slots + weakref + typing.Generic subclass bug.""" from typing import Generic, TypeVar from weakref import ref T = TypeVar("T") class MyGeneric(Generic[T]): """MyGeneric works

[issue41453] A possible reference leak in _locale.localeconv()

2020-07-31 Thread Zackery Spytz
New submission from Zackery Spytz : If the _Py_GetLocaleconvNumeric() call fails in _locale_localeconv_impl(), "decimal_point" may be leaked. -- components: Extension Modules messages: 374655 nosy: ZackerySpytz priority: normal severity: normal status: open title: A possible reference

[issue41452] Inefficient BufferedReader.read(-1)

2020-07-31 Thread Ma Lin
Change by Ma Lin : -- keywords: +patch pull_requests: +20842 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21698 ___ Python tracker ___

[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-07-31 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: New changeset cadda52d974937069eeebea1cca4229e2bd400df by Karthikeyan Singaravelan in branch 'master': bpo-40360: Handle PendingDeprecationWarning in test_lib2to3. (GH-21694)

[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-07-31 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 10.0 -> 11.0 pull_requests: +20840 pull_request: https://github.com/python/cpython/pull/21696 ___ Python tracker

[issue37586] macOS: posix_spawn(..., setsid=True)

2020-07-31 Thread Ned Deily
Ned Deily added the comment: The immediate problem is that the version of Xcode you are using supplies a MacOSX10.15 SDK by default. Since you are running on 10.14, the test passes if you build using a MacOSX10.14 SDK. Either upgrade to 10.15 or grab the 10.14 SDK from a previous version of

[issue41448] pathlib behave differ between OS

2020-07-31 Thread Ronald Oussoren
Ronald Oussoren added the comment: PureWindowsPath does not know about POSIX paths, it supports the two styles of directory separator that are valid on Windows: '/' and '\'. PurePosixPath only supports the single stile of directory separator valid on POSIX systems: '/'. On a Posix system

[issue41449] An article on Python 3 stdout and stderr output buffering

2020-07-31 Thread Anatoli Babenia
New submission from Anatoli Babenia : It is hard to find info why Python 3 buffers stdout/stderr. The buffering causes problems when debugging Python apps in Docker and Kubernetes, and it is unclear if it is Python 3 who starts to buffer stdout if no tty is attached, it is Docker, or it is

[issue41448] pathlib behave differ between OS

2020-07-31 Thread Mond Wan
Mond Wan added the comment: Let me clarify my expectation. # For `as_posix()` * PureWindowsPath can translate both POSIX path, and WINDOW path to POSIX path via `as_posix()` * Therefore, I expect PurePosixPath can translate both platform path to POSIX path via `as_posix()` * I just

[issue41448] pathlib behave differ between OS

2020-07-31 Thread Mond Wan
Mond Wan added the comment: Thanks for the clarifications on PurePosixPath(). Now, I know which library I should use to solve my problem. For resolve() with strict True, I have tried on both platform. They will both raise exception if that file does not exists. --

[issue41448] pathlib behave differ between OS

2020-07-31 Thread Ronald Oussoren
Ronald Oussoren added the comment: I'm not sure what you try to report. PurePath(...) returns a PureWindowsPath on Windows and an PurePosixPath on other (unix-y) platforms. This explains the difference in behaviour you're seeing for as_posix(). --

[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-07-31 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- pull_requests: +20841 pull_request: https://github.com/python/cpython/pull/21697 ___ Python tracker ___

[issue41448] pathlib behave differ between OS

2020-07-31 Thread Mond Wan
Mond Wan added the comment: Moreover, output from PurePosixPath.as_posix() is not that straightforward? Please take a look below example from python3.6 + linux + docker ``` >>> winPath = r'\workspace\xxx\test_fixture\user-restore-success.zip' >>> pWIN = pathlib.PureWindowsPath(winPath) >>>

[issue41402] email: ContentManager.set_content calls nonexistent method encode() on bytes

2020-07-31 Thread R. David Murray
R. David Murray added the comment: The fix looks good to me. Don't know how I made that mistake, and obviously I didn't write a test for it... -- ___ Python tracker ___

[issue41448] pathlib behave differ between OS

2020-07-31 Thread Eryk Sun
Change by Eryk Sun : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> pathlib.Path.resolve(strict=False) returns relative path on Windows if the entry does not exist ___ Python tracker

[issue41450] OSError is not documented in ssl library, but still can be thrown

2020-07-31 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- components: +SSL ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36207] robotsparser deny all with some rules

2020-07-31 Thread Arnaud LIPERINI-DIAZ
Arnaud LIPERINI-DIAZ added the comment: Do you have documentation about robotParser ? The robot.txt of this website works fine : https://vauros.com/ -- nosy: +Arnaud LIPERINI-DIAZ ___ Python tracker

[issue41450] OSError is not documented in ssl library, but still can be thrown

2020-07-31 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +christian.heimes ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-07-31 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset fe928b32daca184e16ccc0ebdc20314cfa776b98 by Karthikeyan Singaravelan in branch '3.9': [3.9] bpo-40360: Handle PendingDeprecationWarning in test_lib2to3. (GH-21694) (GH-21697)

[issue41450] OSError is not documented in ssl library, but still can be thrown

2020-07-31 Thread Alexander Sibiryakov
New submission from Alexander Sibiryakov : See stack trace [07/15/2020 08:51:14.799: ERROR/kafka.producer.sender] Uncaught error in kafka producer I/O thread Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/kafka/producer/sender.py", line 60, in run

[issue34277] EmailPolicy not followed

2020-07-31 Thread Bryce Drennan
Change by Bryce Drennan : Removed file: https://bugs.python.org/file47720/test_header_folding.py ___ Python tracker ___ ___

[issue40666] TarFile.add does not support pathlib.Path as a value to first argument.

2020-07-31 Thread Akuli
New submission from Akuli : TarFile.add seems to support pathlib.Path objects (and other PathLike string paths) starting at Python 3.6, for both name and arcname. The paths go to `os.path` functions that return strings. Recently typeshed was updated to support passing pathlib.Paths in

[issue26791] shutil.move fails to move symlink (Invalid cross-device link)

2020-07-31 Thread SilentGhost
Change by SilentGhost : -- nosy: -SilentGhost ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26791] shutil.move fails to move symlink (Invalid cross-device link)

2020-07-31 Thread Murray Wilson
Murray Wilson added the comment: It also happens when moving a file in linux from an xfs filesystem to a NFS mounted filesystem. -- nosy: +Murray Wilson ___ Python tracker

[issue40978] Document that typing.SupportsXXX protocols are runtime checkable

2020-07-31 Thread Mariatta
Mariatta added the comment: > because their runtime results are inconsistent with how Mypy handles them, > producing both false positives and false negatives. @guido or @ivan, do you have further thoughts or additional context to share about the above point? -- nosy: +Mariatta

[issue40978] Document that typing.SupportsXXX protocols are runtime checkable

2020-07-31 Thread Guido van Rossum
Guido van Rossum added the comment: I agree with Luciano's conclusion and have nothing to add other than to encourage him to submit a PR for the docs. (I know he already submitted a PR to refactor the docs. Honestly I lost track of that one. Luciano, if you need my review for that one, please

[issue41451] Class with __weakref__ slot cannot inherit from multiple typing.Generic classes

2020-07-31 Thread Joshua Bronson
New submission from Joshua Bronson : This appears to be a bug in Python 3.6 that I hit while trying to add type hints to my bidirectional mapping library (https://bidict.rtfd.io). Pasting a working, minimal repro below for easier inline viewing, and also attaching for easier downloading and

[issue41451] Class with __weakref__ slot cannot inherit from typing.Generic subclass

2020-07-31 Thread Joshua Bronson
Joshua Bronson added the comment: It turns out that this bug reproduces with any subclass of the generic type with a weakref slot, even without any multiple inheritance going on. For example: class Invertible2(Invertible[KT1, KT2]): pass is enough to trigger this bug along with the

[issue41450] OSError is not documented in ssl library, but still can be thrown

2020-07-31 Thread Martin Panter
Martin Panter added the comment: Issue 31122 is also open about fixing this long-term, but I agree it would be good to document this quirk / bug. -- nosy: +martin.panter ___ Python tracker

[issue41452] Inefficient BufferedReader.read(-1)

2020-07-31 Thread Ma Lin
New submission from Ma Lin : BufferedReader's constructor has a `buffer_size` parameter, it's the size of this buffer: When reading data from BufferedReader object, a larger amount of data may be requested from the underlying raw stream, and kept in an internal buffer.

[issue41445] Adding configure temporary files to gitignore

2020-07-31 Thread Inada Naoki
Inada Naoki added the comment: Do you know you can use separated build dir? ``` $ mkdir build $ cd build $ ../configure --with-pydebug ``` -- nosy: +inada.naoki ___ Python tracker

[issue41177] ConvertingList and ConvertingTuple lack iterators and ConvertingDict lacks items()

2020-07-31 Thread Vinay Sajip
Vinay Sajip added the comment: Thanks for the PR. I reviewed it and requested changes about 3 weeks ago - you should have received a notification from GitHub when that happened. -- ___ Python tracker

[issue41421] Random.paretovariate sometimes raises ZeroDivisionError for small alpha

2020-07-31 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +20839 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21695 ___ Python tracker

[issue41448] pathlib behave differ between OS

2020-07-31 Thread Mond Wan
New submission from Mond Wan : I have tried 2 functions with different behavior across platform # as_posix() In linux platform, as_posix() cannot process window path nicely * From linux + docker + python:3.8 ``` Python 3.8.0 (default, Oct 17 2019, 05:36:36) [GCC 8.3.0] on linux >>> winPath

[issue41448] pathlib behave differ between OS

2020-07-31 Thread Mond Wan
Change by Mond Wan : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: