[issue24666] Buffered I/O does not take file position into account when reading blocks

2020-01-27 Thread CRYSTAL


Change by CRYSTAL :


--
assignee:  -> docs@python
components: +2to3 (2.x to 3.x conversion tool), Build, Cross-Build, 
Documentation, Extension Modules, FreeBSD, Installation, Interpreter Core, 
Library (Lib), SSL, Tests, Unicode, ctypes
nosy: +Alex.Willmer, docs@python, ezio.melotti, koobs, vstinner

___
Python tracker 

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



[issue14074] argparse allows nargs>1 for positional arguments but doesn't allow metavar to be a tuple

2020-01-27 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

-0 on going forward with this.  AFAICT, no one has requested tuple support (the 
OP just wanted better error handling).  And more fined grained control can 
already be had just by specifying separate positional arguments.

Paul suggested that it may be a better plan to just disallow tuple metavars and 
to give a better error message as the OP suggested.  That makes sense to me.

--
nosy: +rhettinger
priority: high -> normal

___
Python tracker 

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



[issue39298] add BLAKE3 to hashlib

2020-01-27 Thread Larry Hastings


Larry Hastings  added the comment:

I just tried it with clang, and uff-da!  2,737,446,868 bytes/sec!

p.s. I compiled with -O3 for both gcc and clang

--

___
Python tracker 

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



[issue22831] Use "with" to avoid possible fd leaks

2020-01-27 Thread CRYSTAL


Change by CRYSTAL :


--
components: +Build
nosy: +Hinsonlcrystal -Arfrever, berker.peksag, dstufft, eric.araujo, 
ezio.melotti, martin.panter, python-dev, rhettinger, serhiy.storchaka, vstinner
type: resource usage -> security
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



[issue39473] Enable import behavior consistency option

2020-01-27 Thread DarkTrick


New submission from DarkTrick :

Matter:

`import`s are not handled the same throughout the different ways of calling.


Current situation:
===
The resolution of `import` is dependant on the way of calling the script. 
Three ways of calling a script are shown below:
1) python myscript.py   # as script in cwd
2) python -m myscript   # as module in cwd
3) python -m src.myscript   # as module in subpackage of cwd

Given the following situation:

./src
|
|---main.py
||_
|| from subdir.funca import funcA  |
|| funca() |
||_|
|
|---subdir
  |
  |--- __init__.py
  |
  |--- funca.py
  |   |
  |   | from .funcb import funcB   |
  |   | def funcA():   |
  |   |funcb() |
  |   ||
  |
  |
  |--- funcb.py
  |
  | def funcB():   |
  |print("funcB")  |
  ||   

(A) The following call will succeed:
`./src>python -m main`

(B) The following call will succeed:
`./src>python main.py`

(C) The following call will succeed:
`./src>python -m subdir.funca

(D) The following call will not succeed:
`./src>python ./subdir/funca.py

(E) The following call will not succeed:
`./src/subdir>python funca.py


Suggestion:
===
Supply a functionality / an option that will allow all of A~E to succeed. 

S1) So it doesn't matter, if the script is called with or without the -m option 
(D)
S2) So a toplevel script can refer to the package it's placed in by ".", even 
if called direclty (E)


Implementation idea:
=
Problem: The current import logic can't be change for compatibility reasons. 
And maybe it should not. 
Therefore I thought of an option within the python script like
`Option treatAsModule`  
or
`Option relImports`

If such an option would be given, the python interpreter would handle imports 
differently.

--
components: Interpreter Core
messages: 360839
nosy: bluelantern
priority: normal
severity: normal
status: open
title: Enable import behavior consistency option
type: enhancement
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



[issue39298] add BLAKE3 to hashlib

2020-01-27 Thread Larry Hastings


Larry Hastings  added the comment:

I gave it a go.  And yup, I see a definite improvement: it jumped from 
1,583,326,242 bytes/sec to 2,376,741,703 bytes/sec on my Intel laptop using 
AVX2.  A 50% improvement!

I also *think* I'm seeing a 10% improvement in ARM using NEON.  On my DE10-Nano 
board, BLAKE3 portable gets about 50mb/sec, and now BLAKE3 using NEON gets 
about 55mb/sec.  (Roughly.)  I might have goofed up on the old benchmarks 
though, or just not written down the final correct numbers.

I observed no statistically significant performance change in the no-SIMD 
builds on Intel and ARM.

p.s. in my previous comment with that table of benchmarks I said "mb/sec".  I 
meant "bytes/sec".  Oops!

--

___
Python tracker 

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



[issue21696] Idle: test configuration files

2020-01-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The issue is obsolete with respect to the minimal test implied by the opening 
message.  At least two tests (added since this was written) read the .def files.

Some of the proposed tests are, now at least, redundant  For boolean tests like
self.assertIn(get('editor-on-startup', 'bool'), (True, False))
a non-boolean value results in a Warning (treated like error), the assert, and 
remaining tests are skipped, and IDLD hangs.  Stripping strings should not be 
needed.

Some of the tests should be part of a startup check of default *and* user 
options.  Values should also be checked when changed (they mostly are).

Since new options have been added, some tests are missing.

I would like to have a 3-layer option map that can be used for both runtime 
change and the test suite.

--

___
Python tracker 

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



[issue36018] Add a Normal Distribution class to the statistics module

2020-01-27 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 41f4dc3bcf30cb8362a062a26818311c704ea89f by Raymond Hettinger 
(Miss Islington (bot)) in branch '3.8':
bpo-36018: Minor fixes to the NormalDist() examples and recipes. (GH-18226) 
(GH-18227)
https://github.com/python/cpython/commit/41f4dc3bcf30cb8362a062a26818311c704ea89f


--

___
Python tracker 

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



[issue38644] Pass explicitly tstate to function calls

2020-01-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 61f4db8c56ca4b7e60050d96ecc255cfb03d92a0 by Victor Stinner in 
branch 'master':
bpo-38644: Pass tstate in ceval.c (GH-18222)
https://github.com/python/cpython/commit/61f4db8c56ca4b7e60050d96ecc255cfb03d92a0


--

___
Python tracker 

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



[issue36018] Add a Normal Distribution class to the statistics module

2020-01-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17607
pull_request: https://github.com/python/cpython/pull/18227

___
Python tracker 

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



[issue36018] Add a Normal Distribution class to the statistics module

2020-01-27 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 01bf2196d842fc20667c5336e0a7a77eb4fdc25c by Raymond Hettinger in 
branch 'master':
bpo-36018: Minor fixes to the NormalDist() examples and recipes. (GH-18226)
https://github.com/python/cpython/commit/01bf2196d842fc20667c5336e0a7a77eb4fdc25c


--

___
Python tracker 

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



[issue39459] test_import: test_unwritable_module() fails on AMD64 Fedora Stable Clang Installed 3.x

2020-01-27 Thread STINNER Victor


STINNER Victor  added the comment:

> I've added the files to the makefile and AMD64 Fedora Stable Clang Installed 
> 3.x was passing.

Thanks for the fix! I didn't notice that only "Installed" buildbot workers were 
impacted.

--

___
Python tracker 

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



[issue39459] test_import: test_unwritable_module() fails on AMD64 Fedora Stable Clang Installed 3.x

2020-01-27 Thread STINNER Victor


STINNER Victor  added the comment:

commit 2528a6c3d0660c03ae43d796628462ccf8e58190
Author: Dino Viehland 
Date:   Mon Jan 27 14:04:56 2020 -0800

Add test.test_import.data.unwritable package to makefile (#18211)

--

___
Python tracker 

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



[issue39336] Immutable module type can't be used as package in custom loader

2020-01-27 Thread STINNER Victor


STINNER Victor  added the comment:

commit 2528a6c3d0660c03ae43d796628462ccf8e58190
Author: Dino Viehland 
Date:   Mon Jan 27 14:04:56 2020 -0800

Add test.test_import.data.unwritable package to makefile (#18211)

--

___
Python tracker 

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



[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default before Python 4.0

2020-01-27 Thread STINNER Victor


STINNER Victor  added the comment:

I started a thread on typing-sig:
https://mail.python.org/archives/list/typing-...@python.org/thread/JG4IWHO3TZORNESR6ARXFL6OUZU2BEBX/

--

___
Python tracker 

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



[issue38797] x86-64 High Sierra 3.x buildbot worker fails to build Python: python.exe setup.py does crash with a bus error

2020-01-27 Thread STINNER Victor


STINNER Victor  added the comment:

High Sierra buildbot worker is gone.

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



[issue39413] Implement os.unsetenv() on Windows

2020-01-27 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



[issue36018] Add a Normal Distribution class to the statistics module

2020-01-27 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
pull_requests: +17606
pull_request: https://github.com/python/cpython/pull/18226

___
Python tracker 

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



[issue39205] multiprocessing: Hang when interpreter exits after ProcessPoolExecutor.shutdown(wait=False)

2020-01-27 Thread STINNER Victor


Change by STINNER Victor :


--
title: Hang when interpreter exits after 
ProcessPoolExecutor.shutdown(wait=False) -> multiprocessing: Hang when 
interpreter exits after ProcessPoolExecutor.shutdown(wait=False)

___
Python tracker 

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



[issue39205] Hang when interpreter exits after ProcessPoolExecutor.shutdown(wait=False)

2020-01-27 Thread Brian Quinlan


Brian Quinlan  added the comment:


New changeset 884eb89d4a5cc8e023deaa65001dfa74a436694c by Brian Quinlan in 
branch 'master':
bpo-39205: Tests that highlight a hang on ProcessPoolExecutor shutdown (#18221)
https://github.com/python/cpython/commit/884eb89d4a5cc8e023deaa65001dfa74a436694c


--

___
Python tracker 

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



[issue39467] Allow to deprecate CLI arguments in argparse

2020-01-27 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
Removed message: https://bugs.python.org/msg360813

___
Python tracker 

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



[issue39467] Allow to deprecate CLI arguments in argparse

2020-01-27 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Will leave this open for a while so that many people can comment on the 
proposal before we act on it.

My initial take is:

* Having a way to deprecate seems useful.

* In practice, I haven't seen this done very much (in big tooling such as GCC 
perhaps, but everyday command-line tools don't seem to do this AFAICT).

* The warnings module is likely not the right implementation tool.  The 
warnings module doesn't make as much sense for CLIs as it does for libraries.  
In particular, the warnings module is all about the ability of consumer code to 
filter, ignore, or escalate warnings.  Also, we've so far been good about 
minimizing inter-module dependencies so that start-up time remains fast.

* The PR is aggressive in providing *deprecated*, *deprecated_reason*, and 
*deprecated_pending*.  Perhaps a simpler hook or flag would suffice.  The 
overall module API is already large enough to be a barrier to learning all the 
features.

* There is some question as to whether this belongs in argparse at all or 
whether it should be in downstream, post-parsing logic.  For example:

parser.add_argument('--throw', action='store_true',
 help = '(deprecated use "toss" instead) causes ball to move')
...
args = parser.parse_args()
if args.throw:
 print('"throw" has been deprecated, use "toss" instead',
   file=sys.stderr)

--

___
Python tracker 

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



[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-27 Thread Giampaolo Rodola'


Change by Giampaolo Rodola' :


--
assignee: docs@python -> giampaolo.rodola
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



[issue39392] Python Turtle is not filling alternate overlapping areas of a shape with same color

2020-01-27 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



[issue39392] Python Turtle is not filling alternate overlapping areas of a shape with same color

2020-01-27 Thread miss-islington


miss-islington  added the comment:


New changeset 005b0596326cf1b4f17e8d38bfc3887d4486e564 by Miss Islington (bot) 
in branch '3.7':
bpo-39392: Turtle overlap fill depends on OS (GH-18223)
https://github.com/python/cpython/commit/005b0596326cf1b4f17e8d38bfc3887d4486e564


--
nosy: +miss-islington

___
Python tracker 

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



[issue39392] Python Turtle is not filling alternate overlapping areas of a shape with same color

2020-01-27 Thread miss-islington


miss-islington  added the comment:


New changeset b487a8ed5bd267d62a05c3cab7def6b1f36999ea by Miss Islington (bot) 
in branch '3.8':
bpo-39392: Turtle overlap fill depends on OS (GH-18223)
https://github.com/python/cpython/commit/b487a8ed5bd267d62a05c3cab7def6b1f36999ea


--

___
Python tracker 

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



[issue39390] shutil.copytree - 3.8 changed argument types of the ignore callback

2020-01-27 Thread Giampaolo Rodola'


Giampaolo Rodola'  added the comment:


New changeset cf9d00554715febf21cf94950da4f42723b80498 by Giampaolo Rodola 
(mbarkhau) in branch '3.8':
[3.8] bpo-39390 shutil: fix argument types for ignore callback (GH-18122)
https://github.com/python/cpython/commit/cf9d00554715febf21cf94950da4f42723b80498


--

___
Python tracker 

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



[issue39392] Python Turtle is not filling alternate overlapping areas of a shape with same color

2020-01-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17605
pull_request: https://github.com/python/cpython/pull/18225

___
Python tracker 

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



[issue39392] Python Turtle is not filling alternate overlapping areas of a shape with same color

2020-01-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17604
pull_request: https://github.com/python/cpython/pull/18224

___
Python tracker 

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



[issue39392] Python Turtle is not filling alternate overlapping areas of a shape with same color

2020-01-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 2824c45a0a020f12f27da7e7162e8636c21bf869 by Terry Jan Reedy in 
branch 'master':
bpo-39392: Turtle overlap fill depends on OS (#18223)
https://github.com/python/cpython/commit/2824c45a0a020f12f27da7e7162e8636c21bf869


--

___
Python tracker 

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



[issue30780] IDLE: configdialog - add tests for ConfigDialog GUI.

2020-01-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


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

___
Python tracker 

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



[issue31414] IDLE: Entry tests should delete before insert.

2020-01-27 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



[issue31414] IDLE: Entry tests should delete before insert.

2020-01-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Opened #39472 for changes dialog itself.

--

___
Python tracker 

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



[issue39472] IDLE: improve handling of int entry in settings dialog

2020-01-27 Thread Terry J. Reedy


New submission from Terry J. Reedy :

Spinoff from #31414, about int entry fields.  It claims: Note: a deeper problem 
is attaching a tracer that get called with each keystroke.  Using a StringVar 
avoids the error when the entry is blanked, but currently allows non-ints to be 
saved.  A better solution would be to not do the auto tracing, but use a IntVar 
and only call var_changed when the user 'leaves' the box, after checking for a 
count in a sane range.

Verify claim and proposed solution.

--
assignee: terry.reedy
components: IDLE
messages: 360821
nosy: terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: IDLE: improve handling of int entry in settings dialog
type: behavior
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



[issue39392] Python Turtle is not filling alternate overlapping areas of a shape with same color

2020-01-27 Thread Terry J. Reedy


Change by Terry J. Reedy :


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

___
Python tracker 

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



[issue39459] test_import: test_unwritable_module() fails on AMD64 Fedora Stable Clang Installed 3.x

2020-01-27 Thread Dino Viehland


Dino Viehland  added the comment:

I've added the files to the makefile and AMD64 Fedora Stable Clang Installed 
3.x was passing.

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



[issue39471] Meaning and clarification of PyBuffer_Release()

2020-01-27 Thread Eric Wieser


Change by Eric Wieser :


--
nosy: +Eric Wieser

___
Python tracker 

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



[issue38644] Pass explicitly tstate to function calls

2020-01-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17602
pull_request: https://github.com/python/cpython/pull/18222

___
Python tracker 

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



[issue39391] Nondeterministic Pydoc output on functions that have functions as default parameters

2020-01-27 Thread Peter O.


Peter O.  added the comment:

No, the use case I have in mind is storing outputs of the pydoc3 program -- as 
is -- in version control systems such as Git (e.g., running a command like 
"pydoc3 mymodule > mymodule_doc.txt").  The pydoc3 output is not further parsed 
by programs, or even "tested".

For example, adding "#doctest: +ELLIPSIS" as in the following example does not 
solve the problem in the opening post:


def testfunc(a, m=d0): #doctest: +ELLIPSIS
   pass

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

___
Python tracker 

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



[issue39471] Meaning and clarification of PyBuffer_Release()

2020-01-27 Thread Sebastian Berg


Sebastian Berg  added the comment:

I went through Python, `array` seems to not break the logic. pickling has a 
comment which specifically wants to run into the argument parsing corner case 
above (I am not sure that it is really important). However, 
`Modules/_testbuffer.c` (which is just test) actually does allocate new memory 
for the buffer!

I can be convinced that this is how it is supposed to be, but right now I am 
still not quite. The main idea is efficient no-copy data sharing. It is always 
possible to create a `to_memoryview()` method if a realloc was 
desired/necessary...

--

___
Python tracker 

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



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-27 Thread STINNER Victor


STINNER Victor  added the comment:

There are still around 122 calls to Py_FatalError() in the master branch. But 
remaining ones are the hardest to remove. I close the issue, it's already 
better than previously.

Compare this number to 285 calls in Python 3.6.

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



[issue30780] IDLE: configdialog - add tests for ConfigDialog GUI.

2020-01-27 Thread miss-islington


miss-islington  added the comment:


New changeset 7b57b15bd83879ee35f8758a84a7857a9968c145 by Miss Islington (bot) 
in branch '3.8':
bpo-30780: Add IDLE configdialog tests (GH-3592)
https://github.com/python/cpython/commit/7b57b15bd83879ee35f8758a84a7857a9968c145


--

___
Python tracker 

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



[issue30780] IDLE: configdialog - add tests for ConfigDialog GUI.

2020-01-27 Thread miss-islington


miss-islington  added the comment:


New changeset 5aefee6f989821c5dc36d10a9cfd083d7aa737a5 by Miss Islington (bot) 
in branch '3.7':
bpo-30780: Add IDLE configdialog tests (GH-3592)
https://github.com/python/cpython/commit/5aefee6f989821c5dc36d10a9cfd083d7aa737a5


--
nosy: +miss-islington

___
Python tracker 

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



[issue39153] Clarify refcounting semantics of PyDict_SetItem[String]

2020-01-27 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


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

___
Python tracker 

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



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d3a1de22705cc79d7e8a0f44c4f00255e58c8b20 by Victor Stinner in 
branch 'master':
bpo-38631: Avoid Py_FatalError() in _PyCodecRegistry_Init() (GH-18217)
https://github.com/python/cpython/commit/d3a1de22705cc79d7e8a0f44c4f00255e58c8b20


--

___
Python tracker 

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



[issue39471] Meaning and clarification of PyBuffer_Release()

2020-01-27 Thread Sebastian Berg


Sebastian Berg  added the comment:

Hmmm, it seems I had missed this chunk of PEP 3118 before:

> Exporters will need to define a bf_releasebuffer function if they can 
> re-allocate their memory, strides, shape, suboffsets, or format variables 
> which they might share through the struct bufferinfo.

Which reads like the opposite of what I would like to see, unfortunately. Which 
I guess means that the parsing issue should be addressed differently. Opinions 
still welcome, though.

--

___
Python tracker 

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



[issue39467] Allow to deprecate CLI arguments in argparse

2020-01-27 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Will leave this open for a while so that many people can comment on the 
proposal before we act on it.

My initial take is:

* Having a way to deprecate seems useful.

* In practice, I haven't seen this done very much (in big tooling such as GCC 
perhaps, but everyday command-line tools don't seem to do this AFAICT).

* The warnings module is likely not the right implementation tool.  The 
warnings module doesn't make as much sense for CLIs as it does for libraries.  
It particular, the warnings module is all about the ability of consumer code to 
filter, ignore, or escalate warnings.  Also, we've so far been good about 
minimizing inter-module dependencies so that start-up time remains fast.

* The PR is aggressive in providing *deprecated*, *deprecated_reason*, and 
*deprecated_pending*.  Perhaps a simpler hook or flag would suffice.  The 
overall module API is already large enough to be a barrier to learning all the 
features.

* There is some question as to whether this belongs in argparse at all or 
whether it should be in downstream, post-parsing logic.  For example:
 
args = parser.parse_args()
if args.throw:
 print('"throw" has been deprecated, use "toss" instead',
   file=sys.stderr)
..

--

___
Python tracker 

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



[issue39205] Hang when interpreter exits after ProcessPoolExecutor.shutdown(wait=False)

2020-01-27 Thread Brian Quinlan


Change by Brian Quinlan :


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

___
Python tracker 

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



[issue30780] IDLE: configdialog - add tests for ConfigDialog GUI.

2020-01-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17599
pull_request: https://github.com/python/cpython/pull/18219

___
Python tracker 

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



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset a27831351873bd7eff10863353d475c29fb0d7bb by Victor Stinner in 
branch 'master':
bpo-38631: Avoid Py_FatalError() in PyCode_New() (GH-18215)
https://github.com/python/cpython/commit/a27831351873bd7eff10863353d475c29fb0d7bb


--

___
Python tracker 

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



[issue30780] IDLE: configdialog - add tests for ConfigDialog GUI.

2020-01-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +17598
pull_request: https://github.com/python/cpython/pull/18218

___
Python tracker 

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



[issue30780] IDLE: configdialog - add tests for ConfigDialog GUI.

2020-01-27 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset dd023ad1619b6f1ab313986e8953eea32c18f50c by Terry Jan Reedy 
(Cheryl Sabella) in branch 'master':
bpo-30780: Add IDLE configdialog tests (#3592)
https://github.com/python/cpython/commit/dd023ad1619b6f1ab313986e8953eea32c18f50c


--

___
Python tracker 

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



[issue39471] Meaning and clarification of PyBuffer_Release()

2020-01-27 Thread Sebastian Berg


New submission from Sebastian Berg :

The current documentation of ``PyBuffer_Release()`` and the PEP is a bit fuzzy 
about what the function can and cannot do.

When an object exposes the buffer interface, I believe it should always return 
a `view` (in NumPy speak) of its own data, i.e. the data exposed by the object 
is also owned by it directly.

On the other hand the buffer view _itself_ has fields such as `strides`, etc. 
which may need allocating.

In other words, I think `PyBuffer_Release()` should be documented to 
deallocate/invalidate the `Py_buffer`. But, it *must not* invalidate the actual 
memory it points to. If I copy all information out of the `Py_buffer` and then 
free it, the copy must still be valid.

I think this is the intention, but it is not spelled out clear enough, it is 
also the reason for the behaviour of the "#s", etc. keyword argument parsers 
failing due to the code:

if (pb != NULL && pb->bf_releasebuffer != NULL) {
*errmsg = "read-only bytes-like object";
return -1;
}

which in turn currently means NumPy decides to _not_ implement bf_releasebuffer 
at all (leading to very ugly work arounds).

I am happy to make a PR, if we can get to a point where everyone is absolutely 
certain that the above interpretation was always correct, we could clean up a 
lot of code inside NumPy as well!

--
components: C API
messages: 360809
nosy: seberg
priority: normal
severity: normal
status: open
title: Meaning and clarification of PyBuffer_Release()
type: behavior
versions: Python 2.7, 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



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17597
pull_request: https://github.com/python/cpython/pull/18217

___
Python tracker 

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



[issue39470] Indicate that os.makedirs is equivalent to Path.mkdir

2020-01-27 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


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

___
Python tracker 

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



[issue39470] Indicate that os.makedirs is equivalent to Path.mkdir

2020-01-27 Thread Joannah Nanjekye


New submission from Joannah Nanjekye :

:func:`os.makedirs` is equivalent to ``mkdir -p`` and :meth:`Path.mkdir()` when 
given an optional *exist_ok* argument.

--
messages: 360808
nosy: nanjekyejoannah
priority: normal
severity: normal
status: open
title: Indicate that os.makedirs is equivalent to Path.mkdir

___
Python tracker 

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



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 47ee8a6063c22ec272fe7a2d95d12f7811ebb48b by Victor Stinner in 
branch 'master':
bpo-38631: Avoid Py_FatalError() in _memory_release() (GH-18214)
https://github.com/python/cpython/commit/47ee8a6063c22ec272fe7a2d95d12f7811ebb48b


--

___
Python tracker 

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



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset a94c6b61aa5c09237b8105e5aee638cd54197b6f by Victor Stinner in 
branch 'master':
bpo-38631: Avoid Py_FatalError() in PyModule_Create2() (GH-18212)
https://github.com/python/cpython/commit/a94c6b61aa5c09237b8105e5aee638cd54197b6f


--

___
Python tracker 

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



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17595
pull_request: https://github.com/python/cpython/pull/18215

___
Python tracker 

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



[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-27 Thread Ethan Furman


Ethan Furman  added the comment:

Cool.  I appreciate all the work in this area, thank you!

--

___
Python tracker 

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



[issue39461] [RFE] os.environ should support Path-like values, like subprocess(..., env=...)

2020-01-27 Thread Ethan Furman


Ethan Furman  added the comment:

The idea behind PEP 519 was to alleviate str(path_obj) calls between the 
os/program interface.  We can either make that as consistent as we can as we 
find places that still require the str(path_obj) idiom, or we can make users 
remember which ones do, and which ones don't, easily use a Path object.

In my opinion, having to remember is a very unpleasant and frustrating user 
experience.

Serhiy Storchaka:

> Path-like objects are now unintentionally accepted for many non-path
> things, like hostname in socket.sethostname() and username in
> os.initgroups(). I also think it was a mistake, and we should not
> make new mistakes.

There will always be ways for users to make mistakes when using API's.  Whether 
they passed a Path path to os.sethostname() or a string path to 
os.sethostbyname(), it's still their bug, and linters/type-checkers exist to 
help catch those kinds of bugs.

Brett Canon:
---
> Environment variables are strings, period, so they should be specified
> as such;

Out of curiosity, any idea how often non-strings are used to set os.environ, 
and so need explicit conversion?

--

___
Python tracker 

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



[issue39461] [RFE] os.environ should support Path-like values, like subprocess(..., env=...)

2020-01-27 Thread Eryk Sun


Eryk Sun  added the comment:

> I honestly would have disagreed with the Popen change for its 'env' 
> argument or any other place that is dealing with environment
> variables

os.spawnve (Windows) and os.execve support __fspath__ for the env  dict 
partially due to me (bpo-28114), so sorry if that was the wrong decision. 
However, at least on the POSIX side, I was restoring previous behavior that 
aligned with POSIX os.putenv. An example of what's supported currently:

Windows:

>>> path = os.environ['comspec']
>>> argv = ['cmd', '/c', 'echo %SPAM%']
>>> env = os.environ.copy()
>>> env[Path('SPAM')] = Path('eggs')
>>> os.spawnve(0, path, argv, env)
eggs
0

POSIX:

>>> path = '/bin/bash'
>>> argv = ['bash', '-c', 'echo $SPAM']
>>> env = os.environ.copy()
>>> env[Path('SPAM')] = Path('eggs')
>>> os.spawnve(0, path, argv, env)
eggs
0

--

___
Python tracker 

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



[issue39282] python-config --embed documentation

2020-01-27 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:

Leaving this for @victor to decide since he is the PR author.

--
nosy: +nanjekyejoannah, vstinner

___
Python tracker 

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



[issue39248] test_distutils fails on PPC64 Fedora 3.x: /tmp/subprocess.py

2020-01-27 Thread STINNER Victor


STINNER Victor  added the comment:

The buildbot is back to green, thank you David :-)
https://buildbot.python.org/all/#/builders/8/builds/254

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



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17594
pull_request: https://github.com/python/cpython/pull/18214

___
Python tracker 

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



[issue39461] [RFE] os.environ should support Path-like values, like subprocess(..., env=...)

2020-01-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Path-like objects are now unintentionally accepted for many non-path things, 
like hostname in socket.sethostname() and username in os.initgroups(). I also 
think it was a mistake, and we should not make new mistakes.

--

___
Python tracker 

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



[issue39469] Support for relative home path in pyvenv.cfg

2020-01-27 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue38631] Replace Py_FatalError() with regular Python exceptions

2020-01-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17591
pull_request: https://github.com/python/cpython/pull/18212

___
Python tracker 

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



[issue39469] Support for relative home path in pyvenv.cfg

2020-01-27 Thread Jeff Edwards


New submission from Jeff Edwards :

Currently, the interpreter only supports absolute paths for the 'home' 
directory in the pyvenv.cfg file.  While this works when the interpreter is 
always installed at a fixed location, it impacts the portability of virtual 
environments and can make it notably more-difficult if multiple virtual 
environments are shipped with a shared interpreter and are intended to be 
portable and working in any directory.

Many of these issues can be solved for if 'home' can use a directory relative 
to the directory of the pyvenv.cfg file.  This is detected by the presence of a 
starting '.' in the value.

A common use-case for this is that a script-based tool (e.g. black or 
supervisor) may be shipped with a larger portable application where they are 
intended to share the same interpreter (to save on deployment size), but may 
have conflicting dependencies.  Since the application only depends on the 
executable scripts, those packages could be packaged into  their own virtual 
environments with their dependencies.

--
components: Interpreter Core
messages: 360800
nosy: Jeff.Edwards
priority: normal
severity: normal
status: open
title: Support for relative home path in pyvenv.cfg
type: enhancement
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



[issue39461] [RFE] os.environ should support Path-like values, like subprocess(..., env=...)

2020-01-27 Thread STINNER Victor


STINNER Victor  added the comment:

> I don't think this should be done (and I honestly would have disagreed with 
> the Popen change for its 'env' argument or any other place that is dealing 
> with environment variables). Environment variables are strings, period, so 
> they should be specified as such; explicit is better than implicit (and there 
> isn't enough pragmatic benefit to override this in my opinion).

I don't think that subprocess accepts fspath on purpose. It uses fsencode() 
because it's convenient to encode Unicode to the filesystem encoding using the 
right error handler.

It's a side effect of the commit c1cbeedf0c650c3f7c64f04479070d39e15e1baf. In 
fact, I'm opposed to this commit, but now it's too change to change it again :-)

os.putenv() is unrelated to os.environ. Calling os.putenv() does not update 
os.environ, whereas setting a key in os.environ calls internally os.putenv().

I like the idea of keeping os.environ as simple as a dict mapping strings to 
trings (in term of API, internally it's more complicated).

--

___
Python tracker 

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



[issue39459] test_import: test_unwritable_module() fails on AMD64 Fedora Stable Clang Installed 3.x

2020-01-27 Thread Dino Viehland


Change by Dino Viehland :


--
pull_requests: +17590
pull_request: https://github.com/python/cpython/pull/18211

___
Python tracker 

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



[issue39459] test_import: test_unwritable_module() fails on AMD64 Fedora Stable Clang Installed 3.x

2020-01-27 Thread Dino Viehland


Dino Viehland  added the comment:

Ahh, that's probably it Brett, I didn't know that was there, thanks!

--

___
Python tracker 

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



[issue39459] test_import: test_unwritable_module() fails on AMD64 Fedora Stable Clang Installed 3.x

2020-01-27 Thread Brett Cannon


Brett Cannon  added the comment:

Was the Makefile updated to install Lib/test/test_import/date/unwritable?

--
nosy: +brett.cannon

___
Python tracker 

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



[issue39461] [RFE] os.environ should support Path-like values, like subprocess(..., env=...)

2020-01-27 Thread Brett Cannon


Brett Cannon  added the comment:

I don't think this should be done (and I honestly would have disagreed with the 
Popen change for its 'env' argument or any other place that is dealing with 
environment variables). Environment variables are strings, period, so they 
should be specified as such; explicit is better than implicit (and there isn't 
enough pragmatic benefit to override this in my opinion).

--

___
Python tracker 

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



[issue39468] .python_history write permission improvements

2020-01-27 Thread SilentGhost


SilentGhost  added the comment:

1. Your PR contains unrelated changes
2. Please test your code: submitting syntactically incorrect code just wastes 
everyone's time

--
nosy: +SilentGhost

___
Python tracker 

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



[issue39430] tarfile.open(mode="r") race condition when importing lzma

2020-01-27 Thread Brett Cannon


Brett Cannon  added the comment:

> When was this change made?

It has always been this way, so no change here. We have actually improved the 
situation over the years with attempts at better locking in importlib itself.

--

___
Python tracker 

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



[issue39468] .python_history write permission improvements

2020-01-27 Thread Aurora


Change by Aurora :


--
pull_requests: +17589
pull_request: https://github.com/python/cpython/pull/18210

___
Python tracker 

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



[issue39468] .python_history write permission improvements

2020-01-27 Thread Aurora


Change by Aurora :


--
pull_requests:  -17586

___
Python tracker 

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



[issue39468] .python_history write permission improvements

2020-01-27 Thread Aurora


Change by Aurora :


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

___
Python tracker 

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



[issue39459] test_import: test_unwritable_module() fails on AMD64 Fedora Stable Clang Installed 3.x

2020-01-27 Thread STINNER Victor


STINNER Victor  added the comment:

> AMD64 Fedora Stable Clang Installed 3.x:
> https://buildbot.python.org/all/#/builders/127/builds/212

So, I added effective uid/gid to pythoninfo, here you have:

os.getegid: 1000
os.geteuid: 1000
os.getgid: 1000
os.getgrouplist: 1000
os.getgroups: 1000
os.getresgid: (1000, 1000, 1000)
os.getresuid: (1000, 1000, 1000)
os.getuid: 1000

There is nothing related to root (uid 0).

--

___
Python tracker 

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



[issue39468] .python_history write permission improvements

2020-01-27 Thread Aurora


Aurora  added the comment:

https://github.com/opensource-assist/cpython/blob/opensource-assist-patch-sitepy-1/Lib/site.py

--

___
Python tracker 

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



[issue39468] .python_history write permission improvements

2020-01-27 Thread Aurora


New submission from Aurora :

On a typical Linux system, if you run 'chattr +i /home/user/.python_history', 
and then run python, then exit, the following error message will be printed out:
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site.py", line 446, in write_history
readline.write_history_file(history)
OSError: [Errno -1] Unknown error -1


With a simple improvement, the site module can check and suggest the user to 
run 'chattr -i' on the .python_history file.

Additionaly, I don't know if it's a good idea to automatically run 'chattr -i' 
in such a situation or not.

--
components: Library (Lib)
messages: 360790
nosy: opensource-assist
priority: normal
severity: normal
status: open
title: .python_history write permission improvements
type: enhancement
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



[issue39459] test_import: test_unwritable_module() fails on AMD64 Fedora Stable Clang Installed 3.x

2020-01-27 Thread Dino Viehland


Dino Viehland  added the comment:

The curious thing about this is other tests in CircularImportTests are 
importing packages from test.test_import.data in the exact same way.

--

___
Python tracker 

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



[issue39461] [RFE] os.environ should support Path-like values, like subprocess(..., env=...)

2020-01-27 Thread Eryk Sun


Eryk Sun  added the comment:

Supporting __fspath__ for os.environ[b] makes it consistent with POSIX 
os.putenv, which already supports it via PyUnicode_FSConverter. For example:

os.putenv(Path('spam'), Path('eggs'))
getenv = ctypes.CDLL('libc.so.6').getenv
getenv.restype = ctypes.c_char_p

>>> getenv(b'spam')
b'eggs'

For symmetry, os.putenv in Windows could be updated to support __fspath__. An 
old patch for bpo-28188 implements this, along with bytes support, via 
PyUnicode_FSDecoder. But bytes support would be limited to UTF-8 strings, so it 
wouldn't be as flexible as os.environb in POSIX, which supports arbitrary bytes 
except for embedded nulls.

--
nosy: +eryksun

___
Python tracker 

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



[issue39467] Allow to deprecate CLI arguments in argparse

2020-01-27 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +djarb, paul.j3, rhettinger -4383

___
Python tracker 

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



[issue39424] [easy] test_signal: test_pidfd_send_signal() uses deprecated assertRaisesRegexp() method

2020-01-27 Thread Hakan


Hakan  added the comment:

I want to work on this as my first contribution

--
nosy: +hakancelik

___
Python tracker 

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



[issue39467] Allow to deprecate CLI arguments in argparse

2020-01-27 Thread hervé

Change by hervé :


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

___
Python tracker 

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



[issue39467] Allow to deprecate CLI arguments in argparse

2020-01-27 Thread hervé

New submission from hervé :

Today it's not possible to deprecate CLI arguments designed with argparse, it 
could be useful to introduce deprecation feature in argparse to allow 
developers to inform their apps's users when an argument is planed to be 
removed in the future.

--
components: Library (Lib)
messages: 360786
nosy: 4383
priority: normal
severity: normal
status: open
title: Allow to deprecate CLI arguments in argparse
type: enhancement
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



[issue39466] Spam

2020-01-27 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks Zachary.

--

___
Python tracker 

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



[issue38610] use-after-free in list object function

2020-01-27 Thread Dong-hee Na


Change by Dong-hee Na :


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



[issue38610] use-after-free in list object function

2020-01-27 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +17584
pull_request: https://github.com/python/cpython/pull/18207

___
Python tracker 

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



[issue39461] [RFE] os.environ should support Path-like values, like subprocess(..., env=...)

2020-01-27 Thread Ethan Furman


Ethan Furman  added the comment:

True, but this example of implicit conversion is only for Path objects which 
are currently implicitly converted throughout the stdlib where appropriate, and 
this looks like one of those appropriate places.

I don't know enough about os.environb to offer an opinion on auto-conversion 
there.

--

___
Python tracker 

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



[issue39248] test_distutils fails on PPC64 Fedora 3.x: /tmp/subprocess.py

2020-01-27 Thread David Edelsohn


David Edelsohn  added the comment:

The file was created and owned by another user.  I have removed the file.  I 
have reached out to the user to find out why he is creating it.

--

___
Python tracker 

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



[issue39453] Use-after-free in list contain

2020-01-27 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +17583
pull_request: https://github.com/python/cpython/pull/18206

___
Python tracker 

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



[issue39466] Spam

2020-01-27 Thread Zachary Ware


Zachary Ware  added the comment:

I've removed the `User` role from that account since all of its posts have been 
spam; it will no longer be able to post.

--
nosy: +zach.ware
resolution: fixed -> not a bug
title: Great -> Spam

___
Python tracker 

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



[issue39459] test_import: test_unwritable_module() fails on AMD64 Fedora Stable Clang Installed 3.x

2020-01-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 4a46adc7746930c4589ee483cad88d3f8504c045 by Victor Stinner in 
branch 'master':
bpo-39459: test.pythoninfo logs effective uid/gid (GH-18203)
https://github.com/python/cpython/commit/4a46adc7746930c4589ee483cad88d3f8504c045


--

___
Python tracker 

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



[issue39453] Use-after-free in list contain

2020-01-27 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +17582
pull_request: https://github.com/python/cpython/pull/18205

___
Python tracker 

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



[issue39453] Use-after-free in list contain

2020-01-27 Thread miss-islington


miss-islington  added the comment:


New changeset 9e1ed518a576897f914227bf538bac426a02a081 by Miss Islington (bot) 
(Dong-hee Na) in branch 'master':
bpo-39453: Add testcase for bpo-39453 (GH-18202)
https://github.com/python/cpython/commit/9e1ed518a576897f914227bf538bac426a02a081


--
nosy: +miss-islington

___
Python tracker 

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



[issue39453] Use-after-free in list contain

2020-01-27 Thread Dong-hee Na


Change by Dong-hee Na :


--
pull_requests: +17581
pull_request: https://github.com/python/cpython/pull/18204

___
Python tracker 

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



[issue39461] [RFE] os.environ should support Path-like values, like subprocess(..., env=...)

2020-01-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Implicit conversion can also hide some bugs.

Semantically os.environ is an str to str mapping and os.environb is a bytes to 
bytes mapping.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



  1   2   >