[issue40841] Provide mimetypes.sniff API as stdlib

2020-10-23 Thread Dong-hee Na


Dong-hee Na  added the comment:

@gvanrossum, @taleinat

I've already provided the mimesniffing through PyPI ;)
https://pypi.org/project/mimesniff/

The interface is similar to imghdr.what :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38523] ignore_dangling_symlinks in shutil.copytree does not apply recursively

2020-10-23 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
nosy: +ZackerySpytz
nosy_count: 1.0 -> 2.0
pull_requests: +21857
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/22937

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42139] Synchronize What's New in 3.9 master and 3.9

2020-10-23 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42139] Synchronize What's New in 3.9 master and 3.9

2020-10-23 Thread Guido van Rossum


Guido van Rossum  added the comment:

Never mind, I read the diff backwards. You're all good and you can close this.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42139] Synchronize What's New in 3.9 master and 3.9

2020-10-23 Thread Guido van Rossum


Guido van Rossum  added the comment:

You also need to forward-port https://bugs.python.org/issue41950.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42138] Forward port Doc/whatsnew/3.9.rst to master

2020-10-23 Thread Guido van Rossum


Guido van Rossum  added the comment:

Terry did the same thing in https://bugs.python.org/issue42139.

--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42139] Synchronize What's New in 3.9 master and 3.9

2020-10-23 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 805ef73ad0ac4a77f3764dd17dfc959d562ce627 by Terry Jan Reedy in 
branch 'master':
bpo-42139: Update What's New 3.9 for master (#22936)
https://github.com/python/cpython/commit/805ef73ad0ac4a77f3764dd17dfc959d562ce627


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42070] Revisit IsoCalendarDate being private from pickle perspective

2020-10-23 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

If this point I suggest asking on pydev, maybe after you think more about how 
you want it to be for the next decade.

If the behavior is intentional and the doc says nothing, one might consider the 
behavior the 'document'.  Hence deprecation might be needed.  Too bad the API 
was not labelled 'provisional'.

If not being documented is what lead to the SO question, then it probably 
should be documented.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42139] Synchronize What's New in 3.9 master and 3.9

2020-10-23 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +21856
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/22936

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41950] Typo in Python 3.9 what's new page

2020-10-23 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

See #42139

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42139] Synchronize What's New in 3.9 master and 3.9

2020-10-23 Thread Terry J. Reedy


New submission from Terry J. Reedy :

Continuation of #41808, #41950, 9cf6752276e6fcfd0c23fdb064ad27f448aaaf75 
(Langa, no diff).

Attached is a current diff (about 1/2 hour ago).  It appears to be all or 
almost all Langa's release edits in 9cf6752276e6fcfd0c23fdb064ad27f448aaaf75.  
The important point is that all the +s are for the 3.9 version.  So the files 
can be synchronized easily by copying the 3.9 copy to master (each with 
separate workspaces).  I will re-update first to make sure to catch the changes 
in #41950.

--
files: whatnew39-master-to-39.diff
keywords: patch
messages: 379513
nosy: gvanrossum, lukasz.langa, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Synchronize What's New in 3.9 master and 3.9
versions: Python 3.10
Added file: https://bugs.python.org/file49538/whatnew39-master-to-39.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35181] Doc: Namespace Packages: Inconsistent documentation of __loader__ being None

2020-10-23 Thread Géry

Géry  added the comment:

Thanks @barry for reviewing and merging PR 15190

> I haven't merged PR 10016, but I left some additional comments.  Are you 
> still interested in shepherding this PR?

Also thanks for helping me with @ericsnowcurrently advancing this last PR. Yes 
I am still interested, I have reviewed all the comments and updated the whole 
thing, doing my best to keep the two descriptions of the module attributes and 
spec attributes consistent since this PEP updates both descriptions.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: GUI (tkinter) popularity and job prospects for

2020-10-23 Thread Terry Reedy

On 10/23/2020 12:52 PM, John Pote wrote:


On 23/10/2020 05:47, Grant Edwards wrote:



I think that commercial desktop applications with a python
compatible GUI would likely use QT or a Python binding thereof.

Agreed. If you want to improve you "hirability" for GUI application
development, I would probably put Qt first.  Then gobject or
wx. Tkinter would probably be last.


I've used tkinter and wxPython occasionally in the past for 1 off test 
tasks (and interest). What's the advantage of Qt?


For you usage, perhaps None.  Qt is an *application* framework that 
includes a GUI module likely bigger than tkinter.  Its non-GUI parts 
replace things other than tkinter in the stdlib or on pypi.


--
Terry Jan Reedy


--
https://mail.python.org/mailman/listinfo/python-list


[issue35823] Use vfork() in subprocess on Linux

2020-10-23 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Thank you for taking this on!  I'm calling it fixed for now as the buildbots 
are looking happy with it.  If issues with it arise we can address them.

--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2020-10-23 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset c17f63fae57dc02e78bd6931b8fb6c6c2f9d4d81 by Miss Skeleton (bot) 
in branch '3.9':
bpo-19072: Update descriptor howto for decorator chaining (GH-22934) (GH-22935)
https://github.com/python/cpython/commit/c17f63fae57dc02e78bd6931b8fb6c6c2f9d4d81


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2020-10-23 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 8e5b0fdce337ef0a1f4f38b31a8c6b66c56b16d2 by Raymond Hettinger in 
branch 'master':
bpo-19072: Update descriptor howto for decorator chaining (GH-22934)
https://github.com/python/cpython/commit/8e5b0fdce337ef0a1f4f38b31a8c6b66c56b16d2


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2020-10-23 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 9.0 -> 10.0
pull_requests: +21855
pull_request: https://github.com/python/cpython/pull/22935

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42123] Run parser twice; enable invalid_* rules only on the second run

2020-10-23 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Since I do a lot of interactive compiling, I appreciate faster feedback.  How 
much will the slowdown be on errors?

--
nosy: +terry.reedy
title: Run the two times, only enable invalid_* rules on the second run -> Run 
parser twice; enable invalid_* rules only on the second run

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35823] Use vfork() in subprocess on Linux

2020-10-23 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

> * To avoid repeating long parameter lists in several functions, we can move 
> them to a struct. The downside is that we'd need to convert child_exec() to 
> use that struct all over the place. I don't have a strong preference here.

Agreed that the long parameter lists are annoying.  I don't like shoving that 
much on the stack and by adding an additional call with so many params we've 
increase stack usage.  I consider this refactoring work that can be done on its 
own outside of this issue though.

> * Are any documentation changes needed? We don't change any interfaces, so 
> I'm not sure.

I don't think so.  I looked things over and I think all that is needed is the 
existing Misc/NEWS entry.

> Potential future directions:
> 
> * If desired, a vfork() opt-out may be implemented. But it'd need to disable 
> posix_spawn() on Linux as well, since it might be implemented via vfork(), 
> and we have no good way to check that.

We have such an opt-out capabilty for posix_spawn via 
`subprocess._USE_POSIX_SPAWN` 
https://github.com/python/cpython/blob/master/Lib/subprocess.py#L651
along with code in there that determines the default value based on the 
detected runtime environment.

I'm not sure we'll need that for vfork() as it seems to pretty much be a low 
level raw system call wrapper rather than something to be implemented via libc 
that can have its own bugs.  If we do wind up wanting one, I'd structure it the 
same way.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2020-10-23 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
pull_requests: +21854
pull_request: https://github.com/python/cpython/pull/22934

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38953] Untokenize and retokenize does not round-trip

2020-10-23 Thread Zac Hatfield-Dodds


Zac Hatfield-Dodds  added the comment:

Thanks for your comments Terry - I'm delighted that it's useful.  It's been a 
while since I wrote that, and entirely possible that it's just a typo.

Hypothesis does indeed support unittest, including for multiple-failure 
reporting and so on. 
 You can see my unittest implementation of the tokenise tests at 
https://github.com/Zac-HD/stdlib-property-tests/blob/b5ef97f9e7fd1b0e7a028823e436f78f374cf0dc/tests/test_source_code.py#L87-L133

Subtests are a little tricky, because the default interaction is to store the 
subtests for *all* test cases generated by Hypothesis.  We therefore 
monkeypatch it to a no-op, but more sophisticated handling is almost certainly 
possible.  More generally, when using Hypothesis I would usually ask @given for 
single inputs and call the test method; which replaces the usual loop over a 
list of inputs with subTest.

An iterator interface is not available because in general (see e.g. 
`hypothesis.strategies.data()` or stateful testing) it is not possible to 
separate data generation from test execution, and also because Hypothesis uses 
feedback from previous inputs in deciding what to generate.  Instead of "for 
testcase in testcases: with subTest: ...", I'd write "@given(testcase=...) def 
test_foo(self, testcase): ...".


I've sent you an email for the other conversation.  (anyone else interested is 
invited to get in touch via zhd.dev :-))

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42121] unable to input certain Unicode characters in Text widget

2020-10-23 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I am closing this because I am rather sure that your problem is with your input 
method and its interaction with your OS and the tcl/tk GUI framework.  Tkinter 
has essentially nothing to do with key and mouse input.

A better place to ask for debugging help is 
https://mail.python.org/mailman/listinfo/python-list.  If you post there, 
include your OS.

For testing tkinter, you should input with keys, using the unicode escaped 
codes: '\u' for BMP chars, and '\U000#' for non-BMP chars, where each # 
is a hexadecimal character.

For using tkinter, you should use a recent release, within the last year, as 
tkinter's handling of non-ASCII chars are improved a year ago.   The fix may be 
in the 3.7.9 release.

If your browser supports unicode as well as, say, Firefox does, (which is 
better than Tkinter) your input method should work with it.

BPO is for developing patches to fix and enhance the Python docs and the 
CPython implementation.  You have not yet given evidence that there is bug in 
*current* CPython.  If you do, we can reopen.

--
nosy: +terry.reedy
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35823] Use vfork() in subprocess on Linux

2020-10-23 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

now waiting to see how happy all of the buildbots are...

We currently have a `__linux__` check in the code deciding VFORK_USABLE.

>From what I can tell, vfork probably also works on macOS (darwin).

Lets let this run for a bit on Linux and it can be a separate issue to open 
vfork usage up to other platforms.

--
stage: patch review -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35823] Use vfork() in subprocess on Linux

2020-10-23 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset 976da903a746a5455998e9ca45fbc4d3ad3479d8 by Alexey Izbyshev in 
branch 'master':
bpo-35823: subprocess: Use vfork() instead of fork() on Linux when safe 
(GH-11671)
https://github.com/python/cpython/commit/976da903a746a5455998e9ca45fbc4d3ad3479d8


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42116] Inspect library ignore comments at the end of a function (inspect.getsource)

2020-10-23 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +yselivanov

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42138] Forward port Doc/whatsnew/3.9.rst to master

2020-10-23 Thread Guido van Rossum


Change by Guido van Rossum :


--
keywords: +patch
pull_requests: +21853
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/22933

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42111] Make the xxlimited module an example of best extension module practices

2020-10-23 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I would interpret the limited pydev response (1 person, whose concern you 
incorporated into your post) to indicate absence of opposition.  Given that 384 
was written by someone inactive for years, I say go ahead and submit a PR for 
review by any interested active maintainers.

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42138] Forward port Doc/whatsnew/3.9.rst to master

2020-10-23 Thread Guido van Rossum


New submission from Guido van Rossum :

We discovered in issue41950 that the whatsnew/3.9.rst files differ quite a bit 
between 3.9 and master. IIUC this is (mostly) because Lukasz made a big pass 
updating it on occasion of the 3.9.0 release, and he did that in the 3.9 branch:
https://github.com/python/cpython/commit/9cf6752276e6fcfd0c23fdb064ad27f448aaaf75#diff-ec874d66bbcf13046b9928aa3716d14a93632f568b914eba32baf46ff4c9eb36R1180

Historically we've kept these docs in sync.

For someone with a bit of git knowledge this should be a simple thing (probably 
just cp that thing into master).

--
messages: 379501
nosy: gvanrossum, lukasz.langa
priority: normal
severity: normal
status: open
title: Forward port Doc/whatsnew/3.9.rst to master
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41950] Typo in Python 3.9 what's new page

2020-10-23 Thread Guido van Rossum


Guido van Rossum  added the comment:

Thanks, merged, so closing.

I'll open a separate issue regarding the forward-porting of the 3.9 whatsnew.

--
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38953] Untokenize and retokenize does not round-trip

2020-10-23 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Zac, thank you for Hypothesmith.  I am thinking about how to maybe use it to 
test certain IDLE functions.  But your 2nd example, as posted, does not 
compile, even with 3.8.  Typo?

Thank you also for the two failure examples.  I worked on untokenize in 2013 
and an not surprised that there are still bugs.  The test assert matches the 
doc claim that the untokenize return "is guaranteed to tokenize back to match 
the input" of untokenize as far as type and string.  To get output that could 
be used to fix the bugs, I converted to unittest (and ran with 3.10).

from io import StringIO as SIO
import tokenize
import unittest

class RoundtripTest(unittest.TestCase):
def test_examples(self):
examples = ("#", "\n\\\n", "#\n\x0cpass#\n",)
for code in examples:
with self.subTest(code=code):
tokens = list(tokenize.generate_tokens(SIO(code).readline))
print(tokens)
outstring = tokenize.untokenize(tokens)  # may change 
whitespace from source
print(outstring)
output = tokenize.generate_tokens(SIO(outstring).readline)
self.assertEqual([(t.type, t.string) for t in tokens],
 [(t.type, t.string) for t in output])

unittest.main()

"#" compiles: untokenize calls add_whitespace, which failed on line 173 with
 ValueError: start (1,1) precedes previous end (2,0)
tokens = [
TokenInfo(type=60 (COMMENT), string='#', start=(1, 0), end=(1, 1), line='#'),
TokenInfo(type=61 (NL), string='', start=(1, 1), end=(1, 1), line='#'),
TokenInfo(type=4 (NEWLINE), string='', start=(1, 1), end=(1, 2), line=''),
TokenInfo(type=0 (ENDMARKER), string='', start=(2, 0), end=(2, 0), line='')]

The doc for NL, a tokenize-only token, says "Token value used to indicate a 
non-terminating newline. The NEWLINE token indicates the end of a logical line 
of Python code; NL tokens are generated when a logical line of code is 
continued over multiple physical lines."  The NL token seems to be a mistake 
here.

Calling add_whitespace also seems like a mistake.  In any case, raising on a 
valid token stream is obviously bad.


"\n\\\n" does not compile in 3.8 or 3.10.
>>> compile("\n\\\n", '', 'exec')
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 2
\
 ^
SyntaxError: unexpected EOF while parsing

generate_tokens calls _tokenize, which failed on line 521, as it should, with
tokenize.TokenError: ('EOF in multi-line statement', (3, 0))
Nothing to fix here.


"#\n\x0cpass#\n": outstring is '#\n pass#\n', which fails compile with 
IndentationError.
[(60, '#'),(61, '\n'), (1, 'pass'),(60, '#'),(4, '\n'),(0, '')] 
!= 
[(60, '#'),(61, '\n'),(5, ' '),(1, 'pass'),(60, '#'),(4, '\n'),(6, ''),(0, '')]

test_tokenize tests the roundtrip with various modules and test strings, but 
perhaps none with formfeed.  I think the bug is tokenizing 'pass' as starting 
in column 1 instead of column 0.
TokenInfo(type=1 (NAME), string='pass', start=(2, 1), end=(2, 5), 
line='\x0cpass#\n')

Formfeed = '\f' = '\x0c' is legal here precisely because it is non-space 
'whitespace' that does not advance the column counter.  In _tokenize, \f sets 
the column counter for indentation to 0.  Otherwise, there would be an 
IndentationError, as there is with the outstring.  But the string position 
ignores the indentation counter.  Either the string position must be adjusted, 
so \f is replaced with nothing, or a token for \f must be emitted so it is not 
replaced.

Tokens 5 and 6 are INDENT and DEDENT, so the latter will go away with the 
former.

What is a bit silly about untokenize is that it ignores the physical line of 
5-tuples even when present.  Another issue, along with the dreadful API.


A note could be added to 
https://docs.python.org/3/reference/lexical_analysis.html#whitespace-between-tokens
 when _tokenize is patched.
---

BPO is aimed at facilitating patches.  Other discussions are best done 
elsewhere.  But I have a quick question and comment.

Can hypothesis be integrated as is with unittest?  Does it work to decorate 
test_xyz and get a sensible report of multiple failures?  Is there now or 
possibly in the future an iterator interface, so one could write "for testcase 
in testcases:   with subTest"

About properties: your blog post 
https://github.com/Zac-HD/stdlib-property-tests pointed me to metamorphic 
testing https://www.hillelwayne.com/post/metamorphic-testing/ which lead me to 
the PDF version of "“Metamorphic Testing: A Review of Challenges and 
Opportunities”.  Most properties I have seen correspond to metamorphic 
relations.  The 'metamorphic' is broader than may be immediately obvious.  I 
would like to discuss this more on a better channel.

--
stage:  -> test needed
versions: +Python 3.10 -Python 3.8

___
Python tracker 


[issue41950] Typo in Python 3.9 what's new page

2020-10-23 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset dc33f798139016961fba33b37c792c690399b2b6 by Weiliang Li in branch 
'3.9':
bpo-41950: Typo in Python 3.9 what's new page (GH-22573)
https://github.com/python/cpython/commit/dc33f798139016961fba33b37c792c690399b2b6


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41950] Typo in Python 3.9 what's new page

2020-10-23 Thread Weiliang Li


Weiliang Li  added the comment:

Thank you, our hardworking BDFL!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42137] Raise an ImportWarning for calling module_repr() on loaders

2020-10-23 Thread Brett Cannon


Change by Brett Cannon :


--
dependencies: +[importlib] deprecate module_repr() methods

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42137] Raise an ImportWarning for calling module_repr() on loaders

2020-10-23 Thread Brett Cannon


New submission from Brett Cannon :

Once all traces of module_repr() are gone, raise an `ImportWarning` when using 
`module_repr()`.

Once this is implemented and has been out in the wild for a sufficient amount 
of time, it should be switching to a DeprecationWarning and then the fallback 
eventually removed.

--
components: Interpreter Core
messages: 379496
nosy: brett.cannon
priority: normal
severity: normal
status: open
title: Raise an ImportWarning for calling module_repr() on loaders
type: behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42136] [importlib] deprecate module_repr() methods

2020-10-23 Thread Brett Cannon


New submission from Brett Cannon :

The import system handles what `module_repr()` was meant for.

--
components: Library (Lib)
messages: 379495
nosy: brett.cannon
priority: normal
severity: normal
status: open
title: [importlib] deprecate module_repr() methods
type: behavior
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41972] bytes.find consistently hangs in a particular scenario

2020-10-23 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

Here are those zipf-distributed benchmarks for PR 22904: 
https://pastebin.com/raw/qBaMi2dm

Ignoring differences of <5%, there are 33 cases that get slower, but 477 cases 
that got faster.

Here's a stringbench.py run for PR 22904: https://pastebin.com/raw/ABm32bA0

It looks like the stringbench times get a bit worse on a few cases, but I would 
attribute that to the benchmarks having many "difficult" cases with a unique 
character at the end of the needle, such as:

s="ABC"*33; ((s+"D")*500+s+"E").find(s+"E"),

which the status quo already handles as well as possible, whereas the PR best 
handles the case where some middle "cut" character is unique. Who knows how 
common these cases are.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42127] functools.cached_property possibly disables key-sharing instance dictionaries

2020-10-23 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
assignee:  -> docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42135] [importlib] Deprecate find_module() implementations

2020-10-23 Thread Brett Cannon


Change by Brett Cannon :


--
dependencies: +Raise ImportWarning when falling back to find_module()

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42135] [importlib] Deprecate find_module() implementations

2020-10-23 Thread Brett Cannon


New submission from Brett Cannon :

find_spec() supersedes find_module() at this point.

--
components: Library (Lib)
messages: 379493
nosy: brett.cannon
priority: normal
severity: normal
status: open
title: [importlib] Deprecate find_module() implementations
type: behavior
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42127] functools.cached_property possibly disables key-sharing instance dictionaries

2020-10-23 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
keywords: +patch
pull_requests: +21852
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/22930

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42134] Raise ImportWarning when falling back to find_module()

2020-10-23 Thread Brett Cannon


New submission from Brett Cannon :

find_spec() has superseded find_module() since Python 3.4.

--
components: Interpreter Core
messages: 379492
nosy: brett.cannon
priority: normal
severity: normal
status: open
title: Raise ImportWarning when falling back to find_module()
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42074] setup error on windows

2020-10-23 Thread Steve Dower


Steve Dower  added the comment:

Thanks for finding the error code, Terry.

CaptainMitsumoto, firstly sorry for the frustration. We try to make it work 
reliably everywhere, but there are so many variables when it comes to 
installation that weird things always come up.

As an alternative, you might want to try opening the Microsoft Store app and 
searching for one of the Python releases we publish there (probably Python 3.8 
right now, or 3.9 if you want to try it out and aren't planning to install 
other packages). Those use a different kind of installer that is normally much 
more reliable.

If we're going to keep looking into the other installer that failed for you, 
I'm going to need the other log files that were in %TEMP%. The one that ends in 
"core_JustForMe" has the actual source of this error. 

However, I can tell you that the most common reason for this error code is that 
your virus scanner is interfering. You might have to disable it while 
installing.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21762] update the import machinery to only use __spec__

2020-10-23 Thread Brett Cannon


Brett Cannon  added the comment:

It turns out that the import system itself doesn't use `__loader__` (it does 
set it), but various parts of the stdlib do use `__loader__`. bpo-42133 updates 
a bunch of stdlib modules to use `__spec__.loader` as a fallback. bpo-42132 
tracks the fact that there's C code which isn't setting or using `__spec__` 
(let alone `__spec__.loader`).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41950] Typo in Python 3.9 what's new page

2020-10-23 Thread Guido van Rossum


Guido van Rossum  added the comment:

Yeah, I'll see if I can reopen your PR and we can apply it to the 3.9 branch, 
we'll then forward port it (if and when that's done).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42133] Update the stdlib to fall back to __spec__.parent if __loader__ isn't defined

2020-10-23 Thread Brett Cannon


Change by Brett Cannon :


--
keywords: +patch
pull_requests: +21851
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/22929

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41950] Typo in Python 3.9 what's new page

2020-10-23 Thread Weiliang Li


Weiliang Li  added the comment:

No wonder there is discrepancy...

So our tactic would be to patch in 3.9 branch and bring it back to master?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38976] Add support for HTTP Only flag in MozillaCookieJar

2020-10-23 Thread Senthil Kumaran


Change by Senthil Kumaran :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10 -Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38976] Add support for HTTP Only flag in MozillaCookieJar

2020-10-23 Thread Senthil Kumaran


Senthil Kumaran  added the comment:


New changeset 16ee68da6e12bb2d79751b32cc37523fe4f4bb48 by Jacob Neil Taylor in 
branch 'master':
bpo-38976: Add support for HTTP Only flag in MozillaCookieJar (#17471)
https://github.com/python/cpython/commit/16ee68da6e12bb2d79751b32cc37523fe4f4bb48


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42133] Update the stdlib to fall back to __spec__.parent if __loader__ isn't defined

2020-10-23 Thread Brett Cannon


New submission from Brett Cannon :

By making sure the stdlib can handle the case where __loader__ isn't defined 
but __spec__.parent is, eventually the former could be dropped for the latter.

--
components: Library (Lib)
messages: 379486
nosy: brett.cannon
priority: normal
severity: normal
status: open
title: Update the stdlib to fall back to __spec__.parent if __loader__ isn't 
defined
type: behavior
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39108] random needs doc for "gauss" versus "normalvariate"

2020-10-23 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
keywords: +patch
pull_requests: +21850
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/22928

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41950] Typo in Python 3.9 what's new page

2020-10-23 Thread Guido van Rossum

Guido van Rossum  added the comment:

Oh, I see. Łukasz (@ambv) prepared the 3.9.0 release and didn't merge his 
changes into master yet.

I'll contact him.

--
nosy: +lukasz.langa

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41950] Typo in Python 3.9 what's new page

2020-10-23 Thread Weiliang Li


Weiliang Li  added the comment:

The diff is here:

https://gist.github.com/kigawas/c0c3900e5f56552f13160c7989612c28

Looks like it is not trivial.

And the commit at branch 3.9 is:

https://github.com/python/cpython/commit/9cf6752276e6fcfd0c23fdb064ad27f448aaaf75#diff-ec874d66bbcf13046b9928aa3716d14a93632f568b914eba32baf46ff4c9eb36R1180

Hope this would help.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42132] Use specs instead of just __loader__ in C code

2020-10-23 Thread Brett Cannon


New submission from Brett Cannon :

_warnings.c, pylifecycle.c, and pythonrun.c all either use or set `__loader__` 
but without also falling back on `__spec__`.

--
components: Interpreter Core
messages: 379483
nosy: brett.cannon
priority: normal
severity: normal
status: open
title: Use specs instead of just __loader__ in C code
type: behavior
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42070] Revisit IsoCalendarDate being private from pickle perspective

2020-10-23 Thread Paul Ganssle


Paul Ganssle  added the comment:

I'm glad that Terry brought up documentation, though, because I realized that 
this is not a documented behavior: 
https://docs.python.org/3/library/datetime.html#datetime.date.isocalendar

We should maybe document it? Though if we document it it might be considered 
more of a breaking change to change the behavior than if it's an undocumented 
feature.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42131] [zipimport] Update zipimport to use specs

2020-10-23 Thread Brett Cannon


New submission from Brett Cannon :

zipimport only supports old PEP 302 APIs and not PEP 451 module specs (i.e. it 
uses load_module() instead of create_module()/exec_module(), find_mdoule() 
instead of find_spec()).

Uses of both load_module() and find_module() are documented as deprecated for 
the import system and are slated to eventually go away.

--
components: Library (Lib)
messages: 379481
nosy: brett.cannon, twouters
priority: normal
severity: normal
status: open
title: [zipimport] Update zipimport to use specs
type: behavior
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42070] Revisit IsoCalendarDate being private from pickle perspective

2020-10-23 Thread Paul Ganssle

Paul Ganssle  added the comment:

Even if it were accidental (and it wasn't — it was actually somewhat difficult 
to achieve), I'd still argue for not changing it in 3.9, because it would mean 
that pickles created in 3.9.(n+1) would not be readable in 3.9.n.

Still, I don't think I'd be convinced without some real-life use cases. The SO 
question is asking about the reasoning for this in the abstract — the poster 
noticed that we designed it this way and saw a possible objection to this, but 
it was one that we had considered and decided to make the trade-off a different 
way.

I informally asked many people about this, since it was by far the weirdest 
design decision made in that issue (I say that in the passive tense not to 
deflect from the fact that I made the decision, but to own the fact that it was 
weirder than any of the design decisions made by anyone else, either ), and 
generally they could not give me any concrete reasons it would break (but they 
also all counseled not to try to get too clever with pickling logic).

I think I'm happy with the decision if we remain in the realm of the abstract, 
but I recognize how weird it is, and I think if someone came up with a 
compelling workflow that this breaks, we could change it (in a feature 
release). This was specifically proposed to avoid backwards-compatibility 
problems, so it wouldn't be any more of a breakage to change it in future 
feature releases than it would have been to do it in 3.9.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42127] functools.cached_property possibly disables key-sharing instance dictionaries

2020-10-23 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> Essentially it means that types using cached_property are less
> likely to enjoy the benefits of shared keys.

I don't think anything can be done about it.  @cached_property and key-sharing 
dicts are intrinsically at odds with one another.  Likewise, @cached_property 
doesn't work with classes that define __slots__.

FWIW, there is an alternative that works with both key-sharing dicts and 
__slots__.  You can stack property() on top of functools.cache():

class A:
def __init__(self, x):
self.x = x

@property
@cache
def square(self):
print('Called!')
return self.x ** 2


>>> a = A(10)
>>> a.square
Called!
100
>>> b = A(11)
>>> b.square
Called
121
>>> a.square
100
>>> b.square
121

--
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40592] `Shutil.which` incosistent with windows's `where`

2020-10-23 Thread miss-islington


miss-islington  added the comment:


New changeset c437fe39cf5318f27f3381a983fbf320f65064bc by Miss Skeleton (bot) 
in branch '3.9':
[3.9] bpo-40592: shutil.which will not return None anymore if ; is the last 
char in PATHEXT (GH-20088) (GH-22912)
https://github.com/python/cpython/commit/c437fe39cf5318f27f3381a983fbf320f65064bc


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40592] `Shutil.which` incosistent with windows's `where`

2020-10-23 Thread miss-islington


miss-islington  added the comment:


New changeset 8b4842b7a830299870067bba59f53529b13647a2 by Miss Skeleton (bot) 
in branch '3.8':
[3.8] bpo-40592: shutil.which will not return None anymore if ; is the last 
char in PATHEXT (GH-20088) (GH-22913)
https://github.com/python/cpython/commit/8b4842b7a830299870067bba59f53529b13647a2


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2020-10-23 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

I've narrowed down the traverse problems to Py_VISIT(state->CacheType). 
Suspecting this has to do with the cyclic references in cache/connection. 
Preliminary tests with GC tracking `cache->factory` look promising, but this is 
a part of the C API that's _completely_ unknown to me (yet), so I'm on thin ice 
here.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: GUI (tkinter) popularity and job prospects for

2020-10-23 Thread Grant Edwards
On 2020-10-23, John Pote  wrote:
> On 23/10/2020 05:47, Grant Edwards wrote:
>>
>>> I think that commercial desktop applications with a python
>>> compatible GUI would likely use QT or a Python binding thereof.
>> Agreed. If you want to improve you "hirability" for GUI application
>> development, I would probably put Qt first.  Then gobject or
>> wx. Tkinter would probably be last.
>
> I've used tkinter and wxPython occasionally in the past for 1 off test 
> tasks (and interest). What's the advantage of Qt?

I think it may look/act more "native" than the others. It has also had
good support for multiple platforms for a long time. For whatever
reason, it seems to the more popular choice for commercially
distributed Python apps.

Getting Tkinter to look and act like a "native" app takes a lot of
effort, and sometimes is just not possible. Distributing Tkinter apps
is a PITA. Even trivial apps tend to turn into large bundles because
you're including all of TCL with them.

--
Grant


-- 
https://mail.python.org/mailman/listinfo/python-list


[issue41835] Speed up dict vectorcall creation using keywords

2020-10-23 Thread Marco Sulla


Marco Sulla  added the comment:

@Mark.Shannon I tried to run pyperformance, but wheel does not work for Python 
3.10. I get the error:

AssertionError: would build wheel with unsupported tag ('cp310', 'cp310', 
'linux_x86_64')

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Debugging a memory leak

2020-10-23 Thread Dieter Maurer
Pasha Stetsenko wrote at 2020-10-23 11:32 -0700:
> ...
>  static int my_init(PyObject*, PyObject*, PyObject*) { return 0; }
>  static void my_dealloc(PyObject*) {}

I think, the `dealloc` function is responsible to actually
free the memory area.

I see for example:
static void
Spec_dealloc(Spec* self)
{
/* PyType_GenericAlloc that you get when you don't
   specify a tp_alloc always tracks the object. */
PyObject_GC_UnTrack((PyObject *)self);
if (self->weakreflist != NULL) {
PyObject_ClearWeakRefs(OBJECT(self));
}
Spec_clear(self);
Py_TYPE(self)->tp_free(OBJECT(self));
}


-- 
https://mail.python.org/mailman/listinfo/python-list


[issue34976] IDLE: Replace the search dialog with a search bar

2020-10-23 Thread Tal Einat


Tal Einat  added the comment:

Thanks Mark, your feedback is greatly appreciated!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34976] IDLE: Replace the search dialog with a search bar

2020-10-23 Thread Tal Einat


Tal Einat  added the comment:

> Why would having all 'a's on a page light up when I type 'a' be a plus?

The auto-highlighting could be disabled for 1-2 character search queries, or 
delayed for a bit to allow typing to continue.

I find auto-highlighting very useful when I'm looking for "where is this 
variable used?", I just Ctrl-f, start typing its name, and get the answer very 
quickly, even if I haven't typed the whole name.

Also, this PR supports Alt+/ completion in the search bar, which makes the 
above even more effective.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Debugging a memory leak

2020-10-23 Thread Pasha Stetsenko
Thanks MRAB, this was it.
I guess I was thinking about tp_dealloc as a C++ destructor, where the base
class' destructor is called automatically.

On Fri, Oct 23, 2020 at 11:59 AM MRAB  wrote:

> On 2020-10-23 19:32, Pasha Stetsenko wrote:
> > Thanks for all the replies!
> > Following Chris's advice, I tried to reduce the code to the smallest
> > reproducible example (I guess I should have done it sooner),
> > but here's what I came up with:
> > ```
> >#include 
> >#include 
> >
> >static int my_init(PyObject*, PyObject*, PyObject*) { return 0; }
> >static void my_dealloc(PyObject*) {}
> >
> >static void init_mytype(PyObject* module) {
> >  PyTypeObject* type = new PyTypeObject();
> >  std::memset(type, 0, sizeof(PyTypeObject));
> >  Py_INCREF(type);
> >
> >  type->tp_basicsize = static_cast(sizeof(PyObject));
> >  type->tp_itemsize = 0;
> >  type->tp_flags = Py_TPFLAGS_DEFAULT;
> >  type->tp_new   = _GenericNew;
> >  type->tp_name  = "mytype";
> >  type->tp_doc   = "[temporary]";
> >  type->tp_init  = my_init;
> >  type->tp_dealloc = my_dealloc;
> >  PyType_Ready(type);
> >  PyModule_AddObject(module, "mytype",
> reinterpret_cast(type));
> >}
> > ```
>
> You're setting the deallocation function to 'my_dealloc', but that
> function isn't deallocating the object.
>
> Try something like this:
>
> static void my_dealloc(PyObject* obj) {
>  PyObject_DEL(obj);
> }
>
> [snip]
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue34394] Descriptors HowTo doesn't mention __set_name__

2020-10-23 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.9 -Python 3.4, Python 3.5, Python 3.6, Python 
3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42075] Verbose/confusing default format on warnings

2020-10-23 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

An application *can* change warnings.  See lib/idlelib/run for an example.  
Library code should not make changes as they will be global or overwritten.  A 
project that is both can restrict the changes to when run as main module.

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41100] Build failure on macOS 11 (beta)

2020-10-23 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
pull_requests: +21849
pull_request: https://github.com/python/cpython/pull/21114

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41101] Support "arm64" in Mac/Tools/pythonw

2020-10-23 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

This change is part of the active PR in #41100. Therefore closing this issue.

--
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed
superseder:  -> Build failure on macOS 11 (beta)
type:  -> enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40841] Provide mimetypes.sniff API as stdlib

2020-10-23 Thread Tal Einat


Tal Einat  added the comment:

> Dong-hee, I recommend that you turn this into a 3rd party package on PyPI 
> yourself.

+1

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42074] setup error on windows

2020-10-23 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Thank you for attaching the log instead of including it inline.  But when you 
reply by email, please delete the message you are responding too, as it 
duplicates the original already on the web page.

The first error in the log is a failure to make a restore point.  Then the 
fatal error reported:
ESOMEUSERor 0x80070002: Failed to install MSI package.
ESOMEUSERor 0x80070002: Failed to configure per-user MSI package.
Applied execute package: core_JustForMe, result: 0x80070002, restart: None
ESOMEUSERor 0x80070002: Failed to execute MSI package.

I added the Windows component so a Windows expert can try to interpret this.  
Since it was installing just for you, in AppData, I don't think permissions 
should have been a problem.  I presume that 1703 is recent enough that the 
installer should work.

--
components: +Windows
nosy: +paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23797] Mac OS X locale setup in thread happens sometime after run() is called

2020-10-23 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I'm closing this issue as "works for me". Please re-open if there is more 
information on how to reproduce the problem.

--
resolution:  -> works for me
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23797] Mac OS X locale setup in thread happens sometime after run() is called

2020-10-23 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I've been using the scriptlet below to try to attempt to reproduce the problem. 
I'm not sure if this matches the way the program of the OP is set up.

The scriptlet below works for me without problems (macOS 10.15, Python 3.4 - 
3.9).

This either means the problem has been fixed in the meantime (if it was an OS 
bug), or my script doesn't reproduce the problematic setup.

The traceback in the first message is due to LC_CTYPE=UTF-8 in the default 
shell environment on macOS, which wasn't recognised by locale.py for a long 
time. That issue has been fixed though.


# 
import locale
import threading

def thread():
print("thread locale:", locale.getlocale())

locale.setlocale(locale.LC_ALL, "en_US.UTF-8")
#locale.getlocale()

t = threading.Thread(target=thread)
t.start()
t.join()

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42070] Revisit IsoCalendarDate being private from pickle perspective

2020-10-23 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

If the current situation is not a bug, a mismatch between behavior and doc, a 
change would be an enhancement limited to the next release.

--
nosy: +terry.reedy
title: I think the rationale to keep IsoCalendarDate private from the pickle 
perspective should get revisited -> Revisit IsoCalendarDate being private from 
pickle perspective
type: behavior -> enhancement
versions: +Python 3.10 -Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21032] Socket leak if HTTPConnection.getresponse() fails

2020-10-23 Thread Felipe Rodrigues


Change by Felipe Rodrigues :


--
nosy: +fbidu
nosy_count: 3.0 -> 4.0
pull_requests: +21848
pull_request: https://github.com/python/cpython/pull/22737

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13464] HTTPResponse is missing an implementation of readinto

2020-10-23 Thread Felipe Rodrigues


Change by Felipe Rodrigues :


--
nosy: +fbidu
nosy_count: 5.0 -> 6.0
pull_requests: +21847
pull_request: https://github.com/python/cpython/pull/22737

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Debugging a memory leak

2020-10-23 Thread MRAB

On 2020-10-23 19:32, Pasha Stetsenko wrote:

Thanks for all the replies!
Following Chris's advice, I tried to reduce the code to the smallest
reproducible example (I guess I should have done it sooner),
but here's what I came up with:
```
   #include 
   #include 

   static int my_init(PyObject*, PyObject*, PyObject*) { return 0; }
   static void my_dealloc(PyObject*) {}

   static void init_mytype(PyObject* module) {
 PyTypeObject* type = new PyTypeObject();
 std::memset(type, 0, sizeof(PyTypeObject));
 Py_INCREF(type);

 type->tp_basicsize = static_cast(sizeof(PyObject));
 type->tp_itemsize = 0;
 type->tp_flags = Py_TPFLAGS_DEFAULT;
 type->tp_new   = _GenericNew;
 type->tp_name  = "mytype";
 type->tp_doc   = "[temporary]";
 type->tp_init  = my_init;
 type->tp_dealloc = my_dealloc;
 PyType_Ready(type);
 PyModule_AddObject(module, "mytype", reinterpret_cast(type));
   }
```


You're setting the deallocation function to 'my_dealloc', but that 
function isn't deallocating the object.


Try something like this:

static void my_dealloc(PyObject* obj) {
PyObject_DEL(obj);
}

[snip]
--
https://mail.python.org/mailman/listinfo/python-list


[issue42058] Process not running with args

2020-10-23 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

bpo is the issue tracker for patching the python cpython repository.  We 
support running python from system command line terminals and icons that we 
install, as specified in the CPython docs.  Ask questions about running python 
otherwise on other forums.

--
nosy: +terry.reedy
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



RE: Question on ABC classes

2020-10-23 Thread Schachner, Joseph
I'm a C++ programmer and Python programmer as well.  Python classes are not 
exactly like C++ classes.

If you define a class where every method has an implementation, then it really 
isn't abstract.  It can be instantiated.  You can force it to be abstract by 
doing from abc import ABCMeta and declare class myclass(metaClass=ABCMeta).  
Otherwise, Python does not have a way to know that you intend the class to be 
abstract unless it contains an @abstractmethod that makes it actually abstract. 
  Such a method must be overridden.

Usually, an Abstract Base Class defines an interface.  You can make all the 
functions @abstractmethod, and separately make a another class that is based on 
your ABC and provides default implementations for all the functions.  Other 
classes can be based on that class.   I am not an authority on this so let me 
refer you to actual documentation:

See: https://docs.python.org/3/library/abc.html, that should help you. 

-Original Message-
From: Julio Di Egidio  
Sent: Thursday, October 22, 2020 12:26 PM
To: python-list@python.org
Subject: Question on ABC classes

Hello guys,

I am professional programmer but quite new to Python, and I am trying to get 
the grips of some peculiarities of the language.

Here is a basic question: if I define an ABC class, I can still instantiate the 
class unless there are abstract methods defined in the class.

(In the typical OO language the class would be not instantiable, period, since 
it's "abstract".  But this is not so in Python, to the point that, also for 
uniformity, I am feeling compelled to define an @abstractmethod __init__ in my 
ABC classes, whether they need one or not, and whether there are other abstract 
methods in the class or not.)

Now, I do read in the docs that that is as intended, but I am not understanding 
the rationale of it: why only if there are abstract methods defined in an ABC 
class is instantiation disallowed?  IOW, why isn't subclassing from ABC enough?

Thanks for any enlightenment,

Julio

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue30681] email.utils.parsedate_to_datetime() should return None when date cannot be parsed

2020-10-23 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Aside: I noticed that on _parseaddr.py:68, there's a bare `return`.  That 
should really be `return None` (EIBTI).  Can you fix that in your PR?

I think it's confusing to raise both TypeError and ValueError.  I suggest we 
check the `None` return from _parsedate_tz() and raise ValueError explicitly in 
that case, avoiding the implicit TypeError on the failing tuple unpack.

+1 on removing the mention of returning None from the documentation.  Then with 
the above, it would document raising ValueError on invalid date input.

As for backporting, I'm nosing Ned and Łukasz to weigh in.  Given that the 
patch is adding a new defect class (which it should), this won't break existing 
code, but it does mean that existing code would have different semantics 
depending on the patch version release of 3.9, 3.8, and 3.7.  I'm not 
completely comfortable with that, but let's see what the RMs say.  I guess I'm 
currently -0 on backporting.

--
nosy: +lukasz.langa, ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Debugging a memory leak

2020-10-23 Thread Pasha Stetsenko
Thanks for all the replies!
Following Chris's advice, I tried to reduce the code to the smallest
reproducible example (I guess I should have done it sooner),
but here's what I came up with:
```
  #include 
  #include 

  static int my_init(PyObject*, PyObject*, PyObject*) { return 0; }
  static void my_dealloc(PyObject*) {}

  static void init_mytype(PyObject* module) {
PyTypeObject* type = new PyTypeObject();
std::memset(type, 0, sizeof(PyTypeObject));
Py_INCREF(type);

type->tp_basicsize = static_cast(sizeof(PyObject));
type->tp_itemsize = 0;
type->tp_flags = Py_TPFLAGS_DEFAULT;
type->tp_new   = _GenericNew;
type->tp_name  = "mytype";
type->tp_doc   = "[temporary]";
type->tp_init  = my_init;
type->tp_dealloc = my_dealloc;
PyType_Ready(type);
PyModule_AddObject(module, "mytype", reinterpret_cast(type));
  }
```
(my original `update` object had some fields in it, but it turns out they
don't need to be present in order for the problem to manifest. So in this
case I'm creating a custom object which is the same as basic PyObject).
The `init_mytype()` function creates a custom type and attaches it to a
module. After this, creating 100M instances of the object will cause the
process memory to swell to 1.5G:
```
for i  in range(10**8):
z = dt.mytype()
```
I know this is not normal because if instead i used a builtin type such as
`list`, or a python-defined class such as `class  A: pass`, then the
process will remain at steady RAM usage of about 6Mb.

I've  tested this on a Linux platform as well (using docker image
quay.io/pypa/manylinux2010_x86_64), and the problem is present there as
well.

---
PS: The library I'm working on is open source, available at
https://github.com/h2oai/datatable, but the code I posted  above is
completely independent from my library.

On Fri, Oct 23, 2020 at 10:44 AM Dieter Maurer  wrote:

> Pasha Stetsenko wrote at 2020-10-22 17:51 -0700:
> > ...
> >I'm a maintainer of a python library "datatable" (can be installed from
> >PyPi), and i've been recently trying to debug a memory leak that occurs in
> >my library.
> >The program that exposes the leak is quite simple:
> >```
> >import datatable as dt
> >import gc  # just in case
> >
> >def leak(n=10**7):
> >for i in range(n):
> >z = dt.update()
> >
> >leak()
> >gc.collect()
> >input("Press enter")
> >```
> >Note that despite the name, the `dt.update` is actually a class, though it
> >is defined via Python C API. Thus, this script is expected to create and
> >then immediately destroy 10 million simple python objects.
> >The observed behavior, however,  is  that the script consumes more and
> more
> >memory, eventually ending up at about 500M. The amount of memory the
> >program ends up consuming is directly proportional to the parameter `n`.
> >
> >The `gc.get_objects()` does not show any extra objects however.
>
> For efficiency reasons, the garbage collector treats only
> objects from types which are known to be potentially involved in cycles.
> A type implemented in "C" must define `tp_traverse` (in its type
> structure) to indicate this possibility.
> `tp_traverse` also tells the garbage collector how to find referenced
> objects.
> You will never find an object in the result of `get_objects` the
> type of which does not define `tp_traverse`.
>
> > ...
> >Thus, the object didn't actually "leak" in the normal sense: its refcount
> >is 0 and it was reclaimed by the Python runtime (when i print a debug
> >message in tp_dealloc, i see that the destructor gets called every time).
> >Still, Python keeps requesting more and more memory from the system
> instead
> >of reusing the memory  that was supposed to be freed.
>
> I would try to debug what happens further in `tp_dealloc` and its callers.
> You should eventually see a `PyMem_free` which gives the memory back
> to the Python memory management (built on top of the C memory management).
>
> Note that your `tp_dealloc` should not call the "C" library's "free".
> Python builds its own memory management (--> "PyMem_*") on top
> of the "C" library. It handles all "small" memory requests
> and, if necessary, requests big data chunks via `malloc` to split
> them into the smaller sizes.
> Should you "free" small memory blocks directly via "free", that memory
> becomes effectively unusable by Python (unless you have a special
> allocation as well).
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: GUI (tkinter) popularity and job prospects for

2020-10-23 Thread Christian Gollwitzer

Am 22.10.20 um 23:52 schrieb Paul Rubin:

Michael Torrie  writes:

I doubt you'll find any jobs connected a particular Python GUI toolkit.



It would be really nice if there was a way to straightforwardly run
Tkinter applications on Android.  You'd install a single .apk and that
would let you run your Tkinter apps and make launchers for them.


It's not unrealistic - there is AndroWish to run Tcl/Tk on Android 
including GUI and connection to Android specific services (subcommand 
"borg"). Someone in the Python community would need to make the Tkinter 
bridge with a native Python for Android.



https://www.androwish.org/home/home

Christian

--
https://mail.python.org/mailman/listinfo/python-list


[issue3760] PEP 3121 --- PyType_Copy is missing

2020-10-23 Thread Petr Viktorin


Petr Viktorin  added the comment:

The need is covered by PEP 384's PyType_FromSpec (and later additions, the 
latest being PyType_FromModuleAndSpec).

Thanks for closing!

--
nosy: +petr.viktorin

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Logic Bank

2020-10-23 Thread gMail
Hello, All

I am pleased to announce the release of Logic Bank.

Logic Bank introduces spreadsheet-like rules for multi-table derivation and 
constraint logic for SQLAchemy databases - 40X more concise than legacy code, 
extensible and manageable using Python.  Described in this article 
, open 
source on git. 
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue38870] Expose ast.unparse in the ast module

2020-10-23 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Debugging a memory leak

2020-10-23 Thread Dieter Maurer
Pasha Stetsenko wrote at 2020-10-22 17:51 -0700:
> ...
>I'm a maintainer of a python library "datatable" (can be installed from
>PyPi), and i've been recently trying to debug a memory leak that occurs in
>my library.
>The program that exposes the leak is quite simple:
>```
>import datatable as dt
>import gc  # just in case
>
>def leak(n=10**7):
>for i in range(n):
>z = dt.update()
>
>leak()
>gc.collect()
>input("Press enter")
>```
>Note that despite the name, the `dt.update` is actually a class, though it
>is defined via Python C API. Thus, this script is expected to create and
>then immediately destroy 10 million simple python objects.
>The observed behavior, however,  is  that the script consumes more and more
>memory, eventually ending up at about 500M. The amount of memory the
>program ends up consuming is directly proportional to the parameter `n`.
>
>The `gc.get_objects()` does not show any extra objects however.

For efficiency reasons, the garbage collector treats only
objects from types which are known to be potentially involved in cycles.
A type implemented in "C" must define `tp_traverse` (in its type
structure) to indicate this possibility.
`tp_traverse` also tells the garbage collector how to find referenced
objects.
You will never find an object in the result of `get_objects` the
type of which does not define `tp_traverse`.

> ...
>Thus, the object didn't actually "leak" in the normal sense: its refcount
>is 0 and it was reclaimed by the Python runtime (when i print a debug
>message in tp_dealloc, i see that the destructor gets called every time).
>Still, Python keeps requesting more and more memory from the system instead
>of reusing the memory  that was supposed to be freed.

I would try to debug what happens further in `tp_dealloc` and its callers.
You should eventually see a `PyMem_free` which gives the memory back
to the Python memory management (built on top of the C memory management).

Note that your `tp_dealloc` should not call the "C" library's "free".
Python builds its own memory management (--> "PyMem_*") on top
of the "C" library. It handles all "small" memory requests
and, if necessary, requests big data chunks via `malloc` to split
them into the smaller sizes.
Should you "free" small memory blocks directly via "free", that memory
becomes effectively unusable by Python (unless you have a special
allocation as well).
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue38870] Expose ast.unparse in the ast module

2020-10-23 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

Well, I'm happy to say that 3.9.0 is finally released with the ast.unparse 
interface. After tens of PRs, I think it is time for us to move on. For all 
future bugs, please create a new issue and nosy me. Thanks everyone who has 
participated this journey!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40841] Provide mimetypes.sniff API as stdlib

2020-10-23 Thread Guido van Rossum


Guido van Rossum  added the comment:

Dong-hee, I recommend that you turn this into a 3rd party package on PyPI
yourself. That way your effort and code will live on!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue614557] LookupError etc. need API to get the key

2020-10-23 Thread Irit Katriel


Change by Irit Katriel :


--
versions:  -Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40841] Provide mimetypes.sniff API as stdlib

2020-10-23 Thread Dong-hee Na


Dong-hee Na  added the comment:

I close this issue as rejected!

During the sprint, I could hear a lot of opinions from core devs including 
Guido, Tal, and Christian.

The overall conclusion for me is not to add this time.
if the mimetypes module is extracted from stdlib to pypi package, we can 
discuss to add this feature at that time!

Thank you everyone for the discussion!

--
nosy: +christian.heimes, taleinat
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16094] Tuple extraction in a lambda isn't supported by 2to3

2020-10-23 Thread Dong-hee Na


Change by Dong-hee Na :


--
resolution:  -> wont fix
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42122] macOS complains about how fonts are accessed

2020-10-23 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I'm going to mark this as closed, not a bug.  If you're not seeing the same 
result, it is almost certainly an issue with my local build.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41835] Speed up dict vectorcall creation using keywords

2020-10-23 Thread Marco Sulla


Marco Sulla  added the comment:

@methane: well, to be honest, I don't see much difference between the two 
pulls. The major difference is that you merged insertdict_init in 
dict_merge_init.

But I kept insertdict_init separate on purpose, because this function can be 
used in other future dedicated function on creation time only. Furthermore it's 
more simple to maintain, since it's quite identical to insertdict.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Issue with Python

2020-10-23 Thread Mats Wichmann
On 10/23/20 3:52 AM, Ifeanyi Obinelo wrote:
> Hello! I am a Python programmer and I love the language. However, I
> installed Python 3.9 and suddenly, pip does not install Python libraries
> anymore. It says that I need Visual Studio C++ 2014 and exits with:
> 
> "ERROR: Command errored out with exit status 1:..error: Microsoft Visual
> C++ 14.0 is required. Get it with "Build Tools for Visual Studio":
> https://visualstudio.microsoft.com/downloads/;
> (The complete output is about 302 lines long. I will attach at the end of
> the email.)
> 
> But I never needed Visual C++ 14 to install modules. Plus I have a bunch of
> C++ redistributables (but not 14). Is there any thing I can do to fix this?
> 
> Also, is there any way to carry over my libraries and modules from my
> previous Python installation (Python 3.8.5)? Or do I need to manually
> reinstall them?

Sometimes it's good to be a little patient!

*Some* modules, certainly not all, use compiled binary components.
Usually if they're big and consider they have performance-critical
elements, so they use the C API to make binary bits.  When pip goes to
install, it tries to find a wheel that matches your configuration.  If
there are no binary bits, an "any" type wheel will work fine, and there
are no issues.  If there are binary bits, it looks for a combination of
python version, architecture, and maybe bit-ness.  Failing to find a
suitable wheel, it pulls the source distribution and tries to install
that (by calling setup.py), and that will try to compile.

Since Windows doesn't come with a C compiler by default, that fails for
you. You could be ambitious and install Visual Studio Build Tools
(Community edition) or some such, and hope it works; it usually doesn't
without further setup.

Check if modules you care about exist for 3.9 by searching for them on
pypi.org and clicking on Download to see the available versions.  The
projects you care about will inevitably catch up, but it's still early
days for 3.9 and they have their own release processes to go through.

Or you can look on an unofficial site that does early builds - take to
heart the warning about the unsupported nature of these and tread carefully:

https://www.lfd.uci.edu/~gohlke/pythonlibs/#scikit-image

Or... stick with 3.8 for a while longer, there's nothing at all wrong
with 3.8!

"Do I need to manually reinstall" - get pip to dump out the modules into
a requirements.txt file, and use that to populate your new environment.
Then at least it won't be manual.

-- 
https://mail.python.org/mailman/listinfo/python-list


[issue26131] Raise ImportWarning when loader.load_module() is used

2020-10-23 Thread Brett Cannon


Change by Brett Cannon :


--
stage: test needed -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42129] Support resources in namespace packages

2020-10-23 Thread Barry A. Warsaw


Change by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41950] Typo in Python 3.9 what's new page

2020-10-23 Thread Guido van Rossum


Guido van Rossum  added the comment:

There really shouldn't be any differences between that doc in the 3.9 and 
master branch (with rare exceptions). Can you post a diff here between the two 
so we can sort it out?

Also can you find the commit where it was added to the 3.9 branch?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: GUI (tkinter) popularity and job prospects for

2020-10-23 Thread John Pote



On 23/10/2020 05:47, Grant Edwards wrote:



I think that commercial desktop applications with a python
compatible GUI would likely use QT or a Python binding thereof.

Agreed. If you want to improve you "hirability" for GUI application
development, I would probably put Qt first.  Then gobject or
wx. Tkinter would probably be last.


I've used tkinter and wxPython occasionally in the past for 1 off test 
tasks (and interest). What's the advantage of Qt?


John

--
https://mail.python.org/mailman/listinfo/python-list


[issue41950] Typo in Python 3.9 what's new page

2020-10-23 Thread Weiliang Li


Weiliang Li  added the comment:

The whole CONTAINS_OP stuff is gone in master, but it's still there in 3.9 
branch.

I don't know why.

Any plan to resolve the discrepancy?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >