[issue35202] Remove unused imports in standard library

2018-11-16 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Thank you for the cleanup.

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



[issue35202] Remove unused imports in standard library

2018-11-16 Thread miss-islington


miss-islington  added the comment:


New changeset 8d816f74d7673c836b16e4423fed0ec6ee510290 by Miss Islington (bot) 
in branch '3.6':
bpo-35202: Remove more unused imports in idlelib (GH-10573)
https://github.com/python/cpython/commit/8d816f74d7673c836b16e4423fed0ec6ee510290


--

___
Python tracker 

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



[issue35202] Remove unused imports in standard library

2018-11-16 Thread miss-islington


miss-islington  added the comment:


New changeset 3a600d224c1e1106756cc71639232ae1acae45bd by Miss Islington (bot) 
in branch '3.7':
bpo-35202: Remove more unused imports in idlelib (GH-10573)
https://github.com/python/cpython/commit/3a600d224c1e1106756cc71639232ae1acae45bd


--

___
Python tracker 

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



[issue35202] Remove unused imports in standard library

2018-11-16 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9827

___
Python tracker 

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



[issue35202] Remove unused imports in standard library

2018-11-16 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9828

___
Python tracker 

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



[issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__

2018-11-16 Thread Guido van Rossum


Guido van Rossum  added the comment:

In mypy there would be no difference between a cached property and a normal one 
-- the type is the same either way. Caching is the quintessential runtime 
behavior -- it shouldn't matter for semantics, only for performance. (True, 
sometimes there are more subtle semantics that require caching past the first 
call, but this is beyond the realm of a type checker, which cannot typically 
tell whether a call is the first or not.)

--

___
Python tracker 

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



[issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__

2018-11-16 Thread INADA Naoki


INADA Naoki  added the comment:

> Guido van Rossum  added the comment:
>
> This is runtime behavior, mypy doesn't care either way. It triggers on the
> presence of the decorator, not on what attributes it sets at runtime on the
> object.
>
>

But it's only motivation is static hinting.
My point is, is cached_property important static hint?
For example, do you want support cached_property in mypy Protocol with same
semantics?

--

___
Python tracker 

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



[issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__

2018-11-16 Thread Guido van Rossum


Guido van Rossum  added the comment:

This is runtime behavior, mypy doesn't care either way. It triggers on the 
presence of the decorator, not on what attributes it sets at runtime on the 
object.

--

___
Python tracker 

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



[issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__

2018-11-16 Thread INADA Naoki


INADA Naoki  added the comment:

I want to hear mypy developer's comment.

--
nosy: +gvanrossum, levkivskyi

___
Python tracker 

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



[issue35267] reproducible deadlock with multiprocessing.Pool

2018-11-16 Thread Windson Yang


Windson Yang  added the comment:

Hello, dzhu. I can reproduce on my OSX, since you already dive into the code, 
do you have any idea to fix or improve it?

--
nosy: +Windson Yang

___
Python tracker 

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



[issue25438] document what codec PyMemberDef T_STRING decodes the char * as

2018-11-16 Thread Windson Yang


Change by Windson Yang :


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

___
Python tracker 

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



[issue25438] document what codec PyMemberDef T_STRING decodes the char * as

2018-11-16 Thread Windson Yang


Change by Windson Yang :


--
keywords: +patch, patch
pull_requests: +9824, 9826
stage: needs patch -> patch review

___
Python tracker 

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



[issue25438] document what codec PyMemberDef T_STRING decodes the char * as

2018-11-16 Thread Windson Yang


Change by Windson Yang :


--
keywords: +patch, patch, patch
pull_requests: +9824, 9825, 9826
stage: needs patch -> patch review

___
Python tracker 

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



[issue35267] reproducible deadlock with multiprocessing.Pool

2018-11-16 Thread dzhu


New submission from dzhu :

The attached snippet causes a deadlock just about every time it's run (tested 
with 3.6.7/Ubuntu, 3.7.1/Arch, 3.6.7/OSX, and 3.7.1/OSX -- deadlock seems to be 
less frequent on the last, but still common). The issue appears to be something 
like the following sequence of events:

1. The main thread calls pool.__exit__, eventually entering 
Pool._terminate_pool.
2. result_handler's state is set to TERMINATE, causing it to stop reading from 
outqueue.
3. The main thread, in _terminate_pool, joins on worker_handler, which is 
(usually) in the middle of sleeping for 0.1 seconds, opening a window for the 
next two steps to occur.
4. The worker process finishes its task and acquires the shared outqueue._wlock.
5. The worker attempts to put the result into outqueue, but its pickled form is 
too big to fit into the buffer of os.pipe, and it blocks here with the lock 
held.
6. worker_handler wakes up and exits, freeing _terminate_pool to continue.
7. _terminate_pool terminates the worker.
8. task_handler tries to put None into outqueue, but blocks, since the lock was 
acquired by the terminated worker.
9. _terminate_pool joins on task_handler, and everything is deadlocked.

--
components: Library (Lib)
files: lock.py
messages: 330017
nosy: dzhu
priority: normal
severity: normal
status: open
title: reproducible deadlock with multiprocessing.Pool
type: behavior
versions: Python 3.6, Python 3.7
Added file: https://bugs.python.org/file47937/lock.py

___
Python tracker 

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



[issue27240] 'UnstructuredTokenList' object has no attribute '_fold_as_ew'

2018-11-16 Thread Vlad Temian


Vlad Temian  added the comment:

Is there any chance that this fix is gonna be ported to 3.5 as well?

--
nosy: +vtemian

___
Python tracker 

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



[issue35265] Internal C API: pass the memory allocator in a context

2018-11-16 Thread STINNER Victor


STINNER Victor  added the comment:

Passing the memory allocator is my first goal.

My second goal is to cleanup the code reading the configuration, 
pymain_read_conf() in Modules/main.c:

int utf8_mode = config->ctx.utf8_mode;
int encoding_changed = 0;

(...)

/* bpo-34207: Py_DecodeLocale() and Py_EncodeLocale() depend
   on Py_UTF8Mode and Py_LegacyWindowsFSEncodingFlag. */
Py_UTF8Mode = config->ctx.utf8_mode;
#ifdef MS_WINDOWS
Py_LegacyWindowsFSEncodingFlag = config->legacy_windows_fs_encoding;
#endif

(...)

/* Reset the configuration before reading again the configuration,
   just keep UTF-8 Mode value. */
int new_utf8_mode = config->ctx.utf8_mode;
int new_coerce_c_locale = config->coerce_c_locale;
if (_PyCoreConfig_Copy(config, _config) < 0) {
pymain->err = _Py_INIT_NO_MEMORY();
goto done;
}
pymain_clear_cmdline(pymain, cmdline);
config->ctx.utf8_mode = new_utf8_mode;
config->coerce_c_locale = new_coerce_c_locale;

/* The encoding changed: read again the configuration
   with the new encoding */


My main concern is: "bpo-34207: Py_DecodeLocale() and Py_EncodeLocale() depend 
on Py_UTF8Mode and Py_LegacyWindowsFSEncodingFlag". Python initialization code 
should depend on global variables.

--

___
Python tracker 

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



[issue28401] Don't support the PEP384 stable ABI in pydebug builds

2018-11-16 Thread miss-islington


miss-islington  added the comment:


New changeset 338d54f0a59dc5e5b6c9e7397340169f3a3f8ea4 by Miss Islington (bot) 
(Stefano Rivera) in branch 'master':
bpo-28401: prevent Py_DEBUG builds from trying to import limited ABI modules 
(GH-1766)
https://github.com/python/cpython/commit/338d54f0a59dc5e5b6c9e7397340169f3a3f8ea4


--
nosy: +miss-islington

___
Python tracker 

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



[issue35232] Add `module`/`qualname` arguments to make_dataclass for picklability

2018-11-16 Thread Ivan Levkivskyi


Change by Ivan Levkivskyi :


--
nosy: +levkivskyi

___
Python tracker 

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



[issue34160] ElementTree not preserving attribute order

2018-11-16 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> It seemed like we were close to a consensus about adding 
> back the option to sort the attributes, or did I 
> misunderstand?

Adding a sort() option to prettyxml() seems perfectly reasonable.  I wouldn't 
extend any of the other APIs though.

Also, it is reasonable to consider adding a standards compliant 
canonicalization tool.

> Without the sorted attributes, 3.8 fails the test.

It seems to me that the test should be improved as well so that it doesn't rely 
on implementation details.  The usual way to test serialization is to verify 
that it round trips.

Unless the test is improved to not rely on implementation details, I'm 
concerned that we'll end-up having this conversation again if any other 
serialization improvements are made.

So yes, I support adding a sort() option to prettyxml() and adding a 
canonicalization tool, but no I don't agree with the premise that Py 2.7, 3.4, 
3.5, 3.6, 3.7, 3.8 were required to now and forever always produce byte-by-byte 
identical output -- afaict that was never a promised behavior, so any test that 
relies on that premise should be improved.

FWIW, when I described the existing test as being "fragile", it wasn't a 
pejorative, I meant it in the literal sense of "easily broken".

--

___
Python tracker 

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



[issue35148] cannot activate a venv environment on a Swiss German windows

2018-11-16 Thread Vinay Sajip


Change by Vinay Sajip :


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

___
Python tracker 

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



[issue34160] ElementTree not preserving attribute order

2018-11-16 Thread Ned Batchelder


Ned Batchelder  added the comment:

It seemed like we were close to a consensus about adding back the option to 
sort the attributes, or did I misunderstand?

--

___
Python tracker 

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



[issue34160] ElementTree not preserving attribute order

2018-11-16 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> I run my test suite on 2.7, 3.4, 3.5, 3.6, 3.7, 3.8, PyPy2, 
> and PyPy3.  Today, one gold file suffices for all those
> versions.  Without the sorted attributes, 3.8 fails the test.

Would it make sense to rewrite the test to just make sure the XML roundtrips 
instead of relying on the exact byte sequence that is generated?  IIRC, that is 
how we test pickling and various codecs -- rather than relying on implement 
specific details for a particular byte sequence -- the test is roughly "assert 
decode(encode(thing)) == thing".  That allows the test to survive on-going 
improvements to serialization.

--

___
Python tracker 

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



[issue31601] Availability of utimensat, futimens not checked correctly on macOS

2018-11-16 Thread Joshua Root


Joshua Root  added the comment:

This isn't just a cross-build issue, or rather (depending on how you look at 
it) cross-builds are increasingly the norm due to Apple only providing a newer 
SDK on older OS versions. For example the latest version of Xcode available for 
10.12 only comes with the 10.13 SDK.

--

___
Python tracker 

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



[issue13611] Integrate ElementC14N module into xml.etree package

2018-11-16 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



[issue35250] Minor parameter documentation mismatch for turtle

2018-11-16 Thread Éric Araujo

Éric Araujo  added the comment:

There is an HTML escaping problem in the PR list!

--
nosy: +eric.araujo, ezio.melotti

___
Python tracker 

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



[issue35226] mock.call equality surprisingly broken

2018-11-16 Thread Éric Araujo

Éric Araujo  added the comment:

Add the right «needs backport to X.Y» labels to the PR and a bot will take care 
of it.

(This info does not seem to be in the devguide!)

--
nosy: +eric.araujo

___
Python tracker 

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



[issue35195] [Windows] Python 3.7 initializes LC_CTYPE locale at startup, causing performance issue on msvcrt isdigit()

2018-11-16 Thread Dragoljub


Dragoljub  added the comment:

Do we know if its possible to prevent the initialize LC_CTYPE on startup? Is 
there some combination of ENV-Var or CMD-Args that can avoid this slowdown on 
Windows?

What are the next step to get the issue assigned?

--

___
Python tracker 

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



[issue35266] Add _PyPreConfig and rework _PyCoreConfig and _PyMainInterpreterConfig

2018-11-16 Thread STINNER Victor


New submission from STINNER Victor :

The C code of Python initialization uses _PyCoreConfig and 
_PyMainInterpreterConfig which co-exist and more or less redundant. For 
example, both structures have "argv": wchar_** for _PyCoreConfig, PyObject* 
(list of str) for _PyMainInterpreterConfig.

I propose to put _PyCoreConfig inside _PyMainInterpreterConfig and move 
wchar_t* strings into a new _PyPreConfig structure.

The main idea is that _PyPreConfig and wchar_* type are only used for early 
Python initialization, but once Python is initialization, the configuration 
should be provided as Python objects.

I didn't check all configuration variables to see if it's doable or not, but I 
wrote a proof-of-concept pull request to show my idea with concrete (and 
working!) code.

See attached PR.

--
components: Interpreter Core
messages: 330005
nosy: eric.snow, ncoghlan, vstinner
priority: normal
severity: normal
status: open
title: Add _PyPreConfig and rework _PyCoreConfig and _PyMainInterpreterConfig
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



[issue35266] Add _PyPreConfig and rework _PyCoreConfig and _PyMainInterpreterConfig

2018-11-16 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue34160] ElementTree not preserving attribute order

2018-11-16 Thread Ned Batchelder


Ned Batchelder  added the comment:

Stefan, just to clarify: it isn't that I don't feel like re-serializing my gold 
files with the latest version.  I run my test suite on 2.7, 3.4, 3.5, 3.6, 3.7, 
3.8, PyPy2, and PyPy3.  Today, one gold file suffices for all those versions.  
Without the sorted attributes, 3.8 fails the test.

--

___
Python tracker 

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



[issue34160] ElementTree not preserving attribute order

2018-11-16 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

+1 for adding C14N support for ElementTree.

But the problem will still exist for minidom. We will need either add the 
sort_attrs parameter in prettyxml() or complete C14N support in minidom.

--

___
Python tracker 

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



[issue13611] Integrate ElementC14N module into xml.etree package

2018-11-16 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

"c14n" is documented as an accepted serialization method of write() and there 
is some (non-working) code for support of C14N. 
e6a951b83e30b3b9c809a441041fb0f21f72b168 removed optional import of ElementC14N.

--

___
Python tracker 

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



[issue35265] Internal C API: pass the memory allocator in a context

2018-11-16 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue35265] Internal C API: pass the memory allocator in a context

2018-11-16 Thread STINNER Victor


New submission from STINNER Victor :

Currently, the Python initialization code base is full of:

static void
pymain_clear_cmdline(_PyMain *pymain, _PyCmdline *cmdline)
{
PyMemAllocatorEx old_alloc;
_PyMem_SetDefaultAllocator(PYMEM_DOMAIN_RAW, _alloc);
...
PyMem_SetAllocator(PYMEM_DOMAIN_RAW, _alloc);
}

It's a hack that I wrote when I worked on the Python initialization code, to 
make sure that we use the same memory allocator to allocate and release memory. 
The problem is that Python allocates memory at startup, then the memory 
allocator can be changed in Py_Initialize() (ex: by PYTHONMALLOC environment 
variable), but at exit, we need to reuse the same memory allocator that we used 
to allocate memory early.

Instead of "forcing" the memory allocator to "default allocator", I propose to 
add a new "context" structure which contains the memory allocator 
(PyMemAllocatorEx structure). Example:

typedef struct {
/* Enable UTF-8 mode?
   Set by -X utf8 command line option and PYTHONUTF8 environment variable.
   If set to -1 (default), inherit Py_UTF8Mode value. */
int utf8_mode;

PyMemAllocatorEx raw_alloc;
} _PyConfigCtx;

The context should be passed to any function allocating directly or indirectly 
memory.

Py_Main(), "core config" and "path config" are good target for these changes. 
These functions are used during Python initialization.

I know that Eric Snow would like to pass a "context" to functions of the C API. 
I don't want to make a giant change of the C API. I only want to modify the 
internal C API, and only modifiy Python internal. The context that I propose is 
designed for early Python initialization, and fix the practical problem of 
memory allocator.

Later we can discussed how _PyRuntime and the pointer to the current 
interpreter can be added into this context, or if a new context should be 
created.

Attached PR is a proof-of-concept of my idea, but the giant PR might be 
splitted into smaller changes to more incremental changes.

--
components: Interpreter Core
messages: 330001
nosy: eric.snow, ncoghlan, vstinner
priority: normal
severity: normal
status: open
title: Internal C API: pass the memory allocator in a context
type: enhancement
versions: Python 3.8

___
Python tracker 

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



[issue13611] Integrate ElementC14N module into xml.etree package

2018-11-16 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +serhiy.storchaka
stage:  -> needs patch
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



[issue35202] Remove unused imports in standard library

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

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


--
pull_requests: +9821

___
Python tracker 

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



[issue24653] Mock.assert_has_calls([]) is surprising for users

2018-11-16 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Why this case should be explicitly mentioned? Is it an exception from some 
rules? Is the empty list special? Does existing documentation say that 
assert_has_calls([]) should raise an exception?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue34160] ElementTree not preserving attribute order

2018-11-16 Thread Stefan Behnel


Stefan Behnel  added the comment:

> Maybe some people prefer sorting to get a more deterministic output

Note that those people are much better off with C14N. It is the one tool 
designed for all of these use cases, even usable for cryptographic signatures. 
And it's trivial to use, it's just a different serialiser.

The new option would only be for people who want the old behaviour for 
backwards compatibility reasons, like Ned who wants to keep his existing byte 
level tests working that were created by the previous version. Understandable, 
although re-serialising the test samples with C14N would probably still be the 
better approach, because it guards against more than just changes in the 
attribute order.

Maybe it's time to think about adding the ET C14N module to the stdlib again, 
see issue13611.

--

___
Python tracker 

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



[issue35250] Minor parameter documentation mismatch for turtle

2018-11-16 Thread miss-islington


miss-islington  added the comment:


New changeset 8856246c41b0663bfe8d3af7d52a7c337e25572d by Miss Islington (bot) 
in branch '3.6':
bpo-35250: Correct argument name "num" -> "btn" in turtle docs. (GH-10565)
https://github.com/python/cpython/commit/8856246c41b0663bfe8d3af7d52a7c337e25572d


--

___
Python tracker 

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



[issue35250] Minor parameter documentation mismatch for turtle

2018-11-16 Thread miss-islington


miss-islington  added the comment:


New changeset 0461c3b635d53e8e75145695803a2fca288a1689 by Miss Islington (bot) 
in branch '3.7':
bpo-35250: Correct argument name "num" -> "btn" in turtle docs. (GH-10565)
https://github.com/python/cpython/commit/0461c3b635d53e8e75145695803a2fca288a1689


--
nosy: +miss-islington

___
Python tracker 

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



[issue35250] Minor parameter documentation mismatch for turtle

2018-11-16 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9819

___
Python tracker 

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



[issue35250] Minor parameter documentation mismatch for turtle

2018-11-16 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9820

___
Python tracker 

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



[issue35264] SSL Module build fails with OpenSSL 1.1.0 for Python 2.7

2018-11-16 Thread Alexandru Ardelean


Change by Alexandru Ardelean :


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

___
Python tracker 

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



[issue35264] SSL Module build fails with OpenSSL 1.1.0 for Python 2.7

2018-11-16 Thread Alexandru Ardelean


New submission from Alexandru Ardelean :

The Modules/_ssl.c build fails.

Error is:
```
building '_ssl' extension
arm-openwrt-linux-muslgnueabi-gcc -fPIC -fno-strict-aliasing -Os -pipe 
-mcpu=xscale -fno-caller-saves -fno-plt -fhonour-copts 
-Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=soft 
-iremap/build_dir/target-arm_xscale_musl_eabi/Python-2.7.15:Python-2.7.15
 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 
-Wl,-z,now -Wl,-z,relro -DNDEBUG -fno-inline -DNDEBUG -Os -pipe -mcpu=xscale 
-fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable 
-Wno-error=unused-result -mfloat-abi=soft 
-iremap/build_dir/target-arm_xscale_musl_eabi/Python-2.7.15:Python-2.7.15
 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 
-Wl,-z,now -Wl,-z,relro -I. -IInclude -I./Include 
-I/staging_dir/target-arm_xscale_musl_eabi/include 
-I/staging_dir/toolchain-arm_xscale_gcc-7.3.0_musl_eabi/usr/include 
-I/staging_dir/toolchain-arm_xscale_gcc-7.3.0_musl_eabi/include/fortify
 -I/staging_dir
 /toolchain-arm_xscale_gcc-7.3.0_musl_eabi/include 
-I/staging_dir/target-arm_xscale_musl_eabi/usr/include 
-I/staging_dir/hostpkg/bin/Include -I/staging_dir/hostpkg/bin 
-c /build_dir/target-arm_xscale_musl_eabi/Python-2.7.15/Modules/_ssl.c 
-o 
build/temp.linux2-2.7//build_dir/target-arm_xscale_musl_eabi/Python-2.7.15/Modules/_ssl.o
cc1: note: someone does not honour COPTS correctly, passed 2 times
/build_dir/target-arm_xscale_musl_eabi/Python-2.7.15/Modules/_ssl.c:2117:44:
 error: 'PySSL_selected_npn_protocol' undeclared here (not in a function); did 
you mean 'PySSL_selected_alpn_protocol'?
 {"selected_npn_protocol", (PyCFunction)PySSL_selected_npn_protocol, 
METH_NOARGS},
^~~
PySSL_selected_alpn_protocol
```

This is on OpenWrt.

--
assignee: christian.heimes
components: Build, SSL
messages: 329995
nosy: Alexandru Ardelean, christian.heimes
priority: normal
severity: normal
status: open
title: SSL Module build fails with OpenSSL 1.1.0 for Python 2.7
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



[issue30545] Enum equality across modules: comparing objects instead of values

2018-11-16 Thread Sebastian Höfer

Sebastian Höfer  added the comment:

I ran into the same issue and while I see that this is not a bug I would 
suggest that this behaviour at least deserves a warning in the documentation 
under
https://docs.python.org/3/library/enum.html#comparisons

This unexpected behaviour can not only occur with messed up imports, but also 
when a module uses the importlib.reload() function and submodules are reloaded 
during runtime.

I attached a minimal working example. 
In our case we have a central module where all constants, dataclasses and enums 
are defined. A main program imports several submodules which all import these 
datatypes. Reloading a submodule results in new object ids for the enums in 
this submodule and comparing data between different modules suddenly results in 
inconsistent behaviour.

It took a while to debug, because except for the object id the enums look 
exactly the same and before reading this thread I did not realize that the 
comparison is actually done by object ids.

--
nosy: +Sebastian Höfer
Added file: https://bugs.python.org/file47936/enum_reload_example.zip

___
Python tracker 

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



[issue35260] 2to3 Parse Error on Python 3 print() with arguments

2018-11-16 Thread Mark Dickinson


Mark Dickinson  added the comment:

Closing. 2to3 is working as designed here.

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

___
Python tracker 

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



[issue35260] 2to3 Parse Error on Python 3 print() with arguments

2018-11-16 Thread Mark Dickinson


Mark Dickinson  added the comment:

I'm still confused: the main purpose of 2to3 is to take Python 2 code and turn 
it into Python 3 code. The docs[1] are fairly unambiguous here:

> 2to3 is a Python program that reads Python 2.x source code and applies a 
> series of fixers to transform it into valid Python 3.x code.

So expecting 2to3 *not* to parse code as though it's Python 2 code seem odd.

[1] https://docs.python.org/3.7/library/2to3.html

--

___
Python tracker 

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



[issue33816] New metaclass example for Data Model topic

2018-11-16 Thread miss-islington


miss-islington  added the comment:


New changeset 46fa7a60e08fc7486ecab726af93fa2cfe225305 by Miss Islington (bot) 
in branch '3.6':
bpo-33816: Remove outdated metaclass example (GH-7566)
https://github.com/python/cpython/commit/46fa7a60e08fc7486ecab726af93fa2cfe225305


--

___
Python tracker 

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



[issue33816] New metaclass example for Data Model topic

2018-11-16 Thread miss-islington


miss-islington  added the comment:


New changeset 1b80a373d104480c51cacb8b07ec3b61e21d5fa0 by Miss Islington (bot) 
in branch '3.7':
bpo-33816: Remove outdated metaclass example (GH-7566)
https://github.com/python/cpython/commit/1b80a373d104480c51cacb8b07ec3b61e21d5fa0


--
nosy: +miss-islington

___
Python tracker 

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



[issue33816] New metaclass example for Data Model topic

2018-11-16 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9816

___
Python tracker 

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



[issue33816] New metaclass example for Data Model topic

2018-11-16 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9817

___
Python tracker 

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



[issue33816] New metaclass example for Data Model topic

2018-11-16 Thread INADA Naoki

INADA Naoki  added the comment:


New changeset c2ccac7b9f9a1132ca36255b0ddfeecef4371aa3 by INADA Naoki (Andrés 
Delfino) in branch 'master':
bpo-33816: Remove outdated metaclass example (GH-7566)
https://github.com/python/cpython/commit/c2ccac7b9f9a1132ca36255b0ddfeecef4371aa3


--
nosy: +inada.naoki

___
Python tracker 

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



[issue35260] 2to3 Parse Error on Python 3 print() with arguments

2018-11-16 Thread batterystaple456


batterystaple456  added the comment:

I was expecting that like other Python 3 code, since it is already in Python 3, 
it would not parse it like Python 2.

--

___
Python tracker 

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



[issue35239] _PySys_EndInit() doesn't copy main interpreter configuration

2018-11-16 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue35239] _PySys_EndInit() doesn't copy main interpreter configuration

2018-11-16 Thread miss-islington


miss-islington  added the comment:


New changeset d2be9a5c13221fb84c2221bbfd93efac6111e697 by Miss Islington (bot) 
in branch '3.7':
bpo-35239: _PySys_EndInit() copies module_search_path (GH-10532)
https://github.com/python/cpython/commit/d2be9a5c13221fb84c2221bbfd93efac6111e697


--
nosy: +miss-islington

___
Python tracker 

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



[issue35260] 2to3 Parse Error on Python 3 print() with arguments

2018-11-16 Thread Mark Dickinson


Mark Dickinson  added the comment:

I'm not sure I understand the report: 2to3 expects a valid Python 2 file as 
input, and the file a.py isn't a valid Python 2 file: the `print` line is a 
SyntaxError in the absence of a `from __future__ import print_function`.

So yes, this *is* being treated like Python 2 code, but that's what 2to3 is 
designed to do.

Can you say what you expected to happen here?

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue35239] _PySys_EndInit() doesn't copy main interpreter configuration

2018-11-16 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9815

___
Python tracker 

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



[issue35239] _PySys_EndInit() doesn't copy main interpreter configuration

2018-11-16 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 37cd982df02795905886ab36a2378ed557cb6f60 by Victor Stinner in 
branch 'master':
bpo-35239: _PySys_EndInit() copies module_search_path (GH-10532)
https://github.com/python/cpython/commit/37cd982df02795905886ab36a2378ed557cb6f60


--

___
Python tracker 

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



[issue35250] Minor parameter documentation mismatch for turtle

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

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


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

___
Python tracker 

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



[issue35263] Add None handling for get_saved() in IDLE

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

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


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

___
Python tracker 

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



[issue35202] Remove unused imports in standard library

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

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

With the current PR, i think i removed all unused imports in Lib folder.

--

___
Python tracker 

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



[issue35262] There should be a list.get just like dict.get

2018-11-16 Thread Abram Clark


Abram Clark  added the comment:

There really are valid use cases for this. Would you please refer me to this 
previous discussion? In a particular small to medium sized Python repository of 
~10k lines, list get is used 23 times, whereas other list builtin methods are 
used far less (for example list.pop is used once, though dict.pop is used 18 
times). I would be happy to go into specific examples.

--

___
Python tracker 

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



[issue31601] Availability of utimensat, futimens not checked correctly on macOS

2018-11-16 Thread Peter Petrik


Change by Peter Petrik :


--
components: +Cross-Build -Build, macOS
nosy: +Alex.Willmer, Peter Petrik
versions: +Python 3.7

___
Python tracker 

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