[issue32892] Remove specific constant AST types in favor of ast.Constant

2018-11-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Chameleon has been fixed. Genshi needs more work (seems it has issues with 3.7 
too). There are other third-party projects broken after this change, but it is 
not hard to fix them.

Closed this issue. Open new issues for new problems.

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



[issue35286] wrong result for difflib.SequenceMatcher

2018-11-20 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
status: pending -> open
Removed message: https://bugs.python.org/msg330178

___
Python tracker 

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



[issue35286] wrong result for difflib.SequenceMatcher

2018-11-20 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

The "expected result" listed isn't a valid output for get_matching_blocks() 
which is documented to return "triples are monotonically increasing in i and 
j".In your example, the "a" sequence is increasing: 0, 2, 5 but the "b" 
sequence is not monotonic: 3 0 5.

SequenceMatcher.get_matching_blocks() isn't designed to locate swapped blocks 
from "abcd" to "cdab".

--
status:  -> pending

___
Python tracker 

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



[issue15245] ast.literal_eval fails on some literals

2018-11-20 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> out of date
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



[issue35221] Enhance venv activate commands readability

2018-11-20 Thread Julien Palard


Julien Palard  added the comment:

Hi Raymond,

I'm mentionning I've spotted the issue in my class just to say "it happen that 
newcomers don't get it, I've seen it". As I've seen it I want to fix it. I 
don't want to fix it only in my course (it does not scale) I want to fix it for 
everybody.

So what I'm trying to do in this issue (same with 
https://bugs.python.org/issue35200), is to ease the learning of newcomers *not* 
taking a course, those only relying on the official tutorial and documentation.

I don't have numbers, but I don't think all Python newcomers are taking Python 
courses, some are relying to tutorials (maybe our tutorial?) and the doc.

I just added a sentense in the linked PR 
(https://github.com/python/cpython/pull/10604/files), as Lisa said it should be 
enough.

--

___
Python tracker 

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



[issue35289] wrong result for difflib.SequenceMatcher

2018-11-20 Thread Boris Yang


Change by Boris Yang :


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



[issue35287] wrong result for difflib.SequenceMatcher

2018-11-20 Thread Boris Yang


Change by Boris Yang :


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



[issue35288] wrong result for difflib.SequenceMatcher

2018-11-20 Thread Boris Yang


Change by Boris Yang :


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



[issue35289] wrong result for difflib.SequenceMatcher

2018-11-20 Thread Boris Yang

New submission from Boris Yang :

How to repeat:

# -*- coding: UTF-8 -*-
from difflib import SequenceMatcher
seqMatcher = SequenceMatcher(None, "德阳孩子", "孩子德阳")
seqMatcher.get_matching_blocks()

Expect Result:
[Match(a=0, b=3, size=2), Match(a=2, b=0, size=2), Match(a=5, b=5, size=0)]

Current Result:
[Match(a=0, b=3, size=2), Match(a=5, b=5, size=0)]

--
messages: 330175
nosy: Boris Yang
priority: normal
severity: normal
status: open
title: wrong result for difflib.SequenceMatcher
type: behavior
versions: Python 3.7

___
Python tracker 

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



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

2018-11-20 Thread INADA Naoki


INADA Naoki  added the comment:

My personal opinion is: support abstractmethod only when the descriptor is 
useful for define interface with ABC.

In case of cached_property, it's not.  It is just a property as interface 
level.  Caching is just an implementation.

In case of update_wrapper, it's too generic.  A decorated function may be used 
while define interface, but it's a rare case.  So no need to support it.

In case of singledispatch, I think it is not used in ABC, like cached_property. 
 But it has shipped in Python already.  We shouldn't remove it easily.

In case of partialmethod... it's considerable. I don't use ABC much, and I 
never use partialmethod.  So this example is very artificial.

class MyABC(abc.ABC):
@abstractmethod
def set_foo(self, v):
pass
reset_foo = partialmethod(set_foo, None)

When they subclass of MyABC, they need to override both of `set_foo` and 
`reset_foo`.  Otherwise, reset_foo is bound to MyABC.set_foo, not subclass' one.
So __isabstractmethod__ support in partialmethod is not just a "commet as a 
code".

On the other hand, this example can be written as:

class MyABC(abc.ABC):
@abstractmethod
def set_foo(self, v):
pass
@abstractmethod
def reset_foo(self):
pass

Or it can use lazy binding too:

class MyABC(abc.ABC):
@abstractmethod
def set_foo(self, v):
pass

# No need to override if default implementation is OK
def reset_foo(self):
self.set_foo(None)

I am not sure __isabstractmethod__ support in partialmethod is really useful.

--

___
Python tracker 

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



[issue35242] multiprocessing.Queue in an inconsistent state and a traceback silently suppressed if put an unpickable object and process's target function is finished

2018-11-20 Thread Sergei Zobov


Sergei Zobov  added the comment:

Yes, I've missed that the daemonic thread won't work if the parent process 
finished. The similarities between multiprocessing and threading modules are 
confusing a bit.
Anyway, could I make a patch to fix the problem with the silently ignored 
exception and the broken semaphore?

--

___
Python tracker 

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



[issue35278] [security] directory traversal in tempfile prefix

2018-11-20 Thread Tomasz Jezierski


Tomasz Jezierski  added the comment:

Hello,
I have created patch and MR for the Python 3.8 "exception" approach.

For the reference here is patch for ruby:
https://github.com/ruby/ruby/commit/e9ddf2ba41a0bffe1047e33576affd48808c5d0b

Maybe we should consider also validation on suffix as in their solution?

--
nosy: +thorleon
Added file: https://bugs.python.org/file47939/bpo-35278.patch

___
Python tracker 

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



[issue35278] [security] directory traversal in tempfile prefix

2018-11-20 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue35273] 'eval' in generator expression behave different in dict from list

2018-11-20 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

The "bug" is the expected behavior for 2.7, as previously noted, and does not 
exist on Python 3 (where list comprehensions follow the same rules as generator 
expressions for scoping), where NameErrors are raised consistently.

--
nosy: +josh.r
resolution:  -> not a bug
versions: +Python 2.7 -Python 3.6

___
Python tracker 

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



[issue34977] Release Windows Store app containing Python

2018-11-20 Thread Steve Dower


Steve Dower  added the comment:

For people watching the bug, this is ready for review.

Most of the change is adding a "layout" script (roughly the equivalent of "make 
install" for Windows, but with more flexibility to generate different 
structures, precompile stuff, etc.)

About the only CPython change is to venv. I added a new launcher variation that 
looks for pyvenv.cfg and runs the python.exe listed in that, so now we don't 
have to copy any DLLs into the venv at all (it's needed because the old one 
would try to LoadLibrary DLLs inside the store package, which is not allowed, 
but it also fixes my #1 complaint about venv which is that upgrading the base 
Python breaks all venvs).

There are also a few tweaks to the startup process, including extending the 
existing __PYVENV_LAUNCHER__ env variable from macOS to Windows as well, though 
it's handled in a different location. And a couple of minor tweaks to tests - 
issues discovered now that it's pretty easy to generate a "real" layout to run 
tests in.

I can break this up into a couple of PRs if that's preferred, though it doesn't 
really gain anything. If you're not interested in the new layout script, stop 
reading the PR after you finish launcher.c :)

--
nosy: +vinay.sajip

___
Python tracker 

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



[issue35134] Add a new Include/unstable/ subdirectory for the "unstable" API

2018-11-20 Thread STINNER Victor


STINNER Victor  added the comment:

Just to avoid the risk of name conflict, would it make sense to rename 
"unstable" to "pyunstable" or something else with "py" inside? I'm not sure if 
#include "unstable/objimpl.h" first looks the same directory than the header 
file that does the include?

Note: I tested "make install" and I get a 
/opt/py38/include/python3.8dm/unstable/ directory which contains a single file 
(yet): objimpl.h.

--

___
Python tracker 

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



[issue35081] Move internal headers to Include/internal/

2018-11-20 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 3e21ad1a254cc33e8d4920ad7f026254ec728bee by Victor Stinner in 
branch 'master':
bpo-35081: Move _PyGC_FINALIZED() back to C API (GH-10626)
https://github.com/python/cpython/commit/3e21ad1a254cc33e8d4920ad7f026254ec728bee


--

___
Python tracker 

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



[issue35081] Move internal headers to Include/internal/

2018-11-20 Thread STINNER Victor


STINNER Victor  added the comment:

Stefan Behnel:
> Making _PyGC_FINALIZED() internal broke Cython 
> (https://github.com/cython/cython/issues/2721). It's used in the finaliser 
> implementation 
> (https://github.com/cython/cython/blob/da657c8e326a419cde8ae6ea91be9661b9622504/Cython/Compiler/ModuleNode.py#L1442-L1456),
>  to determine if an object for which tp_dealloc() is called has already been 
> finalised or whether we have to do it. I'm not sure how to deal with this on 
> our side now. Any clue?

I wrote PR 10626 to add _PyGC_FINALIZED() back to the C API.

My intent was only to remove _PyObject_GC_TRACK(o) and _PyObject_GC_UNTRACK(o) 
from the public C API.

I didn't expect that anyone would use _PyGC_FINALIZED() :-)

--

___
Python tracker 

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



[issue35081] Move internal headers to Include/internal/

2018-11-20 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9874

___
Python tracker 

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



[issue35134] Add a new Include/unstable/ subdirectory for the "unstable" API

2018-11-20 Thread STINNER Victor


Change by STINNER Victor :


--
title: Move !Py_LIMITED_API to Include/pycapi/ -> Add a new Include/unstable/ 
subdirectory for the "unstable" API

___
Python tracker 

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



[issue35134] Move !Py_LIMITED_API to Include/pycapi/

2018-11-20 Thread STINNER Victor


STINNER Victor  added the comment:

I propose the following organization:

* Include/*.h should be the "stable API"
* Include/unstable/*.h is the "unstable API" (if Py_LIMITED_API is *not* 
defined at all)
* Include/internal/pycore_*.h is the "internal" API

It should become easier to see what is exposed or not to the stable ABI just by 
looking at Include.*.h.

It should also become easier to spot in a review when a pull request something 
to the stable ABI, whereas it should be added to the unstable or internal API.

--

___
Python tracker 

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



[issue35285] Make Proactor api extensible for reasonably any file handle

2018-11-20 Thread Ignas Brašiškis

New submission from Ignas Brašiškis :

There was old issue (https://bugs.python.org/issue30539) requesting extension 
ability at proactor loop for third party libraries. It was rejected as it was 
asking to broad functionality and not particular api. This issue purpose is to 
discuss more concrete api needed to bring proactor functionally at least on par 
with selector.

While loop covers most valid cases it still has no ability to run any third 
party libraries with file descriptors. As a consequence there is workarounds 
with unofficial api and handle wrappers to expose and call private proactor 
methods 
(https://github.com/m-labs/asyncserial/blob/master/asyncserial/asyncserial.py#L172).
 

Selector basically has the following api:

loop.add_reader(fd, callback, *args)
loop.remove_reader(fd)
loop.add_writer(fd, callback, *args)
loop.remove_writer(fd)

Nature of selector makes it easy for user to provide those operations on 
descriptor: make read from when it is available or make write from somewhere 
when you can also cancel operation.

Proactor on the other hand need to be told what and where to copy, and run 
callback when it's done (probably with error, also buffer passed to callback 
???). It also needs to have ability to cancel operations.
 
One possibility of such api could look like this:
loop.start_read_operation(fd, buffer, done_callback, *args)
where done_callback = function(buffer, bytes_read, error)
loop.cancel_read_operation(fd, operation)
loop.start_write_operation(fd, buffer, done_callback, *args)
where done_callback = function(bytes_written, error)
loop.cancel_write_operation(fd, operation)

There probably can be a plenty refinement here to the naming buffer,
or callback workings, but in general there should be start and cancel 
operations. This api might even be implemented for selectors (selectors might 
imitate behaviour with custom writer), thought probably it this usage might be 
discouraged in favour of add_writer/reader logic.

As examples of this api besides IOCP (which is implementation in question here) 
there is linux aio (http://man7.org/linux/man-pages/man2/io_submit.2.html) api 
which uses similar proactor concepts.

This api obviously can be wrapped to higher level api with futures, but this 
probably should remain low level functionality where it is responsibility of 
library implementer to do right thing.

Usage is pretty limited here: mainly writing file descriptors and devices/ttys 
asynchronously on Win32 platform. Python itself is not exactly systems 
programming language, but it convenient for accessing some OS features. Sockets 
and pipes are covered by standard library. But still if could prevent plenty of 
hacks and give library writers and odd few users place to hang on.

--
components: asyncio
messages: 330160
nosy: Ignas Brašiškis, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: Make Proactor api extensible for reasonably any file handle
type: enhancement

___
Python tracker 

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



[issue35134] Move !Py_LIMITED_API to Include/pycapi/

2018-11-20 Thread STINNER Victor


STINNER Victor  added the comment:

I created a new PR 10624:

* move "#ifndef Py_LIMITED_API" code to a new unstable/objimpl.h header file
* Include/unstable/ files (Include/unstable/objimpl.h) are no longer prefixed 
with "unstable_".

Include/unstable/ directory must not be added to the search paths for headers 
(gcc -I Include/unstable/). unstable/objimpl.h must not be included directly: 
it fails with a compiler error.

--

___
Python tracker 

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



[issue35284] Incomplete error handling in the compiler's compiler_call()

2018-11-20 Thread Zackery Spytz


Change by Zackery Spytz :


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

___
Python tracker 

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



[issue35284] Incomplete error handling in the compiler's compiler_call()

2018-11-20 Thread Zackery Spytz


New submission from Zackery Spytz :

compiler_call() needs to check if an error occurred during the 
maybe_optimize_method_call() call.

--
components: Interpreter Core
messages: 330159
nosy: ZackerySpytz
priority: normal
severity: normal
status: open
title: Incomplete error handling in the compiler's compiler_call()
type: behavior
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue35134] Move !Py_LIMITED_API to Include/pycapi/

2018-11-20 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9872

___
Python tracker 

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



[issue35283] "threading._DummyThread" redefines "is_alive" but forgets "isAlive"

2018-11-20 Thread Dieter Maurer


New submission from Dieter Maurer :

In module "threading", class "Thread" defines "is_alive" and defines "isAlive = 
is_alive". The derived class "_DummyThread" redefines "is_alive" but forgets to 
update the "isAlive" alias. As a consequence, calling "_DummyThread.isAlive" 
leads to an "AssertionErrror".

The "isAlive" method is mentioned in the docstring of "Thread.join".

--
components: Library (Lib)
messages: 330158
nosy: dmaurer
priority: normal
severity: normal
status: open
title: "threading._DummyThread" redefines "is_alive" but forgets "isAlive"
type: crash

___
Python tracker 

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



[issue33954] float.__format__('n') fails with _PyUnicode_CheckConsistency assertion error for locales with non-ascii thousands separator

2018-11-20 Thread STINNER Victor


STINNER Victor  added the comment:

Minimum reproducer, on Fedora 29:

import locale
locale.setlocale(locale.LC_ALL, 'fr_FR.UTF-8')
print(ascii('{:n}'.format(1.5)))

Current result:

'H,5'

Output with PR 10623:

'1,5'

--

___
Python tracker 

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



[issue34532] Windows launcher exits with error after listing available versions

2018-11-20 Thread miss-islington


miss-islington  added the comment:


New changeset 129642a1ff6a2f55933186b2303c307d58b710eb by Miss Islington (bot) 
in branch '3.7':
bpo-34532: Fixed exit code for py.exe list versions arg (GH-9039)
https://github.com/python/cpython/commit/129642a1ff6a2f55933186b2303c307d58b710eb


--
nosy: +miss-islington

___
Python tracker 

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



[issue33954] float.__format__('n') fails with _PyUnicode_CheckConsistency assertion error for locales with non-ascii thousands separator

2018-11-20 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue28604] Exception raised by python3.5 when using en_GB locale

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



[issue28604] Exception raised by python3.5 when using en_GB locale

2018-11-20 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset df3051b53fd7f2862a4087f5449e811d8421347a by Victor Stinner in 
branch '3.6':
bpo-28604: Fix localeconv() for different LC_MONETARY (GH-10606) (GH-10619) 
(GH-10621)
https://github.com/python/cpython/commit/df3051b53fd7f2862a4087f5449e811d8421347a


--

___
Python tracker 

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



[issue34532] Windows launcher exits with error after listing available versions

2018-11-20 Thread Steve Dower


Change by Steve Dower :


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

___
Python tracker 

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



[issue34532] Windows launcher exits with error after listing available versions

2018-11-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9870

___
Python tracker 

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



[issue34532] Windows launcher exits with error after listing available versions

2018-11-20 Thread Steve Dower


Steve Dower  added the comment:


New changeset c8fe9ccf7bfbcf9a2cb48e3b6abacf6ec0e5e58d by Steve Dower (Brendan 
Gerrity) in branch 'master':
bpo-34532: Fixed exit code for py.exe list versions arg (GH-9039)
https://github.com/python/cpython/commit/c8fe9ccf7bfbcf9a2cb48e3b6abacf6ec0e5e58d


--

___
Python tracker 

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



[issue28604] Exception raised by python3.5 when using en_GB locale

2018-11-20 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9869

___
Python tracker 

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



[issue28604] Exception raised by python3.5 when using en_GB locale

2018-11-20 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 6eff6b8eecd7a8eccad16419269fa18ec820922e by Victor Stinner in 
branch '3.7':
bpo-28604: Fix localeconv() for different LC_MONETARY (GH-10606) (GH-10619)
https://github.com/python/cpython/commit/6eff6b8eecd7a8eccad16419269fa18ec820922e


--

___
Python tracker 

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



[issue35259] Py_FinalizeEx unconditionally exists in Py_LIMITED_API

2018-11-20 Thread Arthur Neufeld


Change by Arthur Neufeld :


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

___
Python tracker 

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



[issue35281] Allow access to unittest.TestSuite tests

2018-11-20 Thread Brett Cannon


Brett Cannon  added the comment:

I don't quite follow what you're after as it sounds the same as calling 
`list(test_suite)`. Am I missing something or are you just trying to avoid the 
list creation?

--
nosy: +brett.cannon

___
Python tracker 

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



[issue28604] Exception raised by python3.5 when using en_GB locale

2018-11-20 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9867

___
Python tracker 

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



[issue31752] Assertion failure in timedelta() in case of bad __divmod__

2018-11-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 40fdf471931f029ea07e6190f0fe116e0735661b by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-35021: Fix assertion failures in _datetimemodule.c. (GH-10039) 
(GH-10617)
https://github.com/python/cpython/commit/40fdf471931f029ea07e6190f0fe116e0735661b


--

___
Python tracker 

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



[issue35021] Assertion failures in datetimemodule.c.

2018-11-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 40fdf471931f029ea07e6190f0fe116e0735661b by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-35021: Fix assertion failures in _datetimemodule.c. (GH-10039) 
(GH-10617)
https://github.com/python/cpython/commit/40fdf471931f029ea07e6190f0fe116e0735661b


--

___
Python tracker 

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



[issue35282] Add a return value to lib2to3.refactor.refactor_file and refactor_dir

2018-11-20 Thread Martin DeMello


Change by Martin DeMello :


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

___
Python tracker 

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



[issue35282] Add a return value to lib2to3.refactor.refactor_file and refactor_dir

2018-11-20 Thread Martin DeMello


New submission from Martin DeMello :

It would be useful for lib2to3.refactor to return which files were actually 
changed. Right now that information is logged but not returned.

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 330149
nosy: martindemello
priority: normal
severity: normal
status: open
title: Add a return value to lib2to3.refactor.refactor_file and refactor_dir
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



[issue30455] Generate all tokens related code and docs from Grammar/Tokens

2018-11-20 Thread Emily Morehouse


Change by Emily Morehouse :


--
pull_requests: +9865

___
Python tracker 

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



[issue9842] Document ... used in recursive repr of containers

2018-11-20 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue31752] Assertion failure in timedelta() in case of bad __divmod__

2018-11-20 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +9864

___
Python tracker 

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



[issue35021] Assertion failures in datetimemodule.c.

2018-11-20 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +9863

___
Python tracker 

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



[issue31752] Assertion failure in timedelta() in case of bad __divmod__

2018-11-20 Thread miss-islington


miss-islington  added the comment:


New changeset 7a0d964afb41bde846771c81ba746238339cdd8c by Miss Islington (bot) 
in branch '3.6':
bpo-35021: Fix assertion failures in _datetimemodule.c. (GH-10039)
https://github.com/python/cpython/commit/7a0d964afb41bde846771c81ba746238339cdd8c


--

___
Python tracker 

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



[issue35021] Assertion failures in datetimemodule.c.

2018-11-20 Thread miss-islington


miss-islington  added the comment:


New changeset 7a0d964afb41bde846771c81ba746238339cdd8c by Miss Islington (bot) 
in branch '3.6':
bpo-35021: Fix assertion failures in _datetimemodule.c. (GH-10039)
https://github.com/python/cpython/commit/7a0d964afb41bde846771c81ba746238339cdd8c


--

___
Python tracker 

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



[issue35021] Assertion failures in datetimemodule.c.

2018-11-20 Thread miss-islington


miss-islington  added the comment:


New changeset d57ab8ac182d15558118523ad1b11b029e105c46 by Miss Islington (bot) 
in branch '3.7':
bpo-35021: Fix assertion failures in _datetimemodule.c. (GH-10039)
https://github.com/python/cpython/commit/d57ab8ac182d15558118523ad1b11b029e105c46


--
nosy: +miss-islington

___
Python tracker 

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



[issue31752] Assertion failure in timedelta() in case of bad __divmod__

2018-11-20 Thread miss-islington


miss-islington  added the comment:


New changeset d57ab8ac182d15558118523ad1b11b029e105c46 by Miss Islington (bot) 
in branch '3.7':
bpo-35021: Fix assertion failures in _datetimemodule.c. (GH-10039)
https://github.com/python/cpython/commit/d57ab8ac182d15558118523ad1b11b029e105c46


--
nosy: +miss-islington

___
Python tracker 

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



[issue25439] Add type checks to urllib.request.Request

2018-11-20 Thread Sanyam Khurana


Change by Sanyam Khurana :


--
pull_requests: +9862

___
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-11-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset b1dede3ee3498100b95265f7fdb0ea2bef9a2ba2 by Serhiy Storchaka in 
branch 'master':
bpo-25750: Fix a compiler warning introduced in GH-9084. (GH-10234)
https://github.com/python/cpython/commit/b1dede3ee3498100b95265f7fdb0ea2bef9a2ba2


--

___
Python tracker 

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



[issue31752] Assertion failure in timedelta() in case of bad __divmod__

2018-11-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9859

___
Python tracker 

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



[issue35021] Assertion failures in datetimemodule.c.

2018-11-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9858

___
Python tracker 

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



[issue31752] Assertion failure in timedelta() in case of bad __divmod__

2018-11-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9861

___
Python tracker 

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



[issue35021] Assertion failures in datetimemodule.c.

2018-11-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9860

___
Python tracker 

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



[issue31752] Assertion failure in timedelta() in case of bad __divmod__

2018-11-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 3ec0f495163da3b7a15deb2805cec48aed432f58 by Serhiy Storchaka in 
branch 'master':
bpo-35021: Fix assertion failures in _datetimemodule.c. (GH-10039)
https://github.com/python/cpython/commit/3ec0f495163da3b7a15deb2805cec48aed432f58


--

___
Python tracker 

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



[issue35021] Assertion failures in datetimemodule.c.

2018-11-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 3ec0f495163da3b7a15deb2805cec48aed432f58 by Serhiy Storchaka in 
branch 'master':
bpo-35021: Fix assertion failures in _datetimemodule.c. (GH-10039)
https://github.com/python/cpython/commit/3ec0f495163da3b7a15deb2805cec48aed432f58


--

___
Python tracker 

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



[issue33325] Optimize sequences of constants in the compiler

2018-11-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Good point! Thank you Mark for your comment.

In theory, fewer bytecodes is better (the first example doesn't create a new 
object, it operates with references to existing objects). But in practice the 
difference is very small and overwhelmed by random factors. We need hundreds or 
thousands of constants to get a stable result. This is far from a common use 
case.

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



[issue9842] Document ... used in recursive repr of containers

2018-11-20 Thread miss-islington


miss-islington  added the comment:


New changeset dac5124ba498b51a2c46e2bda751150ae244ed47 by Miss Islington (bot) 
in branch '3.6':
bpo-9842: Add references for using "..." as a placeholder to the index. 
(GH-10330)
https://github.com/python/cpython/commit/dac5124ba498b51a2c46e2bda751150ae244ed47


--

___
Python tracker 

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



[issue9842] Document ... used in recursive repr of containers

2018-11-20 Thread miss-islington


miss-islington  added the comment:


New changeset f8f9915f9585a5d4f4a4457ef43ac66607c5f380 by Miss Islington (bot) 
in branch '3.7':
bpo-9842: Add references for using "..." as a placeholder to the index. 
(GH-10330)
https://github.com/python/cpython/commit/f8f9915f9585a5d4f4a4457ef43ac66607c5f380


--

___
Python tracker 

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



[issue35169] Improve error messages for assignment

2018-11-20 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



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

2018-11-20 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +9857

___
Python tracker 

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



[issue9842] Document ... used in recursive repr of containers

2018-11-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9856

___
Python tracker 

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



[issue35169] Improve error messages for assignment

2018-11-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 97f1efb6062188645a470daaa91e3669d739c75f by Serhiy Storchaka in 
branch 'master':
bpo-35169: Improve error messages for forbidden assignments. (GH-10342)
https://github.com/python/cpython/commit/97f1efb6062188645a470daaa91e3669d739c75f


--

___
Python tracker 

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



[issue9842] Document ... used in recursive repr of containers

2018-11-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9855

___
Python tracker 

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



[issue9842] Document ... used in recursive repr of containers

2018-11-20 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 6c48bf2d9e1e18dfbfa35f7582ddd32f11f75129 by Serhiy Storchaka in 
branch 'master':
bpo-9842: Add references for using "..." as a placeholder to the index. 
(GH-10330)
https://github.com/python/cpython/commit/6c48bf2d9e1e18dfbfa35f7582ddd32f11f75129


--

___
Python tracker 

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



[issue25439] Add type checks to urllib.request.Request

2018-11-20 Thread Sanyam Khurana


Sanyam Khurana  added the comment:

I'm working on applying the patch cleanly to master branch for this.

Also adding 3.8 and 3.7 as candidates for the bug.

--
versions: +Python 3.7, Python 3.8

___
Python tracker 

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



[issue25439] Add type checks to urllib.request.Request

2018-11-20 Thread Sanyam Khurana


Change by Sanyam Khurana :


--
assignee:  -> CuriousLearner
nosy: +CuriousLearner

___
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-20 Thread Matt Wilber


Matt Wilber  added the comment:

Inada-san, I think it's fair to ask for a broader vision about how ABCs are 
used. In that respect I'm wondering about some inconsistencies in the existing 
functools module about whether wrappers should maintain the wrapped function's 
__isabstractmethod__ attribute.

Both singledispatchmethod and partialmethod implement their own way of copying 
__isabstractmethod__ from the wrapped function. singledispatchmethod does this 
in addition to calling update_wrapper, whereas partialmethod doesn't seem to 
use update_wrapper at all.

In terms of a broader vision, then, should the decorators in functools be more 
consistent about whether the __isabstractmethod__ attribute of a wrapped 
function is preserved in the wrapped version? Should update_wrapper be the way 
to standardize this? If so, it would make sense either to remove the 
__isabstractmethod__ copying from those decorators, or otherwise to add 
__isabstractmethod__ to the list of attributes that are copied from the wrapped 
function by update_wrapper.

Hopefully viewing the problem in this way avoids the pitfalls of adding random 
code to the codebase, as you are pointing out. Let me know if this discussion 
belongs in a broader issue than this one. Thank you :)

--

___
Python tracker 

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



[issue31146] Docs: On non-public translations, language picker fallback to "English"

2018-11-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9854

___
Python tracker 

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



[issue31146] Docs: On non-public translations, language picker fallback to "English"

2018-11-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9853

___
Python tracker 

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



[issue31146] Docs: On non-public translations, language picker fallback to "English"

2018-11-20 Thread Julien Palard


Julien Palard  added the comment:


New changeset 6b73bb523a176123a819e4ebac3727d31d861515 by Julien Palard in 
branch 'master':
bpo-31146: Don't fallback switcher to english on not-yet pusblished languages. 
(GH-10558)
https://github.com/python/cpython/commit/6b73bb523a176123a819e4ebac3727d31d861515


--

___
Python tracker 

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



[issue31146] Docs: On non-public translations, language picker fallback to "English"

2018-11-20 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9852

___
Python tracker 

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



[issue28043] Sane defaults for SSLContext options and ciphers

2018-11-20 Thread Charalampos Stratakis


Change by Charalampos Stratakis :


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

___
Python tracker 

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



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

2018-11-20 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue29298] argparse fails with required subparsers, un-named dest, and empty argv

2018-11-20 Thread Mathias Ettinger


Mathias Ettinger  added the comment:

I was just hit by the very same issue and added the following test into 
`_get_action_name` to work around it:

elif isinstance(argument, _SubParsersAction):
return '{%s}' % ','.join(map(str, argument.choices))

I checked #9253 as referenced by paul j3 and like the `argument.name()` 
approach as well as it's less specific.

Any chance this can be addressed one way or another?

--
nosy: +Mathias Ettinger

___
Python tracker 

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



[issue28604] Exception raised by python3.5 when using en_GB locale

2018-11-20 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 02e6bf7f2025cddcbde6432f6b6396198ab313f4 by Victor Stinner in 
branch 'master':
bpo-28604: Fix localeconv() for different LC_MONETARY (GH-10606)
https://github.com/python/cpython/commit/02e6bf7f2025cddcbde6432f6b6396198ab313f4


--

___
Python tracker 

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



[issue33570] OpenSSL 1.1.1 / TLS 1.3 cipher suite changes

2018-11-20 Thread Charalampos Stratakis


Change by Charalampos Stratakis :


--
pull_requests: +9850

___
Python tracker 

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



[issue28604] Exception raised by python3.5 when using en_GB locale

2018-11-20 Thread STINNER Victor


Change by STINNER Victor :


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



[issue28604] Exception raised by python3.5 when using en_GB locale

2018-11-20 Thread STINNER Victor


STINNER Victor  added the comment:

I tested manually PR 10606:

LC_ALL= LC_CTYPE=xxx LC_MONETARY=xxx ./python -c 'import locale; 
locale.setlocale(locale.LC_ALL, ""); 
print(ascii(locale.localeconv()["currency_symbol"]))'
'\xa3'

Result (bug = result/error without the fix):


* LC_CTYPE=en_GB, LC_MONETARY=ar_SA.UTF-8: currency_symbol='\u0631.\u0633' 
(bug: '\xd8\xb1.\xd8\xb3')
* LC_CTYPE=en_GB, LC_MONETARY=fr_FR.UTF-8: currency_symbol='\u20ac' (bug: 
'\xe2\x82\xac')
* LC_CTYPE=en_GB, LC_MONETARY=uk_UA.koi8u: 
currency_symbol='\u0433\u0440\u043d.' (bug: '\xc7\xd2\xce.')
* LC_CTYPE=fr_FR.UTF-8, LC_MONETARY=uk_UA.koi8u: 
currency_symbol='\u0433\u0440\u043d.' (bug: UnicodeDecodeError)

Locale encodings:

* en_GB: latin1
* ar_SA.UTF-8: utf8
* fr_FR.UTF-8: utf8
* uk_UA.koi8u: KOI8-U

--

___
Python tracker 

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



[issue35276] Document thread safety

2018-11-20 Thread STINNER Victor


STINNER Victor  added the comment:

Aha, another strange beast: in Python 3, locale.localeconv() now changes 
temporarily the LC_CTYPE locale is some cases, and this change affects other 
threads. That's not something expected.

--

___
Python tracker 

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



[issue28604] Exception raised by python3.5 when using en_GB locale

2018-11-20 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-33954: float.__format__('n') fails with 
_PyUnicode_CheckConsistency assertion error for locales with non-ascii 
thousands separator. It may be nice to fix these two bugs at the same times, 
since they are related :-)

--

___
Python tracker 

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



[issue28604] Exception raised by python3.5 when using en_GB locale

2018-11-20 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue28604] Exception raised by python3.5 when using en_GB locale

2018-11-20 Thread STINNER Victor


STINNER Victor  added the comment:

Example of the bug:

import locale
# LC_CTYPE: latin1 encoding
locale.setlocale(locale.LC_ALL, "en_GB")
# LC_MONETARY: utf8 encoding
locale.setlocale(locale.LC_MONETARY, "ar_SA.UTF-8")
lc = locale.localeconv()
for attr in (
"mon_grouping",
"int_curr_symbol",
"currency_symbol",
"mon_decimal_point",
"mon_thousands_sep",
):
print(f"{attr}: {lc[attr]!a}")

Python 3.7 output:

mon_grouping: []
int_curr_symbol: 'SAR '
currency_symbol: '\xd8\xb1.\xd8\xb3'
mon_decimal_point: '.'
mon_thousands_sep: ''

Expected output:

mon_grouping: []
int_curr_symbol: 'SAR '
currency_symbol: '\u0631.\u0633'
mon_decimal_point: '.'
mon_thousands_sep: ''

Tested on Fedora 29.

--

___
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-20 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:

I am with Inada-san actually. I would go as far as saying that

@cached_property
@abstractmethod
def something(): ...

should unconditionally raise on definition. Mostly because this is just 
misleading. This declaration doesn't guarantee that the implementation will use 
caching (neither Python nor mypy can enforce this). Caching is an 
_implementation_ detail, while ABCs are used to specify _interface_.

--

___
Python tracker 

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



[issue18859] README.valgrind should mention --with-valgrind

2018-11-20 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks! ✨  ✨

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.8 -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue18859] README.valgrind should mention --with-valgrind

2018-11-20 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset d5d33681c1cd1df7731eb0fb7c0f297bc2f114e6 by Łukasz Langa (Sanyam 
Khurana) in branch 'master':
bpo-18859: Document --with-valgrind option in README.valgrind (#10591)
https://github.com/python/cpython/commit/d5d33681c1cd1df7731eb0fb7c0f297bc2f114e6


--

___
Python tracker 

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



[issue35276] Document thread safety

2018-11-20 Thread STINNER Victor


STINNER Victor  added the comment:

I don't think that it would make sense to annotate *each* function in the 
documentation, that would require too much work. I suggest to start to annotate 
functions which are known to have "side effects" or are not safe whereas users 
can be surprised to read that they are unsafe in the context of multithreading.

For example, document that os.chdir() is "process-wide" (I'm not sure how to 
document it). I think that everybody agrees that it's the case, and IMHO it's 
an useful information. At least, one user has been surprised to read that 
os.umask() is process-wide:

"I would be great, if the python standard library would provide correspondig 
thread safe method."
https://bugs.python.org/issue35275

> One idea is that you could author a threading HOWTO document that covers 
> atomicity, locks, queues, reentrancy, etc.  This is a thorny topic and it 
> would be nice to have the principles and techniques collected in one place.

Yes. About the definition of atomicity, thread-safe, process-wide, etc. There 
is an existing example: contextlib describes "Reentrant context managers".
https://docs.python.org/dev/library/contextlib.html#reentrant-cms

> Ideally, it would include examples of what to expect in various situations.  
> For example, the pure python OrderedDict can be put in an inconsistent state 
> if two threads make updates without a mutex; however, the containers 
> implemented in C can never be broken even if they don't guarantee atomicity 
> (i.e. a dict update making a pure python callback to __hash__ will never 
> result in a broken dict).

This is where Python becomes obscure. Depending on the implementation, a method 
can be atomic or not :-/ Maybe atomicity should be documented as a "CPython 
implementation detail"!?

> ISTM that the docs have presumed that people using threading know what 
> they're doing; however, we know that isn't always true ;-)

I don't understand threads and I have no idea which method are thread-safe or 
not. Each time, I should look at the doc, read the implementation, etc. :-)

--

___
Python tracker 

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



[issue31292] `python setup.py check --restructuredtext` fails when a include directive is present.

2018-11-20 Thread flying sheep


Change by flying sheep :


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

___
Python tracker 

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