[issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package.

2019-03-13 Thread emni clap


emni clap  added the comment:

Brother Printers frequently indicate technical hitches because of inward 
reasons. There are numerous reasons which can cause Brother Printer is in an 
Error State. Call us now to get a reliable solution.
 
https://www.brotherprintersupportnumber.com/blog/resolve-brother-printer-error-state-windows-8/

--

___
Python tracker 

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



[issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package.

2019-03-13 Thread emni clap


emni clap  added the comment:

when you get an issue with you website. dont' be worry about it just contact 
see our site which wordpress website provide the solution related to the 
website or any issue contact by email.
https://globalcool.org/how-to-create-a-wordpress-website/

--
nosy: +emniclap

___
Python tracker 

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



[issue36229] Avoid unnecessary copies for list, set, and bytearray ops.

2019-03-13 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Everyone, thanks for chiming in.  Will mark this as closed/rejected.  For this 
reasons listed this thread, it isn't a sensible path for us (hairy at best, 
flat-out wrong at worst).  To the extent people ever have quadratic behavior 
problem, we already have explicit and clean ways to solve it with the existing 
API.

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

___
Python tracker 

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



[issue36283] eval is needlessly limited

2019-03-13 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

> The footnote about why eval/exec cannot be used for arbitrary code

Which footnote? I see nothing here:

https://docs.python.org/3/library/functions.html#eval

> On that point, I still don't understand why PyObject_GetItem doesn't have a 
> PyDict_CheckExact test ...
> After writing all that out this seems more like an issue with  
> PyObject_GetItem


One bug report per ticket please.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue36284] importlib.import_module() not thread safe if Exception is raised (3.4, 3.5)

2019-03-13 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue36285] Integer overflow in array.array.remove()

2019-03-13 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +serhiy.storchaka, vstinner

___
Python tracker 

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



[issue10948] Trouble with dir_util created dir cache

2019-03-13 Thread Éric Araujo

Éric Araujo  added the comment:

Agreed, a doc PR to warn against using any of the distutils *util modules would 
be useful.

--
assignee: eric.araujo -> 
components: +Documentation -Distutils
resolution: works for me -> 
stage: resolved -> needs patch
status: closed -> pending
versions: +Python 3.8 -Python 3.1, Python 3.2

___
Python tracker 

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



[issue31973] Incomplete DeprecationWarning for async/await keywords

2019-03-13 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

My sense is that we will never fix this, so closing as Won't Fix.

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



[issue36285] Integer overflow in array.array.remove()

2019-03-13 Thread Stephan Hohe


Change by Stephan Hohe :


--
keywords: +patch
pull_requests: +12291
stage:  -> patch review

___
Python tracker 

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



[issue15749] cgitb prints html for text when display disabled.

2019-03-13 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Hi Cheryl, I updated and converted the path. Could you please review the PR?

--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue15749] cgitb prints html for text when display disabled.

2019-03-13 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


--
pull_requests: +12290
stage:  -> patch review

___
Python tracker 

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



[issue36285] Integer overflow in array.array.remove()

2019-03-13 Thread Stephan Hohe


New submission from Stephan Hohe :

The array module's `array.remove(x)` iterates over the array, searching for 
`x`. If the array contains >=2G elements this can overflow the `int` loop 
variable.

`array__array_reconstructor_impl()` also contains loops with `int` variables 
that likely have the similar problems.

Changing the loop variables to `Py_ssize_t` fixes the problem. For details see 
the PR.

--
components: Extension Modules
messages: 337889
nosy: sth
priority: normal
severity: normal
status: open
title: Integer overflow in array.array.remove()
type: crash
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue36229] Avoid unnecessary copies for list, set, and bytearray ops.

2019-03-13 Thread Tim Peters


Tim Peters  added the comment:

Josh, I agree - but do read Armin's response.  The string hack was done inside 
ceval.c, where we have extraordinary knowledge of context.  Adding similar 
hacks inside Python C API functions seems to be a non-starter - they can't 
magically start mutating arguments based on refcounts alone.  Armin's 
dead-simple example is compelling.

So if this is desirable at all, it would need to get hairier.

--

___
Python tracker 

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



[issue36274] http.client cannot send non-ASCII request lines

2019-03-13 Thread Tim Burke


Change by Tim Burke :


--
pull_requests: +12289

___
Python tracker 

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



[issue36274] http.client cannot send non-ASCII request lines

2019-03-13 Thread Tim Burke


Change by Tim Burke :


--
keywords: +patch
pull_requests: +12288
stage:  -> patch review

___
Python tracker 

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



[issue36284] importlib.import_module() not thread safe if Exception is raised (3.4, 3.5)

2019-03-13 Thread Riccardo Coccioli

New submission from Riccardo Coccioli :

It seems that importlib.import_module() is not thread-safe if the loaded module 
raises an Exception on Python 3.4 and 3.5. I didn't find any thread-unsafe 
related information in Python's documentation.
The frequency of the failure appears to be random.

This is the setup to reproduce the issue:

#- FILES STRUCTURE
├── fail.py
└── test.py
#-

#- CONTENT OF fail.py
ACCESSIBLE = 'accessible'

import nonexistent  # raise RuntimeError('failed') is basically the same

NOT_ACCESSIBLE = 'not accessible'
#-

#- CONTENT OF test.py
import importlib
import concurrent.futures


def f():
try:
mod = importlib.import_module('fail')
# importlib.reload(mod)  # WORKAROUND

try:
val = mod.NOT_ACCESSIBLE
except AttributeError as e:
val = str(e)

return (mod.__name__, type(mod), mod.ACCESSIBLE, val)
except ImportError as e:
return str(e)


with concurrent.futures.ThreadPoolExecutor(max_workers=3) as executor:
futures = [executor.submit(f) for i in range(5)]
for future in concurrent.futures.as_completed(futures):
print(future.result())
#-

Expected result:
#-
No module named 'nonexistent'
No module named 'nonexistent'
No module named 'nonexistent'
No module named 'nonexistent'
No module named 'nonexistent'
#-

Actual result:
#-
No module named 'nonexistent'
No module named 'nonexistent'
No module named 'nonexistent'
('fail', , 'accessible', "'module' object has no attribute 
'NOT_ACCESSIBLE'")
('fail', , 'accessible', "'module' object has no attribute 
'NOT_ACCESSIBLE'")
#-

In the unexpected output lines, the module has been "partially" imported. The 
'mod' object contains a module object, and trying to access an attribute 
defined before the import that raises Exception works fine, but trying to 
access an attribute defined after the failing import, fails.
It seems like the Exception was not properly raised at module load time, but at 
the same time the module is only partially loaded up to the failing import.

The actual number of half-imported modules varies between runs and picking 
different values for max_workers and range() and can also be zero (normal 
behaviour). Also the frequency of the issue varies.
Using multiprocessing.pool.ThreadPool() and apply_async() instead of 
concurrent.futures.ThreadPoolExecutor has the same effect.

I was able to reproduce the issue with the following Python versions and 
platforms:
- 3.4.2 and 3.5.3 on Linux Debian
- 3.4.9 and 3.5.6 on macOS High Sierra 10.13.6

While the issue doesn't show up at the best of my knowledge on:
- 3.6.7 and 3.7.2 on macOS High Sierra 10.13.6

Thanks to a colleague suggestion I also found a hacky workaround. Uncommenting 
the line in test.py marked as 'WORKAROUND' a reload of the module is forced. 
With that modification the actual result is:
#-
No module named 'nonexistent'
No module named 'nonexistent'
No module named 'nonexistent'
module fail not in sys.modules
module fail not in sys.modules
#-

While this doesn't solve the issue per se, it actually raises the same 
ImportError that the module was supposed to raise in the first place, just with 
a different message, allowing the code to continue it's normal execution.

--
components: Library (Lib)
messages: 337887
nosy: Riccardo Coccioli
priority: normal
severity: normal
status: open
title: importlib.import_module() not thread safe if Exception is raised (3.4, 
3.5)
type: behavior
versions: Python 3.4, Python 3.5

___
Python tracker 

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



[issue36229] Avoid unnecessary copies for list, set, and bytearray ops.

2019-03-13 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

I believe Tim Peters's concern with:

Set1 = Set1 & Set2

is misplaced, because he's drawn an analogy with the string concatenation 
optimization, which *does* handle:

Str1 = Str1 + Str2

because the optimization is in the ceval loop and can check the subsequent 
instruction for a "simple store", clearing the target's reference if the target 
and the left operand are the same thing. This change doesn't try to handle this 
case, so the only time the optimization takes place is when the only reference 
to the left hand operand is on the stack (not in any named variable at all).

Tim's concern *would* make it unsafe to extend this patch to apply the target 
clearing optimization, because at global scope, clearing the target would be 
observable from __hash__/__eq__ (and from other threads); str is safe because 
it holds the GIL the whole time, and can't invoke arbitrary Python level code 
that might release it, set doesn't have that guarantee.

--

___
Python tracker 

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



[issue36283] eval is needlessly limited

2019-03-13 Thread Dan Snider


New submission from Dan Snider :

The footnote about why eval/exec cannot be used for arbitrary code has been 
(for the most part) incorrect for quite some time as the signature for 
PyEval_EvalCodeEx demonstrates:

PyObject* PyEval_EvalCodeEx(PyObject *co, PyObject *globals, PyObject *locals, 
PyObject *const *args, int argcount, PyObject *const *kws, int kwcount, 
PyObject *const *defs, int defcount, PyObject *kwdefs, PyObject *closure)

Making eval a wrapper for PyEval_EvalCodeEx instead of PyEval_EvalCode would be 
a backwards compatible change since new parameters come after the current 3. A 
hypothetical signature for the new signature would be something like:
eval(src, globals: abc.Mapping, locals: abc.Mapping, args: tuple, kwargs: 
dict, defaults: tuple, kwdefaults: dict, closure: tuple). 

In that case, `src` could be unicode, bytes, frames, tracebacks, code objects, 
and even updated to support stuff like parser.STType or 
ast.Module/ast.Interactive/ast.Expresion objects. 

The only objection I can think of is the same as the reason it's currently 
documented that globals must be a dictionary and that is that the LOAD_NAME 
opcode (seemingly) arbitrarily requires frame.f_globals be a dict subtype (even 
though LOAD_GLOBAL doesn't).

On that point, I still don't understand why PyObject_GetItem doesn't have a 
PyDict_CheckExact test for a dictionary fast-path when tp_as_mapping is found 
non-null. That operation - a pointer comparison - takes a fraction of a 
nanosecond on a modern CPU making it essentially free compared to the rest of 
the logic in there... Furthermore, this addition would greatly simplify both 
core and abstract apis and enable the possibility of fixing several 
longstanding bugs caused by using PyDict_GetItem/PyDict_SetItem on a dict 
subtype. Actually, the better solution may be to add PyDict_Check in 
PyObject_Getitem and PyDict_CheckExact in PyDict_GetItem.

After writing all that out this seems more like an issue with  PyObject_GetItem 
and how there is zero consistency throughout the entirety the abstract/core api 
as to whether some arbitrary procedure will try to use the core dictionary api 
as a fast path or head straight for the abstract api.

--
components: Interpreter Core
messages: 337885
nosy: bup
priority: normal
severity: normal
status: open
title: eval is needlessly limited
type: enhancement
versions: Python 3.8

___
Python tracker 

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



[issue36229] Avoid unnecessary copies for list, set, and bytearray ops.

2019-03-13 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

Raymond said: "FWIW, the non-operator versions of these operations already 
support passing in multiple arguments and is the preferred way to do it."

True for sets with union/intersection/difference (and their inplace 
equivalents), but not for lists and bytearrays, which don't have an 
out-of-place version, and the in-place version, extend, only takes a single 
iterable argument.

Perhaps extend could be take multiple iterables as positional varargs, not just 
a single iterable, to make the multi-extend case work efficiently?

Not sure how often this actually comes up though; maybe I've just internalized 
good practices, but I only rarely find myself combining containers where the 
left-most operand is an unreferenced temporary, or combining many containers at 
once in a single line (I use itertools.chain wrapped in a constructor, or 
literals with the unpacking generalization for most of those cases).

--
nosy: +josh.r

___
Python tracker 

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



[issue36229] Avoid unnecessary copies for list, set, and bytearray ops.

2019-03-13 Thread Armin Rigo


Armin Rigo  added the comment:

...or PySequence_Concat() instead of PyNumber_Add(); same reasoning.

--

___
Python tracker 

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



[issue36229] Avoid unnecessary copies for list, set, and bytearray ops.

2019-03-13 Thread Armin Rigo


Armin Rigo  added the comment:

This patch is based on the following reasoning: if 'a' is a list and the 
reference count of 'a' is equal to 1, then we can mutate in-place 'a' in a call 
to 'a->ob_type->tp_as_sequence->list_concat'.  Typically that is called from 
'PyNumber_Add(a, b)'.  The patch is only correct for the case where 
PyNumber_Add() is called from Python/ceval.c.  It is clearly wrong if you 
consider calls to PyNumber_Add() from random C extension modules.  Some 
extension modules' authors would be very surprised if the following code starts 
giving nonsense:

PyObject *a = PyList_New();
PyObject *b = PyNumber_Add(a, some_other_list);
/* here, OF COURSE a must still be an empty list and b != a */

By comparison, if you consider the hack that I'm guilty for doing long ago to 
improve string concatenation, you'll see that it is done entirely inside 
ceval.c, and not in stringobject.c or unicodeobject.c.

For this reason I consider the whole patch, as written now, as bogus.

--

___
Python tracker 

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



[issue36174] Remove licenseUrl field from nuget packages

2019-03-13 Thread Steve Dower


Change by Steve Dower :


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



[issue21314] Document '/' in signatures

2019-03-13 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

I agree with Nick, that pydoc should somehow be updated to mark positional-only 
parameters as such. I believe that the third approach proposed by Nick is the 
most sensible one, as it makes the life of new developers easier by explicitly 
listing all the positional-only parameters. I could open a new issue and work 
on a PR, if you all agree that that is the way to go.

--

___
Python tracker 

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



[issue36272] Recursive logging crashes Interpreter in Python 3

2019-03-13 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Hi Brett, I confirm the test case breaks both Python3.7 and 3.8. I opened a PR 
to fix the problem.

--
versions: +Python 3.7, Python 3.8

___
Python tracker 

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



[issue36272] Recursive logging crashes Interpreter in Python 3

2019-03-13 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


--
keywords: +patch
pull_requests: +12287
stage:  -> patch review

___
Python tracker 

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



[issue36272] Recursive logging crashes Interpreter in Python 3

2019-03-13 Thread Brett Cannon


Brett Cannon  added the comment:

Limiting the version scope to 3.6 until someone reproduces on 3.7 and/or 3.8.

--
nosy: +brett.cannon
versions:  -Python 3.7, Python 3.8

___
Python tracker 

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



[issue36276] Python urllib CRLF injection vulnerability

2019-03-13 Thread Brett Cannon


Brett Cannon  added the comment:

And security issues should be reported according to 
https://www.python.org/news/security/ .

--
nosy: +brett.cannon

___
Python tracker 

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



[issue36174] Remove licenseUrl field from nuget packages

2019-03-13 Thread Steve Dower


Steve Dower  added the comment:


New changeset ce5c7a93d47e07327d19dfb47a967f1b18b7d6e8 by Steve Dower in branch 
'2.7':
bpo-36174: Update nuget authoring for new license field. (GH-12300)
https://github.com/python/cpython/commit/ce5c7a93d47e07327d19dfb47a967f1b18b7d6e8


--

___
Python tracker 

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



[issue36174] Remove licenseUrl field from nuget packages

2019-03-13 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +12286

___
Python tracker 

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



[issue36282] Not accurate error message for exact number of positional arguments

2019-03-13 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset f2f55e7f03d332fd43bc665a86d585a79c3b3ed4 by Serhiy Storchaka in 
branch 'master':
bpo-36282: Improved error message for too much positional arguments. (GH-12310)
https://github.com/python/cpython/commit/f2f55e7f03d332fd43bc665a86d585a79c3b3ed4


--

___
Python tracker 

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



[issue36254] Fix invalid uses of %d in format strings in C

2019-03-13 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset d53fe5f407ff4b529628b01a1bcbf21a6aad5c3a by Serhiy Storchaka in 
branch 'master':
bpo-36254: Fix invalid uses of %d in format strings in C. (GH-12264)
https://github.com/python/cpython/commit/d53fe5f407ff4b529628b01a1bcbf21a6aad5c3a


--

___
Python tracker 

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



[issue36282] Not accurate error message for exact number of positional arguments

2019-03-13 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +12285
stage:  -> patch review

___
Python tracker 

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



[issue36282] Not accurate error message for exact number of positional arguments

2019-03-13 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

Due to minor error, the error message for too many positional arguments is not 
accurate if the function uses Argument Clinic.

For example:

>>> int.from_bytes(b'a', 'little', False)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: from_bytes() takes at most 2 positional arguments (3 given)

This is correct, but not accurate, because from_bytes() takes *exactly* 2 
positional arguments.

--
components: Interpreter Core
messages: 337874
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Not accurate error message for exact number of positional arguments
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue36280] Add kind field to ast.Constant, to distinguish u"..." from "..." for type checkers

2019-03-13 Thread Guido van Rossum


Guido van Rossum  added the comment:

Thanks for the review Serhiy!

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



[issue36280] Add kind field to ast.Constant, to distinguish u"..." from "..." for type checkers

2019-03-13 Thread miss-islington


miss-islington  added the comment:


New changeset 10f8ce66884cd7fee2372b8dae08ca8132091574 by Miss Islington (bot) 
(Guido van Rossum) in branch 'master':
bpo-36280: Add Constant.kind field (GH-12295)
https://github.com/python/cpython/commit/10f8ce66884cd7fee2372b8dae08ca8132091574


--
nosy: +miss-islington

___
Python tracker 

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



[issue36268] Change default tar format to modern POSIX 2001 (pax) for better portability/interop, support and standards conformance

2019-03-13 Thread C.A.M. Gerlach


C.A.M. Gerlach  added the comment:

In general, since pax is a backwards-compatible superset of the standard, 
portable ustar unlike the vendor-specific GNU format that even GNU tar itself 
no longer recommends in favor of switching to pax by default, it is to my 
understanding essentially always the better choice. The only exception would be 
systems that support GNU tar but not POSIX 2001 and where the limitations of 
the old ustar must be bypassed, which as far I'm aware is basically just really 
old (>10-15 years) GNU/Linux.

NetBSD and OpenBSD both use bsdtar implementations, which as far as I could 
find means they support the POSIX 2001-standard pax format, and (unless they 
use libarchive which supports all three) likely *don't* support the current GNU 
format which is specific to GNU tar. Even if they don't, their ustar support 
means they can read pax archives as legacy ustar archives (as pax is 
backwards-compatible), while the same is not necessarily true of GNU tar 
archives. Therefore, pax is strictly a better choice than GNU or ustar.

Most other programming languages I could find did not have internal/standard 
library implementations, instead relying on the aforementioned libraries or 
varying third party packages:

* For C/C++, Libarchive and GNU tar are the modern two heavy hitters, and they 
both have supported it for a very long long. Modern version of old-style bsdtar 
should, but if not then they don't support GNU tar either. These are commonly 
used when needed with C/C++, or programmers implement their own bespoke 
solutions.
* Libtar (C) does not, but it hasn't been updated for 6 years (and has been in 
minimal maintenance mode for over 15) so I'm not sure its really relevant 
anymore. Virtually any platform will also have one of the previous.
* The major implementation for Java, Apache Commons Compress, added support for 
both pax and GNU in its 1.2 version, back in 2011 (8 years ago)
* R uses the system's tar executable (or bundled modern tar), so will have the 
same support as that (i.e. any remotely modern system should be compatible). 
Their documentation explicitly recommends against GNU tar in favor of pax or 
ustar instead for portability: 
https://stat.ethz.ch/R-manual/R-devel/library/utils/html/tar.html
* git-archive uses pax exclusively
* PHP supports ustar only, not pax or GNU; in that case pax is generally the 
more compatible of the two extended formats
* The node-tar library, the apparent standard for Javascript, support it
* The standard tar package for Go supports it
* What seems to be the major current implementation for C#, SharpZipLib, 
supports it
* Ruby has no apparent standard implementation; a few third-party libraries 
have a mix of support

--

___
Python tracker 

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



[issue36266] Which module could not be found?

2019-03-13 Thread Steve Dower


Steve Dower  added the comment:

You mean like this:

>>> import _ssl
Traceback (most recent call last):
  File "", line 1, in 
ImportError: DLL load failed: The specified module could not be found.

Should include "_ssl" somewhere in the message? That's easy enough, but it's 
never been what anyone else has meant when they've asked for this, so I assumed 
you wanted the more helpful message (where it tells you exactly which DLL is 
missing - libcrypto-1_1-x64.dll in this case - and *that's* the one we can't 
do).

--

___
Python tracker 

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



[issue31904] Python should support VxWorks RTOS

2019-03-13 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy:  -terry.reedy

___
Python tracker 

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



[issue36229] Avoid unnecessary copies for list, set, and bytearray ops.

2019-03-13 Thread Tim Peters


Tim Peters  added the comment:

Serhiy, if I understand this, it _could_ pay big with even just a few 
operations.  For example,

[0] * 100 + [1] + [2] + [3]

As-is, we'll copy the million zeroes three times.  WIth the patch, more likely 
the original vector of a million zeroes would be extended in-place, three times 
with a single element each time.

But I don't know that people do that in real code.  It would be great to find 
real examples in real could that would benefit.

--

___
Python tracker 

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



[issue36281] OSError: handle is closed for ProcessPoolExecutor and run_in_executor

2019-03-13 Thread Bas Nijholt


New submission from Bas Nijholt :

The following code in Python 3.7.1
```
import random
import concurrent.futures
import asyncio

executor = concurrent.futures.ProcessPoolExecutor()
ioloop = asyncio.get_event_loop()

async def func():
result = await ioloop.run_in_executor(executor, random.random)
executor.shutdown(wait=False)  # bug doesn't occur when `wait=True`

task = ioloop.create_task(func())
```


prints the following error:
```
Exception in thread QueueManagerThread:
Traceback (most recent call last):
  File "/opt/conda/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
  File "/opt/conda/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
  File "/opt/conda/lib/python3.7/concurrent/futures/process.py", line 368, in 
_queue_management_worker
thread_wakeup.clear()
  File "/opt/conda/lib/python3.7/concurrent/futures/process.py", line 92, in 
clear
while self._reader.poll():
  File "/opt/conda/lib/python3.7/multiprocessing/connection.py", line 255, in 
poll
self._check_closed()
  File "/opt/conda/lib/python3.7/multiprocessing/connection.py", line 136, in 
_check_closed
raise OSError("handle is closed")
OSError: handle is closed
```

I think this is related to https://bugs.python.org/issue34073 and 
https://bugs.python.org/issue34075

This happens in the Adaptive package 
https://adaptive.readthedocs.io/en/latest/docs.html#examples and the related 
issue is https://github.com/python-adaptive/adaptive/issues/156

--
components: asyncio
messages: 337868
nosy: asvetlov, basnijholt, yselivanov
priority: normal
severity: normal
status: open
title: OSError: handle is closed for ProcessPoolExecutor and run_in_executor
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue31904] Python should support VxWorks RTOS

2019-03-13 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 8b5bdda5b4c418c4a858f183763d0a497170977c by Victor Stinner 
(pxinwr) in branch 'master':
bpo-31904: Adapt the _signal module to VxWorks RTOS (GH-12304)
https://github.com/python/cpython/commit/8b5bdda5b4c418c4a858f183763d0a497170977c


--

___
Python tracker 

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



[issue36229] Avoid unnecessary copies for list, set, and bytearray ops.

2019-03-13 Thread Brandt Bucher


Change by Brandt Bucher :


--
title: Linear-time list, set, and bytearray ops. -> Avoid unnecessary copies 
for list, set, and bytearray ops.

___
Python tracker 

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



[issue36252] update to Unicode 12

2019-03-13 Thread STINNER Victor


STINNER Victor  added the comment:

> msg318935 is still true.

Thanks. I added it to my notes ;-)
https://pythondev.readthedocs.io/files.html#generated-files

--

___
Python tracker 

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



[issue34713] csvwriter.writerow()'s return type is undocumented

2019-03-13 Thread Nicholas Chammas


Nicholas Chammas  added the comment:

Nope, go ahead.

--

___
Python tracker 

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



[issue36229] Linear-time list, set, and bytearray ops.

2019-03-13 Thread Brandt Bucher


Brandt Bucher  added the comment:

I apologize - I should have been clearer about what this accomplishes. I'll use 
list addition as an example, but this works for any binary operation on these 
containers.

If the left operand has a refcount of exactly one, it will simply mutate 
in-place rather than making an unnecessary copy. The simplest example of this 
is with literals:

[0] + list1

This just modifies the literal [0] in-place rather than creating an unnecessary 
copy. However, the more common use case is adding named lists. Currently, when 
adding list1 + list2 + list3, two copies (with one reference each) are made:

- The intermediate result of list1 + list2.
- The sum of this intermediate result and list3.

Only the second of these is actually returned - the first is used once and 
thrown away. The effect of this patch is to only create *at most one* (instead 
of n-1) copy for any arbitrarily long list summation, as this intermediate 
result will just mutate in-place for lists 3-n.

--

___
Python tracker 

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



[issue36262] Coverity scan: Python/dtoa.c resource leak

2019-03-13 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 9776b0636ae39668d3ce1c006d4be01dad01bf9f by Victor Stinner in 
branch 'master':
bpo-36262: Fix _Py_dg_strtod() memory leak (goto undfl) (GH-12276)
https://github.com/python/cpython/commit/9776b0636ae39668d3ce1c006d4be01dad01bf9f


--

___
Python tracker 

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



[issue36229] Linear-time list, set, and bytearray ops.

2019-03-13 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It could aimed at list1 + list2 + list3. Or foo() + list2, where foo() returns 
a new list. Or other examples when the left operand is a new object.

But it is not correct to say that it is a problem that currently these 
operations has quadratic complexity. They have the complexity O(N^2) where N is 
the number of additions. Unless you have expressions with many thousands of 
additions, this is not a trouble (actually you can get a crash in the attempt 
to compile such expression in CPython).

--

___
Python tracker 

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



[issue36266] Which module could not be found?

2019-03-13 Thread Phillip M. Feldman


Phillip M. Feldman  added the comment:

Hello Steve,

I'm buying only 50 percent of this.  The Python interpreter must know what
module it was trying to import, and can at least be able to report that.

Phillip

On Tue, Mar 12, 2019 at 8:42 AM Steve Dower  wrote:

>
> Steve Dower  added the comment:
>
> I agree. Unfortunately, the operating system does not provide this
> information.
>
> The best I can offer is to run Process Monitor [1] and watch its logs. It
> should show the paths it attempts to access.
>
> [1]: http://technet.microsoft.com/en-us/sysinternals/bb896645
>
> --
> resolution:  -> third party
> stage:  -> resolved
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue36268] Change default tar format to modern POSIX 2001 (pax) for better portability/interop, support and standards conformance

2019-03-13 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Looks reasonable.

Do you know whether it is supported on OpenBSD and NetBSD? In other popular 
programming languages?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue36229] Linear-time list, set, and bytearray ops.

2019-03-13 Thread Tim Peters


Tim Peters  added the comment:

Brandt, it's quite possible I have no real idea what this patch is aimed at.  I 
didn't reverse-engineer the code, the title is extremely broad, and there are 
no Python examples I can find for what it _is_ aimed at.  If, e.g., it's 
impossible that this patch has any effect on what happens for

Set1 = Set1 & Set2

then the concerns I raised may well be irrelevant.

--

___
Python tracker 

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



[issue36229] Linear-time list, set, and bytearray ops.

2019-03-13 Thread Brandt Bucher


Brandt Bucher  added the comment:

> ...in a subsequent "+" operation...

Sorry, I meant "&|-" here.

--

___
Python tracker 

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



[issue36229] Linear-time list, set, and bytearray ops.

2019-03-13 Thread Brandt Bucher


Brandt Bucher  added the comment:

I'm sorry, Raymond. I didn't mean to imply that this is a problem that needs 
fixing. I just saw an opportunity for a cheap, effective performance boost for 
a potentially expensive operation. Thanks for clarifying.

And on users "expecting" copies: many advanced Python programmers I know still 
recently thought that "a < b < c" was evaluated as "(a < b) < c". It's nice to 
be pleasantly surprised with "better" behavior... especially when this pretty 
solidly falls under the category of "implementation detail", since it's not 
outwardly visible.

And speaking of visibility:

> Beyond that, is it actually safe for set operations?

I'm not sure how it wouldn't be. None of the sets in your example should be 
able to be mutated, since the operation you described doesn't hit the new 
branch at all.

I've also spent parts of yesterday and today trying to craft malicious 
objects/threads that do what you described, and haven't been able to. I've 
found main roadblock to doing so is the fact that the named references still 
aren't mutated, and the first (and only) intermediate copy is invisible to 
everything except PyNumberAdd. I also haven't been able to get a handle to the 
left-hand set in a subsequent "+" operation from a contained object. Maybe I 
misunderstood you, though.

However, both of you are much better engineers than I am, so I'll defer to your 
judgement here. If the set portion of the PR seems vulnerable, I'm eager to 
modify or remove it.

--

___
Python tracker 

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



[issue36085] Enable better DLL resolution

2019-03-13 Thread mattip


mattip  added the comment:

@eryksun - is there a sample resource: blog post, code snippet, msdn 
documentation, that demonstrates how that all works? 

I personally find the MSDN documentation of "what happens when I call 
LoadLibraryEx" not very user friendly. They seem to be written to document the 
system calls and not to explain the user experience. A diagram with some 
examples of setting and debugging this would go a long way to helping users 
enter the right mindset to debug failures to load DLLs because the support dlls 
they depend on are not found

--

___
Python tracker 

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



[issue36277] pdb's recursive debug command is not listed in the docs

2019-03-13 Thread Antony Lee


Antony Lee  added the comment:

I'll pass on that for now.

--

___
Python tracker 

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



[issue36280] Add kind field to ast.Constant, to distinguish u"..." from "..." for type checkers

2019-03-13 Thread Guido van Rossum


Guido van Rossum  added the comment:

On second thought, even though it's a subclass, it feels less consistent than 
an extra attribute. So I'd rather keep the current approach (kind -> 'u' or 
None).

--

___
Python tracker 

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



[issue36280] Add kind field to ast.Constant, to distinguish u"..." from "..." for type checkers

2019-03-13 Thread Guido van Rossum


Guido van Rossum  added the comment:

> Maybe use a special subclass of Constant for indicating string literals with 
> the "u" prefix?

That would indeed be more convenient, as it requires fewer code and test 
changes. Are there examples of such classes in Python.asdl?

--

___
Python tracker 

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



[issue36225] Lingering subinterpreters should be implicitly cleared on shutdown

2019-03-13 Thread Petr Viktorin


Petr Viktorin  added the comment:

Joannah, yes, that looks like a good place. Eric Snow might have more info; he 
wrote that module.

As for testing Py_FatalError, there's an assert_python_failure function in 
test.support.script_helper.

--

___
Python tracker 

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



[issue36277] pdb's recursive debug command is not listed in the docs

2019-03-13 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

As far as I can tell, the list of pdb commands is:
  - commands
  - break
  - tbreak
  - enable
  - disable
  - condition
  - ignore
  - clear
  - where
  - up
  - down
  - until
  - step
  - next
  - run
  - return
  - continue
  - jump
  - debug
  - quit
  - args
  - retval
  - p
  - pp
  - list
  - longlist
  - source
  - whatis
  - display
  - undisplay
  - interact
  - alias
  - unalias
  - help

Those not in the documentation are debug and retval.

Can you open a new pull request to document them?

--
nosy: +remi.lapeyre
versions: +Python 3.8

___
Python tracker 

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



[issue36173] spam

2019-03-13 Thread Ned Deily


Change by Ned Deily :


--
nosy:  -Dianmatang, steven.daprano
title: BROTHER PRINTER CENTER -> spam

___
Python tracker 

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



[issue36173] spam

2019-03-13 Thread Ned Deily


Change by Ned Deily :


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

___
Python tracker 

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



[issue36173] BROTHER PRINTER CENTER

2019-03-13 Thread Ned Deily


Change by Ned Deily :


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

___
Python tracker 

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



[issue36269] post install in setup.py does not work when executed through pip

2019-03-13 Thread Saba Kauser


Change by Saba Kauser :


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



[issue36269] post install in setup.py does not work when executed through pip

2019-03-13 Thread Saba Kauser


Saba Kauser  added the comment:

I am able to get this to work.
I just needed to invoke parent's run prior to the post install commands.

if('darwin' in sys.platform):
class PostInstall(install):
""" Post installation - run install_name_tool on Darwin """
def run(self):
install.run(self)
clipath = os.getenv('IBM_DB_HOME', '@loader_path/clidriver')
print("in PostInstall with {}".format(clipath))
for so in glob.glob(r'build/lib*/ibm_db*.so'):
os.system("install_name_tool -change libdb2.dylib 
{}/lib/libdb2.dylib {}".format(clipath, so))

cmd_class = dict(install = PostInstall)

--
resolution:  -> fixed

___
Python tracker 

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



[issue30040] new empty dict can be more small

2019-03-13 Thread Inada Naoki


Inada Naoki  added the comment:

I created two PRs.  PR 12307 just optimize inserting to empty dict.
PR 12308 has same optimization and removes shared empty key (ma_keys = NULL).

I confirmed PR 12307 is faster than before about `d = {}; d["a"]=None`.
I'll benchmark them later.

--

___
Python tracker 

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



[issue36263] test_hashlib.test_scrypt() fails on Fedora 29

2019-03-13 Thread STINNER Victor


STINNER Victor  added the comment:

> Oh, the Fedora package of OpenSSL 1.1.1b includes this downstream patch (...) 
> The patch changes the behavior for (salt=NULL, saltlen=0) (...)

I reported the issue to OpenSSL in Fedora:
https://bugzilla.redhat.com/show_bug.cgi?id=1688284

--

___
Python tracker 

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



[issue30040] new empty dict can be more small

2019-03-13 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +12284

___
Python tracker 

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



[issue30040] new empty dict can be more small

2019-03-13 Thread Inada Naoki


Change by Inada Naoki :


--
keywords: +patch
pull_requests: +12283
stage: resolved -> patch review

___
Python tracker 

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



[issue36173] BROTHER PRINTER CENTER

2019-03-13 Thread Dian saputra


Dian saputra  added the comment:

My website not spam..
Please your klik url https://brotherprintercenter.com..

Thank you..

Pada tanggal Sen, 4 Mar 2019 05.09, Steven D'Aprano 
menulis:

>
> New submission from Steven D'Aprano :
>
> No details given and a spammy, irrelevant title. Closing.
>
> Dianmatang, if you are an actual person and not a spam bot, please try
> adding details of the bug, and using a more informative title.
>
> --
> nosy: +steven.daprano
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___
>

--
title: apam -> BROTHER PRINTER CENTER

___
Python tracker 

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



[issue21822] KeyboardInterrupt during Thread.join hangs that Thread

2019-03-13 Thread gaborbernat


gaborbernat  added the comment:

I think I'm hitting this with subprocesses inside tox (parallel feature), any 
plans to fix this?

--
nosy: +gaborbernat

___
Python tracker 

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



[issue36272] Recursive logging crashes Interpreter in Python 3

2019-03-13 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

> Stack exhaustion doesn't seem to be due to be the root cause. A simple 
> recursive function doesn't crash the interpreter in Python 3.6.

Yes, sorry I got misleaded. I have added logging module author, @vinay.sajip to 
the issue.

--

___
Python tracker 

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



[issue36272] Recursive logging crashes Interpreter in Python 3

2019-03-13 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

The following patch fixes the issue and raise RecursionError as expecting 
without core dump:

diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
index b4659af7cc..7457549cb9 100644
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -1094,6 +1094,8 @@ class StreamHandler(Handler):
 # issue 35046: merged two stream.writes into one.
 stream.write(msg + self.terminator)
 self.flush()
+except RecursionError as e:
+raise
 except Exception:
 self.handleError(record)

--

___
Python tracker 

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



[issue36272] Recursive logging crashes Interpreter in Python 3

2019-03-13 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

I'm not sure issue35542. I think this happens because while logging the 
recursion limit is hit which calls 
https://github.com/python/cpython/blob/master/Python/ceval.c#L535-L539.

The RecursionError is then handled by 
https://github.com/python/cpython/blob/master/Lib/logging/__init__.py#L1000 and 
cleared.

On subsequent calls the exception is not set anymore because 
`tstate->overflowed` equals 1 so we exit early before setting the exception 
again at https://github.com/python/cpython/blob/master/Python/ceval.c#L531.

This goes on until the condition on 
https://github.com/python/cpython/blob/master/Python/ceval.c#L531 pass which 
abort the interpreter.

I think there is two ways to solve the issue, either handle RecursionError 
explicitly in the logging module so we don't clear it inadvertently as there is 
no way to recover from it anyway or check if the exception has been cleared at 
https://github.com/python/cpython/blob/master/Python/ceval.c#L531 and set it 
again.

Handling it explictly in the logging module would not help for code doing this 
elsewhere:

def rec():
try:
rec()
except:
rec()
rec()


I can submit a patch if you want.

--
nosy: +remi.lapeyre
versions: +Python 3.7, Python 3.8

___
Python tracker 

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



[issue36272] Recursive logging crashes Interpreter in Python 3

2019-03-13 Thread Saim Raza


Saim Raza  added the comment:

Stack exhaustion doesn't seem to be due to be the root cause. A simple 
recursive function doesn't crash the interpreter in Python 3.6.

>>> def rec(): rec()
>>> rec()
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 1, in rec
  File "", line 1, in rec
  File "", line 1, in rec
  [Previous line repeated 995 more times]
RecursionError: maximum recursion depth exceeded

--

___
Python tracker 

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



[issue35661] Store the venv prompt in pyvenv.cfg

2019-03-13 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Looks like the buildbot is happy now.  Thank you everyone!

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



[issue36271] '_io.TextIOWrapper' object has no attribute 'mode'

2019-03-13 Thread SilentGhost


Change by SilentGhost :


--
nosy: +pitrou
type:  -> behavior
versions: +Python 3.8 -Python 3.5

___
Python tracker 

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



[issue36274] http.client cannot send non-ASCII request lines

2019-03-13 Thread SilentGhost


Change by SilentGhost :


--
nosy: +orsenthil
versions:  -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



[issue36279] os.wait3() leaks some uninitialized stack when no processes exist

2019-03-13 Thread SilentGhost


Change by SilentGhost :


--
components: +Library (Lib)
nosy: +neologix
type:  -> resource usage
versions: +Python 3.7, Python 3.8

___
Python tracker 

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



[issue34713] csvwriter.writerow()'s return type is undocumented

2019-03-13 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Issue #27497 is related, it adds documentation a return value and documentation 
to csv.DictWriter.writeheader which uses writerow internally. 

In the discussion, @lsowen found code that uses it at 
https://docs.djangoproject.com/en/1.9/howto/outputting-csv/#streaming-large-csv-files.

Given that this behavior has been added to csv.DictWriter.writeheader it makes 
sense to document csv.Writer.writerow. Do you want to post a pull request?

--

___
Python tracker 

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



[issue27497] csv module: Add return value to DictWriter.writeheader

2019-03-13 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


--
versions: +Python 3.8 -Python 3.6

___
Python tracker 

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



[issue27497] csv module: Add return value to DictWriter.writeheader

2019-03-13 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


--
pull_requests: +12282

___
Python tracker 

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



[issue31904] Python should support VxWorks RTOS

2019-03-13 Thread Peixing Xin


Change by Peixing Xin :


--
pull_requests: +12281

___
Python tracker 

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



[issue32528] Change base class for futures.CancelledError

2019-03-13 Thread Dima Tisnek


Dima Tisnek  added the comment:

ping

--
nosy: +Dima.Tisnek

___
Python tracker 

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



[issue36276] Python urllib CRLF injection vulnerability

2019-03-13 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +vstinner

___
Python tracker 

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



[issue31904] Python should support VxWorks RTOS

2019-03-13 Thread Peixing Xin


Change by Peixing Xin :


--
pull_requests: +12280

___
Python tracker 

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



[issue36085] Enable better DLL resolution

2019-03-13 Thread Eryk Sun


Eryk Sun  added the comment:

> Since I just dug enough to find it, the best way to diagnose problems 
> with dependent DLLs not being found is probably to run Process Monitor 
> [1] while doing the import and checking its logs. It should show the 
> paths that were attempted to be accessed.

Don't forget loader snaps, which we can log using a standard debugger such as 
WinDbg or by attaching a Python script as a debugger (e.g. debug a child 
process via the DEBUG_PROCESS creation flag). For the latter, we need a 
debug-event loop (i.e. WaitForDebugEventEx via ctypes) that logs debug-string 
events. This will show the paths that the loader checks and the load attempts 
that fail with STATUS_DLL_NOT_FOUND (0xC135). We have to first enable 
loader snaps for the executable by setting a flag value of 2 in the 
"GlobalFlag" DWORD in the key "HKLM\Software\Microsoft\Windows 
NT\CurrentVersion\Image File Execution Options\". Or use 
gflags.exe to set this value.

--

___
Python tracker 

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



[issue36276] Python urllib CRLF injection vulnerability

2019-03-13 Thread Alvin Chang


Alvin Chang  added the comment:

I am also seeing the same issue with urllib3 

import urllib3

pool_manager = urllib3.PoolManager()

host = "localhost:?a=1 HTTP/1.1\r\nX-injected: header\r\nTEST: 123"
url = "http://; + host + ":8080/test/?test=a"

try:
info = pool_manager.request('GET', url).info()
print(info)
except Exception:
pass

nc -l localhost 
GET /?a=1 HTTP/1.1
X-injected: header
TEST: 123:8080/test/?test=a HTTP/1.1
Host: localhost:
Accept-Encoding: identity

--
nosy: +alvinchang

___
Python tracker 

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



[issue35647] Cookie path check returns incorrect results

2019-03-13 Thread Larry Hastings


Larry Hastings  added the comment:

You should not assign bugs to the RM who will merge the PR.

--
assignee: larry -> 

___
Python tracker 

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