Re: pathlib

2019-09-30 Thread DL Neil via Python-list
On 1/10/19 1:40 AM, Barry Scott wrote: On 30 Sep 2019, at 12:51, Dan Sommers <2qdxy4rzwzuui...@potatochowder.com> wrote: On 9/30/19 4:28 AM, Barry Scott wrote: On 30 Sep 2019, at 05:40, DL Neil via Python-list wrote: Should pathlib reflect changes it has made to the file-system? I think

Re: pathlib

2019-09-30 Thread DL Neil via Python-list
On 1/10/19 1:09 AM, Chris Angelico wrote: On Mon, Sep 30, 2019 at 9:54 PM Dan Sommers <2qdxy4rzwzuui...@potatochowder.com> wrote: I would have said the same thing, but the docs⁰ disagree: a PurePath represents the name of (or the path to) a file, but a Path represents the actual file. ⁰

Re: pathlib

2019-09-30 Thread DL Neil via Python-list
On 30/09/19 9:28 PM, Barry Scott wrote: On 30 Sep 2019, at 05:40, DL Neil via Python-list wrote: Should pathlib reflect changes it has made to the file-system? I think it should not. The term "concrete" is applied to Path(), PosixPath(), and WindowsPath() - whereas the others are

[issue38319] shutil.copyfile(): os.sendfile() fails with OverflowError on 32-bit system

2019-09-30 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Looks like it worked: https://buildbot.python.org/all/#/builders/176/builds/1383 -- ___ Python tracker ___

[issue38319] shutil.copyfile(): os.sendfile() fails with OverflowError on 32-bit system

2019-09-30 Thread Giampaolo Rodola'
Change by Giampaolo Rodola' : -- versions: +Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38333] add type signatures to library function docs

2019-09-30 Thread Guido van Rossum
Guido van Rossum added the comment: Even if this not desirable for the source code, it still makes sense to add the types to the docs, at least when they are simple and compact. The proposed notation from PEP 604 ('|' for unions) might help with compactness. Many docs are unnecessarily

[issue38333] add type signatures to library function docs

2019-09-30 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: docs@python -> gvanrossum nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list

[issue38333] add type signatures to library function docs

2019-09-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: I believe there was an explicit decision not to do this. For the time being, optional typing is still optional. -- nosy: +rhettinger ___ Python tracker

[issue38333] add type signatures to library function docs

2019-09-30 Thread paul rubin
New submission from paul rubin : It would be nice if the library reference manual had type signatures for all the stdlib functions at some point. It might be possible to extract a lot of them automatically from typeshed and semi-automatically paste them into the doc files. It might also be

[issue38319] shutil.copyfile(): os.sendfile() fails with OverflowError on 32-bit system

2019-09-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +16093 pull_request: https://github.com/python/cpython/pull/16506 ___ Python tracker ___

[issue38319] shutil.copyfile(): os.sendfile() fails with OverflowError on 32-bit system

2019-09-30 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: New changeset 94e165096fd65e8237e60de570fb609604ab94c9 by Giampaolo Rodola in branch 'master': bpo-38319: Fix shutil._fastcopy_sendfile(): set sendfile() max block size (GH-16491)

[issue38329] macOS python.org installers only add or modify framework Versions/Current symlink for Python 2.x installs, not Python 3.x

2019-09-30 Thread Ned Deily
Ned Deily added the comment: Thanks for the reminder. Unfortunately, the macOS installer is working as designed. As discussed at length in Issue18117 (and elsewhere), building using the -framework Python, either directly in compiler calls or indirectly through Xcode is problematic because

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Neil Schemenauer
Neil Schemenauer added the comment: I worked some on trying to create a unit test this evening. Attached is my best result so far (gc_weakref_bug_demo.py). It requires that you enable the 'xx' module so we have a container object without tp_traverse. We should probably add one to

[issue32689] shutil.move raises AttributeError if first argument is a pathlib.Path object and destination is a directory

2019-09-30 Thread Guido van Rossum
Guido van Rossum added the comment: 3.9 only! -- nosy: +gvanrossum resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 -Python 3.6, Python 3.7, Python 3.8 ___ Python tracker

[issue38332] invalid content-transfer-encoding in encoded-word causes KeyError

2019-09-30 Thread Emmanuel Arias
Emmanuel Arias added the comment: Hello, I am not a email expert, but according to RFC 1342 the enconding can be either "B" or "Q". So, I think is reasonable that when a not correct enconding is set, should be raise an exception I think that we can improve the message raising a more

[issue32689] shutil.move raises AttributeError if first argument is a pathlib.Path object and destination is a directory

2019-09-30 Thread miss-islington
miss-islington added the comment: New changeset cf57cabef82c4689ce9796bb1fcdb125fa05efcb by Miss Islington (bot) (Maxwell A McKinnon) in branch 'master': bpo-32689: Updates shutil.move to allow for Path objects to be used as source arg (GH-15326)

[issue38325] [Windows] test_winconsoleio failures

2019-09-30 Thread Eryk Sun
Eryk Sun added the comment: Does test_partial_reads fail for you when run separately? If so, it's for a different reason. Otherwise, there may have been text left in the input buffer from test_input that led to the failure, which is a separate problem that needs to be addressed via

Re: pathlib

2019-09-30 Thread Dan Sommers
On 9/30/19 3:56 PM, Barry Scott wrote: On 30 Sep 2019, at 16:49, Dan Sommers <2qdxy4rzwzuui...@potatochowder.com > wrote: In the totality of a Path object that claims to represent paths to files, It represents string that *should* in most cases

[issue38321] Compiler warnings when building Python 3.8

2019-09-30 Thread Ma Lin
Ma Lin added the comment: Other warnings: c:\vstinner\python\master\objects\longobject.c(420): warning C4244: 'function': conversion from 'unsigned __int64' to 'sdigit', possible loss of data c:\vstinner\python\master\objects\longobject.c(428): warning C4267: 'function': conversion from

[issue38332] invalid content-transfer-encoding in encoded-word causes KeyError

2019-09-30 Thread Emmanuel Arias
Change by Emmanuel Arias : -- nosy: +eamanu ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38321] Compiler warnings when building Python 3.8

2019-09-30 Thread Ma Lin
Ma Lin added the comment: On my Windows, some non-ASCII characters cause this warning: d:\dev\cpython\modules\expat\xmltok.c : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent

Re: Delay in python startup.

2019-09-30 Thread Cameron Simpson
On 30Sep2019 10:28, Tobiah wrote: On 9/30/19 9:54 AM, Chris Angelico wrote: On Tue, Oct 1, 2019 at 1:56 AM Tobiah wrote: It was much faster with -S and instantaneous with -E. I had a directory in my PYTHONPATH that I mount with sshfs from a server. For some reason that mount is very slow.

[issue38332] invalid content-transfer-encoding in encoded-word causes KeyError

2019-09-30 Thread Andrei Troie
New submission from Andrei Troie : The following will cause a KeyError on email.message.get() import email import email.policy text = "Subject: =?us-ascii?X?somevalue?=" eml = email.message_from_string(text, policy=email.policy.default) eml.get('Subject') This is caused by the fact that the

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Neil Schemenauer
Change by Neil Schemenauer : -- nosy: +benjamin.peterson, larry, ned.deily versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker ___

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Neil Schemenauer
Neil Schemenauer added the comment: I created GH-16502. I'm not exactly sure of the process of making a revert on a branch like '3.8' so hopefully it is correct. The code change is exactly what has been reverted in 3.8. The net effect will be as if the revert was never done. --

[issue37725] "make clean" should remove PGO task data

2019-09-30 Thread Neil Schemenauer
Change by Neil Schemenauer : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38326] Concerns with the last minute changes to the PEP 587 API

2019-09-30 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Neil Schemenauer
Change by Neil Schemenauer : -- pull_requests: +16092 pull_request: https://github.com/python/cpython/pull/16502 ___ Python tracker ___

[issue38331] Exec not recognizing global variables inside function

2019-09-30 Thread Huyston
New submission from Huyston : This seems like a bug for me, forgive me if its not. Consider the following script: def func(): print(var) my_globals = {'func':func,'var':14} exec("print(var);func()",my_globals,my_globals) This is the output: 14 Traceback (most recent call last): File

[issue38330] httplib specifies content-length when transfer-encoding present

2019-09-30 Thread apmatthews
Change by apmatthews : -- keywords: +patch pull_requests: +16090 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16501 ___ Python tracker ___

[issue38304] PEP 587 implementation is not ABI forward compatible

2019-09-30 Thread STINNER Victor
STINNER Victor added the comment: I reopen the issue since there seems to be disagreement about the whole feature (provide a stable ABI for embedded Python): see bpo-38326. -- resolution: fixed -> status: closed -> open ___ Python tracker

[issue38326] Concerns with the last minute changes to the PEP 587 API

2019-09-30 Thread STINNER Victor
STINNER Victor added the comment: > Binary compatibility of an embedding-only struct is totally unnecessary, as > posted on the thread. Well, I'm fine with removing PyConfig.struct_size right now. I wrote two PRs to remove it: * PR 16500 (code) * https://github.com/python/peps/pull/1185

[issue38322] Azure Pipelines: appx tests fail: init_fs_encoding: failed to get the Python codec of the filesystem encoding

2019-09-30 Thread Steve Dower
Steve Dower added the comment: Either way, the paths in the latest tests [1] seem to be fine, and they all passed, so I don't think this is a release blocker anymore. Thanks, Victor! [1]:

[issue38322] Azure Pipelines: appx tests fail: init_fs_encoding: failed to get the Python codec of the filesystem encoding

2019-09-30 Thread Steve Dower
Steve Dower added the comment: > I checked why sys.executable is not normalized in the the "appx build". > PC\python_uwp.cpp calls set_process_name() which sets PyConfig.executable and > the path is not normalized. If PyConfig.executable is set explicitly, the > path is left unchanged:

[issue38304] PEP 587 implementation is not ABI forward compatible

2019-09-30 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +16089 pull_request: https://github.com/python/cpython/pull/16500 ___ Python tracker ___

[issue38330] httplib specifies content-length when transfer-encoding present

2019-09-30 Thread apmatthews
New submission from apmatthews : RFC 7230 3.3.2 states "A sender MUST NOT send a Content-Length header field in any message that contains a Transfer-Encoding header field." When trying to perform a chunked request: import httplib http = httplib.HTTPSConnection('google.com')

[issue38325] [Windows] test_winconsoleio failures

2019-09-30 Thread STINNER Victor
STINNER Victor added the comment: Until a fix is found, can we mark the tests as "known to fail" on a specific Windows version? (So test_winconsoleio doesn't fail anymore.) -- ___ Python tracker

Re: pathlib

2019-09-30 Thread Barry Scott
> On 30 Sep 2019, at 16:49, Dan Sommers <2qdxy4rzwzuui...@potatochowder.com> > wrote: > > That's an interesting question. If you phrase the question like > that, then you're right: expecting a string to track the content > of a file is a mistake. > > In the totality of a Path object

[issue38322] Azure Pipelines: appx tests fail: init_fs_encoding: failed to get the Python codec of the filesystem encoding

2019-09-30 Thread STINNER Victor
STINNER Victor added the comment: > Adding in the appx _layout_ test (it's the whole test suite in an "installed" > layout) was easier to do in CI than creating a buildbot config, so I threw it > in as a test and then left it on. It's certainly not been failing this whole > time. I'm fine

[issue38322] Azure Pipelines: appx tests fail: init_fs_encoding: failed to get the Python codec of the filesystem encoding

2019-09-30 Thread STINNER Victor
STINNER Victor added the comment: > The bug was probably exposed due to a change in path initialization (there's > been a few changes here recently ;) ) that stopped normalising prefix. You > can see that sys.executable in your dumped path has additional "." in the > path, and that's never

[issue38325] [Windows] test_winconsoleio failures

2019-09-30 Thread Eryk Sun
Eryk Sun added the comment: Apparently handling non-BMP codes is broken in recent builds of the new console in Windows 10. I see this problem in build 18362 as well. It seems there have been updates that have changed the naive way the console used to handle surrogate codes as just regular

[issue38329] Top level symlinks are broken in the Python 3.7.4 framework for macOS.

2019-09-30 Thread Kevin Packard
New submission from Kevin Packard : The macOS installer for Python 3.7.4 places "Python.framework" into /Library/Frameworks/ However, the top-level symlinks inside the framework are broken for "Headers" and "Resources". Because of this, the framework can not be imported into an Xcode

[issue38321] Compiler warnings when building Python 3.8

2019-09-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset aca8c406ada3bb547765b262bed3ac0cc6be8dd3 by Victor Stinner in branch 'master': bpo-38321: Fix _testcapimodule.c warning (GH-16494) https://github.com/python/cpython/commit/aca8c406ada3bb547765b262bed3ac0cc6be8dd3 --

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Łukasz Langa
Łukasz Langa added the comment: If either of you resurrects tp_clear in functions in the next 12 hours or so, I'll merge it. -- ___ Python tracker ___

[issue38324] [Windows] test_locale and test__locale failures on Windows

2019-09-30 Thread STINNER Victor
STINNER Victor added the comment: > Also, since these seem to be on your own machine, I'm guessing your locale is > not en-US? Oh, the behavior of setlocale() depends on my system locale? Yeah, my system is configured in French, sorry I don't recall the locale name. --

[issue37945] [Windows] locale.getdefaultlocale() issues on Windows: test_locale.test_getsetlocale_issue1813()

2019-09-30 Thread STINNER Victor
Change by STINNER Victor : -- title: test_locale failing -> [Windows] locale.getdefaultlocale() issues on Windows: test_locale.test_getsetlocale_issue1813() ___ Python tracker

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Neil Schemenauer
Neil Schemenauer added the comment: > Is introducing tp_clear on functions a thing that has ABI consequences? In > other words, if we take our time on this, would it land in 3.8.1 or 3.9.0? I think it should not have ABI consequences. However, I see the addition of tp_clear as a new

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Tim Peters
Tim Peters added the comment: Łukasz, all type objects have tp_clear slots, and always did. The patch in question put something useful in the function object's tp_clear slot instead of leaving it NULL. No interface, as such, changes either way. --

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Łukasz Langa
Łukasz Langa added the comment: Now we only need a volunteer to prepare a PR to revert the revert... :> -- ___ Python tracker ___

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Tim Peters
Tim Peters added the comment: Yes, it's better to have tp_clear than not for a variety of reasons (including setting examples of best practice). Best I can tell, the patch for BPO-33418 was reverted _only_ to worm around the crash in _this_ report. That's no longer needed. Or, if it is,

Re: Delay in python startup.

2019-09-30 Thread Chris Angelico
On Tue, Oct 1, 2019 at 3:31 AM Tobiah wrote: > > On 9/30/19 9:54 AM, Chris Angelico wrote: > > On Tue, Oct 1, 2019 at 1:56 AM Tobiah wrote: > >> > >> I don't have a lot of information, so here goes a shot in > >> the dark. One day I started experiencing a delay when > >> starting python. I'm

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Łukasz Langa
Łukasz Langa added the comment: Is introducing tp_clear on functions a thing that has ABI consequences? In other words, if we take our time on this, would it land in 3.8.1 or 3.9.0? I'm kind of nervous about the rate of change in the past 48 hours. --

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Neil Schemenauer
Neil Schemenauer added the comment: > Would [func tp_clear] help with memory usage in functions or was BPO-33418 > addressed in another way since? Having a tp_clear for all container objects that can be involved in reference cycles will help the GC free memory. BPO-33418 may be contrived

Re: pathlib

2019-09-30 Thread DL Neil via Python-list
On 1/10/19 6:13 AM, Dan Sommers wrote: On 9/30/19 12:51 PM, Chris Angelico wrote: On Tue, Oct 1, 2019 at 1:51 AM Dan Sommers ... All I'm doing is defending the OP, who was surprised that renaming a file *using a Path instance* didn't reflect that operation *in that Path instance*.  I believe

Re: Delay in python startup.

2019-09-30 Thread Tobiah
On 9/30/19 9:54 AM, Chris Angelico wrote: On Tue, Oct 1, 2019 at 1:56 AM Tobiah wrote: I don't have a lot of information, so here goes a shot in the dark. One day I started experiencing a delay when starting python. I'm on Ubuntu 16.04. It takes three seconds to get a prompt when I type

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Tim Peters
Tim Peters added the comment: It's unclear to me whether BPO-33418 was a bug or a contrived annoyance :-) If someone believes it was worth addressing, then what it did is the only way to fix it, so should be restored now. -- ___ Python tracker

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Łukasz Langa
Łukasz Langa added the comment: > If that PR is applied, I think we should also restore tp_clear for functions > (revert GH-15826). If that's safe and easy, let's go for it. Would it help with memory usage in functions or was BPO-33418 addressed in another way since? --

Re: pathlib

2019-09-30 Thread Dan Sommers
On 9/30/19 12:51 PM, Chris Angelico wrote: On Tue, Oct 1, 2019 at 1:51 AM Dan Sommers <2qdxy4rzwzuui...@potatochowder.com> wrote: In the totality of a Path object that claims to represent paths to files, including the arguably troublesome read_bytes and write_bytes methods, and a rename method,

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +16088 pull_request: https://github.com/python/cpython/pull/16499 ___ Python tracker ___

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Tim Peters
Tim Peters added the comment: FWIW, I agree with Neil in all respects about the release: his patch is the best approach, plugs segfaulting holes that have been there for many years, and the earlier patches aren't needed anymore. -- ___ Python

[issue38328] Speed up the creation time of constant list literals.

2019-09-30 Thread Brandt Bucher
Change by Brandt Bucher : -- keywords: +patch pull_requests: +16087 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16498 ___ Python tracker ___

[issue33325] Optimize sequences of constants in the compiler

2019-09-30 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +16086 pull_request: https://github.com/python/cpython/pull/16498 ___ Python tracker ___

Re: Delay in python startup.

2019-09-30 Thread Chris Angelico
On Tue, Oct 1, 2019 at 1:56 AM Tobiah wrote: > > I don't have a lot of information, so here goes a shot in > the dark. One day I started experiencing a delay when > starting python. I'm on Ubuntu 16.04. It takes three > seconds to get a prompt when I type 'python' on the command > line (Python

[issue38328] Speed up the creation time of constant list literals.

2019-09-30 Thread Brandt Bucher
New submission from Brandt Bucher : The attached PR contains a small change to the peephole optimizer that converts sequences of: LOAD_CONST(a), LOAD_CONST(b), ..., BUILD_LIST(n) to LOAD_CONST((a, b, ...)), BUILD_LIST_UNPACK(1) The improvement quickly becomes significant for lists larger

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Tim Peters
Tim Peters added the comment: Neil, my brief msg 10 minutes before yours suggested the same thing (just clear the weakref), so it must be right ;-) -- ___ Python tracker ___

Re: pathlib

2019-09-30 Thread Chris Angelico
On Tue, Oct 1, 2019 at 1:51 AM Dan Sommers <2qdxy4rzwzuui...@potatochowder.com> wrote: > In the totality of a Path object that claims to represent paths > to files, including the arguably troublesome read_bytes and > write_bytes methods, and a rename method, however, it's not > unreasonable expect

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Neil Schemenauer
Neil Schemenauer added the comment: Oops, I linked to wrong PR, my proposed fix is GH-16495. It is the same as what Tim suggests in his last comment. -- ___ Python tracker

[issue38302] __rpow__ not reached when __ipow__ returns NotImplemented

2019-09-30 Thread hongweipeng
hongweipeng added the comment: Oh, I see. Thank you. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Neil Schemenauer
Neil Schemenauer added the comment: > Why setting it back to release blocker? As far as I recall, this issue is not > a Python 3.8 regression. The regression which triggered this old and existing > bug has been fixed, see previous comments. I leave it up to our glorious release manager to

[issue38297] Imports at top of module is often not used

2019-09-30 Thread Brett Cannon
Brett Cannon added the comment: So it's a bit misleading to use the stdlib as a guideline because there are reasons we do this in certain spots. E.g. the os module purposefully does function-level imports to make startup cheaper. importlib does this to minimize how many modules need to be

[issue38303] Make audioop PEP-384 compatible

2019-09-30 Thread Tyler Kieft
Change by Tyler Kieft : -- keywords: +patch pull_requests: +16085 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16497 ___ Python tracker ___

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Tim Peters
Tim Peters added the comment: Neil, how about this alternative: leave the weakref implementation alone. If we find a trash weakref, simply clear it instead. That would prevent callbacks too, & would also prevent the weakref from being used to retrieve its possibly-trash-too referent.

[issue38326] Concerns with the last minute changes to the PEP 587 API

2019-09-30 Thread Nick Coghlan
Change by Nick Coghlan : -- keywords: +patch pull_requests: +16084 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/16496 ___ Python tracker

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Neil Schemenauer
Change by Neil Schemenauer : -- pull_requests: +16083 pull_request: https://github.com/python/cpython/pull/16495 ___ Python tracker ___

Re: Recursive method in class

2019-09-30 Thread Anders Märak Leffler
What do you mean by transformed? This is probably your understanding already, but a further consequence of when arguments are evaluated plus what you said about data attributes is that the fib(self, n - 1) call will follow the standard LEGB-lookup of whatever "fib" is, from the point of view of

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Tim Peters
Tim Peters added the comment: > Would the attached rough patch (gc_disable_wr_callback.txt) > be a possible fix? When we find W inside handle_weakrefs(), > we mark it as trash and will not execute the callback. It's semantically correct since we never wanted to execute a callback from a

[issue37398] contextlib.ContextDecorator decorating async functions

2019-09-30 Thread Krzysztof Wróblewski
Change by Krzysztof Wróblewski : -- nosy: +Krzysztof Wróblewski ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38324] [Windows] test_locale and test__locale failures on Windows

2019-09-30 Thread Tim Golden
Tim Golden added the comment: This is the existing issue https://bugs.python.org/issue37945 which I haven't had time to progress. Please feel free to follow up -- ___ Python tracker

Re: Hi how do I import files inside a txt file?

2019-09-30 Thread Tobiah
On 9/2/19 3:32 AM, Spencer Du wrote: Hi How do i import files inside a txt file if they exist in the current directory? Once you've read the module names you can use: new_module = __import__(modulename) So you'd read the name from your file into modulename and import the name contained

Delay in python startup.

2019-09-30 Thread Tobiah
I don't have a lot of information, so here goes a shot in the dark. One day I started experiencing a delay when starting python. I'm on Ubuntu 16.04. It takes three seconds to get a prompt when I type 'python' on the command line (Python 2.7.12). When I run a script that imports packages, it

[issue38321] Compiler warnings when building Python 3.8

2019-09-30 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset c9a413ede47171a224c72dd34122005170caaad4 by Vinay Sajip (Victor Stinner) in branch 'master': bpo-38321: Fix PyCStructUnionType_update_stgdict() warning (GH-16492) https://github.com/python/cpython/commit/c9a413ede47171a224c72dd34122005170caaad4

[issue22273] abort when passing certain structs by value using ctypes

2019-09-30 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset c9a413ede47171a224c72dd34122005170caaad4 by Vinay Sajip (Victor Stinner) in branch 'master': bpo-38321: Fix PyCStructUnionType_update_stgdict() warning (GH-16492) https://github.com/python/cpython/commit/c9a413ede47171a224c72dd34122005170caaad4

Re: pathlib

2019-09-30 Thread Dan Sommers
On 9/30/19 10:33 AM, Barry Scott wrote: On 30 Sep 2019, at 14:20, Dan Sommers <2qdxy4rzwzuui...@potatochowder.com > wrote: That's the wording I read.  I inferred that "path-handling operations which don't actually access a filesystem" meant an

[issue38242] Revert the new asyncio Streams API

2019-09-30 Thread Bruce Merry
Change by Bruce Merry : -- nosy: +bmerry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38326] Concerns with the last minute changes to the PEP 587 API

2019-09-30 Thread Łukasz Langa
Change by Łukasz Langa : -- versions: +Python 3.8, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38327] Creating set with empty string returns empty set

2019-09-30 Thread Emil Bode
Emil Bode added the comment: You're right, I tested with set('a'), which gave me a set of size one, but generalized it here to 'somestring'. Maybe I'm just too loose with using set, instead of {} Sorry to bother you -- ___ Python tracker

[issue38327] Creating set with empty string returns empty set

2019-09-30 Thread Ammar Askar
Ammar Askar added the comment: I think the key thing you're missing here is that the set() constructor can take any arbitrary iterable (https://docs.python.org/3/library/functions.html#func-set). It simply goes over all the elements inside and adds them all to the set. This is no different

[issue38327] Creating set with empty string returns empty set

2019-09-30 Thread Emil Bode
Emil Bode added the comment: Some details about my setup: Python 3.7.1, Spyder 3.3.2 IPython 7.2.0 under Windows 10 64-bit -- ___ Python tracker ___

[issue38327] Creating set with empty string returns empty set

2019-09-30 Thread Emil Bode
New submission from Emil Bode : Initializing/creating a new set with an empty string via the set-command returns an empty set instead of set with the empty string. As in: While set('somestring') gives me a set of size one, set('') gives me an empty set (of size zero), just as set() would do

Re: Announcing config-path an OS independent configuration file paths

2019-09-30 Thread Paul Moore
On Mon, 30 Sep 2019 at 15:51, Barry Scott wrote: > > > On 30 Sep 2019, at 14:17, Paul Moore wrote: > > > > How does this compare to the existing appdirs module on PyPI? > > > > I did not know about appdirs. Fair enough ;-) > It does not seem to have separate read vs. save paths. > Required for

[issue38324] [Windows] test_locale and test__locale failures on Windows

2019-09-30 Thread Steve Dower
Steve Dower added the comment: This is a known issue (forgetting the number right now) - Linux-style locales don't work on Windows, and so there's a normalization function that has to be completely rewritten. Also, since these seem to be on your own machine, I'm guessing your locale is not

[issue35360] Update SQLite to 3.28 in Windows and macOS installer builds

2019-09-30 Thread Steve Dower
Steve Dower added the comment: Please file a new issue -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: Announcing config-path an OS independent configuration file paths

2019-09-30 Thread Barry Scott
> On 30 Sep 2019, at 14:17, Paul Moore wrote: > > How does this compare to the existing appdirs module on PyPI? > I did not know about appdirs. It does not seem to have separate read vs. save paths. Required for XDG specification where a path of config folder is defined. On 1st run the

[issue38322] Azure Pipelines: appx tests fail: init_fs_encoding: failed to get the Python codec of the filesystem encoding

2019-09-30 Thread Steve Dower
Steve Dower added the comment: The bug was probably exposed due to a change in path initialization (there's been a few changes here recently ;) ) that stopped normalising prefix. You can see that sys.executable in your dumped path has additional "." in the path, and that's never been the

[issue38326] Concerns with the last minute changes to the PEP 587 API

2019-09-30 Thread Steve Dower
Steve Dower added the comment: (Continuing from the email thread, so read that for context if you haven't) Binary compatibility of an embedding-only struct is totally unnecessary, as posted on the thread. There's no feasible way to embed cross-Python versions on any platform, so we should

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread STINNER Victor
STINNER Victor added the comment: > 2019-09-30 14:41:36 lukasz.langaset priority: release blocker Why setting it back to release blocker? As far as I recall, this issue is not a Python 3.8 regression. The regression which triggered this old and existing bug has been fixed, see

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-30 Thread Łukasz Langa
Change by Łukasz Langa : -- priority: -> release blocker ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38248] inconsistency in asyncio.Task between cancellation while running vs. cancellation immediately after it finishes

2019-09-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset efe74b6369a8d08f27c69703fcc1686966e51068 by Victor Stinner in branch 'master': bpo-38321: Fix _asynciomodule.c compiler warning (GH-16493) https://github.com/python/cpython/commit/efe74b6369a8d08f27c69703fcc1686966e51068 -- nosy:

[issue38321] Compiler warnings when building Python 3.8

2019-09-30 Thread STINNER Victor
STINNER Victor added the comment: New changeset efe74b6369a8d08f27c69703fcc1686966e51068 by Victor Stinner in branch 'master': bpo-38321: Fix _asynciomodule.c compiler warning (GH-16493) https://github.com/python/cpython/commit/efe74b6369a8d08f27c69703fcc1686966e51068 --

[issue38326] Concerns with the last minute changes to the PEP 587 API

2019-09-30 Thread Nick Coghlan
Nick Coghlan added the comment: (I'm currently working a PR for this that Victor can review) -- assignee: -> ncoghlan ___ Python tracker ___

  1   2   >