[issue36935] bpo-35813 introduced usage of the deprecated PyErr_SetFromWindowsErrWithUnicodeFilename() function

2019-05-15 Thread Zackery Spytz


Change by Zackery Spytz :


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

___
Python tracker 

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



[issue36935] bpo-35813 introduced usage of the deprecated PyErr_SetFromWindowsErrWithUnicodeFilename() function

2019-05-15 Thread Zackery Spytz


New submission from Zackery Spytz :

In e895de3e7f3cc2f7213b87621cfe9812ea4343f0 / bpo-35813, the deprecated 
function PyErr_SetFromWindowsErrWithUnicodeFilename() was added in two 
functions in Modules/_winapi.c. This function was deprecated in 3.3 (and all 
occurrences of it were removed). Also, if bpo-33407 is accepted, usage of this 
function will cause compiler warnings.

See also bpo-19569.

--
components: Extension Modules
messages: 342626
nosy: ZackerySpytz, davin
priority: normal
severity: normal
status: open
title: bpo-35813 introduced usage of the deprecated 
PyErr_SetFromWindowsErrWithUnicodeFilename() function
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



[issue36934] C API Function PyLong_AsDouble Returning Wrong Value

2019-05-15 Thread Tim Peters


Tim Peters  added the comment:

It sounds like you need to read an introduction (any!) to computer 
floating-point formats.  The relevant part in the output you showed is this:

mant_dig=53

As on almost other current machines, your platform's floating point format is 
restricted to 53 bits of precision.  Therefore it's impossible to convert any 
positive integer to float without losing bits if the integer is of the form I * 
2**E where I is odd and I.bit_length() > 53.

That doesn't mean integers you can convert faithfully must be "small".  For 
example 2**200 can be converted to float exactly.  Apart from the 
power-of-2-exponent, that has only 1 significant bit.  You can also convert 
(2**52 + 1) * 2**200 to float exactly.  But NOT (2**53 + 1) * 2**200, because 
that requires 54 significant bits.

--

___
Python tracker 

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



[issue36934] C API Function PyLong_AsDouble Returning Wrong Value

2019-05-15 Thread Farhan Sajjad


Farhan Sajjad  added the comment:

Maybe I need to go back and understand why this loss of precision is taking 
place for the int->float conversion, and why for certain numbers.

Also, it does not work in Python 2. Please disregard the previous message.

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

___
Python tracker 

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



[issue36925] python3.7.3 can't work after MacOS upgrade from v10.14.4 to v10.14.5

2019-05-15 Thread wuwentao


wuwentao  added the comment:

Hi

we may found the root cause from the McAfee log file, as we have too many 
computer have the same result in our company, it may caused by McAfee AntiVirus 
software auto upgrade to new version and new policy , all of our McAfee 
AntiVirus have ATP feature enabled, after disabled ATP service, python3 works 
well now.

it's really a bug for McAfee, but not Python program or MacOS upgrade issue.
I'm sorry for the error bug report.

close this issue as it's not python3 program bug.

Thanks!
Wentao

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



[issue31171] multiprocessing.BoundedSemaphore of 32-bit python could not work while cross compiling on linux platform

2019-05-15 Thread Hongxu Jia


Change by Hongxu Jia :


--
pull_requests: +13264

___
Python tracker 

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



[issue36934] C API Function PyLong_AsDouble Returning Wrong Value

2019-05-15 Thread Farhan Sajjad


Farhan Sajjad  added the comment:

Thanks for your input Tim. Here is what I understand:
1. In Python 3, int can be arbitrarily large.
2. C double data type can hold very large numbers, and the number tested here 
is quite small compared to the max. It even fits fine in a long long int.
3. Quite interestingly, this function/conversion works in Python 2.

>>> sys.float_info
sys.float_info(max=1.7976931348623157e+308, max_exp=1024, max_10_exp=308, 
min=2.2250738585072014e-308, min_exp=-1021, min_10_exp=-307, dig=15, 
mant_dig=53, epsilon=2.220446049250313e-16, radix=2, rounds=1)

--

___
Python tracker 

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



[issue18911] minidom does not encode correctly when calling Document.writexml

2019-05-15 Thread Windson Yang


Windson Yang  added the comment:

I added a PR for like this:

   .. note::

  You should specify the "xmlcharrefreplace" error handler when open a file 
with
  specified encoding::

 writer = open(
filename, "w", encoding="utf-8",
errors="xmlcharrefreplace")
 doc.writexml(writer, "", "  ", "utf-8")

--
nosy: +Windson Yang

___
Python tracker 

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



[issue18911] minidom does not encode correctly when calling Document.writexml

2019-05-15 Thread Windson Yang


Change by Windson Yang :


--
keywords: +patch
pull_requests: +13263
stage: needs patch -> patch review

___
Python tracker 

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



[issue36934] C API Function PyLong_AsDouble Returning Wrong Value

2019-05-15 Thread Tim Peters


Tim Peters  added the comment:

Note that this pure Python gives the same result:

>>> "%.0f" % float(1639873214337061279)
'1639873214337061376'

That's not surprising:  int -> float conversion is limited to the precision of 
a Python float, which is a C double, which is almost certainly just 53 (not 64) 
significant bits.

--
nosy: +tim.peters

___
Python tracker 

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



[issue36934] C API Function PyLong_AsDouble Returning Wrong Value

2019-05-15 Thread Farhan Sajjad


New submission from Farhan Sajjad :

Found this rather obscure behavior where certain 64 bit numbers are changing 
(probably losing precision somewhere down the call chain) if converted from 
PyLong to double using the PyLong_AsDouble C API function.

TO REPRODUCE:

#define __SIZEOF_STRS__ 512

static PyObject*
test_pylong(PyObject* self, PyObject* args)
{
char rBuffer[__SIZEOF_STRS__];
char* strValue;
if (!PyArg_ParseTuple(args, "s", ))
return NULL;

{
printf("%s AS INGRESS\n", strValue);
double dblValue = PyLong_AsDouble(
PyLong_FromString(strValue, NULL, 10));

snprintf(rBuffer, __SIZEOF_STRS__, "%.0f",
 PyLong_AsDouble(PyLong_FromString(strValue, NULL, 10)));

printf("CONVERT 1: %.0f\nCONVERT 2: %s\n", dblValue, rBuffer);

}

Py_RETURN_NONE;
}

Test:
>>> test_pylong("1639873214337061279")
1639873214337061279 AS INGRESS
CONVERT 1: 1639873214337061376
CONVERT 2: 1639873214337061376

--
messages: 342619
nosy: sajjadfx
priority: normal
severity: normal
status: open
title: C API Function PyLong_AsDouble Returning Wrong Value
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue36564] Infinite loop with short maximum line lengths in EmailPolicy

2019-05-15 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +maxking, msapiro

___
Python tracker 

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



[issue36829] Add sys.unraisablehook() to custom how "unraisable exceptions" are logged

2019-05-15 Thread STINNER Victor


STINNER Victor  added the comment:

I started a thread on python-dev to discuss the issue:
https://mail.python.org/pipermail/python-dev/2019-May/157436.html

--

___
Python tracker 

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



[issue2818] pulldom cannot handle xml file with large external entity properly

2019-05-15 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
nosy: +scoder
versions: +Python 3.8 -Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue32947] Support OpenSSL 1.1.1

2019-05-15 Thread Christian Heimes


Christian Heimes  added the comment:

Yes, the feature requires OpenSSL 1.0.2 and a more recent version of LibreSSL. 
2.7 and 3.6 branches still target platforms with ancient versions of OpenSSL 
(e.g. Ubuntu 14.04 has 1.0.1f + patches). People were complain A LOT, because 
there were not able to install Python 3.7 on TravisCI. Like really a lot, alot.

I propose to close this bug as fixed in 3.7+

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> pending
versions: +Python 3.7, Python 3.8 -Python 2.7, Python 3.6

___
Python tracker 

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



[issue32947] Support OpenSSL 1.1.1

2019-05-15 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

Was using OpenSSL to verify hostnames intentionally not backported?

--

___
Python tracker 

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



[issue36933] sys.set_coroutine_wrapper documented as to be removed in 3.8 (still there)

2019-05-15 Thread Matthias Bussonnier


New submission from Matthias Bussonnier :

See issue32591

It was deprecated in 3.7, so maybe removed only in 3.9?

--
components: Interpreter Core
messages: 342615
nosy: mbussonn
priority: normal
severity: normal
status: open
title: sys.set_coroutine_wrapper documented as to be removed in 3.8 (still 
there)
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



[issue36511] Add Windows ARM32 buildbot

2019-05-15 Thread miss-islington


miss-islington  added the comment:


New changeset 4f820723c86c94f857d8d8de47a3c28f985946bd by Miss Islington (bot) 
(Paul Monson) in branch 'master':
bpo-36511: Windows arm32 buildbot changes (remove extra space) (GH-13351)
https://github.com/python/cpython/commit/4f820723c86c94f857d8d8de47a3c28f985946bd


--
nosy: +miss-islington

___
Python tracker 

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



[issue36931] json lib doesnt want to load from file

2019-05-15 Thread Zachary Ware


Zachary Ware  added the comment:

You're passing in a filename, not a file-like object (see 
https://docs.python.org/3/library/json.html#json.load).  Instead, you'll want 
something like:

with open(filename) as f:
json_data = json.load(f)



Please note that this is not a help forum; in future, please submit queries 
like this to the python-l...@python.org mailing list, StackOverflow, or if 
you're just learning Python, try the tu...@python.org mailing list.  Thanks!

--
nosy: +zach.ware
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type: resource usage -> 

___
Python tracker 

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



[issue36511] Add Windows ARM32 buildbot

2019-05-15 Thread Paul Monson


Change by Paul Monson :


--
pull_requests: +13262
stage: commit review -> patch review

___
Python tracker 

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



[issue35926] Need openssl 1.1.1 support on Windows for ARM and ARM64

2019-05-15 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +13261

___
Python tracker 

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



[issue36932] asyncio-task.rst could use proper deprecated-removed directive

2019-05-15 Thread Matthias Bussonnier


Change by Matthias Bussonnier :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
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



[issue36932] asyncio-task.rst could use proper deprecated-removed directive

2019-05-15 Thread Matthias Bussonnier


Change by Matthias Bussonnier :


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

___
Python tracker 

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



[issue36511] Add Windows ARM32 buildbot

2019-05-15 Thread Steve Dower


Steve Dower  added the comment:

Going to leave this in commit review for a bit, in case hitting merge suddenly 
flushes out some reviews :)

--
stage: patch review -> commit review

___
Python tracker 

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



[issue36511] Add Windows ARM32 buildbot

2019-05-15 Thread Steve Dower


Steve Dower  added the comment:


New changeset 67ff6a103a1184b572750c30e231968c963e72f8 by Steve Dower (Paul 
Monson) in branch 'master':
bpo-36511: Windows ARM32 buildbot changes (GH-12917)
https://github.com/python/cpython/commit/67ff6a103a1184b572750c30e231968c963e72f8


--

___
Python tracker 

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



[issue36932] asyncio-task.rst could use proper deprecated-removed directive

2019-05-15 Thread Matthias Bussonnier


New submission from Matthias Bussonnier :

SOme place in the documentation do not use the Deprected-remove directive 
(which is nice as it has a consistent pharing and is easy to search for), 
and deprecation warnings do not always have the version since deprecation which 
could be improved.

--
messages: 342610
nosy: mbussonn
priority: normal
severity: normal
status: open
title: asyncio-task.rst could use proper deprecated-removed directive

___
Python tracker 

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



[issue36931] json lib doesnt want to load from file

2019-05-15 Thread Justin Rose


New submission from Justin Rose :

when I run the included file i get an error that looks like:
Traceback (most recent call last):
  File "/home/justin/Desktop/pkmn/main.py", line 10, in 
expansion = json.load(expan_list)
  File "/usr/lib/python3.6/json/__init__.py", line 296, in load
return loads(fp.read(),
AttributeError: 'str' object has no attribute 'read'
dont know what to make of it

--
components: Extension Modules
files: main.py
messages: 342609
nosy: Justin Rose
priority: normal
severity: normal
status: open
title: json lib doesnt want to load from file
type: resource usage
versions: Python 3.6
Added file: https://bugs.python.org/file48331/main.py

___
Python tracker 

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



[issue35926] Need openssl 1.1.1 support on Windows for ARM and ARM64

2019-05-15 Thread Steve Dower


Steve Dower  added the comment:


New changeset fb7e7505ed1337bf40fa7b8b68317d1e86675a86 by Steve Dower (Paul 
Monson) in branch 'master':
bpo-35926: Add support for OpenSSL 1.1.1b on Windows (GH-11779)
https://github.com/python/cpython/commit/fb7e7505ed1337bf40fa7b8b68317d1e86675a86


--

___
Python tracker 

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



[issue36930] Windows proxy settings automatically used ... partly

2019-05-15 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

As far as I can see, this issue has nothing to do with IDLE as such.

Someone else should decide if this is a bug report or an enhancement request.

--
assignee: terry.reedy -> 
components:  -IDLE
stage:  -> test needed
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



[issue36930] Windows proxy settings automatically used ... partly

2019-05-15 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



[issue34509] Starting to use gcc-8 on CI

2019-05-15 Thread Zachary Ware


Zachary Ware  added the comment:

We do now have at least one builder using GCC 8 (ware-gentoo-x86) and one using 
GCC 9 (cstratak-fedora), so I'm closing the issue.  Thanks for bringing this 
up, and sorry it fell through the cracks for a while!

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



[issue33123] Path.unlink should have a missing_ok parameter

2019-05-15 Thread Antoine Pitrou


Change by Antoine Pitrou :


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



[issue33123] Path.unlink should have a missing_ok parameter

2019-05-15 Thread miss-islington

miss-islington  added the comment:


New changeset d9e006bcefe6fac859b1b5d741725b9a91991044 by Miss Islington (bot) 
(‮zlohhcuB treboR) in branch 'master':
bpo-33123: pathlib: Add missing_ok parameter to Path.unlink (GH-6191)
https://github.com/python/cpython/commit/d9e006bcefe6fac859b1b5d741725b9a91991044


--
nosy: +miss-islington

___
Python tracker 

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



[issue34616] implement "Async exec"

2019-05-15 Thread Matthias Bussonnier


Matthias Bussonnier  added the comment:

> I'll be working on CPython on Friday. Will take a look at your PR first thing.

Thanks, let me know if the is anything I can do for you in exchange; also 
thanks again for sitting with me and stepping me through the things at PyCon.

--

___
Python tracker 

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



[issue36786] "make install" should run compileall in parallel

2019-05-15 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset 1a2dd82f56bd813aacc570e172cefe55a8a41504 by Antoine Pitrou in 
branch 'master':
bpo-36786: Run compileall in parallel during "make install" (GH-13078)
https://github.com/python/cpython/commit/1a2dd82f56bd813aacc570e172cefe55a8a41504


--

___
Python tracker 

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



[issue34616] implement "Async exec"

2019-05-15 Thread Yury Selivanov


Yury Selivanov  added the comment:

I'll be working on CPython on Friday. Will take a look at your PR first thing.

--

___
Python tracker 

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



[issue36930] Windows proxy settings automatically used ... partly

2019-05-15 Thread Immo Wetzel


New submission from Immo Wetzel :

I do run python 2.7/3.7 on a windows 7 host.
This host is AD managed. As part of the group policy the internet settings are 
set to automatically proxy configuration.
The configuration works. cos IE and Chrome can reach external and internal 
hosts. Some of the internal are excluded from proxy via no proxy rules inside 
the pac file.

But python request and urllib2 are not able to reach the internal addresses 
which are excluded via the proxy file rules. Python always tries to get the 
data from the proxy.

the only solution was an extra environmental variable NO_PROXY with the ips not 
to be reached via the proxy.

these excluded IPs are common IPs and not private ! (90.0.0.0/8) is part of the 
pac exclusion

--
assignee: terry.reedy
components: IDLE, IO, Library (Lib), Windows
messages: 342601
nosy: iwetzel, paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Windows proxy settings automatically used ... partly
versions: Python 2.7, Python 3.6, Python 3.7

___
Python tracker 

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



[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-05-15 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Thanks, it's actually good to see this being a feature accepted in other 
languages.

--
priority: low -> normal

___
Python tracker 

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



[issue26707] plistlib fails to parse bplist with 0x80 UID values

2019-05-15 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue26707] plistlib fails to parse bplist with 0x80 UID values

2019-05-15 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset c981ad16b0f9740bd3381c96b4227a1faa1a88d9 by Serhiy Storchaka (Jon 
Janzen) in branch 'master':
bpo-26707: Enable plistlib to read UID keys. (GH-12153)
https://github.com/python/cpython/commit/c981ad16b0f9740bd3381c96b4227a1faa1a88d9


--

___
Python tracker 

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



[issue34616] implement "Async exec"

2019-05-15 Thread Matthias Bussonnier


Matthias Bussonnier  added the comment:

I see the 3.8 feature freeze seem to be end of next-week; do you think that 
async-exec (gh-13148) has a chance of getting in ? I'm happy to do modification 
to the PR but would need some more reviews. I'm happy to take some other tasks 
of your plate is that allow this to squeeze in before feature freeze. 

Thanks.

--

___
Python tracker 

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



[issue36917] ast.NodeVisitor no longer calls visit_Str

2019-05-15 Thread Anthony Sottile


Anthony Sottile  added the comment:

> You can not use the same implementation of the visitor for Num, Str, 
> NameConstant and Ellipsis, because all these classes use different attribute 
> for saving the value

ah yes, this is true -- maybe the better change would be to just add `@property 
value` to each of those instead of collapsing the classes? (If that's the 
actual convenience we're trying to achieve)

> No need to call generic_visit() from visit_Constant() -- Constant nodes 
> should not contain AST nodes.

correct there's no need, but it's a best practice to always call 
`generic_visit` in all `visit_*` methods, I have a linter I haven't finished up 
yet that checks this.  And who knows if that'll be true in the future!

--

___
Python tracker 

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



[issue36917] ast.NodeVisitor no longer calls visit_Str

2019-05-15 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

You can not use the same implementation of the visitor for Num, Str, 
NameConstant and Ellipsis, because all these classes use different attribute 
for saving the value (Ellipsis does not have it at all). For the same reasons 
you can not just pass the argument of visit_Constant() to visit_Str() -- they 
have different types.

No need to call generic_visit() from visit_Constant() -- Constant nodes should 
not contain AST nodes.

--

___
Python tracker 

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



[issue27639] UserList.__getitem__ doesn't account for slices

2019-05-15 Thread Michael Blahay


Michael Blahay  added the comment:

PR 13203 is still waiting for merge

--

___
Python tracker 

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



[issue36929] Other Python _io implementations may not expose _io in their type names

2019-05-15 Thread Maxwell Bernstein


Change by Maxwell Bernstein :


--
nosy: +vstinner

___
Python tracker 

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



[issue36015] streamhandler cannot represent streams with an integer as name

2019-05-15 Thread Vinay Sajip


Change by Vinay Sajip :


--
resolution: not a bug -> 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



[issue36929] Other Python _io implementations may not expose _io in their type names

2019-05-15 Thread Maxwell Bernstein


Change by Maxwell Bernstein :


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

___
Python tracker 

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



[issue36929] Other Python _io implementations may not expose _io in their type names

2019-05-15 Thread Maxwell Bernstein


Maxwell Bernstein  added the comment:

I have the beginnings of a PR to patch the test suite to make the prefix
optional, if anybody is interested.

--

___
Python tracker 

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



[issue36921] Deprecate yield from and @coroutine in asyncio

2019-05-15 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
pull_requests: +13257

___
Python tracker 

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



[issue36929] Other Python _io implementations may not expose _io in their type names

2019-05-15 Thread Maxwell Bernstein


New submission from Maxwell Bernstein :

For a vanishingly small number of internal types, CPython sets the
tp_name slot to mod_name.type_name, either in the PyTypeObject or the
PyType_Spec. There are a few minor places where this surfaces:

* Custom repr functions for those types (some of which ignore the
  tp_name in favor of using a string literal, such as _io.TextIOWrapper)
* Pickling error messages

The existing test suite only tests the former.

This makes it tricky for other Python implementations to pass the test suite if
they do not expose the module name (_io, _ssl, _tkinter, etc) in their type
names.

--
assignee: christian.heimes
components: IO, SSL, Tests, Tkinter
messages: 342593
nosy: christian.heimes, tekknolagi
priority: normal
severity: normal
status: open
title: Other Python _io implementations may not expose _io in their type names
type: behavior
versions: 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



[issue36928] linkt threading.settrace to sys.settrace

2019-05-15 Thread Stefan Hölzl

Change by Stefan Hölzl :


--
keywords: +patch
pull_requests: +13255
stage: needs patch -> patch review

___
Python tracker 

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



[issue36928] linkt threading.settrace to sys.settrace

2019-05-15 Thread SilentGhost


SilentGhost  added the comment:

Would you care to submit a PR implementing this fix? There are some guidelines 
available at https://devguide.python.org/pullrequest/

--
nosy: +SilentGhost
stage:  -> needs patch
type:  -> behavior
versions: +Python 3.7 -Python 3.9

___
Python tracker 

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



[issue36928] linkt threading.settrace to sys.settrace

2019-05-15 Thread Stefan Hölzl

New submission from Stefan Hölzl :

The documentation of sys.settrace suggest to call it from every created thread
to enable tracing within threads.

I would suggest to add a link to threading.settrace which automatically sets a 
trace function for every by threading module created thread.

link to docs:
https://docs.python.org/3.5/library/sys.html#sys.settrace
https://docs.python.org/3.5/library/threading.html#threading.settrace

--
assignee: docs@python
components: Documentation
messages: 342591
nosy: docs@python, stefanhoelzl
priority: normal
severity: normal
status: open
title: linkt threading.settrace to sys.settrace
versions: Python 3.8, Python 3.9

___
Python tracker 

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



[issue36015] streamhandler cannot represent streams with an integer as name

2019-05-15 Thread Vinay Sajip


Vinay Sajip  added the comment:


New changeset 78dd781ef4d41dfefad53aa3bc52c39b0d443b19 by Vinay Sajip (Miss 
Islington (bot)) in branch '3.7':
bpo-36015: Handle StreamHandler representaton of stream with an integer name 
(GH-11908) (GH-13183)
https://github.com/python/cpython/commit/78dd781ef4d41dfefad53aa3bc52c39b0d443b19


--

___
Python tracker 

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



[issue36927] traceback docstrings should explicitly state return values instead of referring to other functions

2019-05-15 Thread SilentGhost


SilentGhost  added the comment:

The doc strings were never updated in #17911. Would you like to submit a PR for 
these changes? (guidelines are available at 
https://devguide.python.org/pullrequest/) Perhaps, you could include similar 
changes in Doc/library/traceback.rst ?

--
nosy: +SilentGhost
stage:  -> needs patch
type:  -> behavior
versions: +Python 3.7 -Python 3.9

___
Python tracker 

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



[issue36927] traceback docstrings should explicitly state return values instead of referring to other functions

2019-05-15 Thread Aaron Hall


New submission from Aaron Hall :

I've written three (or more) answers on Stack Overflow about how to use the 
functions in the traceback module, and I code Python all day long.

Embarrassing confession: I just recommended the wrong traceback function in 
email to fix the incorrect usage of another of these functions after pulling up 
the docs because. I corrected myself before anyone else could correct me, but I 
find these docstrings incredibly frustrating and problematic.

May I please give them a little more verbiage about their return values?

e.g.:

def format_tb(tb, limit=None):
"""A shorthand for 'format_list(extract_tb(tb, limit))'."""
return extract_tb(tb, limit=limit).format()

should be:

def format_tb(tb, limit=None):
"""A shorthand for 'format_list(extract_tb(tb, limit))',
which returns a list of strings ready for printing'.
"""
return extract_tb(tb, limit=limit).format()


In fact, perhaps the "shorthand" part is an implementation detail that may not 
even be correct (it doesn't immediately seem to be) and should be removed.

--
assignee: docs@python
components: Documentation
messages: 342588
nosy: Aaron Hall, docs@python
priority: normal
severity: normal
status: open
title: traceback docstrings should explicitly state return values instead of 
referring to other functions
versions: Python 3.8, Python 3.9

___
Python tracker 

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



[issue8400] zipimporter find_module fullname mis-documented

2019-05-15 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This still exists after zipimport rewrite in Python with 3.8 . Is this a 
documentation issue or an enhancement to be made as noted in msg109467 ?

--
nosy: +serhiy.storchaka, xtreak
versions: +Python 3.7, Python 3.8 -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



[issue36919] Exception from 'compile' reports a newline char not present in input

2019-05-15 Thread Brett Cannon


Brett Cannon  added the comment:

I don't think it's option C. As for whether A or B I don't know. Wouldn't hurt 
to ask on python-dev if no one comes forward with a more authoritative answer.

--

___
Python tracker 

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



[issue36920] inspect.getcallargs sees optional arg to builtin as required

2019-05-15 Thread Brett Cannon


Brett Cannon  added the comment:

Also note that inspect.getcallargs() has been deprecated since Python 3.5: 
https://docs.python.org/3/library/inspect.html#inspect.getcallargs.

Since the function is deprecated I'm closing as "won't fix".

--
nosy: +brett.cannon
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



[issue36917] ast.NodeVisitor no longer calls visit_Str

2019-05-15 Thread Anthony Sottile


Anthony Sottile  added the comment:

The simplest case is just the addition of an `isinstance` check:

https://github.com/asottile/dead/blob/85f5edbb84b5e118beab4be3346a630e41418a02/dead.py#L165-L170

class V(ast.NodeVisitor):
def visit_Str(self, node):
...

def visit_Constant(self, node):
if isinstance(node.value, str):
self.visit_Str(node)
else:
self.generic_visit(node)


But I have another case where there's much more complex (sorry this one's 
private, I'll give the pseudo-code of it though which ends up in a whole mess 
of slow `isinstance(...)` calls


class V(ast.NodeVisitor):
def visit_Str(self, node):
...

def visit_Bytes(self, node):
...

def visit_Num(self, node):
...

def visit_Constant(self, node):
if isinstance(node.value, str):
 return self.visit_Str(node)
# Annoying special case, bools are ints, before this wouldn't call
# `visit_Num` because there was a separate `visit_NameConstant` for 
`True` / `False`
elif isinstance(node.value, int) and not isinstance(node.value, bool):
return self.visit_Num(node)
elif isinstance(node.value, bytes):
return self.visit_Bytes(node)
else:
return self.generic_visit(node)


Whereas the opposite case (where handling all constants the same) is much much 
easier to simplify the code and not need the `Constant` mess (if required)

class V(ast.NodeVisitor):
def _visit_constant(self, node):
# generic handling of constant _if you want it_

visit_Str = visit_Num = visit_Bytes = visit_NameConstant = visit_Ellipsis = 
_visit_constant


Maybe I haven't been in the community long enough but this is the first 
*removal* of the ast I've seen, and it makes all my uses of these functions 
objectively worse, and none of the cases get simpler (whereas there's an 
existing easy way to simplify constants already, without breaking the ast)

github search isn't a great measure of this but it's currently showing 10k+ 
usages of `visit_{Str,Num,Bytes}` that would presumably be broken by this 
change: https://github.com/search?q=visit_Num+visit_Str+visit_Bytes=Code 
-- backward compatibility is very valuable, I would hope it isn't squandered 
for an internal cleanup

--

___
Python tracker 

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



[issue34648] Confirm the types of parameters of traceback.format_list and traceback.StackSummary.from_list post-3.5

2019-05-15 Thread Aaron Hall


Change by Aaron Hall :


--
nosy: +Aaron Hall

___
Python tracker 

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



[issue36917] ast.NodeVisitor no longer calls visit_Str

2019-05-15 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This is not a new case. This is exactly the same problem which has already been 
fixed in multiple other projects.

Could you show your real code Anthony? In all known opensource examples 
(astroid, pyflakes, genshi, chameleon, mako) the compatibility fix is as simple 
as

def visit_Constant(self, node):
if node.value is Ellipsis:
self._write('...')
else:
self._write(repr(node.value))

In return, you can remove several methods, such as visit_Str, visit_Num, etc, 
once you drop the support of Python versions <3.8.

AST is not stable. Virtually in every version the new nodes are added: for 
asynchronous constructions, for f-strings, etc, and the structure and meaning 
of existing nodes can be changed.

--

___
Python tracker 

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



[issue36925] python3.7.3 can't work after MacOS upgrade from v10.14.4 to v10.14.5

2019-05-15 Thread wuwentao


wuwentao  added the comment:

1.my python3 is /usr/local/bin/python3, it's a link to Python3.7.3
2. I have downloaded the Mac OS install pkg file from our website, get the same 
result
3. my env don'T set PYTHON env , just default value
4. also tried reinstall many times with brew ,got the same result
 i think maybe some OS related issue caused it, need to confirm tomorrow

--
status: pending -> open

___
Python tracker 

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



[issue34288] Declare sethostname in socketmodule.c for SOLARIS

2019-05-15 Thread John Harrison


John Harrison  added the comment:

On Solaris 10 i386 I successfully built _socket on 3.7.3 by patching *in* a 
Solaris test (by cloning the test for the INET_ADDRSTRLEN definition currently 
on line 268) rather than by patching away the _AIX ifdef

$ diff -u ../socketmodule.c Modules/socketmodule.c
--- ../socketmodule.c   Wed May 15 16:36:32 2019
+++ Modules/socketmodule.c  Wed May 15 15:34:50 2019
@@ -5212,6 +5212,10 @@
 extern int sethostname(const char *, size_t);
 #endif

+#if (defined(__sun) && defined(__SVR4))
+extern int sethostname(const char *, size_t);
+#endif
+
 if (!PyArg_ParseTuple(args, "S:sethostname", )) {
 PyErr_Clear();
 if (!PyArg_ParseTuple(args, "O&:sethostname",

--
nosy: +John Harrison

___
Python tracker 

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



[issue36799] Typo in ctypes documentation

2019-05-15 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:


New changeset 4fd7f56ee78a07ebadf034affc2e36db14c85c00 by Stéphane Wirtel in 
branch '3.7':
[3.7] bpo-36799: Fix typo in ctypes.rst (GH-13104) (GH-13341)
https://github.com/python/cpython/commit/4fd7f56ee78a07ebadf034affc2e36db14c85c00


--

___
Python tracker 

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



[issue36926] Implement methoddescr_call without _PyMethodDef_RawFastCallDict

2019-05-15 Thread Jeroen Demeyer


Change by Jeroen Demeyer :


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

___
Python tracker 

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



[issue36926] Implement methoddescr_call without _PyMethodDef_RawFastCallDict

2019-05-15 Thread Jeroen Demeyer


New submission from Jeroen Demeyer :

Once PEP 590 is implemented, it makes sense to focus on using the new 
"vectorcall" calling convention, which is essentially what is currently 
FastCallKeywords. To simplify things, it would also be good to use FastCallDict 
in as few places as possible and actually get rid of that completely.

One place where using FastCallKeywords instead of FastCallDict is bad for 
performance is when using METH_VARARGS|METH_KEYWORDS: the dict would be 
converted to a tuple and then back to a dict. For builtin_function_or_method 
instances, there is already special code to deal with METH_VARARGS. But for 
method_descriptor, there is no such code and this issue fixes that.

More precisely, a specialized function is used for implementing calls of 
method_descriptor with the METH_VARARGS|METH_KEYWORDS signature. Other calls 
use FastCallKeywords instead, in which case there is no performance loss.

--
components: Interpreter Core
messages: 342579
nosy: Mark.Shannon, jdemeyer, petr.viktorin
priority: normal
severity: normal
status: open
title: Implement methoddescr_call without _PyMethodDef_RawFastCallDict
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



[issue36917] ast.NodeVisitor no longer calls visit_Str

2019-05-15 Thread Matthias Bussonnier


Matthias Bussonnier  added the comment:

> so my vote is to revert, keep the complexity in the compiler and out of user 
> code


Playing Devil advocate here, but the complexity depends on what transformations 
user want to do; with the current state of 3.8, a user that wants to visit all 
immutable types can do with a single visit_Constant; once 32892 reverted; they 
would need to implement all of visit_Str,NamedConstant,Num,Bytes, and have it 
called the same visit_Constant.

--

___
Python tracker 

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



[issue36799] Typo in ctypes documentation

2019-05-15 Thread Stéphane Wirtel

Change by Stéphane Wirtel :


--
pull_requests: +13253

___
Python tracker 

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



[issue36799] Typo in ctypes documentation

2019-05-15 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

If I have no news from miss-islington about the backport of this PR, I will do 
it manually.

--

___
Python tracker 

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



[issue36799] Typo in ctypes documentation

2019-05-15 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:


New changeset 133fc89ca02b51b8d5b87556d94f1382c4ed72c1 by Stéphane Wirtel 
(Yavor Konstantinov) in branch 'master':
bpo-36799: Fix typo in ctypes.rst (GH-13104)
https://github.com/python/cpython/commit/133fc89ca02b51b8d5b87556d94f1382c4ed72c1


--
nosy: +matrixise

___
Python tracker 

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



[issue35983] tp_dealloc trashcan shouldn't be called for subclasses

2019-05-15 Thread Ned Deily


Change by Ned Deily :


--
versions:  -Python 2.7, Python 3.7

___
Python tracker 

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



[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f24a9f3bf42709fb97b954b6dd6f90853967712e by Victor Stinner in 
branch '2.7':
bpo-27987: pymalloc: align by 16bytes on 64bit platform (GH-12850) (GH-13319)
https://github.com/python/cpython/commit/f24a9f3bf42709fb97b954b6dd6f90853967712e


--

___
Python tracker 

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



[issue33135] Define field prefixes for the various config structs

2019-05-15 Thread STINNER Victor


STINNER Victor  added the comment:

In the master branch, the C function config_read_cmdline() uses:

* cmdline_warnoptions: -W command line arguments
* env_warnoptions: PYTHONWARNINGS environment variable

The config_init_warnoptions() uses these 2 list and combine it with other 
options, dev_mode and bytes_warnings.

The warnings options are now specified in my PEP 587:
https://www.python.org/dev/peps/pep-0587/#priority-and-rules

--

___
Python tracker 

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



[issue36925] python3.7.3 can't work after MacOS upgrade from v10.14.4 to v10.14.5

2019-05-15 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the report but I am unable to reproduce the behavior you describe on 
another v10.14.5 system using any of the current python.org 3.7.3 macOS python 
binary, a built-from-source 3.7.3+, or a MacPorts 3.7.3 with either libedit or 
GNU readline.  First, I would check to check what the command "python3" really 
does.  In a new terminal window, I would expect something like:

$ type python3
python3 is /usr/local/bin/python3

Also check for any Python-related environment variables:

$ env | grep PYTHON

Since you appear to be using a Homebrew-installed python3.7, I would check the 
Homebrew forums and issue tracker for similar reports. You could also try 
reinstalling the Homebrew python3.

--
resolution:  -> works for me
status: open -> pending
type: crash -> 

___
Python tracker 

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



[issue36917] ast.NodeVisitor no longer calls visit_Str

2019-05-15 Thread Anthony Sottile


Anthony Sottile  added the comment:

spent some more time thinking about this and I think we should strongly 
consider reverting.  simplification in the core interpreter should not be 
weighed lightly against complexity and breaking changes for users.

the change is also unfortunate because it reduces the expressivity of the ast

as we discuss shims, I believe the intention is to remove the `Num` / `Str` / 
etc. layer eventually so it's really just delaying that.

so my vote is to revert, keep the complexity in the compiler and out of user 
code

--

___
Python tracker 

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



[issue36319] Erro 0xC0000374 on windows 10

2019-05-15 Thread Bernd Meiners


Bernd Meiners  added the comment:

Microsoft Windows [Version 10.0.17763.437]
(c) 2018 Microsoft Corporation. Alle Rechte vorbehalten.

C:\Users\bmx>python
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

>>> import time,locale
>>> locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
>>> time.localtime()

---> python crashes, same with 'de_DE.UTF-8'

In contrast Python 3.6 raises an error about an invalid locale

--
nosy: +bmx

___
Python tracker 

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



[issue36925] python3.7.3 can't work after MacOS upgrade from v10.14.4 to v10.14.5

2019-05-15 Thread wuwentao


New submission from wuwentao :

Hi

My python3.7.3 works well in MacOS v10.14.4 yesterday, today I have upgrade my 
MacOS to v10.14.5, after upgrade,I just found python3 and pip3 can't works, all 
the command will be run as a background program, but not foreground program.
but MacOS builtin python 2.7 works well.
so I have reported it to Apply Support for this upgrade bug.
in addition, I think I also should report it to python bug tracker.



for example:

wtwu@wtwu-mbp:~$ ps aux |grep python
wtwu 27839   0.0  0.0  4277296844 s003  S+8:41PM   0:00.00 
grep python
wtwu@wtwu-mbp:~$ python
Python 2.7.10 (default, Feb 22 2019, 21:55:15)
[GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.37.14)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> print "hello world"
hello world
>>> exit()
wtwu@wtwu-mbp:~$ python3

[1]+  Stopped python3
wtwu@wtwu-mbp:~$ Python 3.7.3 (default, Mar 27 2019, 09:23:15)
[Clang 10.0.1 (clang-1001.0.46.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.


[1]+  Stopped python3
wtwu@wtwu-mbp:~$ ps aux |grep python
wtwu 27851   0.0  0.0  4268080820 s003  S+8:41PM   0:00.00 
grep python
wtwu 27847   0.0  0.1  4263232   8576 s003  T 8:41PM   0:00.04 
/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python
wtwu@wtwu-mbp:~$ python3

[2]+  Stopped python3
wtwu@wtwu-mbp:~$ Python 3.7.3 (default, Mar 27 2019, 09:23:15)
[Clang 10.0.1 (clang-1001.0.46.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.


[2]+  Stopped python3
wtwu@wtwu-mbp:~$ ps aux |grep python
wtwu 27857   0.0  0.0  4277296836 s003  S+8:42PM   0:00.00 
grep python
wtwu 27854   0.0  0.1  4274496   8596 s003  T 8:42PM   0:00.04 
/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python
wtwu 27847   0.0  0.1  4263232   8576 s003  T 8:41PM   0:00.04 
/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python
wtwu@wtwu-mbp:~$
wtwu@wtwu-mbp:~$

--
components: macOS
messages: 342570
nosy: ned.deily, ronaldoussoren, wuwentao
priority: normal
severity: normal
status: open
title: python3.7.3 can't work after MacOS upgrade from v10.14.4 to v10.14.5
type: crash
versions: Python 3.7

___
Python tracker 

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



[issue36924] Simplify implementation of classmethod_descriptor.__call__

2019-05-15 Thread Jeroen Demeyer


Change by Jeroen Demeyer :


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

___
Python tracker 

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



[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-05-15 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

For the record, I just came across this proposed feature for Java:

https://openjdk.java.net/jeps/8222530

Add text blocks to the Java language. A text block is a multi-line 
string literal that avoids the need for most escape sequences, 
automatically formats the string in predictable ways, and gives the 
developer control over format when desired.

It seems to be similar to Python triple-quoted strings except that the 
compiler automatically dedents the string using a "re-indentation 
algorithm". (Which sounds to me similar to, if not identical, to that 
used by textwrap.)

The JEP proposal says:

A study of Google's large internal repository of Java source code 
showed that 98% of string literals, once converted to text blocks 
and formatted appropriately, would require removal of incidental 
white space. If Java introduced multi-line string solution without 
support for automatically removing incidental white space, then many 
developers would write a method to remove it themselves and/or lobby 
for the String class to include a removal method.

which matches my own experience: *most* but not all of my indented 
triple-quotes strings start with incidental whitespace that I don't care 
about. But not quite all, so I think backwards compatibility requires 
that *by default* triple-quoted strings are not dedented.

Note that there are a couple of major difference between the JEP 
proposal and this:

- The JEP proposes to automatically dedent triple-quoted strings;
  this proposal requires an explicit call to .dedent().

- The JEP proposal allows the user to control the dedent by 
  indenting, or not, the trailing end-quote;

- however that means that in Java you won't be able to control
  the dedent if the string doesn't end with a final blank line;

- Should the dedent method accept an optional int argument
  specifying the number of spaces to dedent by? (Defaulting to
  None, meaning "dedent by the common indent".) If so, that won't
  affect the compile-time optimization so long as the argument is
  a literal.

- the JEP performs the dedent before backslash escapes are 
  interpreted; in this proposal backslash escapes will 
  occur before the dedent.

The JEP also mentions considering multi-line string literals as Swift 
and Rust do them:

https://github.com/apple/swift-evolution/blob/master/proposals/0168-multi-line-string-literals.md

https://stackoverflow.com/questions/29483365/what-is-the-syntax-for-a-multiline-string-literal

I mention these for completeness, not to suggest them as alternatives.

--

___
Python tracker 

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



[issue36338] urlparse of urllib returns wrong hostname

2019-05-15 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests:  -13146

___
Python tracker 

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



[issue34682] Typo reports on docs@

2019-05-15 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Thank you @divyag for the patch and thank you @matrixise for the backport!

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



[issue36567] DOC: manpage directive doesn't create hyperlink

2019-05-15 Thread Batuhan


Batuhan  added the comment:

*ups propsal = pr

--

___
Python tracker 

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



[issue36924] Simplify implementation of classmethod_descriptor.__call__

2019-05-15 Thread Jeroen Demeyer


New submission from Jeroen Demeyer :

The class classmethod_descriptor implements classmethods for builtin functions. 
Unlike the plain classmethod class (which is used for Python classmethods), 
instances of classmethod_descriptor are callable. However, calling them is 
unlikely to happen in practice: the only way to obtain such an object is to 
extract from the class __dict__.

Therefore, the implementation of __call__ does not need to be optimized: we can 
just call __get__ and then call the result. Doing that allows a simpler 
implementation of PEP 590.

--
components: Interpreter Core
messages: 342566
nosy: Mark.Shannon, jdemeyer, petr.viktorin
priority: normal
severity: normal
status: open
title: Simplify implementation of classmethod_descriptor.__call__
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



[issue36567] DOC: manpage directive doesn't create hyperlink

2019-05-15 Thread Batuhan


Batuhan  added the comment:

I sent a proposal with debian default and can be altered through env variable 
called MANPAGES_URL

--

___
Python tracker 

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



[issue36567] DOC: manpage directive doesn't create hyperlink

2019-05-15 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Is there another source than Debian?

there is this option: http://man7.org/linux/man-pages/index.html

Honestly, if you use the Debian source, there is an automatic redirect to the 
right man page.

--
nosy: +matrixise

___
Python tracker 

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



[issue36567] DOC: manpage directive doesn't create hyperlink

2019-05-15 Thread Batuhan


Change by Batuhan :


--
keywords: +patch
pull_requests: +13251
stage: needs patch -> patch review

___
Python tracker 

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



[issue36567] DOC: manpage directive doesn't create hyperlink

2019-05-15 Thread Batuhan


Batuhan  added the comment:

What is going to be our manpage site? Debian?

--
nosy: +BTaskaya

___
Python tracker 

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



[issue33135] Define field prefixes for the various config structs

2019-05-15 Thread Batuhan


Batuhan  added the comment:

+1 from me. But i dont understand why this issue triaged as "needs patch". 
Isn't it should be discussed first?

--
nosy: +BTaskaya

___
Python tracker 

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



[issue36713] duplicate method definition in Lib/ctypes/test/test_unicode.py

2019-05-15 Thread Batuhan


Change by Batuhan :


--
title: uplicate method definition in Lib/ctypes/test/test_unicode.py -> 
duplicate method definition in Lib/ctypes/test/test_unicode.py

___
Python tracker 

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



[issue36922] Implement Py_TPFLAGS_METHOD_DESCRIPTOR

2019-05-15 Thread Jeroen Demeyer


Change by Jeroen Demeyer :


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

___
Python tracker 

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



[issue1572968] release GIL while doing I/O operations in the mmap module

2019-05-15 Thread Batuhan


Batuhan  added the comment:

Any news? If a patch is not ready, i can work on a patch too.

--
nosy: +BTaskaya

___
Python tracker 

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



[issue36826] ast_unparser.c doesn't handle := expressions

2019-05-15 Thread Batuhan


Change by Batuhan :


--
keywords: +patch
pull_requests: +13249
stage: needs patch -> patch review

___
Python tracker 

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



[issue36826] ast_unparser.c doesn't handle := expressions

2019-05-15 Thread Batuhan


Batuhan  added the comment:

I have patch, i'm going to submit it.

--
nosy: +BTaskaya

___
Python tracker 

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



[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-15 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +13248

___
Python tracker 

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



[issue1875] "if 0: return" not raising SyntaxError

2019-05-15 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

>The drawback of compiling the dead code is adding cells for unneeded constants 
>and local variables. Also it can create less optimal code for jumps.

Is unlikely that this situation arises often enough that this is a concern. We 
would be sacrificing correctness for speed and I think that is an error.

If there is a more optimal approach I'm happy to implement it.

--

___
Python tracker 

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



[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2019-05-15 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +13247

___
Python tracker 

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



[issue1875] "if 0: return" not raising SyntaxError

2019-05-15 Thread Armin Rigo


Change by Armin Rigo :


--
nosy:  -arigo

___
Python tracker 

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



[issue36923] Implemented __str__ for zip and map objects

2019-05-15 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It will fail for infinite and very large iterables. It can cause performing 
unexpected operations. Examples:

zip(itertools.count(), itertools.repeat(None))

zip(file1, file2)

In general, the repr of the iterator should not change it state. But your 
proposition exhausts it.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue36923] Implemented __str__ for zip and map objects

2019-05-15 Thread SilentGhost


SilentGhost  added the comment:

This would exhaust the object, seems like a rather unfortunate side effect. I 
don't think this suggestion has any chance of being accepted, do feel free to 
take it to python-ideas to demonstrate that benefits outweigh the downsides.

--
nosy: +SilentGhost
resolution:  -> rejected
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



  1   2   >