[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-12-11 Thread Kyle Stanley
Change by Kyle Stanley : -- pull_requests: +17051 pull_request: https://github.com/python/cpython/pull/17577 ___ Python tracker ___

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-12-11 Thread Kyle Stanley
Kyle Stanley added the comment: > One more resource warning about unclosed resource being garbage collected. As > per the other tests I think transport and protocol need to be closed as per > below patch but someone can verify if it's the right approach. Ah, good catch. It's not needed when

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-12-11 Thread Kyle Stanley
Kyle Stanley added the comment: > I'll fix them accordingly and open a new PR (as well as the backports). Nevermind. Upon further inspection, the other occurrences of `reuse_address=` were for create_server(), not create_datagram_endpoint(). The PR will only include the removal of the two

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-12-11 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-12-11 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: One more resource warning about unclosed resource being garbage collected. As per the other tests I think transport and protocol need to be closed as per below patch but someone can verify if it's the right approach. ./python.exe -X tracemalloc

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-12-11 Thread Kyle Stanley
Kyle Stanley added the comment: > or left an outdated test somewhere that explicitly sets `reuse_address=False` Looks like this was the issue, I left a `reuse_address=False` in both test_create_datagram_endpoint_nosoreuseport and test_create_datagram_endpoint_ip_addr. I fixed it locally on

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Chris Angelico
On Thu, Dec 12, 2019 at 1:33 PM Daniel Haude wrote: > > Am 10.12.2019 22:29 schrieb Chris Angelico: > > > And once again, you are maintaining your assumptions despite being > > very clearly shown that they are wrong. "del instance" does not > > directly call __del__ any more than "instance = 1"

[issue39028] ENH: Fix performance issue in keyword extraction

2019-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please provide benchmarks which demonstrate the performance issue? -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue36054] On Linux, os.count() should read cgroup cpu.shares and cpu.cfs (CPU count inside docker container)

2019-12-11 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +inada.naoki ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Greg Ewing
On 12/12/19 2:17 pm, Python wrote: I was very impressed back in the day when the with statement and context manager protocol appeared in Python. I've always wondered from what language(s) it was borrowed from It was partly inspired by the RAII pattern often used in C++, but as far as I know,

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-12-11 Thread Kyle Stanley
Kyle Stanley added the comment: > The fix seems to generate few DeprecationWarning while running test suite > with -Wall. Thanks Karthikeyan, I'm guessing that I missed an assertWarns() or left an outdated test somewhere that explicitly sets `reuse_address=False` (since

[issue37228] UDP sockets created by create_datagram_endpoint() allow by default multiple processes to bind the same port

2019-12-11 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: The fix seems to generate few DeprecationWarning while running test suite with -Wall. ➜ cpython git:(master) git checkout ab513a38c98695f271e448fe2cb7c5e39eef~1 Lib/asyncio Updated 1 path from 4fb4056fbc ➜ cpython git:(master) ✗ ./python.exe

[issue37701] shutil.copyfile raises SpecialFileError for symlink to fifo

2019-12-11 Thread Ashley Whetter
Change by Ashley Whetter : -- keywords: +patch pull_requests: +17050 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16575 ___ Python tracker ___

[issue39028] ENH: Fix performance issue in keyword extraction

2019-12-11 Thread Sebastian Berg
New submission from Sebastian Berg : The keyword argument extraction/finding function seems to have a performance bug/enhancement (unless I am missing something here). It reads: ``` for (i=0; i < nkwargs; i++) { PyObject *kwname = PyTuple_GET_ITEM(kwnames, i); /*

[issue39028] ENH: Fix performance issue in keyword extraction

2019-12-11 Thread Sebastian Berg
Change by Sebastian Berg : -- keywords: +patch pull_requests: +17049 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17576 ___ Python tracker ___

[issue38921] Max Recursion Depth Reached in Logging Library

2019-12-11 Thread Joy
Joy added the comment: Yes, still working on a script for this bug. -- status: pending -> open ___ Python tracker ___ ___

Re: Extract all words between two keywords in .txt file (Python)

2019-12-11 Thread A S
On Thursday, 12 December 2019 04:55:46 UTC+8, Joel Goldstick wrote: > On Wed, Dec 11, 2019 at 1:31 PM Ben Bacarisse wrote: > > > > A S writes: > > > > > I would like to extract all words within specific keywords in a .txt > > > file. For the keywords, there is a starting keyword of "PROC SQL;"

Re: Extract all words between two keywords in .txt file (Python)

2019-12-11 Thread A S
On Thursday, 12 December 2019 02:28:09 UTC+8, Ben Bacarisse wrote: > A S writes: > > > I would like to extract all words within specific keywords in a .txt > > file. For the keywords, there is a starting keyword of "PROC SQL;" (I > > need this to be case insensitive) and the ending keyword

Re: Python3 - How do I import a class from another file

2019-12-11 Thread musbur
On Tue, 10 Dec 2019 22:08:48 +0100 "R.Wieser" wrote: > And although you have been fighting me over when the __del__ method is > called, it /is/ called directly as a result of an "del instance" and > the refcount goes zero. There is /no/ delay.(with the only > exception is when a circular

Extract all words between two keywords in .txt file (Python)

2019-12-11 Thread A S
I would like to extract all words within specific keywords in a .txt file. For the keywords, there is a starting keyword of "PROC SQL;" (I need this to be case insensitive) and the ending keyword could be either "RUN;", "quit;" or "QUIT;". This is my sample .txt file. Thus far, this is my

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Daniel Haude
Am 10.12.2019 22:29 schrieb Chris Angelico: And once again, you are maintaining your assumptions despite being very clearly shown that they are wrong. "del instance" does not directly call __del__ any more than "instance = 1" does. You HAVE been shown. Much of the confusion in this thread

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Python
Greg Ewing wrote: ... You deal with it by not relying on __del__ for anything that needs to be done promptly. There are always alternatives: e.g. file objects have a close() method, and the "with" statement was invented to make it easy to do these kinds of things properly. By the way, I was

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Greg Ewing
On 12/12/19 3:50 am, R.Wieser wrote: I was rather clear about what my used version of Python was-and-is. I have no idea why that was ignored. :-( I think we've all been talking at cross purposes for a while. What I meant to say originally was that you were relying on an implementation detail

[RELEASE] Python 3.7.6rc1 and 3.6.10rc1 are now available for testing

2019-12-11 Thread Ned Deily
Details here: https://discuss.python.org/t/python-3-7-6rc1-and-3-6-10rc1-are-now-available-for-testing/2835 https://www.python.org/downloads/release/python-376rc1/ https://www.python.org/downloads/release/python-3610rc1/ -- Ned Deily n...@python.org -- [] -- Python-announce-list mailing

[issue39001] possible problem with 64-bit mingw DECREF

2019-12-11 Thread Dave Lawrence
Dave Lawrence added the comment: traced to be a duplicate of https://bugs.python.org/issue28267 -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[RELEASE] Python 3.7.6rc1 and 3.6.10rc1 are now available for testing

2019-12-11 Thread Ned Deily
Details here: https://discuss.python.org/t/python-3-7-6rc1-and-3-6-10rc1-are-now-available-for-testing/2835 https://www.python.org/downloads/release/python-376rc1/ https://www.python.org/downloads/release/python-3610rc1/ -- Ned Deily n...@python.org -- [] --

[issue39016] Negative Refcount in Python 3.8

2019-12-11 Thread Christian Tismer
Change by Christian Tismer : -- resolution: -> not a bug status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue39016] Negative Refcount in Python 3.8

2019-12-11 Thread Christian Tismer
Change by Christian Tismer : -- stage: patch review -> resolved ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39016] Negative Refcount in Python 3.8

2019-12-11 Thread Christian Tismer
Christian Tismer added the comment: Sorry, I believe I was wrong and lookup_maybe_method does not return a borrowed reference. _PyType_Lookup does and I was confused. Closing that for now. -- ___ Python tracker

[issue39001] possible problem with 64-bit mingw DECREF

2019-12-11 Thread Dave Lawrence
Dave Lawrence added the comment: by redefinining the Py_DECREF macro in my application: #define Py_DECREF(op) do { if (--op->ob_refcnt == 0) fprintf(stderr, "DECREF %s %d %p %d %s %p\n", __FILE__, __LINE__, op, Py_SIZE(op), Py_TYPE(op)->tp_name,Py_TYPE(op)->tp_dealloc ); fflush(stderr); }

[issue38999] Python launcher on Windows does not detect active venv

2019-12-11 Thread Steve Dower
Steve Dower added the comment: > This makes it simple for users to intervene via the PATH (which is the whole > point of /usr/bin/env) and launch whatever they want. That's one point of view, but the other is that the whole point of the shebang line is for users to be able to run the script

[issue39027] run_coroutine_threadsafe uses wrong TimeoutError

2019-12-11 Thread janust
New submission from janust : https://docs.python.org/3.8/library/asyncio-task.html#asyncio.run_coroutine_threadsafe has a code example that catches a asyncio.TimeoutError from run_coroutine_threadsafe. In Python 3.7, this exception was equal to concurrent.futures.TimeoutError, but since

Re: Python3 - How do I import a class from another file

2019-12-11 Thread musbur
On Tue, 10 Dec 2019 14:56:10 -0500 Dennis Lee Bieber wrote: > > It is called when the language IMPLEMENTATION decides to call > it. That time is not specified in the language description/reference > manual. Yes it is: "Note: del x doesn’t directly call x.__del__() — the former

[issue38614] Add timeout constants to test.support

2019-12-11 Thread STINNER Victor
STINNER Victor added the comment: I'm not sure about backporting the new timeout constants of test.support to Python 3.7 and 3.8. Backporting all changes may help to make tests more stable in 3.7 and 3.7 branches. It should also help to backport test changes from master to 3.7 and 3.8. But

[issue38614] Add timeout constants to test.support

2019-12-11 Thread STINNER Victor
Change by STINNER Victor : -- title: test_asyncio: test_communicate() failed on AMD64 FreeBSD Shared 3.8 -> Add timeout constants to test.support ___ Python tracker ___

[issue38614] test_asyncio: test_communicate() failed on AMD64 FreeBSD Shared 3.8

2019-12-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset 7772b1af5ebc9d72d0cfc8332aea6b2143eafa27 by Victor Stinner in branch 'master': bpo-38614: Use support timeout constants (GH-17572) https://github.com/python/cpython/commit/7772b1af5ebc9d72d0cfc8332aea6b2143eafa27 --

Re: Extract all words between two keywords in .txt file (Python)

2019-12-11 Thread Joel Goldstick
On Wed, Dec 11, 2019 at 1:31 PM Ben Bacarisse wrote: > > A S writes: > > > I would like to extract all words within specific keywords in a .txt > > file. For the keywords, there is a starting keyword of "PROC SQL;" (I > > need this to be case insensitive) and the ending keyword could be > >

Re: datetime gotcha

2019-12-11 Thread Skip Montanaro
> Why is a dtm instance also an instance of dt? The datetime type is, in fact, a subclass of the date type: >>> import datetime >>> datetime.date.__bases__ (,) >>> datetime.datetime.__bases__ (,) >>> datetime.time.__bases__ (,) Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Roel Schroeven
R.Wieser schreef op 11/12/2019 om 11:43:> MRAB, > >> From the help: > ... >> Do not depend on immediate finalization of objects when they become >> unreachable (so you should always close files explicitly). > > Do you notice there is not a single word about (the delayed action of) the >

[issue33762] Make tempfiles subclass IOBase

2019-12-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Looking at the tempfile code more, I agree with Serhiy that changing it should be rejected. Python is a duck-typed language (essentially what Martin said). People should not be over-zealous in using instance checks. The doc specifically says that

[issue38999] Python launcher on Windows does not detect active venv

2019-12-11 Thread Alexandros Karypidis
Alexandros Karypidis added the comment: My suggestion to gradually fall back from most specific to least specific version, was an attempt to reconcile the input from various viewpoints. I think that ideally the behaviour should be as close to UNIX as possible. This means that it should just

[issue38860] GenericPyCData_new does not invoke new or init

2019-12-11 Thread Justin Capella
Justin Capella added the comment: It might make sense that CSimpleData types do not call init, which makes sense for _fields_ but it doesn't make sense to offer subclassing (of Structure) and not use the subclass, instead creating a type of the same name. That test case is bugged, missing

Re: Extract all words between two keywords in .txt file (Python)

2019-12-11 Thread Ben Bacarisse
A S writes: > I would like to extract all words within specific keywords in a .txt > file. For the keywords, there is a starting keyword of "PROC SQL;" (I > need this to be case insensitive) and the ending keyword could be > either "RUN;", "quit;" or "QUIT;". This is my sample .txt file. > >

[issue28254] Add C API for gc.enable, gc.disable, and gc.isenabled

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

[issue39016] Negative Refcount in Python 3.8

2019-12-11 Thread Petr Viktorin
Petr Viktorin added the comment: Thanks! (note: unfortunately I'll probably not have time for CPython until next week, but further investigation is on my list.) -- ___ Python tracker

[issue39016] Negative Refcount in Python 3.8

2019-12-11 Thread Christian Tismer
Christian Tismer added the comment: On 11.12.19 17:37, Petr Viktorin wrote: > > Petr Viktorin added the comment: > > The goal now should be to find a reasonably small reproducer. > > I'm trying to compile PySide to see what it does, but it's a big project and > I'm a bit lost. >

[issue36225] Lingering subinterpreters should be implicitly cleared on shutdown

2019-12-11 Thread Lewis Gaul
Change by Lewis Gaul : -- pull_requests: +17048 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17575 ___ Python tracker ___

[issue39025] Windows Python Launcher does not update PATH to Scripts directory

2019-12-11 Thread Steve Dower
Steve Dower added the comment: > Create a pyscript launcher, which would work like py but would take as > command-line the name of the script to run ... This is spelled "py [-x.y] -m [script]", but it's up to the libraries to support it. We can't force them to do it. > Let py execute a

[issue39025] Windows Python Launcher does not update PATH to Scripts directory

2019-12-11 Thread Steve Dower
Steve Dower added the comment: > Moreover, some of these C++ exectuables depends on DLL which are only in the > Scripts directory and it might not work. In this case, perhaps these tools should be in a separate directory? A simple .py script could be added to Scripts that works with "-m"

[issue1021318] PyThreadState_Next not thread safe

2019-12-11 Thread Mark Lawrence
Change by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39016] Negative Refcount in Python 3.8

2019-12-11 Thread Petr Viktorin
Petr Viktorin added the comment: The goal now should be to find a reasonably small reproducer. I'm trying to compile PySide to see what it does, but it's a big project and I'm a bit lost. Christian, you said in an e-mail that you have a workaround -- unsetting the

[issue1438480] shutil.move raises OSError when copystat fails

2019-12-11 Thread Eshan Singhal
Eshan Singhal added the comment: Amending shutil.copy and shutil.copy2 to expose a method of ignoring the permission errors rather than changing the current behaviour would not fix the original issue without further changes in consumers of these functions to pass through the new parameter

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Musbur
Am 11.12.2019 11:22 schrieb R.Wieser: I think I will just go out on a limb and just assume that the __del__ method /will/ be called as part of a "del instance" request causing the reference count to reach zero (directly or indirectly), before the next command is executed [...]. That's what

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Musbur
Am 11.12.2019 11:01 schrieb Greg Ewing: On 11/12/19 7:47 am, R.Wieser wrote: what happens when the reference becomes zero: is the __del__ method called directly (as I find logical), or is it only called when the garbage collector actually removes the instance from memory (which Chris thinks

[issue39026] pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure

2019-12-11 Thread Gaige Paulsen
Gaige Paulsen added the comment: I should have been more specific. Sorry about that. Yes, when including in Xcode, incorporating the framework. In particular, I'm embedding 3.8 in an application (previously used the system Framework, which was 2.7, which worked but Apple has warned that it

Re: Python3 - How do I import a class from another file

2019-12-11 Thread R.Wieser
Chris, > Yes, we know exactly how that's solved, Nice. > but you specifically said you weren't interested in learning. Try taking a few courses of "understanding what you read". That is /not/ what I said. Though it goes in par with your amadant "you're wrong" chanting, even if there is at

[issue39016] Negative Refcount in Python 3.8

2019-12-11 Thread Christian Tismer
Christian Tismer added the comment: On 11.12.19 14:13, Petr Viktorin wrote: > > Petr Viktorin added the comment: > > lookup_maybe_method should not return a borrowed reference. It increfs its > return value. At second sight, this seems to be true. No idea why I was so convinced. Need to

[issue39026] pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure

2019-12-11 Thread Ronald Oussoren
Ronald Oussoren added the comment: In what way does it not work when using a framework build? Is this when you add the python framework to an (Xcode) project and include the main python header using "#include "? -- ___ Python tracker

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Arjun pazhanikumar
You could write the name of the class variable you want to import for example class manager On December 10, 2019, at 2:46 AM, Dennis Lee Bieber wrote: On Mon, 9 Dec 2019 20:21:39 +0100, "R.Wieser" declaimed the following: > >And than when the instance is deleted the binding to the class is

[issue39026] pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure

2019-12-11 Thread Gaige Paulsen
New submission from Gaige Paulsen : The cpython/pystate.h includes cpython/initconfig.h using the relative path "cpython/initconfig.h", which probably works fine if your include path explicitly contains the top of the python directory, however when developing with a framework in macOS, the

[issue39026] pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure

2019-12-11 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38860] GenericPyCData_new does not invoke new or init

2019-12-11 Thread Rebecca Morgan
Rebecca Morgan added the comment: Looking at the test case 'test_from_buffer_copy' here: https://github.com/python/cpython/blob/master/Lib/ctypes/test/test_frombuffer.py This suggests the failure to call init in this instance is expected behavior (similarly for from_buffer), unlike e.g. the

Re: Python3 - How do I import a class from another file

2019-12-11 Thread R.Wieser
Bev, > You acknowledge that you are new to Python, yet you claimed > to know better than Python experts. You claim you want an answer > and yet you purposefully ignored their response because it didn't match > what you wanted to hear. No, I didn't. I just pointed out that their position simply

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Chris Angelico
On Thu, Dec 12, 2019 at 1:56 AM R.Wieser wrote: > A question though: I have brought up that a delayed calling of the __del__ > method could/would most likely cause race problems. Do you have any idea > how thats solved in environents like Jython ? Yes, we know exactly how that's solved, but you

[issue38860] GenericPyCData_new does not invoke new or init

2019-12-11 Thread Lewis Gaul
Change by Lewis Gaul : -- nosy: +LewisGaul, aeros ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: Python3 - How do I import a class from another file

2019-12-11 Thread R.Wieser
Greg, > In CPython, these are the same thing. As soon as the reference > count becomes zero, the __del__ method is called That is what I assumed (the logical thing to do). > *and* the object is removed from memory. Which sounds reasonable too, especially in regard to the instances variables

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Rhodri James
On 11/12/2019 14:17, Musbur wrote: Am 10.12.2019 22:33 schrieb Paul Moore: You do understand that the reference counting garbage collector is an implementation detail of the CPython implementation *only*, don't you? I don't think that's true. Here's a sentonce from near the top of the "gc"

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Musbur
Am 10.12.2019 22:33 schrieb Paul Moore: You do understand that the reference counting garbage collector is an implementation detail of the CPython implementation *only*, don't you? I don't think that's true. Here's a sentonce from near the top of the "gc" module documentation of Python 3:

Re: Python3 - How do I import a class from another file

2019-12-11 Thread R.Wieser
Antoon, > There is a difference between not understanding why things are as > you are told, and assuming because you don't understand, what you > are told is wrong. The other side is you guys, expecting from me that, even though I appearantly do not understand it, just take whatever has being

[issue39025] Windows Python Launcher does not update PATH to Scripts directory

2019-12-11 Thread Bluebird
Bluebird added the comment: Thanks for the quick feedback. I agree that it makes sense for python modules to support -m. However, PyQt comes with many executables originally written in C++ for Qt (designer, assistant). It feels a bit strange to add a module with that name, just for the

[issue10915] Make the PyGILState API compatible with multiple interpreters

2019-12-11 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-1021318: "PyThreadState_Next not thread safe". -- ___ Python tracker ___ ___

[issue1021318] PyThreadState_Next not thread safe

2019-12-11 Thread STINNER Victor
STINNER Victor added the comment: I'm not sure of what is the best approach. Currently, bpo-10915 is blocking different projects: "Make the PyGILState API compatible with multiple interpreters". We may have to fix this API first, and clarify the scope of the different locks. --

[issue1021318] PyThreadState_Next not thread safe

2019-12-11 Thread Julien Danjou
Julien Danjou added the comment: Victor, do you have an idea of how you would like this mutex to be exposed? I see it only recently changed in Python 3.7 to be part of a structure, though this structure is not public AFAIU. Is adding 2 new lock/unlock C functions good enough? --

Re: Python3 - How do I import a class from another file

2019-12-11 Thread R.Wieser
Michael, > It's a two-way street. It's hard to teach someone that won't be taught. Whacking a student over the head because he doesn't understand has never helped the student*. So, stop whacking and start /teaching/. Like thinking of examples that could show the student where he goes

Re: Python3 - How do I import a class from another file

2019-12-11 Thread R.Wieser
Michael, > You said it by implication. > > quote: "And as I do not think the designers of the language where that > stupid I must therefore reject your claim to what you think happens." I suggest you try reading that again, and imagine it being two centences, the first ending after "stupid"

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Bev In TX
> On Dec 11, 2019, at 6:09 AM, R.Wieser wrote: > > Paul, > >> You do understand that the reference counting garbage collector is an >> implementation detail of the CPython implementation *only*, don't you? > > No, I don't. But do tell how that matters to me. > >> there can be an indefinite

[issue39016] Negative Refcount in Python 3.8

2019-12-11 Thread Petr Viktorin
Petr Viktorin added the comment: lookup_maybe_method should not return a borrowed reference. It increfs its return value. -- nosy: +petr.viktorin ___ Python tracker ___

[issue39025] Windows Python Launcher does not update PATH to Scripts directory

2019-12-11 Thread Paul Moore
Paul Moore added the comment: Most items in the Scripts directory can be run using the `-m` flag to Python, so you can use something like `py -m pip` to run pip without needing the Scripts directory in PATH. If an individual project like PyQt doesn't support -m, it's relatively easy for

Re: Python3 - How do I import a class from another file

2019-12-11 Thread R.Wieser
MRAB, > You don't "del" an instance, you "del" a reference, which might be in the > form of a name in a namespace. Remember me, the newbie to the language ? Did you understand what I tried to to say ? Good. Thats al that matters. > When the instance is collected, whenever that happens to

[issue28866] Type cache is not correctly invalidated on a class defining mro()

2019-12-11 Thread Petr Viktorin
Petr Viktorin added the comment: Steve, I would like to add your reproducer (weird.py) to CPython's test suite, to make sure this doesn't happen again. Would you be willing to sign the contributor agreement, so we can use your code in Python? The instructions are here:

[issue28866] Type cache is not correctly invalidated on a class defining mro()

2019-12-11 Thread Petr Viktorin
Change by Petr Viktorin : -- pull_requests: +17047 pull_request: https://github.com/python/cpython/pull/17573 ___ Python tracker ___

Re: Python3 - How do I import a class from another file

2019-12-11 Thread R.Wieser
Paul, > You do understand that the reference counting garbage collector is an > implementation detail of the CPython implementation *only*, don't you? No, I don't. But do tell how that matters to me. > there can be an indefinite delay between the last reference to > a value being lost and the

[issue28866] Type cache is not correctly invalidated on a class defining mro()

2019-12-11 Thread Petr Viktorin
Petr Viktorin added the comment: A refcount problem possibly caused by the fix: https://bugs.python.org/issue39016 -- nosy: +petr.viktorin ___ Python tracker ___

[issue39025] Windows Python Launcher does not update PATH to Scripts directory

2019-12-11 Thread Bluebird
New submission from Bluebird : The py Python launcher is a great improvement over a few years ago when managing multiple Python installation was tedious. However, it does not solve one annoying problem: the Scripts directory. If you install tools like mypy, pyqt-tools or pyinstaller, to be

Re: Python3 - How do I import a class from another file

2019-12-11 Thread R.Wieser
MRAB, > From the help: ... > Do not depend on immediate finalization of objects when they become > unreachable (so you should always close files explicitly). Do you notice there is not a single word about (the delayed action of) the __del__ method in there ? Why than do you think its talking

Re: Python3 - How do I import a class from another file

2019-12-11 Thread R.Wieser
Dennis, This is the first time I've seen you post FUD. :-(( > It is called when the language IMPLEMENTATION decides to call it. > That time is not specified in the language description/reference manual. I'm rather sure it neither specifies that for any of the other commands. Does that mean

[issue38614] test_asyncio: test_communicate() failed on AMD64 FreeBSD Shared 3.8

2019-12-11 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17046 pull_request: https://github.com/python/cpython/pull/17572 ___ Python tracker ___

[issue38614] test_asyncio: test_communicate() failed on AMD64 FreeBSD Shared 3.8

2019-12-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset 0d63bacefd2e5b937ec6b0ec3053777c09941b4a by Victor Stinner in branch 'master': bpo-38614: Use test.support.SHORT_TIMEOUT constant (GH-17566) https://github.com/python/cpython/commit/0d63bacefd2e5b937ec6b0ec3053777c09941b4a --

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Greg Ewing
On 11/12/19 7:47 am, R.Wieser wrote: what happens when the reference becomes zero: is the __del__ method called directly (as I find logical), or is it only called when the garbage collector actually removes the instance from memory (which Chris thinks what happens) ? In CPython, these are the

[issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range

2019-12-11 Thread Ben Brown
Change by Ben Brown : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

Re: Python3 - How do I import a class from another file

2019-12-11 Thread Antoon Pardon
On 10/12/19 22:24, R.Wieser wrote: > Roel, > >> Rudy, unless/until you know the language inside out, you'd better listen >> to Chris and other people here who spend a lot of time and effort in >> helping people like you. > I tried. But what he said made no sense to me, and no matter how hard I