[issue40621] Python crashes with new parser on invalid exception handlers

2020-05-14 Thread Shantanu

New submission from Shantanu :

```
~/dev/cpython master λ ./python.exe --version --version 
  
Python 3.9.0a6+ (heads/master:a15c9b3a05, May 14 2020, 00:31:47) 
[Clang 11.0.0 (clang-1100.0.33.17)]



# should raise a syntax error, instead crashes
~/dev/cpython master λ cat test.py 
try:
1 / 0
except Exception as a.b:
pass
~/dev/cpython master λ ./python.exe test.py
[1]63986 bus error  ./python.exe test.py
~/dev/cpython master λ ./python.exe -Xoldparser test.py
  File "/Users/shantanu/dev/cpython/test.py", line 3
except Exception as a.b:
 ^
SyntaxError: invalid syntax



# should raise a syntax error, instead passes
~/dev/cpython master λ cat test2.py
try:
1 / 0
except Exception as (a):
pass
~/dev/cpython master λ ./python.exe test2.py
~/dev/cpython master λ ./python.exe -Xoldparser test2.py
  File "/Users/shantanu/dev/cpython/test2.py", line 3
except Exception as (a):
^
SyntaxError: invalid syntax



# should raise a syntax error, instead crashes
~/dev/cpython master λ cat test3.py
try:
1 / 0
except Exception as a[0]:
pass
~/dev/cpython master λ ./python.exe test3.py
[1]64206 bus error  ./python.exe test3.py
~/dev/cpython master λ ./python.exe -Xoldparser test3.py
  File "/Users/shantanu/dev/cpython/test3.py", line 3
except Exception as a[0]:
 ^
SyntaxError: invalid syntax
```

The old grammar expects a NAME here, but the new grammar attempts to use a 
target (https://docs.python.org/3/reference/grammar.html). Seems like we should 
just go back to using NAME.

--
messages: 368818
nosy: hauntsaninja
priority: normal
severity: normal
status: open
title: Python crashes with new parser on invalid exception handlers

___
Python tracker 

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



[issue40621] Python crashes with new parser on invalid exception handlers

2020-05-14 Thread Shantanu


Change by Shantanu :


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

___
Python tracker 

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



[issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts

2020-05-14 Thread Ned Deily


Ned Deily  added the comment:

An update on this: it turns out there are two different problems with the 
launcher app as a result of security changes introduced in macOS 10.15 Catalina.

The first is that the launcher did not execute files launched with it (for 
example, by double-clicking on the source file or by dragging the file to the 
launcher icon).  The launcher launches but no Terminal window opens.  That 
problem has been fixed in the just released python.org macOS installer for 
3.8.3 and will be fixed in the next releases of 3.7.x and 3.9.x (pre-release).

The second problem is that the launcher app is not able to launch Terminal.app 
to run the script if Terminal.app was not already running. Unfortunately, I was 
not able to provide a fix for that problem in time for 3.8.3. However, there is 
a relatively easy workaround until that fix is available. Before using the 
launcher app, just ensure that Terminal.app is already launched; the launcher 
will then be able to run any number of scripts in new terminal windows as 
expected.  One easy standard way to launch Terminal.app is to invoke Spotlight 
by clicking on the "magnifying glass" icon near the upper right end of the 
macOS menu bar and then typing the letters "terminal" followed by the Return 
key in the resulting search window.  When a script is done running, just close 
the terminal window but don't quit Terminal.app if you want to keep using the 
launcher.

--
priority: normal -> high
stage:  -> needs patch
title: Launcher on Catalina -> Python Launcher app on macOS 10.15 Catalina 
fails to run scripts
versions: +Python 3.7, Python 3.9

___
Python tracker 

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



[issue40028] Math module method to find prime factors for non-negative int n

2020-05-14 Thread paul rubin


paul rubin  added the comment:

I'm the one always asking for more stuff in the stdlib, but above some 
simplistic approaches this seems out of scope.  Doing it usefully above say 
2**32 requires fancy algorithms.  Better to use some external package that 
implements that stuff.

--
nosy: +phr

___
Python tracker 

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



[issue36027] Support negative exponents in pow() where a modulus is specified.

2020-05-14 Thread paul rubin


paul rubin  added the comment:

https://bugs.python.org/issue457066  The old is new again ;-).

--
nosy: +phr

___
Python tracker 

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



[issue40622] Using VS2019 to automatically build Python3 and Runtest and it failed to Runtest

2020-05-14 Thread Lin Gao


New submission from Lin Gao :

Here is repro steps:
1. git clone -b "3.6" -c core.autocrlf=true 
https://github.com/python/cpython.git F:\gitP\python\cpython
2. Open a VS 2019 16.4.5 x86 command prompt and browse to F:\gitP\python\cpython
3. checkout the revision to f3a5b7a.
4. Add #include  to the _iomodule.c.
5. cd F:\gitP\python\cpython\PCBuild
6. devenv /upgrade pcbuild.sln
7. build -e -r --no-tkinter -v "/p:PlatformToolset=v142" 
"/p:WindowsTargetPlatformVersion=10.0.18362.0" 
8.cd F:\gitP\python\cpython\PCBuild
9.rt -q -x test_math test_cmath test_distutils test_codecencodings_iso2022 
test_random test_sax test_enum test_re test_subprocess test_socket
Error:
4 tests failed:
test_binhex test_importlib test_peg_generator test_tools
Please see the attachment for details

--
components: Tests
files: test.log.2.out
messages: 368822
nosy: Lin
priority: normal
severity: normal
status: open
title: Using VS2019 to automatically build Python3 and Runtest and it failed to 
Runtest
type: behavior
versions: Python 3.6
Added file: https://bugs.python.org/file49152/test.log.2.out

___
Python tracker 

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



[issue40623] JSON streaming

2020-05-14 Thread paul rubin


New submission from paul rubin :

This is a well-explored issue in other contexts: 
https://en.wikipedia.org/wiki/JSON_streaming

There is also a patch for it in json.tool, for release in 3.9: 
https://bugs.python.org/issue31553

Basically it's often convenient to have a file containing a list of json docs, 
one per line.  However, there is no convenient way to read them back in one by 
one, since json.load(filehandle) barfs when it sees the unexpected newline at 
the end of the first doc.

It would be great if the json module itself had a function to handle this.  I 
have an awful hack that I use myself, that is not suitable for a production 
library, but I'll attach it to show what functionality I'm suggesting.  I hope 
this is simple enough to not need a PEP.  Thanks!

--
components: Library (Lib)
files: jsonstream.py
messages: 368823
nosy: phr
priority: normal
severity: normal
status: open
title: JSON streaming
type: enhancement
Added file: https://bugs.python.org/file49153/jsonstream.py

___
Python tracker 

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



[issue40623] JSON streaming

2020-05-14 Thread paul rubin


Change by paul rubin :


Added file: https://bugs.python.org/file49154/jsonstream.py

___
Python tracker 

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



[issue40623] JSON streaming

2020-05-14 Thread paul rubin


paul rubin  added the comment:

Note: the function in my attached file wants no separation at all between the 
json docs (rather than a newline between them), but that was ok for the 
application I wrote it for some time back.  I forgot about that when first 
writing this rfe so thought I better clarify.

--

___
Python tracker 

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



[issue40621] Python crashes with new parser on invalid exception handlers

2020-05-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Thanks for the issue and the PR @hauntsaninja. Unfortunately, I think this is 
already covered by #20083 and https://bugs.python.org/issue40618

--
nosy: +pablogsal

___
Python tracker 

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



[issue40623] JSON streaming

2020-05-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

If you want to read json objects encoded one per line (JSON Lines or NDJSON), 
you can do this with just two lines of code:

for line in file:
yield json.loads(line)

This format is not formally standardized, but it is popular because its support 
in any programming language is trivial.

If you want to use more complex format, I afraid it is not popular enough to be 
supported in the stdlib. You can try to search third-party library which 
supports your flavour of multi-object JSON format or write your own code if 
this format is specific for your application.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue40623] JSON streaming

2020-05-14 Thread paul rubin


paul rubin  added the comment:

It's coming back to me, I think I used the no-separator format because I made 
the multi-document input files by using json.dump after opening the file in 
append mode.  That seems pretty natural.  I figured the wikipedia article and 
the json.tool patch just released were evidence that there is interest in this. 
 The approach of writing newlines between the docs and iterating through lines 
is probably workable though.  I don't know why I didn't do that before.  I 
might not have been sure that json docs never contain newlines.

Really it would be nice if json.load could read in anything that json.dump 
could write out (including with the indent parameter), but that's potentially 
more complicated and might conflict with the json spec.

--

___
Python tracker 

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



[issue40623] JSON streaming

2020-05-14 Thread paul rubin


paul rubin  added the comment:

Also I didn't know about ndjson (I just looked at it, ndjson.org) but its 
existence and formalization is even more evidence that this is useful.  I'll 
check what the two different python modules linked from that site do that's 
different from your example of iterating through the file by lines.

--

___
Python tracker 

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



[issue40521] Make tuple, dict, frame free lists, unicode interned strings, unicode latin1 singletons per-interpreter

2020-05-14 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
Python tracker 

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



[issue40624] add support for != (not-equals) in ElementTree XPath

2020-05-14 Thread Antony Lee


New submission from Antony Lee :

It would be a small usability improvement if ElementTree's XPath support also 
supported the != (not-equals) operator.
I am specifically mentioning only != and not >/

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



[issue40625] Autogenerate signature for METH_NOARGS and perhaps METH_O extension functions

2020-05-14 Thread Antony Lee


New submission from Antony Lee :

It would be nice if METH_NOARGS extension methods had an autogenerated 
signature (or rather, autogenerated __text_signature__ that gets picked up by 
inspect.signature).  After all, the signature is trivially known at compile 
time.

The same *could* possibly be done for METH_O methods, for which the effective 
signature is known too.  The *name* of the sole parameter is not known, but 
given that the parameter is (I believe?) positional only, that name "shouldn't" 
really matter (in the sense, e.g., that whether `signature.bind()` succeeds or 
not doesn't depend on the parameter name).

--
components: C API
messages: 368830
nosy: Antony.Lee
priority: normal
severity: normal
status: open
title: Autogenerate signature for METH_NOARGS and perhaps METH_O extension 
functions
versions: Python 3.9

___
Python tracker 

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



[issue38045] enum.Flag instance creation is slow

2020-05-14 Thread Antony Lee


Antony Lee  added the comment:

Now fixed, I believe.

--
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



[issue38701] datetime.timedelta string representation is ambiguous

2020-05-14 Thread Serge Matveenko


Serge Matveenko  added the comment:

I would be happy to submit a PR if there would be an agreement on the format.

--

___
Python tracker 

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



[issue33953] The DEFAULT_ENTROPY variable used to store the current default random bytes value should be documented for `secrets` module

2020-05-14 Thread Serge Matveenko


Change by Serge Matveenko :


--
versions: +Python 3.9

___
Python tracker 

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



[issue33953] The DEFAULT_ENTROPY variable used to store the current default random bytes value should be documented for `secrets` module

2020-05-14 Thread Serge Matveenko


Change by Serge Matveenko :


--
versions: +Python 3.6

___
Python tracker 

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



[issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts

2020-05-14 Thread Glenn Travis


Glenn Travis  added the comment:

I appreciate the update.
As an aside, I keep the terminal in the dock.

--

___
Python tracker 

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



[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

I tested manually the just released Python 3.8.3 with msg365311: I confirm that 
it's fixed. Thanks!

--
priority: release blocker -> 
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue38804] Regular Expression Denial of Service in http.cookiejar

2020-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

The fix landed in all maintained versions, thanks. I close the issue.

--
priority: release blocker -> 
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



[issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts

2020-05-14 Thread Glenn Travis


Glenn Travis  added the comment:

Well heck.
I just tried it, and got an error.  The error does not occur when I run the 
script directly from the Terminal, nor when I run it via IDLE (double click)

Last login: Thu May 14 07:57:11 on ttys000
But what do I know? % cd '/Volumes/BigHDD/Ortho4XP-master/' && 
'/usr/bin/pythonw'  '/Volumes/BigHDD/Ortho4XP-master/Ortho4XP_v130.py'  && echo 
Exit status: $? && exit 1
Traceback (most recent call last):
  File "/Volumes/BigHDD/Ortho4XP-master/Ortho4XP_v130.py", line 9, in 
import O4_Imagery_Utils as IMG
  File "./src/O4_Imagery_Utils.py", line 597
SyntaxError: Non-ASCII character '\xc2' in file ./src/O4_Imagery_Utils.py on 
line 597, but no encoding declared; see http://python.org/dev/peps/pep-0263/ 
for details
But what do I know? %

--

___
Python tracker 

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



[issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition

2020-05-14 Thread Tim Nyborg


Tim Nyborg  added the comment:

Echoing Fran Boon, I'm wondering what needs to happen to get the fixes merged 
and this issue resolved.  It affects web servers run on several frameworks, 
which is more of a problem now, since so many of us migrated to py3 in advance 
of py2 EOL.

--
nosy: +Tim Nyborg2

___
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-05-14 Thread Christopher Marchfelder


Christopher Marchfelder  added the comment:

@steve.dower I would really love to work on this and make my first 
contribution. Never did one, so I would some help doing this one :)

--
nosy: +Christopher Marchfelder

___
Python tracker 

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



[issue33953] The DEFAULT_ENTROPY variable used to store the current default random bytes value should be documented for `secrets` module

2020-05-14 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
assignee: docs@python -> steven.daprano
nosy: +steven.daprano

___
Python tracker 

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



[issue40512] Meta issue: per-interpreter GIL

2020-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

> Add a lock to pymalloc, or disable pymalloc when subinterpreters are used: 
> (...)

By the way, tracemalloc is not compatible with subinterpreters.

test.support.run_in_subinterp() skips the test if tracemalloc is tracing.

--

___
Python tracker 

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



[issue40275] test.support has way too many imports

2020-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

While the number of imports reduced a lot, "import test.support" still imports 
98 modules. That's a lot! IMO we can reduce it a little bit more :-)

Examples of imports which could be lazy:

* faulthandler: move it into start_threads() and disable_faulthandler()
* shutil: move it into rmtree()
* bz2: move it into @requires_bz2 decorator. Is it possible? Same for zlib, 
gzip and lzma?


There are also tons of functions, it may be time to create even more submodules:

* support.threading_helper:

  * threading_setup()/threading_cleanup()
  * reap_threads()
  * wait_thread_exit()
  * join_thread()
  * catch_threading_exception context manager
  * start_threads()

* support.process_helper:
  
  * wait_process()
  * reap_children()
  * SuppressCrashReport
  * PIPE_MAX_SIZE (is it the best place for that one?)
  * args_from_interpreter_flags()
  * optim_args_from_interpreter_flags()
  * PythonSymlink

* support.file_helper: 

  * rmtree() and the related private functions
  * unlink()
  * rmdir()
  * FS_NONASCII
  * TESTFN_UNICODE, TESTFN_NONASCII, TESTFN_UNENCODABLE, TESTFN_UNDECODABLE
  * SAVEDCWD (not sure about this one)
  * TESTFN_ENCODING <= this one can be removed, it's just 
sys.getfilesystemencoding()
  * temp_dir()
  * change_cwd()
  * temp_cwd()
  * temp_umask()
  * create_empty_file()
  * make_bad_fd()
  * EnvironmentVarGuard (not sure about this one)
  * can_symlink(), skip_unless_symlink()
  * can_xattr(), skip_unless_xattr()
  * fs_is_case_insensitive()
  * fd_count()
  * FakePath

* support.import_helper:

  * import_module(), _ignore_deprecated_imports()
  * import_fresh_module(), _save_and_remove_module(), _save_and_block_module()
  * unload()
  * make_legacy_pyc()
  * forget()
  * CleanImport
  * DirsOnSysPath
  * modules_setup(), modules_cleanup()

* support.warnings_helper:

  * check_syntax_warning()
  * ignore_warnings()
  * WarningsRecorder
  * check_warnings(), _filterwarnings()
  * check_no_warnings()
  * check_no_resource_warning()

Move also move the following functions to socket_helper:

  * SOCK_MAX_SIZE
  * open_urlresource()
  * TransientResource
  * time_out
  * socket_peer_reset
  * ioerror_peer_reset

Serhiy: What do you think of these proposed submodules?

--

___
Python tracker 

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



[issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files

2020-05-14 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset e77d428856fbd339faee44ff47214eda5fb51d57 by Lumír 'Frenzy' Balhar 
in branch 'master':
bpo-40495: compileall option to hardlink duplicate pyc files (GH-19901)
https://github.com/python/cpython/commit/e77d428856fbd339faee44ff47214eda5fb51d57


--

___
Python tracker 

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



[issue40495] compileall: option to hardlink duplicate optimization levels bytecode cache files

2020-05-14 Thread STINNER Victor

STINNER Victor  added the comment:

Thanks Lumír and Miro! I close the issue.

--
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



[issue40626] application/x-hdf5 mime type missing from mimetypes library

2020-05-14 Thread MARK SCHWAB


New submission from MARK SCHWAB :

The HDF data group relased HDF5 many years ago, it is a common data type for 
many science files.

Their recommendation for file extension is '.h5', and mimetype 
'application/x-hdf5'.

See 'Recommendations' section for mime types from the HDF group here: 
https://www.hdfgroup.org/2018/06/citations-for-hdf-data-and-software/

Update mimetypes.py #20042

--
components: Extension Modules
messages: 368843
nosy: schwabm
priority: normal
pull_requests: 19391
severity: normal
status: open
title: application/x-hdf5 mime type missing from mimetypes library
type: enhancement
versions: Python 3.5, Python 3.6, Python 3.7, 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



[issue40624] add support for != (not-equals) in ElementTree XPath

2020-05-14 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue37573] asyncio: freeze when using MultiLoopChildWatcher on Solaris

2020-05-14 Thread Jakub Kulik


Jakub Kulik  added the comment:

You are right, that seems to be the same issue. Thanks for closing this.

--

___
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-05-14 Thread Christopher Marchfelder


Change by Christopher Marchfelder :


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

___
Python tracker 

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



[issue40549] Convert posixmodule.c to multiphase initialization (PEP 489)

2020-05-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 97f33c35445e6d67df24dcbafef7b78333feb778 by Victor Stinner in 
branch 'master':
bpo-40549: posixmodule.c uses defining_class (GH-20075)
https://github.com/python/cpython/commit/97f33c35445e6d67df24dcbafef7b78333feb778


--

___
Python tracker 

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



[issue32604] Expose the subinterpreters C-API in Python for testing use.

2020-05-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19393
pull_request: https://github.com/python/cpython/pull/20089

___
Python tracker 

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



[issue32604] Expose the subinterpreters C-API in Python for testing use.

2020-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

The buildbots are broken for one whole week and nobody is available to 
investigate the reference leak regression. Following the CI policy, I wrote PR 
20089 to revert the change which broke the CI:
https://pythondev.readthedocs.io/ci.html#revert-on-fail

If someone wants to push again the change, make sure that "./python -m test -R 
3:3 test__xxsubinterpreters" does not leak.

--

___
Python tracker 

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



[issue40556] test__xxsubinterpreters leaked [1486, 1484, 1484, 1484] references

2020-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

I wrote PR 20089 to revert the change which introduced the leak.

--

___
Python tracker 

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



[issue25872] multithreading traceback KeyError when modifying file

2020-05-14 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +19394
pull_request: https://github.com/python/cpython/pull/20079

___
Python tracker 

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



[issue40613] gcc 10 emits warning for unused function: _xxsubinterpretersmodule

2020-05-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f2c3b6823bc4777d4a14eb0c3615b719521f763a by Victor Stinner in 
branch 'master':
Revert "bpo-32604: [_xxsubinterpreters] Propagate exceptions. (GH-19768)" 
(GH-20089)
https://github.com/python/cpython/commit/f2c3b6823bc4777d4a14eb0c3615b719521f763a


--

___
Python tracker 

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



[issue32604] Expose the subinterpreters C-API in Python for testing use.

2020-05-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f2c3b6823bc4777d4a14eb0c3615b719521f763a by Victor Stinner in 
branch 'master':
Revert "bpo-32604: [_xxsubinterpreters] Propagate exceptions. (GH-19768)" 
(GH-20089)
https://github.com/python/cpython/commit/f2c3b6823bc4777d4a14eb0c3615b719521f763a


--

___
Python tracker 

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



[issue40556] test__xxsubinterpreters leaked [1486, 1484, 1484, 1484] references

2020-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

The revert fixed the test:

$ ./python -m test -R 3:3 test__xxsubinterpreters 
(...)
Tests result: SUCCESS

--
resolution:  -> fixed
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



[issue32604] Expose the subinterpreters C-API in Python for testing use.

2020-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

The revert fixed the test:

$ ./python -m test -R 3:3 test__xxsubinterpreters 
(...)
Tests result: SUCCESS

--

___
Python tracker 

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



[issue40619] compile() passes rest of file as SyntaxError().text when file unreadable

2020-05-14 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch
pull_requests: +19395
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/20090

___
Python tracker 

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



[issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented

2020-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

I consider that all things that could be done have already been done, so I 
close the issue. Thanks for Hai and Dong-hee who helped ;-)

> * _functools: Py_CLEAR(kwd_mark); is commented in _functools_free()

Sadly, PEP 573 implementation is not complete enough to use it in _functools: 
see PR 20055.

> * _abc: abc_invalidation_counter

Fixed in bpo-40566 by:

commit 77c614624b6bf2145bef69830d0f499d8b55ec0c
Author: Dong-hee Na 
Date:   Sat May 9 17:31:40 2020 +0900

bpo-40566: Apply PEP 573 to abc module (GH-20005)


> scanner_traverse(), scanner_clear(), encoder_traverse() and encoder_clear()

tp_clear slot cannot get the defining type (PEP 573 may be extended later to 
allow that).

Using PyType_GetModule(Py_TYPE(self)) to access types stored in the module 
state and then compare Py_TYPE(self) to these types... looks badly broken :-) 
If we get the wrong type, PyType_GetModule(Py_TYPE(self)) will return the wrong 
module and so we cannot get the json state from the wrong module... It's a 
chicken-and-egg issue :-)

I think that it's not worth it to attempt to add back these assertions. It's 
very unlikely to get the wrong types in practice.

--
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



[issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h

2020-05-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19396
pull_request: https://github.com/python/cpython/pull/20091

___
Python tracker 

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



[issue40612] Make traceback module's formatting of SyntaxError more similar to system formatting

2020-05-14 Thread Lysandros Nikolaou

Lysandros Nikolaou  added the comment:

Agreed on everything.

One thing I don't really understand is if you propose to also strip trailing 
whitespace. Does "limit the offset to just past the end of the source text" 
include whitespace or not?

For example, the linked PR does not change this behavior:

➜  cpython git:(pr/20072) ./python
Python 3.9.0a6+ (heads/pr/20072:6df7662ca5, May 14 2020, 20:37:50) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> compile('1 +  ', '', 'exec')
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 1
1 +  
 ^
SyntaxError: invalid syntax

Should we clip just past the end of `1 +` here?

--

___
Python tracker 

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



[issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts

2020-05-14 Thread Ned Deily


Ned Deily  added the comment:

Glenn, you will need to change the Interpreter setting in the Launcher 
Preferences panel.  In the box that says "/usr/bin/pythonw", type 
"/usr/local/bin/python3"; that setting will then be remembered on subsequent 
launches.

--

___
Python tracker 

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



[issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts

2020-05-14 Thread Glenn Travis


Glenn Travis  added the comment:

Thank you Ned.

So close now.  After your final fix, if I understood you correctly, we will no 
longer have to open Terminal? 

And, excuse my vast knowledge gap, but will it ever be possible to not have the 
terminal run in the future?

--

___
Python tracker 

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



[issue40612] Make traceback module's formatting of SyntaxError more similar to system formatting

2020-05-14 Thread Guido van Rossum


Guido van Rossum  added the comment:

My current PR does not strip trailing whitespace. It only strips a single 
trailing newline (since this is usually but not always present, and we don't 
want to its presence to cause an extra blank line, nor do we want its absence 
to cause the text line and the caret line to be run together).

--

___
Python tracker 

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



[issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts

2020-05-14 Thread Glenn Travis


Glenn Travis  added the comment:

It is working now. However, I end up with two terminal windows open.
One is the one that I opened and the second appears to have been opened by the 
Launcher??

--

___
Python tracker 

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



[issue40612] Make traceback module's formatting of SyntaxError more similar to system formatting

2020-05-14 Thread Guido van Rossum


Guido van Rossum  added the comment:

(And, to be clear, I don't *want* to strip trailing spaces.)

--

___
Python tracker 

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



[issue40612] Make traceback module's formatting of SyntaxError more similar to system formatting

2020-05-14 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

Understood.

--

___
Python tracker 

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



[issue40627] Bus error on 'except E as a.b:'

2020-05-14 Thread Guido van Rossum


New submission from Guido van Rossum :

This seems due to some new check in pegen:

>>> try:
...   pass
... except E as a.b:
...   pass
... 
Bus error: 10

--
messages: 368860
nosy: gvanrossum, lys.nikolaou, pablogsal
priority: normal
severity: normal
stage: needs patch
status: open
title: Bus error on 'except E as a.b:'
type: crash

___
Python tracker 

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



[issue40627] Bus error on 'except E as a.b:'

2020-05-14 Thread Guido van Rossum


Guido van Rossum  added the comment:

Oh, looks like https://github.com/python/cpython/pull/20083 fixes it.

--
keywords: +patch
message_count: 1.0 -> 2.0
pull_requests: +19397
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/20083

___
Python tracker 

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



[issue40627] Bus error on 'except E as a.b:'

2020-05-14 Thread Guido van Rossum


Guido van Rossum  added the comment:

Sorry!

--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> PEG Parser: Invalid targets for augassign and except succeed

___
Python tracker 

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



[issue40628] sockmodule.c: sock_connect vs negative errno values...

2020-05-14 Thread Ryan C. Gordon


New submission from Ryan C. Gordon :

(Forgive any obvious mistakes in this report, I'm almost illiterate with 
Python, doubly so with Python internals.)

In trying to get buildbot-worker running on Haiku ( https://haiku-os.org/ ), it 
runs into a situation where it tries to connect a non-blocking TCP socket, 
which correctly reports EINPROGRESS, and cpython/Modules/sockmodule.c's 
internal_connect() returns this error code to sock_connect() and 
sock_connect_ex().

Both of the sock_connect* functions will return NULL if the error code is 
negative, but on Haiku, all the errno values are negative (EINPROGRESS, for 
example, is -2147454940).

I _think_ what sock_connect is intending to do here...

res = internal_connect(s, SAS2SA(&addrbuf), addrlen, 1);
if (res < 0)
return NULL;

...is say "if we had a devastating and unexpected system error, give up 
immediately." Buildbot-worker seems to confirm this by throwing this exception 
in response:

  builtins.SystemError:  
returned NULL without setting an error

internal_connect returns -1 in those devastating-and-unexpected cases--namely 
when an exception is to be raised--and does not ever use that to otherwise 
signify a legit socket error. Linux and other systems don't otherwise fall into 
this "res < 0" condition because errno values are positive on those systems.

So I believe the correct fix here, in sock_connect() and sock_connect_ex(), is 
to check "if (res == -1)" instead of "res < 0" and let all other negative error 
codes carry on.

If this seems like the correct approach, I can assemble a pull request, but I 
don't know the full ramifications of this small change, so I thought I'd report 
it here first.

--ryan.

--
components: Extension Modules
messages: 368863
nosy: icculus
priority: normal
severity: normal
status: open
title: sockmodule.c: sock_connect vs negative errno values...
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue25872] multithreading traceback KeyError when modifying file

2020-05-14 Thread A.M. Kuchling


Change by A.M. Kuchling :


--
nosy: +akuchling
nosy_count: 5.0 -> 6.0
pull_requests: +19398
pull_request: https://github.com/python/cpython/pull/20092

___
Python tracker 

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



[issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h

2020-05-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset a482dc500b6ec4889f6a126ba08cbad6c11e37bc by Victor Stinner in 
branch 'master':
bpo-40602: Write unit tests for _Py_hashtable_t (GH-20091)
https://github.com/python/cpython/commit/a482dc500b6ec4889f6a126ba08cbad6c11e37bc


--

___
Python tracker 

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



[issue40619] compile() passes rest of file as SyntaxError().text when file unreadable

2020-05-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset bcc30360951a303aa72b0502b77aad2c5f09f30d by Pablo Galindo in 
branch 'master':
bpo-40619: Correctly handle error lines in programs without file mode (GH-20090)
https://github.com/python/cpython/commit/bcc30360951a303aa72b0502b77aad2c5f09f30d


--

___
Python tracker 

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



[issue40619] compile() passes rest of file as SyntaxError().text when file unreadable

2020-05-14 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
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



[issue40621] Python crashes with new parser on invalid exception handlers

2020-05-14 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> PEG Parser: Invalid targets for augassign and except succeed

___
Python tracker 

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



[issue40618] PEG Parser: Invalid targets for augassign and except succeed

2020-05-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset ce21cfca7bb2d18921bc4ac27cb064726996c519 by Lysandros Nikolaou in 
branch 'master':
bpo-40618: Disallow invalid targets in augassign and except clauses (GH-20083)
https://github.com/python/cpython/commit/ce21cfca7bb2d18921bc4ac27cb064726996c519


--

___
Python tracker 

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



[issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h

2020-05-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d2dc827d16479d99927a6923a0347199d7c694fb by Victor Stinner in 
branch 'master':
bpo-40602: _Py_hashtable_set() reports rehash failure (GH-20077)
https://github.com/python/cpython/commit/d2dc827d16479d99927a6923a0347199d7c694fb


--

___
Python tracker 

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



[issue40602] Move Modules/hashtable.h to Include/internal/pycore_hashtable.h

2020-05-14 Thread STINNER Victor


Change by STINNER Victor :


--
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



[issue22107] tempfile module misinterprets access denied error on Windows

2020-05-14 Thread Tor Colvin


Change by Tor Colvin :


--
nosy: +Tor.Colvin

___
Python tracker 

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



[issue1776160] Buffer overflow when listing deeply nested directory

2020-05-14 Thread Zackery Spytz


Zackery Spytz  added the comment:

Python 2 is EOL.

--
nosy: +ZackerySpytz

___
Python tracker 

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



[issue1776160] Buffer overflow when listing deeply nested directory

2020-05-14 Thread Benjamin Peterson


Change by Benjamin Peterson :


--
resolution:  -> wont fix
stage: test needed -> 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



[issue40377] APPDATA

2020-05-14 Thread Chris Billington


Change by Chris Billington :


--
title: APPDATA location in Microsoft Store version -> APPDATA

___
Python tracker 

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



[issue40377] APPDATA location in Microsoft Store version

2020-05-14 Thread Chris Billington


Change by Chris Billington :


--
title: APPDATA -> APPDATA location in Microsoft Store version

___
Python tracker 

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



[issue40237] Test code coverage (C) job of Travis CI fails on test_distutils which creates _configtest.gcno file

2020-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

It seems like results at published at: https://codecov.io/gh/python/cpython/

It seems like there is coverage on both C and Python code. I never used this 
service.

--
nosy: +p-ganssle

___
Python tracker 

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



[issue40548] Always run GitHub action jobs, even on documentation-only jobs

2020-05-14 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 75d7257b201a56f950c20cd9f5753a83fff4742b by Filipe Laíns in 
branch 'master':
bpo-40548: GitHub Action workflow: skip jobs on doc only PRs (GH-19983)
https://github.com/python/cpython/commit/75d7257b201a56f950c20cd9f5753a83fff4742b


--

___
Python tracker 

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



[issue40462] [easy] undefined name in Lib/test/mock_socket.py

2020-05-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests:  -19288

___
Python tracker 

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



[issue40460] [easy] undefined name in Lib/idlelib/zzdummy.py

2020-05-14 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue40462] [easy] undefined name in Lib/test/mock_socket.py

2020-05-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19400
pull_request: https://github.com/python/cpython/pull/20094

___
Python tracker 

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



[issue40460] [easy] undefined name in Lib/idlelib/zzdummy.py

2020-05-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset edf2643bbb9859403239fe1cb3c212b1a2a8e65c by Victor Stinner in 
branch 'master':
bpo-40460: Fix typo in idlelib/zzdummy.py (GH-20093)
https://github.com/python/cpython/commit/edf2643bbb9859403239fe1cb3c212b1a2a8e65c


--

___
Python tracker 

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



[issue40460] [easy] undefined name in Lib/idlelib/zzdummy.py

2020-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

> Yes, simple typo.

Ok, thanks for the confirmation :-) It's now fixed.

--
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



[issue40618] PEG Parser: Invalid targets for augassign and except succeed

2020-05-14 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
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



[issue40142] Modify _PyObject_GC_TRACK() to ensure that newly tracked object is valid

2020-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

While it might be doable, I don't have the bandwidth to investigate this issue 
and so I prefer to close it as out of date.

--
resolution:  -> out of date
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



[issue40462] [easy] undefined name in Lib/test/mock_socket.py

2020-05-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 4b972faf605912092013a1fdbf486c498d002926 by Victor Stinner in 
branch 'master':
bpo-40462: Fix typo in test_json (GH-20094)
https://github.com/python/cpython/commit/4b972faf605912092013a1fdbf486c498d002926


--

___
Python tracker 

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



[issue40462] [easy] undefined name in Lib/test/mock_socket.py

2020-05-14 Thread STINNER Victor

STINNER Victor  added the comment:

Thanks for the fix Furkan Önder!

--
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



[issue25920] PyOS_AfterFork should reset socketmodule's lock

2020-05-14 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Does the example code (which should be posted here) still hang?

If so, automated tests that hang indefinitely on failure are a nuisance.  A 
revised example that failed after, say, a second would be better.

--
nosy: +terry.reedy
versions: +Python 3.9 -Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue40055] test___all__ and test_distutils alters the enviroinment: pkg_resources.PEP440Warning

2020-05-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19401
pull_request: https://github.com/python/cpython/pull/20095

___
Python tracker 

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



[issue40629] Error MSB4086 (numeric comparison)

2020-05-14 Thread veganaiZe


New submission from veganaiZe :

I'm getting an "error MSB4086: A numeric comparison was attempted ..." while 
attempting to build Python 3.8.3 (branch `3.8` from github) on Windows 8.1 
(64-bit) with VC++ Build Tools 14.0 (2015 R3), at the command line.

I'm guessing that I might have an incorrect (ie. too old) version of the .NET 
tools?

I've attach the `PCBuild\clean.bat -vv` output.

I can provide many more details but I didn't want to overwhelm.

--
components: Windows
files: clean_out.txt
messages: 368877
nosy: paul.moore, steve.dower, tim.golden, veganaiZe, zach.ware
priority: normal
severity: normal
status: open
title: Error MSB4086 (numeric comparison)
type: compile error
versions: Python 3.8
Added file: https://bugs.python.org/file49155/clean_out.txt

___
Python tracker 

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



[issue22652] Add suggestion about keyword arguments to this error message: "builtins.TypeError: my_func() takes 1 positional argument but 2 were given"

2020-05-14 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Serhiy, I am nosying you because you have worked on argument issues in the last 
year.

Minimal example: def f(a, *, b): pass.  In 3.9.0a6,

>>> f(1,2) # ... Same as 5 years ago.
  TypeError: f() takes 1 positional argument but 2 were given

My first inclination was that this is sufficient information.  But ...

>>> f(1,2,b=3) # ...
  TypeError: f() takes 1 positional argument but 2 positional arguments (and 1 
keyword-only argument) were given

The simple message is equally sufficiant here, but more is given, and it seems 
strange to not then give the equivalent for for 'takes'.  So the patch to add 
more seems plausible (but I am not one to carefully review C code).

Jesse, if you still want your patch, possibly updated, considered, please make 
a PR.

We now also have positional-only arguments, and I am not sure how that affects 
my view on this issue.

--
nosy: +serhiy.storchaka, terry.reedy
versions: +Python 3.9 -Python 3.5

___
Python tracker 

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



[issue40462] [easy] undefined name in Lib/test/mock_socket.py

2020-05-14 Thread Furkan Onder


Furkan Onder  added the comment:

You are welcome :=)

--

___
Python tracker 

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



[issue22652] Add suggestion about keyword arguments to this error message: "builtins.TypeError: my_func() takes 1 positional argument but 2 were given"

2020-05-14 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Also, python-ideas list is a good place to get more opinions (too many 
sometimes) on an enhancement proposal.

--

___
Python tracker 

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



[issue25920] PyOS_AfterFork should reset socketmodule's lock

2020-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

> Maybe instead of releasing the lock in the forked child process, we should 
> try to acquire the lock in the os.fork() implementation, and then release it?

In bpo-40089, I added _PyThread_at_fork_reinit() for this purpose: reinitialize 
a lock after a fork to unlocked state. Internally, it leaks memory on purpose 
and then create a new lock, since there is no portable way to reset a lock 
after fork.

The problem is how to register netdb_lock of Modules/socketmodule.c into a list 
of locks which should be reinitialized at fork, or maybe how to register a C 
callback called at fork. There is a *Python* API to register a callback after a 
fork: os.register_at_fork().

See also the meta-issue bpo-6721: "Locks in the standard library should be 
sanitized on fork".

--

___
Python tracker 

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



[issue6721] Locks in the standard library should be sanitized on fork

2020-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-25920: PyOS_AfterFork should reset socketmodule's lock.

--

___
Python tracker 

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



[issue25920] PyOS_AfterFork should reset socketmodule's lock

2020-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

> (I wrote some more details here: 
> https://emptysqua.re/blog/getaddrinfo-deadlock/ )

On macOS, Python is only affected if "MAC_OS_X_VERSION_MIN_REQUIRED < 
MAC_OS_X_VERSION_10_5". Is it still the case in 2020?

Copy/paste of socketmodule.c:

/* On systems on which getaddrinfo() is believed to not be thread-safe,
   (this includes the getaddrinfo emulation) protect access with a lock.

   getaddrinfo is thread-safe on Mac OS X 10.5 and later. Originally it was
   a mix of code including an unsafe implementation from an old BSD's
   libresolv. In 10.5 Apple reimplemented it as a safe IPC call to the
   mDNSResponder process. 10.5 is the first be UNIX '03 certified, which
   includes the requirement that getaddrinfo be thread-safe. See issue #25924.

   It's thread-safe in OpenBSD starting with 5.4, released Nov 2013:
   http://www.openbsd.org/plus54.html

   It's thread-safe in NetBSD starting with 4.0, released Dec 2007:

http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/net/getaddrinfo.c.diff?r1=1.82&r2=1.83
 */
#if ((defined(__APPLE__) && \
MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5) || \
(defined(__FreeBSD__) && __FreeBSD_version+0 < 503000) || \
(defined(__OpenBSD__) && OpenBSD+0 < 201311) || \
(defined(__NetBSD__) && __NetBSD_Version__+0 < 4) || \
!defined(HAVE_GETADDRINFO))
#define USE_GETADDRINFO_LOCK
#endif

--

___
Python tracker 

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



[issue40548] Always run GitHub action jobs, even on documentation-only jobs

2020-05-14 Thread Filipe Laíns

Change by Filipe Laíns :


--
pull_requests: +19402
pull_request: https://github.com/python/cpython/pull/20097

___
Python tracker 

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



[issue40028] Math module method to find prime factors for non-negative int n

2020-05-14 Thread STINNER Victor


STINNER Victor  added the comment:

I suggest to implement this idea on PyPI first and only later propose it for 
inclusion in the stdlib (as a new module, or into an existing module). 
Bikeshedding on names, debate on the appropriate trade-off between correctness 
and speed, how many functions?, which functions?, etc. can be discussed outside 
Python bug tracker first. So far, the proposition is quite vague: "Math module 
method to find prime factors for non-negative int n". Comments on this issue 
gives an idea of the questions which should be answered first. See also 
bpo-37132 which proposes another bunch of functions.

Because such module is easy to write and prototype, bikeshedding on details are 
more likely :-)

An actual implementation may help to drive the discussion, and a dedicated 
project may help to organize discussions (ex: dedicated bug tracker to discuss 
each function independently).

--
nosy: +vstinner

___
Python tracker 

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



[issue40514] [subinterpreters] Add --experimental-isolated-subinterpreters build option

2020-05-14 Thread STINNER Victor


Change by STINNER Victor :


--
components: +Subinterpreters
title: Add --experimental-isolated-subinterpreters build option -> 
[subinterpreters] Add --experimental-isolated-subinterpreters build option

___
Python tracker 

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



[issue40512] [subinterpreters] Meta issue: per-interpreter GIL

2020-05-14 Thread STINNER Victor


Change by STINNER Victor :


--
components: +Subinterpreters -Interpreter Core
title: Meta issue: per-interpreter GIL -> [subinterpreters] Meta issue: 
per-interpreter GIL

___
Python tracker 

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



[issue40513] [subinterpreters] Move _PyRuntimeState.ceval to PyInterpreterState

2020-05-14 Thread STINNER Victor


Change by STINNER Victor :


--
components: +Subinterpreters -Interpreter Core
title: Move _PyRuntimeState.ceval to PyInterpreterState -> [subinterpreters] 
Move _PyRuntimeState.ceval to PyInterpreterState

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-05-14 Thread STINNER Victor


Change by STINNER Victor :


--
components: +Subinterpreters -Interpreter Core
title: Make tuple, dict, frame free lists, unicode interned strings, unicode 
latin1 singletons per-interpreter -> [subinterpreters] Make free lists and 
unicode caches per-interpreter

___
Python tracker 

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



[issue40533] [subinterpreters] Don't share Python objects between interpreters

2020-05-14 Thread STINNER Victor


Change by STINNER Victor :


--
components: +Subinterpreters -Interpreter Core
title: Subinterpreters: don't share Python objects between interpreters -> 
[subinterpreters] Don't share Python objects between interpreters

___
Python tracker 

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



[issue40522] [subinterpreters] Get the current Python interpreter state from Thread Local Storage (autoTSSkey)

2020-05-14 Thread STINNER Victor


Change by STINNER Victor :


--
components: +Subinterpreters -Interpreter Core
title: Subinterpreters: get the current Python interpreter state from Thread 
Local Storage (autoTSSkey) -> [subinterpreters] Get the current Python 
interpreter state from Thread Local Storage (autoTSSkey)

___
Python tracker 

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



[issue39984] Move pending calls from _PyRuntime to PyInterpreterState

2020-05-14 Thread STINNER Victor


Change by STINNER Victor :


--
components: +Subinterpreters -Interpreter Core

___
Python tracker 

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



  1   2   >