[issue37224] test__xxsubinterpreters failed on AMD64 Windows8.1 Refleaks 3.8

2019-09-15 Thread Kyle Stanley


Kyle Stanley  added the comment:

Clarification: In the above comment when I was referring to the commit made by 
Eric Snow, I meant to link to 
https://github.com/python/cpython/commit/7f8bfc9b9a8381ddb768421b5dd5cbd970266190.

--

___
Python tracker 

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



[issue37224] test__xxsubinterpreters failed on AMD64 Windows8.1 Refleaks 3.8

2019-09-15 Thread Kyle Stanley


Kyle Stanley  added the comment:

Note that I'm not particularly experienced with the c-api, I'm just trying to 
take a stab at understanding why the buildbot failure is occuring.

--

___
Python tracker 

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



[issue37224] test__xxsubinterpreters failed on AMD64 Windows8.1 Refleaks 3.8

2019-09-15 Thread Kyle Stanley


Kyle Stanley  added the comment:

Upon digging through Modules/_xxsubinterpretersmodule.c, I noticed that on line 
2059, `PyInterpreterState_Delete(interp);` is commented out 
(https://github.com/python/cpython/blob/bf169915ecdd42329726104278eb723a7dda2736/Modules/_xxsubinterpretersmodule.c#L2059).
 

This was done when _xxsubinterpretersmodule.c was first added by Eric Snow 
(https://github.com/python/cpython/blob/bf169915ecdd42329726104278eb723a7dda2736/Modules/_xxsubinterpretersmodule.c#L2059),
 so it seems to have been done intentionally but I don't understand why.

Is this because `Py_EndInterpreter()` is supposed to shutdown the interpreter, 
so `PyInterpreterState_Delete()` isn't needed? If so, that still doesn't 
particularly explain why it was commented out. Perhaps Eric can elaborate.

--
nosy: +aeros167

___
Python tracker 

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



[issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t

2019-09-15 Thread Ned Deily


Ned Deily  added the comment:

macOS 3.9, 3.8, 3.7 installers updated to 1.1.1d, macOS 2.7 installer updated 
to 1.0.2t. Leaving open for Windows installers updates.

--
nosy: +benjamin.peterson
versions: +Python 2.7

___
Python tracker 

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



[issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t

2019-09-15 Thread Ned Deily


Ned Deily  added the comment:


New changeset 8dd358caf0d3f300ee64799812a020fe0de53637 by Ned Deily in branch 
'2.7':
bpo-38117: Updated OpenSSL to 1.0.2t in macOS installer for 2.7.x. (GH-16171)
https://github.com/python/cpython/commit/8dd358caf0d3f300ee64799812a020fe0de53637


--

___
Python tracker 

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



[issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t

2019-09-15 Thread miss-islington


miss-islington  added the comment:


New changeset 346b7c928b82d9da8f6654391e9cfe55625dcfac by Miss Islington (bot) 
in branch '3.8':
bpo-38117: Updated OpenSSL to 1.1.1d in macOS installer. (GH-16170)
https://github.com/python/cpython/commit/346b7c928b82d9da8f6654391e9cfe55625dcfac


--

___
Python tracker 

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



[issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t

2019-09-15 Thread miss-islington


miss-islington  added the comment:


New changeset 26c44b5144a51f452dd0693b0278ec69d6a954a1 by Miss Islington (bot) 
in branch '3.7':
bpo-38117: Updated OpenSSL to 1.1.1d in macOS installer. (GH-16170)
https://github.com/python/cpython/commit/26c44b5144a51f452dd0693b0278ec69d6a954a1


--

___
Python tracker 

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



[issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t

2019-09-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15783
pull_request: https://github.com/python/cpython/pull/16173

___
Python tracker 

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



[issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t

2019-09-15 Thread Ned Deily


Ned Deily  added the comment:


New changeset 24d1597e430498ebe2d3d18fba2cacb3957b494d by Ned Deily in branch 
'master':
bpo-38117: Updated OpenSSL to 1.1.1d in macOS installer. (GH-16170)
https://github.com/python/cpython/commit/24d1597e430498ebe2d3d18fba2cacb3957b494d


--

___
Python tracker 

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



[issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t

2019-09-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15782
pull_request: https://github.com/python/cpython/pull/16172

___
Python tracker 

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



[issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t

2019-09-15 Thread Ned Deily


Change by Ned Deily :


--
pull_requests: +15781
pull_request: https://github.com/python/cpython/pull/16171

___
Python tracker 

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



[issue32592] Drop support of Windows Vista and 7 in Python 3.9

2019-09-15 Thread Eryk Sun


Eryk Sun  added the comment:

Here are a couple more:

* WSA_FLAG_NO_HANDLE_INHERIT is supported. Code related to 
`support_wsa_no_inherit` in Modules/socketmodule.c can be removed.

* AddDllDirectory and RemoveDllDirectory are supported. 
os__add_dll_directory_impl and os__remove_dll_directory_impl in 
Modules/posixmodule.c no longer need to manually link to them via 
GetModuleHandleW and GetProcAddress.

--

___
Python tracker 

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



[issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t

2019-09-15 Thread Ned Deily


Change by Ned Deily :


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

___
Python tracker 

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



[issue20066] PyStructSequence_NewType() not setting proper heap allocation flag?

2019-09-15 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:

As commented in issue15729, the Py_TPFLAGS_HEAPTYPE flag is now set in 
PyType_FromSpecWithBases() which is called by PyStructSequence_NewType(). I 
think this is no longer an issue.

--
nosy: +nanjekyejoannah

___
Python tracker 

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



[issue15729] PyStructSequence_NewType enhancement

2019-09-15 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:

All enhancements specified in this issue have since been done. 
PyStructSequence_NewType() calls PyType_FromSpecWithBases() which sets the 
needed flags and even the qualname:

PyObject *
PyType_FromSpecWithBases(PyType_Spec *spec, PyObject *bases)
{
PyHeapTypeObject *res;
PyMemberDef *memb;
PyObject *modname;
PyTypeObject *type, *base;

PyType_Slot *slot;
Py_ssize_t nmembers;
char *s, *res_start;

nmembers = 0;
for (slot = spec->slots; slot->slot; slot++) {
if (slot->slot == Py_tp_members) {
nmembers = 0;
for (memb = slot->pfunc; memb->name != NULL; memb++) {
nmembers++;
}
}
}

res = (PyHeapTypeObject*)PyType_GenericAlloc(_Type, nmembers);
if (res == NULL)
return NULL;
res_start = (char*)res;

if (spec->name == NULL) {
PyErr_SetString(PyExc_SystemError,
"Type spec does not define the name field.");
goto fail;
}

/* Set the type name and qualname */
s = strrchr(spec->name, '.');
if (s == NULL)
s = (char*)spec->name;
else
s++;

type = >ht_type;
/* The flags must be initialized early, before the GC traverses us */
type->tp_flags = spec->flags | Py_TPFLAGS_HEAPTYPE;
res->ht_name = PyUnicode_FromString(s);
if (!res->ht_name)
goto fail;
res->ht_qualname = res->ht_name;
Py_INCREF(res->ht_qualname);
type->tp_name = spec->name;

/* Adjust for empty tuple bases */
if (!bases) {
base = _Type;
/* See whether Py_tp_base(s) was specified */
for (slot = spec->slots; slot->slot; slot++) {
if (slot->slot == Py_tp_base)
base = slot->pfunc;
else if (slot->slot == Py_tp_bases) {
bases = slot->pfunc;
Py_INCREF(bases);
}
}
if (!bases)
bases = PyTuple_Pack(1, base);
if (!bases)
goto fail;
}
else
Py_INCREF(bases);

/* Calculate best base, and check that all bases are type objects */
base = best_base(bases);
if (base == NULL) {
goto fail;
}
if (!PyType_HasFeature(base, Py_TPFLAGS_BASETYPE)) {
PyErr_Format(PyExc_TypeError,
 "type '%.100s' is not an acceptable base type",
 base->tp_name);
goto fail;
}

/* Initialize essential fields */
type->tp_as_async = >as_async;
type->tp_as_number = >as_number;
type->tp_as_sequence = >as_sequence;
type->tp_as_mapping = >as_mapping;
type->tp_as_buffer = >as_buffer;
/* Set tp_base and tp_bases */
type->tp_bases = bases;
bases = NULL;
Py_INCREF(base);
type->tp_base = base;

type->tp_basicsize = spec->basicsize;
type->tp_itemsize = spec->itemsize;

for (slot = spec->slots; slot->slot; slot++) {
if (slot->slot < 0
|| (size_t)slot->slot >= Py_ARRAY_LENGTH(slotoffsets)) {
PyErr_SetString(PyExc_RuntimeError, "invalid slot offset");
goto fail;
}
else if (slot->slot == Py_tp_base || slot->slot == Py_tp_bases) {
/* Processed above */
continue;
}
else if (slot->slot == Py_tp_doc) {
/* For the docstring slot, which usually points to a static string
   literal, we need to make a copy */
const char *old_doc = _PyType_DocWithoutSignature(type->tp_name, 
slot->pfunc);
size_t len = strlen(old_doc)+1;
char *tp_doc = PyObject_MALLOC(len);
if (tp_doc == NULL) {
type->tp_doc = NULL;
PyErr_NoMemory();
goto fail;
}
memcpy(tp_doc, old_doc, len);
type->tp_doc = tp_doc;
}
else if (slot->slot == Py_tp_members) {
/* Move the slots to the heap type itself */
size_t len = Py_TYPE(type)->tp_itemsize * nmembers;
memcpy(PyHeapType_GET_MEMBERS(res), slot->pfunc, len);
type->tp_members = PyHeapType_GET_MEMBERS(res);
}
else {
/* Copy other slots directly */
*(void**)(res_start + slotoffsets[slot->slot]) = slot->pfunc;
}
}
if (type->tp_dealloc == NULL) {
/* It's a heap type, so needs the heap types' dealloc.
   subtype_dealloc will call the base type's tp_dealloc, if
   necessary. */
type->tp_dealloc = subtype_dealloc;
}

if (PyType_Ready(type) < 0)
goto fail;

if (type->tp_dictoffset) {
res->ht_cached_keys = _PyDict_NewKeysForClass();
}

/* Set type.__module__ */
s = strrchr(spec->name, '.');
if (s != NULL) {
int err;
modname = PyUnicode_FromStringAndSize(
spec->name, (Py_ssize_t)(s - spec->name));
if (modname == NULL) {
goto fail;

[issue31956] Add start and stop parameters to the array.index()

2019-09-15 Thread Anders Lorentsen


Anders Lorentsen  added the comment:

I have actually managed to lost my local branch of this fix, though I assume I 
can just start another one, manually copy over the changes, somehow mark this 
current PR as cancelled, aborted, or in my option the best: 
"replaced/superseeded by: [new PR]". In any case, there were discussions that 
seem to be unresolved, allow me to summarize:

* Document that index() raises ValueError when *value* is not found?
> vstinner: We don't do this, remove this addition.
> serhiy: Other index() methods does this.
---> My patch current does this. Who has final saying here?

* 'start' and 'stop' arguments are not keyword arguments, and also not shown in 
the signature as '.. start=0 ..' for this very reason (it may make them look as 
keyword arguments). Also, this lines up with list.index() for consistency. 
Wishes about changing this for all index()-methods has been expressed, but it 
seems to be consensus on doing this in unison for all index()-methods at once, 
in a bigger change... So, what is currently in the PR is good enough for now, 
or?

* Wording in documentation: Clarify that "the returned index is still relative 
to the start of the array, not the searched sub sequence" or not?

* Comment in the code about checking the length of the array on each iteration? 
There were comments about it being "confusing" - and while I agree, the other 
index()-code for lists, does not comment on this. Again I followed the path of 
most consistency, but I did receive comments about this. Yes to descriptive 
comments, or not?



Generally speaking: In the end, all I really did was mimic how list.index() is 
both written and documented, and that's when discussions about issues related 
to that started occurring, and so I now remember that I halted my PR, waiting 
for these issues to be resolved.

--

___
Python tracker 

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



[issue37904] Suggested edit to Python Tutorial - Section 4

2019-09-15 Thread Diego Barriga


Change by Diego Barriga :


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

___
Python tracker 

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



[issue38180] Test pyexpat fails on Fedora 30

2019-09-15 Thread Diego Barriga


Diego Barriga  added the comment:

$  cat /etc/os-release  
NAME=Fedora
VERSION="30 (Workstation Edition)"
ID=fedora
VERSION_ID=30
VERSION_CODENAME=""
PLATFORM_ID="platform:f30"
PRETTY_NAME="Fedora 30 (Workstation Edition)"
ANSI_COLOR="0;34"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:30"
HOME_URL="https://fedoraproject.org/;
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f30/system-administrators-guide/;
SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help;
BUG_REPORT_URL="https://bugzilla.redhat.com/;
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=30
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=30
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy;
VARIANT="Workstation Edition"
VARIANT_ID=workstation

--

___
Python tracker 

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



[issue38180] Test pyexpat fails on Fedora 30

2019-09-15 Thread Diego Barriga


Change by Diego Barriga :


--
type:  -> behavior

___
Python tracker 

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



[issue38180] Test pyexpat fails on Fedora 30

2019-09-15 Thread Diego Barriga


New submission from Diego Barriga :

$ ./python -m test -j8 test_pyexpat
Run tests in parallel using 8 child processes
0:00:00 load avg: 0.66 [1/1/1] test_pyexpat failed
test test_pyexpat failed -- Traceback (most recent call last):
  File "/home/umoqnier/develop/python-dev/cpython/Lib/test/test_pyexpat.py", 
line 454, in test_exception
parser.Parse(b"", True)
RuntimeError: a

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/umoqnier/develop/python-dev/cpython/Lib/test/test_pyexpat.py", 
line 470, in test_exception
self.assertIn('call_with_frame("StartElement"', entries[1][3])
AssertionError: 'call_with_frame("StartElement"' not found in ''

== Tests result: FAILURE ==

1 test failed:
test_pyexpat

Total duration: 211 ms
Tests result: FAILURE

--
components: Tests
messages: 352497
nosy: umoqnier
priority: normal
severity: normal
status: open
title: Test pyexpat fails on Fedora 30
versions: Python 3.9

___
Python tracker 

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



[issue38179] Test subprocess fails on Fedora 30: test_group and test_extra_groups

2019-09-15 Thread Diego Barriga


Diego Barriga  added the comment:

$  cat /etc/os-release 
NAME=Fedora
VERSION="30 (Workstation Edition)"
ID=fedora
VERSION_ID=30
VERSION_CODENAME=""
PLATFORM_ID="platform:f30"
PRETTY_NAME="Fedora 30 (Workstation Edition)"
ANSI_COLOR="0;34"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:30"
HOME_URL="https://fedoraproject.org/;
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f30/system-administrators-guide/;
SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help;
BUG_REPORT_URL="https://bugzilla.redhat.com/;
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=30
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=30
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy;
VARIANT="Workstation Edition"
VARIANT_ID=workstation

--

___
Python tracker 

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



[issue38179] Test subprocess fails on Fedora 30: test_group and test_extra_groups

2019-09-15 Thread Diego Barriga


New submission from Diego Barriga :

==
ERROR: test_extra_groups (test.test_subprocess.POSIXProcessTestCase)
--
Traceback (most recent call last):
  File "/home/umoqnier/develop/python-dev/cpython/Lib/test/test_subprocess.py", 
line 1840, in test_extra_groups
output = subprocess.check_output(
  File "/home/umoqnier/develop/python-dev/cpython/Lib/subprocess.py", line 419, 
in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/home/umoqnier/develop/python-dev/cpython/Lib/subprocess.py", line 497, 
in run
with Popen(*popenargs, **kwargs) as process:
  File "/home/umoqnier/develop/python-dev/cpython/Lib/subprocess.py", line 889, 
in __init__
gids.append(grp.getgrnam(extra_group).gr_gid)
KeyError: "getgrnam(): name not found: 'nogroup'"

==
ERROR: test_group (test.test_subprocess.POSIXProcessTestCase) (group='nogroup')
--
Traceback (most recent call last):
  File "/home/umoqnier/develop/python-dev/cpython/Lib/test/test_subprocess.py", 
line 1800, in test_group
output = subprocess.check_output(
  File "/home/umoqnier/develop/python-dev/cpython/Lib/subprocess.py", line 419, 
in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/home/umoqnier/develop/python-dev/cpython/Lib/subprocess.py", line 497, 
in run
with Popen(*popenargs, **kwargs) as process:
  File "/home/umoqnier/develop/python-dev/cpython/Lib/subprocess.py", line 862, 
in __init__
gid = grp.getgrnam(group).gr_gid
KeyError: "getgrnam(): name not found: 'nogroup'"

--

Ran 306 tests in 26.423s

FAILED (errors=2, skipped=31)
test test_subprocess failed

== Tests result: FAILURE ==

1 test failed:
test_subprocess

Total duration: 26 sec 676 ms
Tests result: FAILURE

--
components: Tests
messages: 352495
nosy: umoqnier
priority: normal
severity: normal
status: open
title: Test subprocess fails on Fedora 30: test_group and test_extra_groups
type: behavior
versions: Python 3.9

___
Python tracker 

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



[issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t

2019-09-15 Thread Ned Deily


Ned Deily  added the comment:

The Windows and macOS installers also need to by updated to the new versions.

--
components: +Windows, macOS
nosy: +lukasz.langa, ned.deily, paul.moore, ronaldoussoren, steve.dower, 
tim.golden, zach.ware
priority: normal -> release blocker
resolution: fixed -> 
stage: resolved -> needs patch
status: closed -> open

___
Python tracker 

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



[issue38100] Spelling error in unittest.mock code

2019-09-15 Thread Marco Antonio Ramirez Valdes


Change by Marco Antonio Ramirez Valdes :


--
pull_requests: +15778
pull_request: https://github.com/python/cpython/pull/16168

___
Python tracker 

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



[issue38080] 2to3 urllib fixer: missing fix for urllib.getproxies

2019-09-15 Thread Roberto Meza


Change by Roberto Meza :


--
keywords: +patch
nosy: +robertpro
nosy_count: 1.0 -> 2.0
pull_requests: +15776
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/16167

___
Python tracker 

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



[issue37828] Fix default mock_name in unittest.mock.assert_called error message

2019-09-15 Thread Abraham


Change by Abraham :


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

___
Python tracker 

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



[issue37904] Suggested edit to Python Tutorial - Section 4

2019-09-15 Thread Diego Barriga


Diego Barriga  added the comment:

I'm interest on this for my first contribution :D

--

___
Python tracker 

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



[issue35638] Introduce fixed point locale aware format type for floating point numbers

2019-09-15 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I had thought that use a locales were deemed an anti-pattern (not easy-to-use, 
not thread-safe, etc).

--
nosy: +rhettinger

___
Python tracker 

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



[issue35638] Introduce fixed point locale aware format type for floating point numbers

2019-09-15 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
versions: +Python 3.9 -Python 3.8

___
Python tracker 

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



[issue38100] Spelling error in unittest.mock code

2019-09-15 Thread Maritza Esparza


Change by Maritza Esparza :


--
pull_requests: +15774
pull_request: https://github.com/python/cpython/pull/16165

___
Python tracker 

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



[issue38100] Spelling error in unittest.mock code

2019-09-15 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue37904] Suggested edit to Python Tutorial - Section 4

2019-09-15 Thread Diego Barriga


Change by Diego Barriga :


--
nosy: +umoqnier

___
Python tracker 

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



[issue38178] Remove explicit "loop" argument from EchoClientProtocol example

2019-09-15 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Raymond, sorry if I was so quick in applying.
The patch is very trivial and obvious.
I am pretty sure that Yuri and Victor approve it.

The PR doesn't fix a mistake, the code is still valid.
But we all changed our mind what is the loop role, should it be explicitly 
passed everywhere or not, etc.

At the time of the example creation explicit loop was safer, after Python 3.5.3 
bugfx release the implicit loop became the idiomatic solution.

We use the implicit loop everywhere, 3.8 raises DeprecationWarning for passing 
the loop into certain API calls.
The PR just changes the example to follow our own recommendations.

--

___
Python tracker 

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



[issue38019] asyncio subprocess AttributeError: 'NoneType' object has no attribute '_add_reader' / '_remove_reader'

2019-09-15 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

This fix cannot land on 3.6, the version is in security-fix only mode.

--
versions:  -Python 3.6

___
Python tracker 

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



[issue38019] asyncio subprocess AttributeError: 'NoneType' object has no attribute '_add_reader' / '_remove_reader'

2019-09-15 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Thanks. The correct fix is 'do nothing if stream._transport is None'.
We have only two weeks before 3.8rc, thus I'll prepare a fix myself for the 
sake of fast merging.

--
assignee:  -> asvetlov

___
Python tracker 

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



[issue38178] Remove explicit "loop" argument from EchoClientProtocol example

2019-09-15 Thread Hrvoje Nikšić

Hrvoje Nikšić  added the comment:

Raymond, no problem; I guess I assumed that the authors are following the bug 
tracker (or have possibly moved on and are inactive).

I also had reason to believe the change to be non-controversial, since it is in 
line with Yury's own recommendations, e.g. from his 2018 EuroPython 
presentation (slide 14):

https://speakerdeck.com/1st1/asyncio-today-and-tomorrow

In any case, I am happy that the pull request has been processed and accepted 
so quickly - thanks everyone for the great work!

--

___
Python tracker 

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



[issue38178] Remove explicit "loop" argument from EchoClientProtocol example

2019-09-15 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Thanks Hrvoje!

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



[issue38013] AsyncGenerator breaks when not iterated fully with RuntimeError("can't send non-None value to a just-started coroutine")

2019-09-15 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

I have a PR for the fix.
Yuri preliminary agrees with the patch but he requested more time for careful 
review.

I've added 'release blocker' priority to don't miss this bugfix for the next 
release.

--
nosy: +lukasz.langa, ned.deily
priority: normal -> release blocker
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



[issue38178] Remove explicit "loop" argument from EchoClientProtocol example

2019-09-15 Thread miss-islington


miss-islington  added the comment:


New changeset 1cd6e926d30552056457820a682c1c361ee0f3ff by Miss Islington (bot) 
in branch '3.8':
bpo-38178: Don't explicitly pass "loop" to EchoClientProtocol. (GH-16159)
https://github.com/python/cpython/commit/1cd6e926d30552056457820a682c1c361ee0f3ff


--

___
Python tracker 

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



[issue38178] Remove explicit "loop" argument from EchoClientProtocol example

2019-09-15 Thread miss-islington


miss-islington  added the comment:


New changeset 701c4886bb0e19ad5ed8c8f556f65ab8597841e7 by Miss Islington (bot) 
in branch '3.7':
bpo-38178: Don't explicitly pass "loop" to EchoClientProtocol. (GH-16159)
https://github.com/python/cpython/commit/701c4886bb0e19ad5ed8c8f556f65ab8597841e7


--

___
Python tracker 

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



[issue38178] Remove explicit "loop" argument from EchoClientProtocol example

2019-09-15 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Hrvoje, thanks for fixing this.

Next time, please involve the people who originally wrote the code.  They are 
both still active.  If they made mistakes, it helps them to know about it.  If 
they had a specific intent for the code example, it allows them to make sure 
the objectives are still being achieved.

--

___
Python tracker 

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



[issue38178] Remove explicit "loop" argument from EchoClientProtocol example

2019-09-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15772
pull_request: https://github.com/python/cpython/pull/16162

___
Python tracker 

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



[issue38178] Remove explicit "loop" argument from EchoClientProtocol example

2019-09-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15771
pull_request: https://github.com/python/cpython/pull/16161

___
Python tracker 

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



[issue38178] Remove explicit "loop" argument from EchoClientProtocol example

2019-09-15 Thread miss-islington

miss-islington  added the comment:


New changeset c717c73fa33a2f3591442059eaf6e7a673e2c725 by Miss Islington (bot) 
(Hrvoje Nikšić) in branch 'master':
bpo-38178: Don't explicitly pass "loop" to EchoClientProtocol. (GH-16159)
https://github.com/python/cpython/commit/c717c73fa33a2f3591442059eaf6e7a673e2c725


--
nosy: +miss-islington

___
Python tracker 

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



[issue37798] Add C fastpath for statistics.NormalDist.inv_cdf()

2019-09-15 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset d6fdfc82dd307161caae938b7a6c85215bc1 by Raymond Hettinger 
(Miss Islington (bot)) in branch '3.8':
bpo-37798: Prevent undefined behavior in direct calls to the C helper function. 
(GH-16149) (GH-16160)
https://github.com/python/cpython/commit/d6fdfc82dd307161caae938b7a6c85215bc1


--

___
Python tracker 

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



[issue38178] Remove explicit "loop" argument from EchoClientProtocol example

2019-09-15 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

The was added originally by Victor and Yuri in c7edff3 and 7c7605ff113

--
nosy: +rhettinger, vstinner

___
Python tracker 

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



[issue37798] Add C fastpath for statistics.NormalDist.inv_cdf()

2019-09-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15770
pull_request: https://github.com/python/cpython/pull/16160

___
Python tracker 

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



[issue37798] Add C fastpath for statistics.NormalDist.inv_cdf()

2019-09-15 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 6e27a0d77520bf2c4412e367496212510f81b983 by Raymond Hettinger in 
branch 'master':
bpo-37798: Prevent undefined behavior in direct calls to the C helper function. 
(#16149)
https://github.com/python/cpython/commit/6e27a0d77520bf2c4412e367496212510f81b983


--

___
Python tracker 

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



[issue38178] Remove explicit "loop" argument from EchoClientProtocol example

2019-09-15 Thread Hrvoje Nikšić

Change by Hrvoje Nikšić :


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

___
Python tracker 

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



[issue38178] Remove explicit "loop" argument from EchoClientProtocol example

2019-09-15 Thread Hrvoje Nikšić

New submission from Hrvoje Nikšić :

The EchoClientProtocol example receives a "loop" argument, which is not used at 
all in the TCP example, and is used to create a future in the UDP example. In 
modern asyncio code the explicit loop arguments are no longer used since the 
loop can always be obtained with get_running_loop().

The proposed patch makes the UDP example consistent with the TCP one (by having 
the constructor accept the on_con_lost future) and removes the loop argument 
from both.

--
assignee: docs@python
components: Documentation, asyncio
messages: 352478
nosy: asvetlov, docs@python, hniksic, yselivanov
priority: normal
severity: normal
status: open
title: Remove explicit "loop" argument from EchoClientProtocol example
versions: Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2019-09-15 Thread Thomas Grainger


Thomas Grainger  added the comment:

I think assertPermutation (without the "is") would be the best name

--

___
Python tracker 

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



[issue38176] test_threading leaked [1, 1, 1] references: test_threads_join

2019-09-15 Thread Dino Viehland


Change by Dino Viehland :


--
stage: patch review -> resolved

___
Python tracker 

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



[issue38176] test_threading leaked [1, 1, 1] references: test_threads_join

2019-09-15 Thread Dino Viehland


Change by Dino Viehland :


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



[issue38176] test_threading leaked [1, 1, 1] references: test_threads_join

2019-09-15 Thread Dino Viehland


Change by Dino Viehland :


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

___
Python tracker 

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



[issue38176] test_threading leaked [1, 1, 1] references: test_threads_join

2019-09-15 Thread Dino Viehland


Change by Dino Viehland :


--
assignee:  -> dino.viehland
nosy: +dino.viehland

___
Python tracker 

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



[issue32592] Drop support of Windows Vista and 7 in Python 3.9

2019-09-15 Thread Eryk Sun


Eryk Sun  added the comment:

3.9 can drop support for console pseudohandles in set_inheritable in 
Python/fileutils.c and Popen._filter_handle_list in Lib/subprocess.py. 

Also, _Py_write_impl in Python/fileutils.c can remove the 32767 byte limit for 
console files (and other character devices such as NUL, since it 
over-generalizes via isatty). The same applies to 
_io__WindowsConsoleIO_write_impl in Modules/_io/winconsoleio.c.

---
Discussion

In Windows 8+, the console uses "\\Device\\ConDrv" with kernel file objects. 
The console host process opens a file object for the ConDrv device itself in 
order to handle IOCTLs from clients. A console client process opens virtual 
files on ConDrv such as Connect (for generic functions such as GetConsoleCP), 
Input (default StandardInput), Output (default StandardOutput, StandardError), 
Console (//./CON), CurrentIn (//./CONIN$), and CurrentOut (//./CONOUT$). 
There's no practical limit on the size of reads and writes via these files.

Prior to Windows 8, console API requests are instead sent over an LPC port. 
Large messages that don't fit in a LPC packet are passed in a 64 KiB window of 
shared memory that's overlayed by a heap. This is the heap referred to by 
claims in the console API docs such as "[i]f the total size of the specified 
number of characters exceeds the available heap, the function fails with 
ERROR_NOT_ENOUGH_MEMORY".

With the LPC implementation, file handles for the console input buffer and 
screen buffer(s) are not real handles for kernel File objects. Rather, the 
console host process maintains a private table of pseudohandles for console 
buffers. These console pseudohandles are tagged for routing in the Windows API 
by setting the lower 2 bits. They're also verified in functions such as 
GetFileType via the undocumented function VerifyConsoleIoHandle. These 
pseudohandles have to be identified in Python because they're not supported by 
SetHandleInformation or the PROC_THREAD_ATTRIBUTE_HANDLE_LIST of CreateProcess, 
both of which require real kernel handles.

--

___
Python tracker 

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



[issue27218] improve tracing performance with f_trace set to Py_None

2019-09-15 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


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

___
Python tracker 

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



[issue37635] Using constant for whence arg in seek()

2019-09-15 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

> What do you think of the followup PR to make use of the SEEK_* constants 
> listed in the documentation? I think it would be useful to at least mention 
> them in the tutorial, or even make use of them directly in the examples.

Yes, I think it would be good to make use of them.

--

___
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-09-15 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue38177] test_tools: test.test_tools.test_unparse.UnparseTestCase: test_tools leaked [36, 36, 36] references

2019-09-15 Thread STINNER Victor


STINNER Victor  added the comment:

Oh, test_unparse.UnparseTestCase.test_nonlocal has been fixed. Maybe by:

commit 0247e80f3c529900689425676342cb70ea31a13d
Author: Eddie Elizondo 
Date:   Sat Sep 14 09:38:17 2019 -0400

Fix leaks in Python-ast.c (#16127)

But there are more leaks.

vstinner@apu$ make && ./python -m test -R 3:3 test_tools -m 
test.test_tools.test_c_analyzer.test_c_analyzer_common.test_known.FromFileTests.test_typical

It seems like the test leaks since the test has been added by:

commit ee536b2020b1f0baad1286dbd4345e13870324af
Author: Eric Snow 
Date:   Wed Sep 11 19:49:45 2019 +0100

bpo-36876: Add a tool that identifies unsupported global C variables. 
(#15877)

--

___
Python tracker 

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



[issue38177] test_tools: test.test_tools.test_unparse.UnparseTestCase: test_tools leaked [36, 36, 36] references

2019-09-15 Thread STINNER Victor


New submission from STINNER Victor :

https://buildbot.python.org/all/#/builders/189/builds/153

$ ./python -m test -R 3:3 test_tools -m 
test.test_tools.test_unparse.UnparseTestCase.test_nonlocal
Run tests sequentially
0:00:00 load avg: 1.48 [1/1] test_tools
beginning 6 repetitions
123456
..
test_tools leaked [36, 36, 36] references, sum=108
test_tools failed

== Tests result: FAILURE ==

1 test failed:
test_tools

Total duration: 591 ms
Tests result: FAILURE

--
components: Tests
messages: 352473
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_tools: test.test_tools.test_unparse.UnparseTestCase: test_tools 
leaked [36, 36, 36] references
versions: Python 3.9

___
Python tracker 

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



[issue38075] Make random module PEP-384 compatible

2019-09-15 Thread STINNER Victor


STINNER Victor  added the comment:

> bpo-38075: Port _randommodule.c to PEP-384 (GH-15798)

It seems like this change introduced a reference leak: bpo-38176.

--
nosy: +vstinner

___
Python tracker 

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



[issue38176] test_threading leaked [1, 1, 1] references: test_threads_join

2019-09-15 Thread STINNER Victor


STINNER Victor  added the comment:

The regression seems to be introduced by:

commit 04f0bbfbedf8d2bb69b012f853de6648b1a9f27f (HEAD, refs/bisect/bad)
Author: Dino Viehland 
Date:   Fri Sep 13 11:12:27 2019 +0100

bpo-38075: Port _randommodule.c to PEP-384 (GH-15798)

- Migrate `Random_Type` to `PyType_FromSpec`
- To simulate an old use of `PyLong_Type.tp_as_number->nb_absolute`, I added
  code to the module init function to stash `int.__abs__` for later
  use. Ideally we'd use `PyType_GetSlot()` instead, but it doesn't currently
  work for static types in CPython, and implementing it just for this case
  doesn't seem worth it.
- Do exact check for long and dispatch to PyNumber_Absolute, use vector 
call when not exact.

--

___
Python tracker 

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



[issue38176] test_threading leaked [1, 1, 1] references: test_threads_join

2019-09-15 Thread STINNER Victor


New submission from STINNER Victor :

vstinner@apu$ ./python -m test -R 3:3 test_threading -m 
test.test_threading.SubinterpThreadingTests.test_threads_join
Run tests sequentially
0:00:00 load avg: 1.11 [1/1] test_threading
beginning 6 repetitions
123456
..
test_threading leaked [1, 1, 1] references, sum=3
test_threading failed

== Tests result: FAILURE ==

1 test failed:
test_threading

Total duration: 639 ms
Tests result: FAILURE

--
components: Library (Lib)
messages: 352470
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_threading leaked [1, 1, 1] references: test_threads_join
versions: Python 3.9

___
Python tracker 

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



[issue26360] Deadlock in thread.join on Python 2.7/macOS

2019-09-15 Thread Kirill Smelkov


Kirill Smelkov  added the comment:

> > Maybe issue38106 related.
>
> That looks plausible, but unfortunately I'm still able to reproduce the hang 
> with your PR (commit 9b135c02aa1edab4c99c915c43cd62d988f1f9c1, macOS 10.14.6).

Thanks for feedback. Then hereby bug is probably deadlock of another kind.

--

___
Python tracker 

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



[issue38081] Different behavior of os.path.realpath('nul') in 3.7 and 3.8

2019-09-15 Thread Steve Dower


Steve Dower  added the comment:

I added another PR with the additional error codes listed by Eryk Sun.

Theoretically we should be able to test most of them, but I haven't written 
those tests, and I'm not sure they'd prove enough to be worth the extra code. 
ntpath.realpath is a "best effort" function (realpath in all cases is, I 
guess), so given the choice between failing and returning a best-effort path, 
it's obviously better to go with the best-effort path.

--

___
Python tracker 

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



[issue38081] Different behavior of os.path.realpath('nul') in 3.7 and 3.8

2019-09-15 Thread Steve Dower


Change by Steve Dower :


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

___
Python tracker 

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



[issue38166] ast identifies incorrect column for compound attribute lookups

2019-09-15 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

AST for expression a.b.c is

 Attribute(
value=Attribute(
   value=Name(
  id='a',
  ctx=Load(),
  lineno=1,
  col_offset=0,
  end_lineno=1,
  end_col_offset=1),
   attr='b',
   ctx=Load(),
   lineno=1,
   col_offset=0,
   end_lineno=1,
   end_col_offset=3),
attr='c',
ctx=Load(),
lineno=1,
col_offset=0,
end_lineno=1,
end_col_offset=5)

It contains one Name node for "a" and two Attribute nodes for "a.b" and 
"a.b.c". Every node has attributes lineno, col_offset, end_lineno and 
end_col_offset. Note that there are no nodes for "b" and "c", therefore there 
is no information about the location of "c" in AST.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue35638] Introduce fixed point locale aware format type for floating point numbers

2019-09-15 Thread Karl Ove Hufthammer


Change by Karl Ove Hufthammer :


--
nosy: +huftis

___
Python tracker 

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



[issue38166] ast identifies incorrect column for compound attribute lookups

2019-09-15 Thread Andrew Briand


Andrew Briand  added the comment:

It looks like the test suite (in particular test_ast) specifically checks for 
the behavior where the col_offset of c in a.b.c.d is 0. This  seems strange to 
me though, does anyone know if this is intended? If not, I can patch it.

--
nosy: +andrewbriand

___
Python tracker 

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



[issue38175] Memory leak in comparison of sqlite.Row objects

2019-09-15 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue38175] Memory leak in comparison of sqlite.Row objects

2019-09-15 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

There is a memory leak in comparison of sqlite.Row objects when row descriptors 
are different. There were not tests for this case.

Also, the code compares the result of PyObject_RichCompare() with Py_True and 
Py_False. It is better to avoid such code, because technically 
PyObject_RichCompare() can return an arbitrary value, although in this 
particular case description can only be tuple or None (or NULL, but this is 
other issue).

Also, there is a test for inequality of hash codes. Since hashes depend on 
hashes of strings, they value is random, and there is a small chance of 
failure. Hashes should not be tested for inequality.

--
components: Library (Lib)
messages: 352465
nosy: berker.peksag, ghaering, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Memory leak in comparison of sqlite.Row objects
type: resource usage
versions: Python 2.7, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue38155] Add __all__ to the datetime module

2019-09-15 Thread Dong-hee Na


Dong-hee Na  added the comment:

@ta1hia

My idea is that both tests should be added.
@p-ganssle's test aims to check the attr is allowed or not.
And your test aims to check attribute equalities of pure python module and c 
module.

--

___
Python tracker 

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



[issue21023] PyTypeObject tp_name is char* instead of const char*

2019-09-15 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It should not be an issue in 2014 as it was fixed in 2005. See 
af68c874a6803b4e90b616077a602c0593719a1d.

--
nosy: +serhiy.storchaka
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue38158] PyType_Spec docs list non-existant field "doc"

2019-09-15 Thread Stefan Behnel


Change by Stefan Behnel :


--
keywords:  -patch
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



[issue38158] PyType_Spec docs list non-existant field "doc"

2019-09-15 Thread Stefan Behnel


Stefan Behnel  added the comment:


New changeset b65be6cd3d9b6102227d27f4f35385f999a7dd7d by Stefan Behnel (Miss 
Islington (bot)) in branch '3.8':
bpo-38158: Removing nonexistant member "doc" from PyType_Spec documentation 
(GH-16142) (GH-16154)
https://github.com/python/cpython/commit/b65be6cd3d9b6102227d27f4f35385f999a7dd7d


--

___
Python tracker 

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



[issue38158] PyType_Spec docs list non-existant field "doc"

2019-09-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15764
pull_request: https://github.com/python/cpython/pull/16154

___
Python tracker 

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



[issue38158] PyType_Spec docs list non-existant field "doc"

2019-09-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15763
pull_request: https://github.com/python/cpython/pull/16153

___
Python tracker 

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