[issue35054] Add more index entries for symbols

2018-10-26 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +9451

___
Python tracker 

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



[issue35054] Add more index entries for symbols

2018-10-26 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +9452

___
Python tracker 

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



[issue1154351] add get_current_dir_name() to os module

2018-10-26 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
versions: +Python 3.8 -Python 3.4

___
Python tracker 

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



[issue35075] Doc: pprint example uses dead URL

2018-10-26 Thread INADA Naoki


New submission from INADA Naoki :

https://mail.python.org/pipermail/docs/2018-October/037913.html

Dead URL: http://pypi.org/project/Twisted/json
Valid URL: https://pypi.org/pypi/Twisted/json

But JSON returned by the valid URL seems too long for the example.
Is there a better sample JSON we can use in the example?

--
assignee: docs@python
components: Documentation
messages: 328517
nosy: docs@python, inada.naoki
priority: normal
severity: normal
status: open
title: Doc: pprint example uses dead URL
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



[issue35073] 'from app import __init__' behaves differently with native import and importlib

2018-10-26 Thread Quentin Agren


Quentin Agren  added the comment:

Sorry for the misunderstanding, and thanks for clarifying!

So essentially what I am getting by `from app import __init__` is the 
`__init__` method of the module object bound to the name `app`.

However if I have a submodule `app/myapp.py`, `from app import myapp` will 
import it and bind it to the name `myapp`, whereas 
`importlib.import_module('app').myapp` raises AttributeError, so I guess the 
two forms not totally equivalent...


Anyways, I'll investigate deeper before creating an issue henceforth :)

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



[issue1154351] add get_current_dir_name() to os module

2018-10-26 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue35007] Minor change to weakref docs

2018-10-26 Thread Julien Palard


Julien Palard  added the comment:

In the other end that's true that's an iterable, and that's what's count.

So if we want to change the implementation in the future, we still can, as long 
as we still return an iterable, it won't break asumptions.

So I'll keep the "iterable" word in the documentation, and it looks OK to me 
that the docstring tells more about the implementation than the interface, so 
I'll leave it as is too.

Relying on what you read in the current implementation is relying on an 
implementation detail that may change in the future, this weakens your code, 
please just consider it's an iterable?

Anyway the key set of the WeakKeyDictionary can change at any time, according 
to the actions you're doing while iterating over the keys, so better write 
solid code here, and be prepred for the worse, don't rely on implementation 
details.

--
nosy: +mdk

___
Python tracker 

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



[issue35056] Test leaks of memory not managed by Python allocator

2018-10-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Can it be used on buildbots and in CI tests?

--

___
Python tracker 

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



[issue21967] Interpreter crash upon accessing frame.f_restricted of a frame from a dead thread

2018-10-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Thank you for your report Anselm. Seems this bug is fixed in issue22851.

--
nosy: +serhiy.storchaka
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> 2.7 core crashes with generator.gi_frame.f_restricted

___
Python tracker 

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



[issue35073] 'from app import __init__' behaves differently with native import and importlib

2018-10-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The difference is that attribute "__init__" existed. If you set the "myapp" 
global in the "app" module, the file "app/myapp.py" will be not imported.

--
resolution:  -> not a bug

___
Python tracker 

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



[issue35054] Add more index entries for symbols

2018-10-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset e825b4e1a9bbe1d4c561f4cbbe6857653ef13a15 by Serhiy Storchaka in 
branch '3.6':
[3.6] bpo-35054: Add more index entries for symbols. (GH-10064). (GH-10119)
https://github.com/python/cpython/commit/e825b4e1a9bbe1d4c561f4cbbe6857653ef13a15


--

___
Python tracker 

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



[issue35054] Add more index entries for symbols

2018-10-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 9a75b8470a2e0de5406edcabba140f023c99c6a9 by Serhiy Storchaka in 
branch '3.7':
[3.7] bpo-35054: Add more index entries for symbols. (GH-10064). (GH-10120)
https://github.com/python/cpython/commit/9a75b8470a2e0de5406edcabba140f023c99c6a9


--

___
Python tracker 

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



[issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security

2018-10-26 Thread Senthil Kumaran


Senthil Kumaran  added the comment:


New changeset 971089fc2a09e4bcb872efac52c1b014af16fff9 by Senthil Kumaran in 
branch '2.7':
[2.7] bpo-34576 : Backport eeab510 2.7 (#10115)
https://github.com/python/cpython/commit/971089fc2a09e4bcb872efac52c1b014af16fff9


--

___
Python tracker 

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



[issue35070] test_posix fails on macOS 10.14 Mojave

2018-10-26 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

FWIW I don't see the problem either, VM running 10.14.1 (beta) with Python 
3.7.0.

--

___
Python tracker 

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



[issue33533] Provide an async-generator version of as_completed

2018-10-26 Thread Hrvoje Nikšić

Hrvoje Nikšić  added the comment:

I didn't start working on the PR, so please go ahead if you're interested.

One small suggestion: If you're implementing this, please note that the 
proof-of-concept implementation shown in the description is not very efficient 
because each call to `wait` has to iterate over all the futures (which can be 
potentially large in number) to set up and tear down the done callbacks on each 
one. A more efficient implementation would set up the callbacks only once - see 
https://stackoverflow.com/a/51403277/1600898 for an example.

--

___
Python tracker 

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



[issue35065] Reading received data from a closed TCP stream using `StreamReader.read` might hang forever

2018-10-26 Thread Vincent Michel


Vincent Michel  added the comment:

Hi Andrew!

I reverted the commit associated with the following PR, and the hanging issue 
disappeared:
https://github.com/python/cpython/pull/9201

I'll look into it.

--
type:  -> behavior

___
Python tracker 

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



[issue35056] Test leaks of memory not managed by Python allocator

2018-10-26 Thread STINNER Victor


STINNER Victor  added the comment:

> Can it be used on buildbots and in CI tests?

These kind of tool produces a lot of false alarms :-( They are also hard to use.

--

___
Python tracker 

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



[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-26 Thread STINNER Victor


STINNER Victor  added the comment:

Benjamin:
> Why do we need this Py_STATIC_INLINE macro? If you want to have one for 
> enabling always inline, that's fine with me, since it's compiler-specific.

For about the name, there is already Py_LOCAL_INLINE which also uses "static 
inline", but has a very different usage: "Py_LOCAL can be used instead of 
static to get the fastest possible calling convention for functions that are 
local to a given module." So I chise "Py_STATIC_INLINE" name, it describes the 
basic implementation ("static inline TYPE").

Py_STATIC_INLINE() is designed to replace a preprocessor macro with a function, 
when you care that the code is "always inlined". (Maybe the name is not perfect 
;-))

Honestly, I'm not sure that it really matters that the function is "always" 
inlined. The main issue is that "static" requires to duplicate the function in 
each file which uses the macro, when the function cannot/is not inlined.


Previously, you asked me:

> Does this slow down debug builds at all? It probably will not end will if 
> Py_INCREF is ever not inlined.

That's why I wrote Py_STATIC_INLINE() to "force" inlining and PR 10094 to 
enable inlining for Debug build on MSVC.


> But the current Py_STATIC_INLINE macro seems to conflate linkage with 
> always-inline behavior.

I'm not sure that I get it. Do you talk about "static" inside the macro? 
bpo-33407 modifies Py_DEPRECATED() to support Visual Stuido, but it requires to 
modify how the macro is used: it now must be used at the start, rather than at 
the end:
https://github.com/python/cpython/pull/8980/files

I chose to put "static" and "inline" in the same macro. We already have many 
other similar macros like PyAPI_FUNC(TYPE) and Py_LOCAL(TYPE). I would like to 
have a common way to "declare a function behaving as a macro".


Please see also the discussion on the PR itself, Neil discuss what's the best 
way to declare an inline function:
https://github.com/python/cpython/pull/10079#issuecomment-433230587

By the way, was it you who required "static inline" support in PEP 7? :-)

--

___
Python tracker 

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



[issue35075] Doc: pprint example uses dead URL

2018-10-26 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



[issue35056] Test leaks of memory not managed by Python allocator

2018-10-26 Thread STINNER Victor


STINNER Victor  added the comment:

Before seeing how to automate it, first someone should try to detect the 
bpo-34794 memory leak manually ;-)

By the way, when I implemented the PEP 445, I tried to configure OpenSSL to use 
Python memory allocators (to benefit of tracemalloc), but the OpenSSL API for 
that didn't work at all: bpo-18227.

--

___
Python tracker 

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



[issue35056] Test leaks of memory not managed by Python allocator

2018-10-26 Thread STINNER Victor


STINNER Victor  added the comment:

About automation, regrtest -R checks memory leaks using 
sys.getallocatedblocks(). But this function only tracks PyMem_Malloc() and 
PyObject_Malloc() (which is now technically the same memory allocator, since 
Python 3.6: 
https://docs.python.org/dev/c-api/memory.html#default-memory-allocators )

I tried to track PyMem_RawMalloc() using regrtest but... the raw memory 
allocator is not really "deterministic", it's hard to get reliable behavior. 
See: bpo-26850.

Tracking memory leaks is an hard topic :-) I'm happy that I finally fixed 
tracemalloc to track properly objects in free lists: bpo-35053!

--

___
Python tracker 

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



[issue35054] Add more index entries for symbols

2018-10-26 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +9453

___
Python tracker 

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



[issue35056] Test leaks of memory not managed by Python allocator

2018-10-26 Thread STINNER Victor


STINNER Victor  added the comment:

It seems like the easiest thing to do thta would directly benefit (to 
tracemalloc users) is to continue the implementation of bpo-18227:

* _sqlite: call sqlite3_config(SQLITE_CONFIG_MALLOC, pMem) to use 
PyMem_RawMalloc()
* _ssl: try again CRYPTO_set_mem_functions()

Python modules already using Python memory allocators:

* zlib: "zst.zalloc = PyZlib_Malloc" which calls PyMem_RawMalloc
* _decimal: mpd_mallocfunc = PyMem_Malloc
* _lzma: "self->alloc.alloc = PyLzma_Malloc" which calls PyMem_RawMalloc
* pyexpat: XML_ParserCreate_MM(encoding, &ExpatMemoryHandler,...) with 
ExpatMemoryHandler = {PyObject_Malloc, PyObject_Realloc, PyObject_Free}
* _bz2: "bzalloc = BZ2_Malloc" which calls PyMem_RawMalloc()

Using Python memory allocators gives access to Python builtin "memory 
debugger", even in release mode using PYTHONMALLOC=debug or -X dev.

--

___
Python tracker 

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



[issue35054] Add more index entries for symbols

2018-10-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

PR 10121 adds names for single-character symbols (e.g. "* (asterisk)"). It also 
adds more indices for symbols in fnmatch, glob, struct, argparse, sqlite3, etc.

--

___
Python tracker 

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



[issue35044] Use the :exc: role for the exceptions in the doc

2018-10-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9454

___
Python tracker 

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



[issue35044] Use the :exc: role for the exceptions in the doc

2018-10-26 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset e483f02423917dc4dfd25f46e5b9e6fce304777d by Victor Stinner 
(Stéphane Wirtel) in branch 'master':
bpo-35044, doc: Use the :exc: role for the exceptions (GH-10037)
https://github.com/python/cpython/commit/e483f02423917dc4dfd25f46e5b9e6fce304777d


--
nosy: +vstinner

___
Python tracker 

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



[issue35044] Use the :exc: role for the exceptions in the doc

2018-10-26 Thread miss-islington


miss-islington  added the comment:


New changeset ec10b70ea66e738ccb5c28f75a9c5d2b1c197de7 by Miss Islington (bot) 
in branch '3.7':
bpo-35044, doc: Use the :exc: role for the exceptions (GH-10037)
https://github.com/python/cpython/commit/ec10b70ea66e738ccb5c28f75a9c5d2b1c197de7


--
nosy: +miss-islington

___
Python tracker 

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



[issue35071] Canot send real string from c api to module (corrupted string)

2018-10-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

PyUnicode_FromString() doesn't interpret %. Did you use PyUnicode_FromFormat()?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue33899] Tokenize module does not mirror "end-of-input" is newline behavior

2018-10-26 Thread Tal Einat


Change by Tal Einat :


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



[issue34890] Support functools.partial in inspect.is*function() checks

2018-10-26 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 7cd25434164882c2093ea41ccfc7b95a05cd5cbd by Pablo Galindo in 
branch 'master':
bpo-34890: Make iscoroutinefunction, isgeneratorfunction and isasyncgenfunction 
work with functools.partial (GH-9903)
https://github.com/python/cpython/commit/7cd25434164882c2093ea41ccfc7b95a05cd5cbd


--
nosy: +pablogsal

___
Python tracker 

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



[issue34890] Support functools.partial in inspect.is*function() checks

2018-10-26 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue25750] tp_descr_get(self, obj, type) is called without owning a reference to "self"

2018-10-26 Thread STINNER Victor


STINNER Victor  added the comment:

Comment on the commit:
https://github.com/python/cpython/commit/5a30620e68ebb911eef4d583de3776d782148637#commitcomment-31057082

"bad_get should be explicitly cast to PyCFunction here, or else the compiler 
will balk; see https://bugs.python.org/msg328176 "

--

___
Python tracker 

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



[issue35044] Use the :exc: role for the exceptions in the doc

2018-10-26 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue35074] source install [3.7.1] on debian jessie

2018-10-26 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks for the report. Is this related using older version of GCC? Searching 
the bug tracker tells me a related issue (https://bugs.python.org/issue34112) 
where --enable-optimizations caused build error on 3.7.0 for older compiler 
toolchain like GCC 4 with a very similar traceback. 

* Can you please upgrading GCC and try? 
* Does the build also fails without --enable-optimizations flag with your 
current version of GCC?

--
nosy: +xtreak

___
Python tracker 

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



[issue35076] FAIL: test_min_max_version (test.test_ssl.ContextTests) with libressl-2.8.2

2018-10-26 Thread jean-michel


New submission from jean-michel :

Hi.

Python-3.7.1 with LibreSSL-2.8.2 and patches from 
https://github.com/python/cpython/pull/8055 and 
https://github.com/python/cpython/pull/8050

Compilation failed because of test_ssl failed.

A detailed list of all the patches that I use for my python-3.7.1 compilation 
with LibreSSL-2.8.2:

https://github.com/python/cpython/commit/4254483b21ec534ea942afa4ccd39dcb9bce3794
https://github.com/python/cpython/commit/8352fd3bbeef09cc14af61a0b88a8fcefd2279e3
https://github.com/python/cpython/commit/77d24d830fa4976998ac41b253d06654fae3ed5b
https://github.com/python/cpython/commit/2a0961153b15b032bae03f46297e56555e4612ba
https://github.com/python/cpython/commit/f415a39463e8bffb338f39d846c3141f3635271c
https://github.com/python/cpython/commit/abc1b0aefd79ad8b412d4e74900dd43cdea46f97
https://github.com/python/cpython/commit/3a421ebdefaedb8522cf5ebe86d16a683a580607
https://github.com/python/cpython/commit/d98c1603a1c9583eddab92b30b091a583229fb3f

FAIL: test_min_max_version (test.test_ssl.ContextTests)
Traceback (most recent call last):
File "/tmp/makepkg/python/src/Python-3.7.1/Lib/test/test_ssl.py", line 1163, in 
test_min_max_version
ctx.maximum_version, ssl.TLSVersion.MAXIMUM_SUPPORTED
AssertionError:  != 

--
assignee: christian.heimes
components: SSL
files: python-3.7.1-2-libressl-2.8.2-1-WithPatches.txt
messages: 328541
nosy: christian.heimes, jean-michel
priority: normal
severity: normal
status: open
title: FAIL: test_min_max_version (test.test_ssl.ContextTests) with 
libressl-2.8.2
type: compile error
versions: Python 3.7
Added file: 
https://bugs.python.org/file47892/python-3.7.1-2-libressl-2.8.2-1-WithPatches.txt

___
Python tracker 

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



[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b4435e20a92af474f117b78b98ddc6f515363af5 by Victor Stinner in 
branch 'master':
bpo-35059: Convert PyObject_INIT() to function (GH-10077)
https://github.com/python/cpython/commit/b4435e20a92af474f117b78b98ddc6f515363af5


--

___
Python tracker 

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



[issue33710] Deprecate gettext.lgettext()

2018-10-26 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset a05bef4f5be1bcd0df63ec0eb88b64fdde593a86 by Victor Stinner in 
branch 'master':
bpo-35059, PCbuild: Expand inline funcs in Debug (GH-10094)
https://github.com/python/cpython/commit/a05bef4f5be1bcd0df63ec0eb88b64fdde593a86


--

___
Python tracker 

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



[issue34789] Make xml.sax.make_parser accept iterables

2018-10-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9455

___
Python tracker 

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



[issue34789] Make xml.sax.make_parser accept iterables

2018-10-26 Thread Tal Einat

Tal Einat  added the comment:


New changeset 1487b651caa62647f8f8c9e8432e475e3566130c by Tal Einat (Andrés 
Delfino) in branch '3.7':
[3.7] bpo-34789: xml.sax.make_parser expects a list not just any sequence 
(GH-9542)
https://github.com/python/cpython/commit/1487b651caa62647f8f8c9e8432e475e3566130c


--
nosy: +taleinat

___
Python tracker 

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



[issue34789] Make xml.sax.make_parser accept iterables

2018-10-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9456

___
Python tracker 

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



[issue34789] Make xml.sax.make_parser accept iterables

2018-10-26 Thread miss-islington


miss-islington  added the comment:


New changeset 38d7620baab96c702243cfa193377a3ec10f by Miss Islington (bot) 
in branch '3.6':
[3.7] bpo-34789: xml.sax.make_parser expects a list not just any sequence 
(GH-9542)
https://github.com/python/cpython/commit/38d7620baab96c702243cfa193377a3ec10f


--
nosy: +miss-islington

___
Python tracker 

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



[issue34789] Make xml.sax.make_parser accept iterables

2018-10-26 Thread miss-islington


miss-islington  added the comment:


New changeset 9dcb517f8ebba16a46ec2a6a97bb3e4a97daeae9 by Miss Islington (bot) 
in branch '2.7':
[3.7] bpo-34789: xml.sax.make_parser expects a list not just any sequence 
(GH-9542)
https://github.com/python/cpython/commit/9dcb517f8ebba16a46ec2a6a97bb3e4a97daeae9


--

___
Python tracker 

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



[issue35065] Reading received data from a closed TCP stream using `StreamReader.read` might hang forever

2018-10-26 Thread Vincent Michel


Vincent Michel  added the comment:

I found the culprit:
https://github.com/python/cpython/blob/a05bef4f5be1bcd0df63ec0eb88b64fdde593a86/Lib/asyncio/streams.py#L350

The call to `_untrack_reader` is performed too soon. Closing the transport 
causes `protocol.connection_lost()` to be "called soon" but by the time it is 
actually executed, the stream reader has been "untracked".  Since the protocol 
doesn't know the stream reader anymore, it has not way to feed it the EOF.

The fix attached removes the `_untrack_reader` call and definition altogether. 
I don't really see the point of this method since one has to wait for 
`connection_lost` to be executed before untracking the reader, but 
`connection_lost` already gets rid of the reader reference.

With this fix, calling `writer.close` then awaiting `writer.wait_closed` (or 
awaiting `writer.aclose`) should:
- close the transport
- schedule `protocol.connection_lost`
- wait for the protocol to be closed
- run `protocol.connection_lost`
- feed the EOF to the reader
- set the protocol as closed
- get rid of the reader reference in the protocol
- return (making aclose causal and safe)
- the reader can then be safely garbage collected

But maybe I'm missing something about `_untrack_reader`?

--
keywords: +patch
Added file: https://bugs.python.org/file47893/patch-bpo-35065.diff

___
Python tracker 

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



[issue35017] socketserver accept a last request after shutdown

2018-10-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 10cb3760e8631a27f5db1e51b05494e29306c671 by Victor Stinner (Denis 
Ledoux) in branch 'master':
bpo-35017, socketserver: don't accept request after shutdown (GH-9952)
https://github.com/python/cpython/commit/10cb3760e8631a27f5db1e51b05494e29306c671


--
nosy: +vstinner

___
Python tracker 

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



[issue35017] socketserver accept a last request after shutdown

2018-10-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9458

___
Python tracker 

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



[issue35017] socketserver accept a last request after shutdown

2018-10-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9457

___
Python tracker 

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



[issue35058] Unable to Install Python on Windows

2018-10-26 Thread Alex Bach


Alex Bach  added the comment:

Hi Sorry for replying so late, I couldn't find the right method to use on this 
website. 

Also Steve, if I download some old version of python, would it support the 
latest functions that I need to learn this semester.

--

___
Python tracker 

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



[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-26 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9459

___
Python tracker 

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



[issue35017] socketserver accept a last request after shutdown

2018-10-26 Thread miss-islington


miss-islington  added the comment:


New changeset 908082451382b8b3ba09ebba638db660edbf5d8e by Miss Islington (bot) 
in branch '3.7':
bpo-35017, socketserver: don't accept request after shutdown (GH-9952)
https://github.com/python/cpython/commit/908082451382b8b3ba09ebba638db660edbf5d8e


--
nosy: +miss-islington

___
Python tracker 

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



[issue35017] socketserver accept a last request after shutdown

2018-10-26 Thread miss-islington


miss-islington  added the comment:


New changeset 8b1f52b5a93403acd7d112cd1c1bc716b31a418a by Miss Islington (bot) 
in branch '3.6':
bpo-35017, socketserver: don't accept request after shutdown (GH-9952)
https://github.com/python/cpython/commit/8b1f52b5a93403acd7d112cd1c1bc716b31a418a


--

___
Python tracker 

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



[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-26 Thread STINNER Victor


STINNER Victor  added the comment:

> bpo-35059, PCbuild: Expand inline funcs in Debug (GH-10094)
> https://github.com/python/cpython/commit/a05bef4f5be1bcd0df63ec0eb88b64fdde593a86

Too bad: this change broke the compilation on AMD64 Windows7 SP1 3.x, AMD64 
Windows8 3.x and AMD64 Windows10 3.x:
https://github.com/python/cpython/pull/10094#issuecomment-433405364

I don't understand why: it works well on my Windows 10 VM with my up to date 
Visual Studio Community 2017 (version 15.8.8). The compilation also worked on 
AppVeyor.

For me, the only explanation is that buildbots use older compiler versions.

Note: I checked that _decimal is compiled on my VM.

--

___
Python tracker 

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



[issue34897] distutils test errors when CXX is not set

2018-10-26 Thread Tal Einat


Tal Einat  added the comment:

I'm not sure that the resolution currently suggested, changing 
compiler.set_executables(), is the right way to go.

This change to distutils is a break of backwards compatibility. Though it is a 
minor change, it could still break existing code.

Fixing test.support seems just as good to me in terms of code design, and 
better in that it is only used internally for our tests.

(BTW, instead of `elif cmd is None or (not cmd):`, you can just use `elif not 
cmd:`.)

--
nosy: +taleinat

___
Python tracker 

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



[issue26979] The danger of PyType_FromSpec()

2018-10-26 Thread Christian Tismer


Christian Tismer  added the comment:

The default of PyType_FromSpec for tp_dealloc is wrong!
---

After a long struggle with crashes and leaks, the situation
was finally clarified:

When a type is converted from a static type to a heaptype
via PyType_FromSpec, and the tp_dealloc field is NULL,
then subtype_dealloc is inserted.

This is not correct.
The reasoning in the code is that a heaptype has subtype_dealloc.
But before the conversion, the type was static, and for
static types the function object_dealloc was inserted.

In the given type, the only change is to become a heaptype.
The by default inserted object_dealloc should not be changed,
since the existing code was written with object_dealloc in 
mind and not the consequences of replacing it with subtype_dealloc.

Before this solution, I used a dummy function to prevend
subpype_dealloc being inserted, but that caused leaks.

It was hard to understand that the default for a static type
is object_dealloc. After that, it was easy to fix that:

The now correctly working workaround is to explicitly insert
an object_dealloc function whenever the default for tp_dealloc
is NULL.

Again, in order to use this fix, it is necessary to break the
Limited API, because in order to write an object_dealloc function
(it is not public) you need access to type objects.

--

___
Python tracker 

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



[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-26 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9460

___
Python tracker 

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



[issue35017] socketserver accept a last request after shutdown

2018-10-26 Thread Denis Ledoux


Change by Denis Ledoux :


--
pull_requests: +9461

___
Python tracker 

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



[issue34789] Make xml.sax.make_parser accept iterables

2018-10-26 Thread Tal Einat

Tal Einat  added the comment:


New changeset a6dc531063efe3a8d47ff4639729060c72a3688c by Tal Einat (Andrés 
Delfino) in branch 'master':
bpo-34789: make xml.sax.make_parser accept iterables of all types (GH-9576)
https://github.com/python/cpython/commit/a6dc531063efe3a8d47ff4639729060c72a3688c


--

___
Python tracker 

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



[issue34789] Make xml.sax.make_parser accept iterables

2018-10-26 Thread Tal Einat

Tal Einat  added the comment:

Thanks for reporting the issue and making the PRs, Andrés!

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



[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 3b1cba3701fd1321a9bdafa9e683f891369f0cfd by Victor Stinner in 
branch 'master':
bpo-35059, libmpdec: Add missing EXTINLINE in mpdecimal.h (GH-10128)
https://github.com/python/cpython/commit/3b1cba3701fd1321a9bdafa9e683f891369f0cfd


--

___
Python tracker 

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



[issue35017] socketserver accept a last request after shutdown

2018-10-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 6f97a50c86737458c6bed9970c8dc31a465eff22 by Victor Stinner (Denis 
Ledoux) in branch '2.7':
bpo-35017, socketserver: don't accept request after shutdown (GH-9952) 
(GH-10129)
https://github.com/python/cpython/commit/6f97a50c86737458c6bed9970c8dc31a465eff22


--

___
Python tracker 

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



[issue35017] socketserver accept a last request after shutdown

2018-10-26 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Denis Ledoux for your bug report and your fix!

It's nice to see this bug fixed in all branches ;-)

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



[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 24702044afb1d4ad7568bf6aa7450b14dc44a38f by Victor Stinner in 
branch 'master':
bpo-9263: Use _PyObject_ASSERT() in object.c (GH-10110)
https://github.com/python/cpython/commit/24702044afb1d4ad7568bf6aa7450b14dc44a38f


--

___
Python tracker 

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



[issue35072] re.sub does not play nice with chr(92)

2018-10-26 Thread Matthew Barnett


Matthew Barnett  added the comment:

@Ezio: the value of stringy_thingy is irrelevant because it never gets that 
far; it fails when it tries to parse the replacement, which occurs before 
attempting any matching.

I can't reproduce the difference either.

--
status: pending -> open

___
Python tracker 

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



[issue32173] linecache.py add lazycache to __all__ and use dict.clear to clear the cache

2018-10-26 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి

Change by Srinivas  Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) 
:


--
pull_requests: +9462

___
Python tracker 

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



[issue33944] Deprecate and remove pth files

2018-10-26 Thread Ivan Pozdeev


Change by Ivan Pozdeev :


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

___
Python tracker 

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



[issue35017] socketserver accept a last request after shutdown

2018-10-26 Thread Denis Ledoux


Denis Ledoux  added the comment:

The pleasure is all mine.

Thanks to you and the other contributors involved. For my first contribution to 
Python, I am glad everything went smoothly :).

--

___
Python tracker 

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



[issue35027] distutils.core.setup does not raise TypeError when if classifiers, keywords and platforms fields are not specified as a list

2018-10-26 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Since the two PRs are merged as part of triaging I am closing this as fixed. 
Feel free to reopen this if needed.

Thanks Tilman for the PR :)

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



[issue33944] Deprecate and remove pth files

2018-10-26 Thread Ivan Pozdeev


Ivan Pozdeev  added the comment:

The primary motivation behind the suggestion seems to be the fact that the 
feature is abused.

However, the documentation has no info whatsoever on what is the intended use 
-- thus what constitutes abuse. Without that, the accusations are kind of 
baseless -- how can we blame package authors for having to figure it out for 
themselves?

I've made a PR with the corresponding note.
Since the discussion has revealed a number of valid use cases for the feature 
for which there are no adequate alternatives currently, I hope it will diminish 
the discontent and be grounds to incite package authors to remove unnecessary 
logic from there.

--

___
Python tracker 

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



[issue35077] Make TypeError message less ambiguous

2018-10-26 Thread coyot linden


New submission from coyot linden :

The TypeError message:

TypeError: string indices must be integers

is ambiguously written. While some may understand the intent, others will read 
it as confusingly saying that strings must be integers since dicts among other 
things do have string indices.  Suggest changing the message to:

TypeError: indices of strings must be integers

--
messages: 328565
nosy: coyot
priority: normal
severity: normal
status: open
title: Make TypeError message less ambiguous
type: enhancement
versions: Python 3.5

___
Python tracker 

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



[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset a4b2bc70f69d93d8252861b455052c051b7167ae by Victor Stinner in 
branch 'master':
bpo-9263: Use _PyObject_ASSERT() in gcmodule.c (GH-10112)
https://github.com/python/cpython/commit/a4b2bc70f69d93d8252861b455052c051b7167ae


--

___
Python tracker 

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



[issue35077] Make TypeError message less ambiguous

2018-10-26 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి

Srinivas  Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) 
 added the comment:

+1. 

In my early days of python programming i was confused of this message.

--
nosy: +thatiparthy

___
Python tracker 

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



[issue35077] Make TypeError message less ambiguous

2018-10-26 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి

Change by Srinivas  Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) 
:


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

___
Python tracker 

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



[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 0862505a0377c12e8004b2eb8de0555f26ce9530 by Victor Stinner in 
branch 'master':
bpo-9263: Use _PyObject_ASSERT() in typeobject.c (GH-10111)
https://github.com/python/cpython/commit/0862505a0377c12e8004b2eb8de0555f26ce9530


--

___
Python tracker 

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



[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 50fe3f8913c503e63f4cfb8ddcf8641ef7ad0722 by Victor Stinner in 
branch 'master':
bpo-9263: _PyXXX_CheckConsistency() use _PyObject_ASSERT() (GH-10108)
https://github.com/python/cpython/commit/50fe3f8913c503e63f4cfb8ddcf8641ef7ad0722


--

___
Python tracker 

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



[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-26 Thread STINNER Victor


STINNER Victor  added the comment:

> Too bad: this change broke the compilation on AMD64 Windows7 SP1 3.x, AMD64 
> Windows8 3.x and AMD64 Windows10 3.x: (...)

I checked buildbots: my PR 10128 fixed all Windows buildbots, good.

--

___
Python tracker 

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



[issue32173] linecache.py add lazycache to __all__ and use dict.clear to clear the cache

2018-10-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Since all proposed PRs just change formatting, I suggest to close this issue.

--

___
Python tracker 

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



[issue35077] Make TypeError message less ambiguous

2018-10-26 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +rhettinger

___
Python tracker 

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



[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9465

___
Python tracker 

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



[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9466

___
Python tracker 

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



[issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security

2018-10-26 Thread Senthil Kumaran


Senthil Kumaran  added the comment:


New changeset bb1876acd815a05744cea4a7d4098231ef499e52 by Senthil Kumaran in 
branch '3.7':
[3.7]  bpo-34576 : Backport eeab510 (#10114)
https://github.com/python/cpython/commit/bb1876acd815a05744cea4a7d4098231ef499e52


--

___
Python tracker 

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



[issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security

2018-10-26 Thread Senthil Kumaran


Senthil Kumaran  added the comment:


New changeset 8be1c043a6d10d375f7a73c681cb2d7ec2f2d361 by Senthil Kumaran in 
branch '3.6':
[3.6] - bpo-34576 : Backport eeab510 3.6 (GH-10113)
https://github.com/python/cpython/commit/8be1c043a6d10d375f7a73c681cb2d7ec2f2d361


--

___
Python tracker 

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



[issue34576] [EASY doc] http.server, SimpleHTTPServer: warn users on security

2018-10-26 Thread Senthil Kumaran


Senthil Kumaran  added the comment:

This is resolved. Thank you, all.

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



[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-26 Thread STINNER Victor


STINNER Victor  added the comment:

I pushed the change and even more, so I consider that the issue can now be 
closed... 8 years later! Thank you very much Dave Malcolm for this nice idea, 
and for its implementation. Thanks Bohuslav "Slavek" Kabrda for the rebase in 
2013, and thanks to my colleagues who rebased the patch frequently since 2013 
in the Fedora package!

Maybe some people (like me?) want to use _PyObject_ASSERT() in more places, but 
I consider that we don't need to leave this issue open just for that.


I took the 00170-gc-assertions.patch rebased on Python 3.7.1 by my colleagues 
for the Fedora package, and I rebased it on master. I modified more functions 
in object.c and typeobject.c to use _PyObject_ASSERT(). I tried to not replace 
all assert(), but only when it's revelant.

I added code to detect if the object memory has been freed to avoid derefering 
0xdbdbdbdbdbdbdbdb pointers which is very likely to cause a segmantation fault. 
It should reduce the risk of crash when dumping the faulty object.


Dave Malcolm:
> - Only tested on gcc-4.4.3 so far; the __STRING(expr) and __PRETTY_FUNCTION__ 
> look non-portable.

I used Py_STRINGIFY() and __func__ in the final patch. __func__ is part of the 
C99 standard which is now required since Python 3.6: see PEP 7.


Dave Malcolm:
> - no test case; I thought about using ctypes to extract PyObject_IncRef from 
> the implementation, but this is likely to lead to brittle test cases.  
> Alternatively, is xxmodule to be used for this kind of thing?

I reworked the unit test to not use ctypes, but write the crashing code in C 
instead.


Antoine Pitrou:
> How about turning these asserts into Py_FatalError()s and then enabling 
> Victor's faulthandler extension?

Done.

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



[issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?)

2018-10-26 Thread Dave Malcolm


Dave Malcolm  added the comment:

Thanks!

--

___
Python tracker 

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



[issue35078] Allow customization of css class name of a month in calendar module

2018-10-26 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి

Change by Srinivas  Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) 
:


--
components: Library (Lib)
nosy: thatiparthy
priority: normal
severity: normal
status: open
title: Allow customization of css class name of a month in  calendar module
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



[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-26 Thread miss-islington


miss-islington  added the comment:


New changeset 95cfb818eaffba41333d4bc93253f4e0c6237ca8 by Miss Islington (bot) 
in branch '3.7':
bpo-35059, libmpdec: Add missing EXTINLINE in mpdecimal.h (GH-10128)
https://github.com/python/cpython/commit/95cfb818eaffba41333d4bc93253f4e0c6237ca8


--
nosy: +miss-islington

___
Python tracker 

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



[issue35059] Convert Py_INCREF() and PyObject_INIT() to inlined functions

2018-10-26 Thread miss-islington


miss-islington  added the comment:


New changeset 7eac88afd2e39d05a0ed3bc8c0787a2e755a6072 by Miss Islington (bot) 
in branch '3.6':
bpo-35059, libmpdec: Add missing EXTINLINE in mpdecimal.h (GH-10128)
https://github.com/python/cpython/commit/7eac88afd2e39d05a0ed3bc8c0787a2e755a6072


--

___
Python tracker 

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



[issue35078] Allow customization of css class name of a month in calendar module

2018-10-26 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి

Change by Srinivas  Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) 
:


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

___
Python tracker 

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



[issue35070] test_posix fails on macOS 10.14 Mojave

2018-10-26 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

We're wondering if it could be a weird interaction with Active Directory.  This 
is my work laptop, so it's all integrated with LDAP and whatnot.  I don't have 
Mojave on my personal laptop yet (maybe this weekend).  I'm guessing that 
whatever corporate integration is going on is messing with getgroups(2).  Brett 
said he vaguely remembers something similar, but I don't remember seeing this 
problem on High Sierra on the same laptop.  I'm beta testing Mojave internally, 
so maybe this is just a weirdism I should report to our IT.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue35077] Make TypeError message less ambiguous

2018-10-26 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks for the report. Error message changes are generally done on master and 
not back ported. I am removing 3.5 which is security fixes only mode and adding 
3.8 . There are other errors of similar format but indicate the wrong type in 
the error message like list indices.

$ ./python.exe
Python 3.8.0a0 (heads/bpo31177-dirty:19986202a8, Oct 26 2018, 22:19:23)
[Clang 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> [1]['1']
Traceback (most recent call last):
  File "", line 1, in 
TypeError: list indices must be integers or slices, not str

I think we should also assert the error message in test_slice 
(Lib/test/string_tests.py) if there is a change.

Thanks Serhiy, I was about to add Raymond too who might have thoughts on the 
wording :)

--
nosy: +xtreak
versions: +Python 3.8 -Python 3.5

___
Python tracker 

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



[issue35070] test_posix fails on macOS 10.14 Mojave

2018-10-26 Thread Ned Deily


Ned Deily  added the comment:

It very well could have something to do with Active Directory support.  Here's 
a little getgroups test I used a while back for a previous getgroups issue.  
You should see something similar in the output depending on the number of 
groups in your id.  If it fails, we can eliminate Python from the equation.


#include 
#include 
#include 

int main(){
gid_t grouplist[32];
int n;
int gidsetsize;

for(gidsetsize = 0; gidsetsize < 22; ++gidsetsize)
{
n = getgroups(gidsetsize, grouplist);
printf("calling grouplist with gidsetsize = %i, returns %i\n", 
gidsetsize, n);
}
exit(0);
}


calling grouplist with gidsetsize = 0, returns 14
calling grouplist with gidsetsize = 1, returns -1
calling grouplist with gidsetsize = 2, returns -1
calling grouplist with gidsetsize = 3, returns -1
calling grouplist with gidsetsize = 4, returns -1
calling grouplist with gidsetsize = 5, returns -1
calling grouplist with gidsetsize = 6, returns -1
calling grouplist with gidsetsize = 7, returns -1
calling grouplist with gidsetsize = 8, returns -1
calling grouplist with gidsetsize = 9, returns -1
calling grouplist with gidsetsize = 10, returns -1
calling grouplist with gidsetsize = 11, returns -1
calling grouplist with gidsetsize = 12, returns -1
calling grouplist with gidsetsize = 13, returns -1
calling grouplist with gidsetsize = 14, returns 14
calling grouplist with gidsetsize = 15, returns 14
calling grouplist with gidsetsize = 16, returns 14
calling grouplist with gidsetsize = 17, returns 14
calling grouplist with gidsetsize = 18, returns 14
calling grouplist with gidsetsize = 19, returns 14
calling grouplist with gidsetsize = 20, returns 14
calling grouplist with gidsetsize = 21, returns 14

--

___
Python tracker 

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



[issue35078] Allow customization of css class name of a month in calendar module

2018-10-26 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



[issue35070] test_posix fails on macOS 10.14 Mojave

2018-10-26 Thread Ned Deily


Ned Deily  added the comment:

Also, I'm assuming you've tried rebooting your system?  :)

--

___
Python tracker 

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



[issue33710] Deprecate gettext.lgettext()

2018-10-26 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue18114] Update PyImport_ImportFrozenModuleObject() to set __package__

2018-10-26 Thread Brett Cannon


Brett Cannon  added the comment:

I'm not sure if it's still relevant. :) Feel free to look at the code and come 
back here with a recommendation as to whether this is still necessary or not.

--

___
Python tracker 

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



[issue33710] Deprecate gettext.lgettext()

2018-10-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It includes three parts:

* Add the code that emits a DeprecationWarning when corresponding functions and 
arguments are used. It is important to specify the correct stacklevel argument.

* Add tests and/or modify existing test for catching or silencing a 
DeprecationWarning.

* Document this change: in the module documentation, in the What's New 
document, and add a news entry.

PR 10139 implements all this.

--

___
Python tracker 

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



[issue33710] Deprecate gettext.lgettext()

2018-10-26 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Sometime we starts with deprecating just in the documentation, if it is hard to 
add deprecation in the code or adding it will break a lot of working code. But 
this is not the case. lgettext() was inherently broken in Python 3.

--

___
Python tracker 

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



[issue35035] Documentation for email.utils is named email.util.rst

2018-10-26 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +r.david.murray

___
Python tracker 

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



[issue35024] Incorrect logging in importlib when '.pyc' file creation fails

2018-10-26 Thread miss-islington


miss-islington  added the comment:


New changeset 9e14e49f13ef1a726f31efe6689285463332db6e by Miss Islington (bot) 
(Quentin Agren) in branch 'master':
bpo-35024: Remove redundant and possibly incorrect verbose message after 
writing '.pyc' (GH-9998)
https://github.com/python/cpython/commit/9e14e49f13ef1a726f31efe6689285463332db6e


--
nosy: +miss-islington

___
Python tracker 

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



[issue35077] Make TypeError message less ambiguous

2018-10-26 Thread coyot linden


coyot linden  added the comment:

You're welcome. I filed against 3.5 because that's what I have in our env at 
the moment and I couldn't test and thus assert the issue in later versions. 

Happy to see the problem addressed more generally.

The abstraction of the problem is the ambiguity in English between nouns used 
as adjectives and their groupings: (noun phrase) versus (noun as 
adjective)(noun). Using "X of Y" rather than (XY) or (X)(Y) resolves the 
ambiguity.

--

___
Python tracker 

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



  1   2   >