[issue28805] Add documentation for METH_FASTCALL and _PyObject_FastCall*()

2019-12-01 Thread Batuhan


Batuhan  added the comment:

PR 14079 has been merged, is there anything left as unresolved about this issue?

--
nosy: +BTaskaya

___
Python tracker 

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



[issue38948] os.module.ismount() returns true in python 3.7.4 and false in 2.7.14

2019-12-01 Thread Ankur


New submission from Ankur :

Tested with following lines of code on windows 10:

import os.path
print(os.path.ismount("F:"))

The above statement returns true in python 3.7.4 and false in 2.7.14

Note that F: drive does not have any mount points.
Somehow, python 3.7.4 returns true for all drive letters except C:

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 357674
nosy: jainankur
priority: normal
severity: normal
status: open
title: os.module.ismount() returns true in python 3.7.4 and false in 2.7.14
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



[issue38948] os.path.ismount() returns true in python 3.7.4 and false in 2.7.14

2019-12-01 Thread Ankur


Change by Ankur :


--
title: os.module.ismount() returns true in python 3.7.4 and false in 2.7.14 -> 
os.path.ismount() returns true in python 3.7.4 and false in 2.7.14

___
Python tracker 

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



[issue38948] os.path.ismount() returns true in python 3.7.4 and false in 2.7.14

2019-12-01 Thread Christoph Reiter


Christoph Reiter  added the comment:

related: issue28859

--
nosy: +lazka

___
Python tracker 

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



[issue37496] Support annotations in signature strings.

2019-12-01 Thread Batuhan


Batuhan  added the comment:

We have exposed Tools/unparse.py under ast module, so that option also can 
help. @potomak are you still interested in working on this issue?

--
nosy: +BTaskaya, pablogsal

___
Python tracker 

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



[issue16649] Add a PyCF_DISPLAY_EXPRESSION_RESULTS flag

2019-12-01 Thread Batuhan


Change by Batuhan :


--
nosy: +BTaskaya

___
Python tracker 

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



[issue4724] setting f_exc_traceback aborts in debug builds

2019-12-01 Thread Batuhan


Batuhan  added the comment:

This issue looks like specific to 2.7, which is almost dead. Is there any 
interest about adding this to 2.7 branch?

--
nosy: +BTaskaya

___
Python tracker 

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



[issue38947] dataclass defaults behave inconsistently for init=True/init=False when default is a descriptor

2019-12-01 Thread Eric V. Smith


Change by Eric V. Smith :


--
assignee:  -> eric.smith

___
Python tracker 

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



[issue31821] pause_reading() doesn't work from connection_made()

2019-12-01 Thread Itay azolay


Change by Itay azolay :


--
pull_requests: +16904
pull_request: https://github.com/python/cpython/pull/17425

___
Python tracker 

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



[issue38949] incorrect prefix, exec_prefix in distutils.command.install

2019-12-01 Thread Xavier de Gaye


New submission from Xavier de Gaye :

In function finalize_options() of Lib/distutils/command/install.py at

https://github.com/python/cpython/blob/575d0b46d122292ca6e0576a91265d7abf7cbc3d/Lib/distutils/command/install.py#L284

(prefix, exec_prefix) is set using get_config_vars(). This may be incorrect 
when Python has been manually copied in another location from the location 
where it has been installed with 'make install'. We should use sys.prefix and 
sy.exec_prefix instead, those values are calculated by getpath.c instead of 
being retrieved from the sysconfigdata module.

--
components: Distutils
messages: 357678
nosy: dstufft, eric.araujo, xdegaye
priority: normal
severity: normal
stage: needs patch
status: open
title: incorrect prefix, exec_prefix in distutils.command.install
type: behavior
versions: Python 3.9

___
Python tracker 

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



[issue37496] Support annotations in signature strings.

2019-12-01 Thread Giovanni Cappellotto

Giovanni Cappellotto  added the comment:

Thanks for the info.

Yes, I’m still interested in working on the issue, but lately I didn’t have
much time to do it.

If this is a high priority feel free to re-assign to someone else,
otherwise I’ll start working on it next week.

On Sun, Dec 1, 2019 at 6:59 AM Batuhan  wrote:

>
> Batuhan  added the comment:
>
> We have exposed Tools/unparse.py under ast module, so that option also can
> help. @potomak are you still interested in working on this issue?
>
> --
> nosy: +BTaskaya, pablogsal
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue38941] xml.etree.ElementTree.Element inconsistent warning for bool

2019-12-01 Thread Stefan Behnel

Stefan Behnel  added the comment:

Not so quick. :) You're probably aware of the details, but still, let me state 
clearly what this is about, to make sure that we're all on the same page here.
(I'm also asking in Serhiy, because he did quite some work on ET in the past 
and has experience with it.)

The Element class in ElementTree represents an XML tag, but it also mimics a 
sequence container of child elements. Its behaviour is quite list-like, in that 
it supports indexing and slicing of its children "list", and also has an 
"append()" method to add one at the end. All of this is a nice and simple API, 
so what's the catch?

The gotcha is the behaviour of "__bool__". Following the sequence protocol, the 
truth value of an Element depends on its children. No children – false. Has 
children, true. While this makes sense from the sequence protocol side, I don't 
think it is what users expect. In Python, it is very common to say "if 
something: …" in order to test if "something" is "a thing". When doing this 
with Elements, users usually don't think of the element's children but the 
Element itself, often because they got it back from from kind of tree search, 
as in the OP's example using ".find()".

I would argue that this is brittle, because it works when testing with Elements 
that happen to have children, but it fails when the Element that was found has 
no children. The intention of the "FutureWarning" was to allow changing the 
behaviour at some point to always return true as the truth value, i.e. to 
remove the "__bool__" implementation all together.

This
1) fixes the behaviour for broken code that intended to test if it "is a thing"
2) does not change the behaviour when testing Elements (for whatever reason) 
that have children
3) returns true instead of false when truth-testing Elements that have no 
children, whether the code originally expected this or not.

The main question now is: what is more common? Code that only accidentally 
works because it didn't get in touch with child-free (leaf-)elements yet? Or 
code that would start failing with this change because it really wants to find 
out if an Element has children by truth-testing it.

I'm sure that both exist, because I have seen both, and my very limited 
*feeling* from what I've seen is that there's more brittle code out there than 
intentional code that truth-tests Elements, and that future users are also more 
likely to get it wrong until they get bitten by it and learn the actual meaning 
of the truth-test.

But, we don't know, and this isn't something to easily find out via a code 
search. I'm personally more leaning towards changing the behaviour to help new 
users, but lacking enough evidence, not changing something long-standing is 
always the safer choice. I'm aware that I will have to take the "final" 
decision in the end, but would be happy to hear some more intuitions, ideas or 
even data points first.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue38950] argparse uses "optional arguments" for "keyword arguments"

2019-12-01 Thread Géry

New submission from Géry :

The argparse module incorrectly uses the terms "optional arguments" for keyword 
arguments.

For instance this argument parser takes a required keyword argument and an 
optional positional argument, but classifies the former as an "optional 
argument" and the latter as a "positional argument":

>>> import argparse
>>> parser = argparse.ArgumentParser()
>>> parser.add_argument('--foo', required=True)
_StoreAction(option_strings=['--foo'], dest='foo', nargs=None, const=None, 
default=None, type=None, choices=None, help=None, metavar=None)
>>> parser.add_argument('bar', nargs='?')
_StoreAction(option_strings=[], dest='bar', nargs='?', const=None, 
default=None, type=None, choices=None, help=None, metavar=None)
>>> parser.parse_args(['-h'])
usage: [-h] --foo FOO [bar]

positional arguments:
  bar

optional arguments:
  -h, --help  show this help message and exit
  --foo FOO

Since the actual classification seems to distinguish positional from keyword 
arguments instead of required from optional arguments, I think that the 
"optional arguments:" section should be renamed to "keyword arguments:".

--
components: Library (Lib)
messages: 357681
nosy: bethard, maggyero, rhettinger
priority: normal
severity: normal
status: open
title: argparse uses "optional arguments" for "keyword arguments"
type: enhancement
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue38948] os.path.ismount() returns true in python 3.7.4 and false in 2.7.14

2019-12-01 Thread Ned Deily


Change by Ned Deily :


--
components: +Windows -2to3 (2.x to 3.x conversion tool)
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue38941] xml.etree.ElementTree.Element inconsistent warning for bool

2019-12-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Stefan's arguments looked reasonable to me. I supported deprecating 
Element.__bool__. This was an old plan, although we failed with deprecation in 
the C implementation (this is not the first oversight in deprecations in 
ElementTree).

But there is a problem: removing __bool__ will not change the value of 
bool(element). It will still return False for an Element without children, 
because bool() falls back to __len__ if __bool__ is not defined, and 
Element.__len__ is defined. So we will need either to define Element.__bool__ 
always returning True, and this will be the first case when __bool__ and 
__len__ return inconsistent values, or to deprecate __len__ (and perhaps 
__getitem__) that goes too far from the initial plan.

So now I am not sure. Making Element.__bool__ always returning True or raising 
an exception could help to fix some bugs in user code. But this differs from 
common behavior of sequence-like types in Python. On other hand, we have a 
precedence: bool(NotImplemented) raises an exception now (this also can save 
from common errors).

When I started to write this message I was -0 for changing Element.__bool__. 
Now I am +0, after considering all arguments that came in my mind, but still 
have doubts. Can we ask some of the language ideologues?

--
nosy: +gvanrossum

___
Python tracker 

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



[issue32894] AST unparsing of infinity numbers

2019-12-01 Thread Batuhan


Change by Batuhan :


--
versions: +Python 3.9

___
Python tracker 

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



[issue38951] Use threading.main_thread() check in asyncio

2019-12-01 Thread Andrew Svetlov


New submission from Andrew Svetlov :

Now we use private `isinstance(thread, threading._MainThread)` check.

main_thread() function was added in Python 3.4 by me to avoid it.
Sorry, I forgot to update asyncio code.

The fix is trivial, I very appreciate if somebody will take care.

--
components: asyncio
keywords: easy
messages: 357683
nosy: asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: Use threading.main_thread() check in asyncio
versions: Python 3.8, Python 3.9

___
Python tracker 

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



[issue32894] AST unparsing of infinity numbers

2019-12-01 Thread Batuhan


Change by Batuhan :


--
nosy: +BTaskaya

___
Python tracker 

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



[issue38951] Use threading.main_thread() check in asyncio

2019-12-01 Thread Andrew Svetlov


Change by Andrew Svetlov :


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



[issue32894] AST unparsing of infinity numbers

2019-12-01 Thread Batuhan


Change by Batuhan :


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

___
Python tracker 

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



[issue35632] support unparse for Suite ast

2019-12-01 Thread Batuhan


Batuhan  added the comment:

Tools/parser/unparse.py has been moved under ast module and exposed via 
ast.unparse() interface. If you want to support custom AST statements, the 
current version is incapable of doing such changes because of the real unparser 
class is private. As a workaround you can import it and subclass it /assign a 
method and then use ast.unparse() but that is a hacky way and there is no one 
who can guarantee if that unparser class will change its API or not. Currently 
it uses NodeVisitor API. Also you can use Berker's astor project to do this 
job, which gives you ability of changing source generator class.

--
components: +Library (Lib) -Demos and Tools
nosy: +BTaskaya, pablogsal
versions: +Python 3.9 -Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue19541] ast.dump(indent=True) prettyprinting

2019-12-01 Thread Batuhan


Batuhan  added the comment:

issue 37995 has added pretty printing to the ast.dump, IMHO this issue can be 
closed.

--
nosy: +BTaskaya

___
Python tracker 

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



[issue19541] ast.dump(indent=True) prettyprinting

2019-12-01 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> duplicate
stage: test needed -> resolved
status: open -> closed
superseder:  -> Multiline ast.dump()

___
Python tracker 

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



[issue38702] Adding new types to parser/unparse.py

2019-12-01 Thread Batuhan


Batuhan  added the comment:

> be changed to span across more number of lines?
Yes, that changed in ast._Unparser, and i agree with Serhiy. There is no need 
for supporting that old constant nodes. IMHO this issue can be closed

--
nosy: +BTaskaya, pablogsal

___
Python tracker 

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



[issue21992] New AST node Else() should be introduced

2019-12-01 Thread Batuhan


Batuhan  added the comment:

IMHO there are no need to keep this issue open according to opinions of core 
developers, so can this be closed or it needs more discussion (which i prefer 
to do on mailing lists)?

--
nosy: +BTaskaya

___
Python tracker 

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



[issue38941] xml.etree.ElementTree.Element inconsistent warning for bool

2019-12-01 Thread Guido van Rossum


Guido van Rossum  added the comment:

I'm +1 on adding the deprecation and changing it to an error in the future.

I think it's an anti-pattern that objects with complex behavior that includes 
some sequence behavior allow the fallback behavior for checking the empty 
sequence. I recall being bitten by this nearly 20 years ago (at Zope) when some 
database class used this pattern -- somehow the app ended up thinking there was 
no database at all when in fact there was one but it was empty, and it 
reinitialized the database with bad results.

The fallback from truth testing to __len__() is built into the language and 
cannot be changed, but we *can* override __bool__() to raise an exception, and 
I think that's what we should do. (Clearly that's also what we were planning to 
do, hence the warning in the Python version.)

--

___
Python tracker 

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



[issue36000] __debug__ is a keyword but not a keyword

2019-12-01 Thread Batuhan


Change by Batuhan :


--
nosy: +BTaskaya

___
Python tracker 

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



[issue27119] `compile` doesn't compile into an AST object as specified

2019-12-01 Thread Batuhan


Change by Batuhan :


--
nosy: +BTaskaya
versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.2, Python 3.3, Python 
3.4

___
Python tracker 

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



[issue34000] Document when compile returns a code object v. AST

2019-12-01 Thread Batuhan


Batuhan  added the comment:

I think this is a duplicate of issue 27119

--
nosy: +BTaskaya

___
Python tracker 

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



[issue37883] threading.Lock.locked is not documented

2019-12-01 Thread Ido Michael


Change by Ido Michael :


--
pull_requests: +16906
pull_request: https://github.com/python/cpython/pull/17427

___
Python tracker 

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



[issue33754] f-strings should be part of the Grammar

2019-12-01 Thread Batuhan


Change by Batuhan :


--
nosy: +BTaskaya

___
Python tracker 

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



[issue37883] threading.Lock.locked is not documented

2019-12-01 Thread Ido Michael


Ido Michael  added the comment:

Hey Tal, created a new PR: GH-17427
Also fixed the signed CLA issue

--

___
Python tracker 

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



[issue38702] Adding new types to parser/unparse.py

2019-12-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

We usually do not accept cosmetic changes. If these lines be changed for other 
reasons (fixing a bug, adding new feature), their style can be changed.

--
resolution:  -> rejected
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



[issue21992] New AST node Else() should be introduced

2019-12-01 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> rejected
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



[issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop

2019-12-01 Thread Ido Michael


Ido Michael  added the comment:

@yselivanov

Can we close this?

--

___
Python tracker 

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



[issue37883] threading.Lock.locked is not documented

2019-12-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16907
pull_request: https://github.com/python/cpython/pull/17428

___
Python tracker 

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



[issue37883] threading.Lock.locked is not documented

2019-12-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16909
pull_request: https://github.com/python/cpython/pull/17430

___
Python tracker 

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



[issue37883] threading.Lock.locked is not documented

2019-12-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16908
pull_request: https://github.com/python/cpython/pull/17429

___
Python tracker 

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



[issue37883] threading.Lock.locked is not documented

2019-12-01 Thread Tal Einat

Tal Einat  added the comment:

Thanks for the report Rémi and for the PR Ido!

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



[issue38449] regression - mimetypes guess_type is confused by ; in the filename

2019-12-01 Thread Abhilash Raj


Abhilash Raj  added the comment:


New changeset 2fe4c48917c2d1b40cf063c6ed22ae2e71f4cb62 by Abhilash Raj 
(Dong-hee Na) in branch 'master':
bpo-38449: Add URL delimiters test cases (#16729)
https://github.com/python/cpython/commit/2fe4c48917c2d1b40cf063c6ed22ae2e71f4cb62


--

___
Python tracker 

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



[issue38449] regression - mimetypes guess_type is confused by ; in the filename

2019-12-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16911
pull_request: https://github.com/python/cpython/pull/17432

___
Python tracker 

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



[issue38449] regression - mimetypes guess_type is confused by ; in the filename

2019-12-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16910
pull_request: https://github.com/python/cpython/pull/17431

___
Python tracker 

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



[issue38449] regression - mimetypes guess_type is confused by ; in the filename

2019-12-01 Thread miss-islington


miss-islington  added the comment:


New changeset 926eabb6b46106e677d5e1ea25b7bab918da4110 by Miss Islington (bot) 
in branch '3.7':
bpo-38449: Add URL delimiters test cases (GH-16729)
https://github.com/python/cpython/commit/926eabb6b46106e677d5e1ea25b7bab918da4110


--

___
Python tracker 

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



[issue38449] regression - mimetypes guess_type is confused by ; in the filename

2019-12-01 Thread miss-islington


miss-islington  added the comment:


New changeset 4f1eaf028058cc357030dfaa5e611c90662539f0 by Miss Islington (bot) 
in branch '3.8':
bpo-38449: Add URL delimiters test cases (GH-16729)
https://github.com/python/cpython/commit/4f1eaf028058cc357030dfaa5e611c90662539f0


--

___
Python tracker 

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



[issue38951] Use threading.main_thread() check in asyncio

2019-12-01 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue38952] asyncio cannot handle Python3 IPv4Address or IPv6 Address

2019-12-01 Thread Max Coplan


New submission from Max Coplan :

Trying to use new Python 3 `IPv4Address`s fails with the following error
```
File 
"/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py",
 line 1270, in _ensure_resolved
info = _ipaddr_info(host, port, family, type, proto, *address[2:])
  File 
"/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py",
 line 134, in _ipaddr_info
if '%' in host:
TypeError: argument of type 'IPv4Address' is not iterable
```

--
components: asyncio
messages: 357697
nosy: Max Coplan, asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: asyncio cannot handle Python3 IPv4Address or IPv6 Address
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue38952] asyncio cannot handle Python3 IPv4Address or IPv6 Address

2019-12-01 Thread Max Coplan


Change by Max Coplan :


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

___
Python tracker 

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



[issue38952] asyncio cannot handle Python3 IPv4Address

2019-12-01 Thread Max Coplan


Change by Max Coplan :


--
title: asyncio cannot handle Python3 IPv4Address or IPv6 Address -> asyncio 
cannot handle Python3 IPv4Address

___
Python tracker 

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



[issue38720] Logging failure with timestamp messages

2019-12-01 Thread Bruno P. Kinoshita


Bruno P. Kinoshita  added the comment:

I think this needs a script to reproduce the problem.

Tested first with Anaconda Python 3.7.1 on Win10 Pro. Not able to reproduce the 
issue. Smae with the latest version.

Using Python master and Win10Pro and timezone set to NZ (not that really 
matter, but just in case).

Python 3.9.0a1+ (heads/master:2fe4c48917, Dec  2 2019, 14:12:32) [MSC 
v.1916 64 bit (AMD64)] on win32

with the example from https://docs.python.org/3/library/logging.html:

import logging
FORMAT = '%(asctime)-15s %(clientip)s %(user)-8s %(message)s'
logging.basicConfig(format=FORMAT)
d = {'clientip': '192.168.0.1', 'user': 'fbloggs'}
logger = logging.getLogger('tcpserver')

logger.warning('Protocol problem: %s', 'connection reset', extra=d)

Gives:

2019-12-02 14:14:46,615 192.168.0.1 fbloggs  Protocol problem: connection 
reset

If I modify the example to use just %(asctime)s


import logging
FORMAT = '%(asctime)s'
logging.basicConfig(format=FORMAT)
d = {'clientip': '192.168.0.1', 'user': 'fbloggs'}
logger = logging.getLogger('tcpserver')

logger.warning('Protocol problem: %s', 'connection reset', extra=d)

Now gives:

2019-12-02 14:18:29,047

Everything looks OK, at least on my environment.

--
nosy: +kinow

___
Python tracker 

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



[issue38868] Shutil cannot delete a folder that contains an .ini file

2019-12-01 Thread Bruno P. Kinoshita


Bruno P. Kinoshita  added the comment:

I think eryksun is correct. Reproduced it locally. Setting to read-only 
initially did not raise the issue, but then as administrator I removed the 
inherited permissions and set it to read-only for my user, then it raised the 
exact same WinError 5 Permission Error.

With the extra code to remove the readonly attribute, the directory was 
successfully deleted.

>It does so as an accident of history, not because it's justified

I think it would be easier for users if this attribute was not copied, 
especially as it looks like other attributes are not being copied (on Win). 
That would remove the need of this extra code when using Windows.

--
nosy: +kinow

___
Python tracker 

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



[issue35981] shutil make_archive create wrong file when base name contains dots at end

2019-12-01 Thread Bruno P. Kinoshita


Change by Bruno P. Kinoshita :


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

___
Python tracker 

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



[issue35981] shutil make_archive create wrong file when base name contains dots at end

2019-12-01 Thread Bruno P. Kinoshita


Change by Bruno P. Kinoshita :


--
keywords: +patch, patch
pull_requests: +16914, 16915
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/17435

___
Python tracker 

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



[issue35981] shutil make_archive create wrong file when base name contains dots at end

2019-12-01 Thread Bruno P. Kinoshita


Bruno P. Kinoshita  added the comment:

Tested locally on Win10 pro, and both suggestions of steve.dower worked. I've 
put a PR (https://github.com/python/cpython/pull/17435) based on his second 
suggestion.

The rationale being that that way, the format function (zip/bztar/etc) will get 
the absolute file name. I thought this was less risk then trusting that the 
format function would work with the relative paths in win/linux/etc.

--
nosy: +kinow

___
Python tracker 

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



[issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop

2019-12-01 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Closing this as fixed. Thanks.

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



[issue31842] pathlib: "Incorrect function" during resolve()

2019-12-01 Thread LiJiayuan


LiJiayuan  added the comment:

Same Error.

It happend by resolving a path which is not under C: driver,
in Windows System.

>>> Path().resolve()
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Users\zom\scoop\apps\miniconda3\current\envs\web\lib\pathlib.py", 
line 1159, in resolve
s = self._flavour.resolve(self, strict=strict)
  File "C:\Users\zom\scoop\apps\miniconda3\current\envs\web\lib\pathlib.py", 
line 202, in resolve
s = self._ext_to_normal(_getfinalpathname(s))
OSError: [WinError 1] Incorrect function: '.'
>>> Path().absolute()
WindowsPath('R:/fileshare/fileshare-s')
>>> Path().absolute().resolve()
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Users\zom\scoop\apps\miniconda3\current\envs\web\lib\pathlib.py", 
line 1159, in resolve
s = self._flavour.resolve(self, strict=strict)
  File "C:\Users\zom\scoop\apps\miniconda3\current\envs\web\lib\pathlib.py", 
line 202, in resolve
s = self._ext_to_normal(_getfinalpathname(s))
OSError: [WinError 1] Incorrect function: 'R:\\fileshare\\fileshare-s'

--
nosy: +zombie110year
versions: +Python 3.8 -Python 3.7

___
Python tracker 

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



[issue38952] asyncio cannot handle Python3 IPv4Address

2019-12-01 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This looks like a duplicate of issue35019.

--
nosy: +xtreak
type:  -> enhancement
versions: +Python 3.9 -Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue31842] pathlib: "Incorrect function" during resolve()

2019-12-01 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +eryksun

___
Python tracker 

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