[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



Re: question on the 'calendar' function

2018-11-20 Thread Ben Finney
o1bigtenor  writes:

> On Tue, Nov 20, 2018 at 12:09 PM Ben Finney  
> wrote:
> > o1bigtenor  writes:
> > > It could be useful to see the longer time spans as weeks rather
> > > than as days but seeing the larger time frames only as months
> > > would enable the planning that I need to do.
> >
> > Does ‘calendar.monthcalendar’ come close to what you need
> > https://docs.python.org/3/library/calendar.html#calendar.monthcalendar>?
>
> No - - - the limit is still one year (of 12 months) and my minimum
> would be 18 months and preferably quite a bit more.

That doesn't match what I understand from the module documentation.

Can you show a (small, self-contained) example that demonstrates the
“limit is still one year” when you try to use ‘calendar.monthcalendar’
for the purpose you described above?

-- 
 \ “I have yet to see any problem, however complicated, which, |
  `\  when you looked at it in the right way, did not become still |
_o__)more complicated.” —Paul Anderson |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list


[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



Re: Reading 'scientific' csv using Pandas?

2018-11-20 Thread Martin Schöön
Den 2018-11-19 skrev Martin Schöön :
> I spoke too early. Upon closer inspection I get the first column with
> decimal '.' and the rest with decimal ','. I have tried the converter
> thing to no avail :-(
>
Problem solved!

This morning I woke up with the idea of testing if all this fuss may
be caused by the fact that the 'objectional' files missed some data
in their first few rows. I tested by replacing the blank spaces in one
file with zeros. Bingo! For real this time!

Missing data threw read_csv off course.

Fortunately, only a few files needed a handful of zeros to work so
I could do it manually without breaking too much sweat.

Thanks for the keen interest shown.

/Martin
-- 
https://mail.python.org/mailman/listinfo/python-list


[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



Re: question on the 'calendar' function

2018-11-20 Thread o1bigtenor
On Tue, Nov 20, 2018 at 12:09 PM Ben Finney  wrote:
>
> o1bigtenor  writes:
>
> > I am in the process of learning my first computer programming language
> > (unless g-code counts and then it is my second - - - grin). It
> > definitely is a big world out there.
>
> Welcome, and congratulations on starting with Python!
>
> > The calendar function has a lot of versatility and shows care in its
> > development.
>
> I assume we are here talking about the standard library ‘calendar’
> module https://docs.python.org/3/library/calendar.html>, and the
> function is ‘calendar.calendar’ to generate a whole year calendar
> https://docs.python.org/3/library/calendar.html#calendar.calendar>.

These are the documents that I was examining before I asked my question.
>
> > For planning I need to be able to easily look backward 6 months and
> > forward at least 12 and better 18 months and would prefer perhaps even
> > a total of 36 (and even 60 might be useful) months of calendar
> > available. It could be useful to see the longer time spans as weeks
> > rather than as days but seeing the larger time frames only as months
> > would enable the planning that I need to do.
>
> Have you looked through the rest of the documentation of that module?
> Does ‘calendar.monthcalendar’ come close to what you need
> https://docs.python.org/3/library/calendar.html#calendar.monthcalendar>?

No - - - the limit is still one year (of 12 months) and my minimum would be
18 months and preferably quite a bit more.
>
> > Do I need to (somehow and I have no idea how) extend the calendar
> > function?
>
> It's quite feasible you may get to that point, at which time you will
> want to learn about composing functions by calling other functions;
> eventually you will learn a different technique, of creating a class by
> inheriting from an existing class.

Hmm - - - this sounds like what I'm going to have to do.
let's see if I can find docs on this.
>
> But all that may be in the future! Try just using the existing functions
> from that library module and see how far that gets you.

The calendar function as it exists just quite spread its wings far enough
for my needs but this extension by inheritance is intriguing!

Thanks for the ideas.
-- 
https://mail.python.org/mailman/listinfo/python-list


[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



Re: question on the 'calendar' function

2018-11-20 Thread o1bigtenor
On Tue, Nov 20, 2018 at 11:50 AM Schachner, Joseph
 wrote:
>
> It's possible I don't understand the question.  The calendar functions are 
> NOT limited to this year or any limited range.
>
> Example:
> import calendar
> print( calendar.monthcalendar(2022, 12) )
>
> Prints lists of dates in each week of December 2022.  It prints:
> [[0, 0, 0, 1, 2, 3, 4], [5, 6, 7, 8, 9, 10, 11], [12, 13, 14, 15, 16, 17, 
> 18], [19, 20, 21, 22, 23, 24, 25], [26, 27, 28, 29, 30, 31, 0]]
>
> So, Dec 1 is a Wednesday; Dec 31 is a Saturday.
>
> That's 49 months ahead of this month.   Change the year and month to any 
> (valid) number, and it will do what it does.
> The only caveat is that if the moon's orbit slows down as it gets farther 
> away from the earth and the earth's rotation speed changes, then the 
> calculations done by calendar for leap years may not be correct about the 
> distant future.
>

Greetings

If my syntax or commands are wrong - - - - I've just started so
something is likely to NOT be correct - - - grin - - - I'sa noob!

# calendar 2019

that is to show the year 2019

How could I show June 2018 to Dec 2019, inclusive?
Or June 2018 to Dec 2021, inclusive?
Or June 2018 to Dec 2023 by week (June wk 1,2,3,4 2018; July wk
1,2,3,4,5 2018; . . .   Dec wk 1,2,3,4,5 2023 or maybe even by dates),
inclusive?

Note that the time frame is ALWAYS more than 1 year.
AIUI there isn't a way to do that, at least not that I can see, and I
would like to be able to do that.
A friend suggested using a script wrapped around the command. I
thought maybe there might we a way of doing what I need to do without
using 2 levels of programming.

Regards
-- 
https://mail.python.org/mailman/listinfo/python-list


[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



Re: question on the 'calendar' function

2018-11-20 Thread Ben Finney
o1bigtenor  writes:

> I am in the process of learning my first computer programming language
> (unless g-code counts and then it is my second - - - grin). It
> definitely is a big world out there.

Welcome, and congratulations on starting with Python!

> The calendar function has a lot of versatility and shows care in its
> development.

I assume we are here talking about the standard library ‘calendar’
module https://docs.python.org/3/library/calendar.html>, and the
function is ‘calendar.calendar’ to generate a whole year calendar
https://docs.python.org/3/library/calendar.html#calendar.calendar>.

> For planning I need to be able to easily look backward 6 months and
> forward at least 12 and better 18 months and would prefer perhaps even
> a total of 36 (and even 60 might be useful) months of calendar
> available. It could be useful to see the longer time spans as weeks
> rather than as days but seeing the larger time frames only as months
> would enable the planning that I need to do.

Have you looked through the rest of the documentation of that module?
Does ‘calendar.monthcalendar’ come close to what you need
https://docs.python.org/3/library/calendar.html#calendar.monthcalendar>?

> Do I need to (somehow and I have no idea how) extend the calendar
> function?

It's quite feasible you may get to that point, at which time you will
want to learn about composing functions by calling other functions;
eventually you will learn a different technique, of creating a class by
inheriting from an existing class.

But all that may be in the future! Try just using the existing functions
from that library module and see how far that gets you.

Good hunting.

-- 
 \ “I have the simplest tastes. I am always satisfied with the |
  `\best.” —Oscar Wilde, quoted in _Chicago Brothers of the Book_, |
_o__) 1917 |
Ben Finney

-- 
https://mail.python.org/mailman/listinfo/python-list


[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



RE: question on the 'calendar' function

2018-11-20 Thread Schachner, Joseph
It's possible I don't understand the question.  The calendar functions are NOT 
limited to this year or any limited range.

Example:
import calendar
print( calendar.monthcalendar(2022, 12) )

Prints lists of dates in each week of December 2022.  It prints:
[[0, 0, 0, 1, 2, 3, 4], [5, 6, 7, 8, 9, 10, 11], [12, 13, 14, 15, 16, 17, 18], 
[19, 20, 21, 22, 23, 24, 25], [26, 27, 28, 29, 30, 31, 0]]

So, Dec 1 is a Wednesday; Dec 31 is a Saturday.  

That's 49 months ahead of this month.   Change the year and month to any 
(valid) number, and it will do what it does.  
The only caveat is that if the moon's orbit slows down as it gets farther away 
from the earth and the earth's rotation speed changes, then the calculations 
done by calendar for leap years may not be correct about the distant future.

--- Joseph S.


-Original Message-
From: o1bigtenor  
Sent: Tuesday, November 20, 2018 8:37 AM
To: python-list@python.org
Subject: question on the 'calendar' function

Greetings

I am in the process of learning my first computer programming language (unless 
g-code counts and then it is my second - - - grin). It definitely is a big 
world out there.

The calendar function has a lot of versatility and shows care in its 
development.

There is one area where I don't understand if I even could use this function or 
if I need to look to something(s) else to achieve what I need.

For planning I need to be able to easily look backward 6 months and forward at 
least 12 and better 18 months and would prefer perhaps even a total of 36 (and 
even 60 might be useful) months of calendar available. It could be useful to 
see the longer time spans as weeks rather than as days but seeing the larger 
time frames only as months would enable the planning that I need to do.

Do I need to (somehow and I have no idea how) extend the calendar function?
Is there some other way of displaying dates/calendars that would allow me to 
achieve my needed span?

TIA

-- 
https://mail.python.org/mailman/listinfo/python-list


[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



Re: Have I Been Banned?

2018-11-20 Thread Wildman via Python-list
On Tue, 20 Nov 2018 16:39:39 +, Jon Ribbens wrote:

> On 2018-11-20, Wildman  wrote:
>> In the past I have participated in the group without any
>> problems.  I access the forum through the usenet mirror
>> and I am still using the same newsreader and account.
>> Recently I made some followup posts to the group and they
>> never showed up.  Have I been banned?  If so, I would
>> appreciate it to know why?
> 
> If you mean you made posts to the comp.lang.python group and they did
> not show up on your news server then the problem is either at your
> end or with your news server - unlike the mailing list, the group is
> unmoderated and therefore nobody can be banned from it.

Yes, I make posts to comp.lang.python.  My newsreader's log says the
posts are accepted by the server.  I will contact Giganews to see if
they can shed some light on the subject.

-- 
 GNU/Linux user #557453
The cow died so I don't need your bull!
-- 
https://mail.python.org/mailman/listinfo/python-list


Have I Been Banned?

2018-11-20 Thread Wildman via Python-list
In the past I have participated in the group without any
problems.  I access the forum through the usenet mirror
and I am still using the same newsreader and account.
Recently I made some followup posts to the group and they
never showed up.  Have I been banned?  If so, I would
appreciate it to know why?

Of course I am not sure if this post will make it to the
server.

-- 
 GNU/Linux user #557453
Restricted area!  Authorized trespassers only.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Have I Been Banned?

2018-11-20 Thread Jon Ribbens
On 2018-11-20, Wildman  wrote:
> In the past I have participated in the group without any
> problems.  I access the forum through the usenet mirror
> and I am still using the same newsreader and account.
> Recently I made some followup posts to the group and they
> never showed up.  Have I been banned?  If so, I would
> appreciate it to know why?

If you mean you made posts to the comp.lang.python group and they did
not show up on your news server then the problem is either at your
end or with your news server - unlike the mailing list, the group is
unmoderated and therefore nobody can be banned from it.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: bottledaemon stop/start doesn't work if killed elsewhere

2018-11-20 Thread Adam Funk
On 2018-11-18, Dan Sommers wrote:

> On 11/18/18 1:21 PM, MRAB wrote:> On 2018-11-18 17:50, Adam Funk wrote:
> >> Hi,
> >>
> >> I'm using bottledaemon to run a little REST service on a Pi that takes
> >> input from other machines on the LAN and stores stuff in a database.
> >> I have a cron job to call 'stop' and 'start' on it daily, just in case
> >> of problems.
> >>
> >> Occasionally the oom-killer runs overnight and kills the process using
> >> bottledaemon; when this happens (unlike properly stopping the daemon),
> >> the pidfile and its lockfile are left on the filesystem, so the 'stop'
> >> does nothing and the 'start' gets refusedq because the old pidfile and
> >> lockfile are present.  At the moment, I eventually notice something
> >> wrong with the output data, ssh into the Pi, and rm the two files then
> >> call 'start' on the daemon again.
> >>
> >> Is there a recommended or good way to handle this situation
> >> automatically?
> >>
> > Could you write a watchdog daemon that checks whether bottledaemon is
> > running, and deletes those files if it isn't (or hasn't been for a 
> while)?
>
> What if the oom-killer kills the watchdog?
>
> Whatever runs in response to the start command has to be smarter:  if
> the pid and lock files exist, then check whether they refer to a
> currently running bottledaemon.  If so, then all is well, and refuse to
> start a redundant daemon.  If not, then remove the pid and lock files
> and start the daemon.

I've reported this as an issue on github.  It seems to me that the
'stop' subcommand should delete the pidfile and lockfile if the pid is
no longer running.


-- 
It's like a pair of eyes. You're looking at the umlaut, and it's
looking at you. ---David St. Hubbins
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Suggestions for plotting slide rule & sector scales?

2018-11-20 Thread Adam Funk
On 2018-11-08, Stefan Ram wrote:

> Adam Funk  writes:
>>and get a line 100 mm long with a log scale on the top and a linear
>>scale on the bottom.
>
>   From what I have heard,
>
> pyqt.sourceforge.net/Docs/PyQt4/qx11info.html#appDpiX
>
>   will give you the dots per inch (link not validated).
>
>   matplotlib.axis.Axis handles drawing of t tick lines,
>   grid lines, tick and axis label (information not verified).

I hadn't thought of using matplotlib to do axes only, without the rest
of the graph --- interesting idea.

I've also found pynomo, which looks more appropriate, but I'm having
problems with that (see other post).


-- 
Physics is like sex. Sure, it may give some practical results, but 
that's not why we do it.---Richard Feynman
-- 
https://mail.python.org/mailman/listinfo/python-list


Basic pynomo instructions not working

2018-11-20 Thread Adam Funk
Hi,

I'm trying to use the basic stuff in pynomo



which I've installed with pip3, but I run into this problem trying to
the basic stuff in the documentation:

#v+
$ python3
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pynomo.nomographer import *
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/adam/.local/lib/python3.6/site-packages/pynomo/nomographer.py", 
line 16, in 
from nomo_wrapper import *
ModuleNotFoundError: No module named 'nomo_wrapper'
>>> import pynomo
>>> import pynomo.nomographer
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/adam/.local/lib/python3.6/site-packages/pynomo/nomographer.py", 
line 16, in 
from nomo_wrapper import *
ModuleNotFoundError: No module named 'nomo_wrapper'
>>>
#v-

Any ideas?

Thanks.
-- 
https://mail.python.org/mailman/listinfo/python-list


[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



question on the 'calendar' function

2018-11-20 Thread o1bigtenor
Greetings

I am in the process of learning my first computer programming language
(unless g-code counts and then it is my second - - - grin). It
definitely is a big world out there.

The calendar function has a lot of versatility and shows care in its
development.

There is one area where I don't understand if I even could use this
function or if I need to look to something(s) else to achieve what I
need.

For planning I need to be able to easily look backward 6 months and
forward at least 12 and better 18 months and would prefer perhaps even
a total of 36 (and even 60 might be useful) months of calendar
available. It could be useful to see the longer time spans as weeks
rather than as days but seeing the larger time frames only as months
would enable the planning that I need to do.

Do I need to (somehow and I have no idea how) extend the calendar function?
Is there some other way of displaying dates/calendars that would allow
me to achieve my needed span?

TIA
-- 
https://mail.python.org/mailman/listinfo/python-list


[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



  1   2   >