[issue37636] Deprecate slicing and ordering operations on sys.version

2019-08-09 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> Regarding the "Would releasing 4.0 instead avoid problems?"
> Anthony actually did that experiment, too: it broke third
> party projects even more impressively than the 3.10 build did.

That's good to know.  Please thank Anthony for doing his homework.

--

___
Python tracker 

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



[issue16837] Number ABC can be instantiated

2019-08-09 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I looked into this a bit more and don't see another non-invasive way of 
blocking instantiation.

Marking for Guido to take a look at.  He's the expert on ABCs and typing and is 
the originator of the __hash__ = None approach to turning off hashability.

Guido, would you like number subclasses to require an override of __hash__ or 
is the accidental instantiation of Number() something we even care about (I 
think this unlikely to ever arise in practice)?  My suggestion is to deem it 
harmless and leave it as is.

--
assignee: rhettinger -> gvanrossum
nosy: +gvanrossum
versions: +Python 2.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



[issue37806] Infinite recursion with typing.get_type_hints

2019-08-09 Thread Valerio G


Change by Valerio G :


--
type:  -> crash

___
Python tracker 

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



[issue37806] Infinite recursion with typing.get_type_hints

2019-08-09 Thread Valerio G


New submission from Valerio G :

I encountered one condition where calling get_type_hints causes infinite 
recursion when dealing with forward declaration and cyclic types.

Here's an example:

from typing import Union, List, get_type_hints

ValueList = List['Value']
Value = Union[str, ValueList]

class A:
a: List[Value]

get_type_hints(A, globals(), locals())
This reaches the recursion limit as of 3.8.0b2.

It seems that the combining _GenericAlias with ForwardRef is what triggers this 
condition:

ForwardRef._evaluate sets __forward_value__ on its first call on a given 
instance
_GenericAlias tries to compare its args post evaluation
If one of the arguments is a previously evaluated forward reference containing 
a cycle, then it will infinitely recurse in the hash function when building a 
frozen set for the comparison.
The above is, of course, a very artificial example, but I can imagine this 
happening a lot in code with trees or similar structures.
My initial reproduction case was using _eval_type to resolve forward references 
returned by get_args (side note: it would be nice to have a public function to 
do that).

--
components: Library (Lib)
messages: 349330
nosy: vg0377467
priority: normal
severity: normal
status: open
title: Infinite recursion with typing.get_type_hints
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



[issue37799] Renaming Doc/reference/ to Doc/language/

2019-08-09 Thread Mariatta


Mariatta  added the comment:

The change is not worth doing for several reasons:

- renaming filename/directory breaks git history on GitHub web UI. The history 
can still be viewed if you use the command line e.g. git log --follow. 
 
- other pages like stack overflow or blog posts have linked to the /reference 
for ages. We'll be breaking links. We might be able to set up redirect to the 
new path, but the effort is not worth the gain IMO.

There is very little to be gained compared to all the pitfalls.

So I'm closing this issue.

Thanks.

--
nosy: +Mariatta
priority: normal -> low
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



[issue32912] Raise non-silent warning for invalid escape sequences

2019-08-09 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

One possibility is to restrict the warning to a backslash followed by an 
alphabetic character or backslash, and that we define backslash followed by any 
other printable character as specifically allowed.  This would catch the likely 
sources of errors without breaking the likes of \, or \-.  Also, multiline 
strings have less of a need for a warning than a single line string.

--

___
Python tracker 

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



[issue36714] Tweak doctest 'example' regex to allow a leading ellipsis in 'want' line

2019-08-09 Thread Brian Skinn


Brian Skinn  added the comment:

On reflection, it would probably be better to limit the ELLIPSIS to 3 or 4 
periods ('[.]{3,4}'); otherwise, it would be impossible to express an ellipsis 
followed by a period in a 'want'.

--

___
Python tracker 

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



[issue14465] xml.etree.ElementTree: add feature to prettify XML output

2019-08-09 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

FWIW, here is the relevant section of the XML specification, 
https://www.w3.org/TR/2008/REC-xml-20081126/#sec-white-space :

"""In editing XML documents, it is often convenient to use "white space" 
(spaces, tabs, and blank lines) to set apart the markup for greater 
readability. Such white space is typically not intended for inclusion in the 
delivered version of the document. On the other hand, "significant" white space 
that should be preserved in the delivered version is common, for example in 
poetry and source code.

An XML processor must always pass all characters in a document that are not 
markup through to the application. A validating XML processor must also inform 
the application which of these characters constitute white space appearing in 
element content.
"""

OTOH, the java TransformerFactory does support a property, OutputKeys.INDENT, 
so there is a precedent for this feature request.

Stefan, would you please make a final determination or pronouncement on whether 
this makes sense for ElementTree or whether it is outside the scope of what the 
module is trying to accomplish.

--

___
Python tracker 

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



[issue16837] Number ABC can be instantiated

2019-08-09 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Usually, setting hash to None is the proper way to turn-off hashability.  And 
it's possible that existing code has subclassed Number and provided other 
methods but not __hash__, so this could potentially break their code.  On the 
other hand, it would be desirable to prevent instantiation, perhaps using some 
other mechanism would be better.  I'll take a deeper look at this when I get a 
chance.

--
assignee:  -> rhettinger

___
Python tracker 

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



[issue37799] Renaming Doc/reference/ to Doc/language/

2019-08-09 Thread Emmanuel Arias


Emmanuel Arias  added the comment:

Hello maggyero,

I thinks that could be a good improve. But this structure is
used on since old cpython versions, so I don't know if it will be a necessary 
change.

But, if you don't receive some feedback from here, you can propose
a PR, maybe other core dev could review it and tell you their opinion
:-)

--
nosy: +eamanu

___
Python tracker 

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



[issue32912] Raise non-silent warning for invalid escape sequences

2019-08-09 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

I haven't looked, so not that i'm aware of.  I suggest filing one for each of 
those.

The warning not pointing to the right line in a multiline literal sounds like a 
bug to me so that one, if fixed, seems reasonable for 3.8.  The release manager 
gets to decide.

Making the syntax warnings happen upon import of an already compiled pyc is 
more feature-ish, likely to be 3.9+.

--

___
Python tracker 

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



[issue32912] Raise non-silent warning for invalid escape sequences

2019-08-09 Thread Aaron Meurer


Aaron Meurer  added the comment:

Are there issues tracking the things I mentioned, which should IMO happen 
before this becomes a hard error (making the warnings reproduce even if the 
file has already been compiled, and making warning message point to the correct 
line in multiline strings)? And is it too late to potentially get some of those 
things in 3.8?

--

___
Python tracker 

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



[issue32912] Raise non-silent warning for invalid escape sequences

2019-08-09 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

I'm leaving this open, as we may still want to do it in 3.9+, just in a less 
disruptive manner.  (That, and how, hasn't been decided yet)

Follow the thread(s) on python-dev for the latest on that.

--
resolution: fixed -> 
stage: resolved -> 
status: closed -> open
versions: +Python 3.9 -Python 3.8

___
Python tracker 

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



[issue32912] Raise non-silent warning for invalid escape sequences

2019-08-09 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Thank you!

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



[issue26543] [EASY] imaplib noop Debug: bytes vs Unicode bug in debug mode

2019-08-09 Thread Kostis Anagnostopoulos


Kostis Anagnostopoulos  added the comment:

>
> BTW, i went back to my code and pasted what seemed to cure the problem,
>
added in commit 2b99cec  in my PR.  But i don't have much time to track if
it really works.
I hope it will help you resolve the issue.

Best,
  Kostis

--

___
Python tracker 

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



[issue32912] Raise non-silent warning for invalid escape sequences

2019-08-09 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
pull_requests: +14927
pull_request: https://github.com/python/cpython/pull/15195

___
Python tracker 

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



[issue32912] Raise non-silent warning for invalid escape sequences

2019-08-09 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset 4c5b6bac2408f879231c7cd38d67657dd4804e7c by Gregory P. Smith 
(Serhiy Storchaka) in branch '3.8':
[3.8] bpo-32912: Revert SyntaxWarning on invalid escape sequences (GH-15142)
https://github.com/python/cpython/commit/4c5b6bac2408f879231c7cd38d67657dd4804e7c


--

___
Python tracker 

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



[issue37805] json.dump(..., skipkeys=True) has no unit tests

2019-08-09 Thread Julian Berman


New submission from Julian Berman :

Looks like there possibly are upstream tests that could be pulled in with 
modification:

https://github.com/simplejson/simplejson/blob/00ed20da4c0e5f0396661f73482418651ff4d8c7/simplejson/tests/test_dump.py#L53-L66

(Found via 
https://bitbucket.org/pypy/pypy/issues/3052/json-skipkeys-true-results-in-invalid-json)

--
components: Tests
messages: 349317
nosy: Julian
priority: normal
severity: normal
status: open
title: json.dump(..., skipkeys=True) has no unit tests
versions: 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



[issue37398] contextlib.ContextDecorator decorating async functions

2019-08-09 Thread Nathaniel Smith


Nathaniel Smith  added the comment:

@Yury: depends on what you mean by "100% reliable" :-). Like I said above, I'm 
normally super against automagic detection of sync-vs-async functions because 
of all the edge cases where it goes wrong, but in this specific case where 
people are writing a decorator one line above their def/async def, I think a 
simple iscoroutinefunction check will be pretty close to 100% matching what 
users expect.

Or, if we don't change the semantics, then we can still be 100% confident that 
if iscoroutinefunction returns true, then the user has made a mistake. (I.e., 
if we make this issue a warning, then it's possible we'll miss print a warning 
in some complicated cases, but we can be confident that all the warnings we do 
print are correct.)

--

___
Python tracker 

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



[issue23666] Add shell session logging option to IDLE

2019-08-09 Thread Tal Einat


Tal Einat  added the comment:

I'm happy to look into implementing this. Also perhaps auto-saved backups for 
edited files.

Where would you suggest the files be kept? The user's .idlerc directory?

--
nosy: +taleinat

___
Python tracker 

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



[issue37398] contextlib.ContextDecorator decorating async functions

2019-08-09 Thread Yury Selivanov


Yury Selivanov  added the comment:

> I hear you on the semantic confusion, but is a single check at definition 
> time really that expensive? 

Do you know how to make that single check 100% reliable?

--

___
Python tracker 

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



[issue37398] contextlib.ContextDecorator decorating async functions

2019-08-09 Thread Nathaniel Smith


Nathaniel Smith  added the comment:

> I wouldn't be OK with magic switching in the behaviour of ContextDecorator 
> (that's not only semantically confusing, it's also going to make the 
> contextlib function wrappers even slower than they already are).

I hear you on the semantic confusion, but is a single check at definition time 
really that expensive? The runtime cost is zero.

> I'm also entirely unclear on what you would expect a synchronous context 
> manager to do when applied to an asynchronous function, as embedding an 
> "await" call inside a synchronous with statement is unlikely to end well.

It would be like:

async def blah():
with something():
await foo()

There's nothing weird about this; people write the long version all the time. 
You'd only do it when 'something()' doesn't do I/O, but there are lots of 
context managers that don't do I/O.

--

___
Python tracker 

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



[issue37801] Compilation on MINGW64 fails (CODESET,wcstok,...)

2019-08-09 Thread Eryk Sun


Eryk Sun  added the comment:

I wasn't aware that CPython builds for MSYS2 out of the box, since it's a 
POSIX-on-Windows platform like Cygwin. Apparently there are patches that enable 
it to build, since MSYS2 has Python available.

For Windows, WCSTOK expands to wcstok_s, which takes a context pointer that 
allows concurrently parsing multiple strings in a single thread. The old 
function lacks this parameter and instead uses a per-thread static buffer. 
They're declared as follows:

wchar_t *wcstok(wchar_t *strToken, const wchar_t *strDelimit);
wchar_t *wcstok_s(wchar_t *str, const wchar_t *delimiters,
  wchar_t **context);

Otherwise the WCSTOK macro expands to wcstok, which assumes that POSIX systems 
use the standard definition [1]:

wchar_t *wcstok(wchar_t *restrict ws1, const wchar_t *restrict ws2,
wchar_t **restrict ptr);

Apparently the version of wcstok declared in your build environment takes only 
two arguments, like the old insecure function in Windows: 

wchar_t *__cdecl wcstok(wchar_t * __restrict__ _Str,
const wchar_t * __restrict__ _Delim)
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;

[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/wcstok.html

--
nosy: +eryksun

___
Python tracker 

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



[issue26543] [EASY] imaplib noop Debug: bytes vs Unicode bug in debug mode

2019-08-09 Thread Kostis Anagnostopoulos


Kostis Anagnostopoulos  added the comment:

Dear Sanyam,

My apologies, it's been almost a year that i don't need the fix for this
code,
my app has been graciously decommissioned, and i don;t have any time for it.

Best,
  Kostis

On Fri, 9 Aug 2019 at 21:35, Sanyam Khurana  wrote:

>
> Sanyam Khurana  added the comment:
>
> Hey ankostis,
>
> Please let us know if you've time to complete the PR.
>
> Thank you :)
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue34331] Incorrectly pluralized abstract class error message

2019-08-09 Thread Sanyam Khurana


Sanyam Khurana  added the comment:

Adding 3.9 to this bug. I've reviewed the PR and it looks good to me.

--
nosy: +CuriousLearner
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



[issue32912] Raise non-silent warning for invalid escape sequences

2019-08-09 Thread Sanyam Khurana


Change by Sanyam Khurana :


--
nosy: +CuriousLearner

___
Python tracker 

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



[issue31226] shutil.rmtree fails when target has an internal directory junction (Windows)

2019-08-09 Thread Eryk Sun


Eryk Sun  added the comment:

> Thanks for the detailed explanation Eryk. While it is a little 
> annoying that it comes 2 years after the initial proposed 
> solution, I'll happily take that if the end result is a better fix :)

Mea culpa. I am sorry about that. I do respect your time and the work you've 
invested into this issue. I'm guilty of procrastination here. Plus we're in 
murky waters, and I'm worried about getting it wrong -- again. A lot of 
misleading information has been published about filesystem junctions. And 
Microsoft's documentation on the subject of reparse points and the expected 
behavior of symlinks, junctions, and other "name surrogates" is too brief, 
incomplete or just wrong.

> this fix seems quite a bit more involved to implement than the 
> previous one.

I was painting a broad picture of what it might look if we had general support 
for "name surrogate" reparse points. I went out of my way to use conditional 
tense, with "could" and "would" used extensively. I wanted to get that part 
covered upfront to be able to present a generic alternative solution to the 
rmtree() problem before digressing into the subject of junction and symlink 
behavior.

For just this issue, we could use a local solution for Windows. One option 
would be to add an nt._getattrtaginfo function that calls CreateFileW and 
GetFileInformationByHandleEx: FileAttributeTagInfo, with a fallback to 
FindFirstFileW if that fails for a downlevel filesystem. Then wrap the 
os.scandir call with a function that checks for a name-surrogate tag. 

For example:

if not _WINDOWS:
_rmtree_unsafe_scandir = os.scandir
else:
import contextlib

def _rmtree_unsafe_scandir(path):
try:
attr, tag = nt._getattrtaginfo(path)
except OSError:
attr = tag = 0
if (attr & stat.FILE_ATTRIBUTE_DIRECTORY
  and attr & stat.FILE_ATTRIBUTE_REPARSE_POINT
  and tag & 0x2000_): # IsReparseTagNameSurrogate
return contextlib.nullcontext([])
else:
return os.scandir(path)

--

___
Python tracker 

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



[issue36714] Tweak doctest 'example' regex to allow a leading ellipsis in 'want' line

2019-08-09 Thread Brian Skinn


Brian Skinn  added the comment:

I suppose one alternative solution might be to tweak the ELLIPSIS feature of 
doctest, such that it would interpret a run of >=3 periods in a row (matching 
regex pattern of "[.]{3,}") as 'ellipsis'.

The regex for PS2 could then have a negative lookahead added, so that it *only* 
matches three periods, plus optionally other content: '\.\.\.(?!\.)'

That way, a line like "... foo" would retain the current meaning of "'source' 
line, consisting of PS2 plus the identifier 'foo'", but the meaning of 
"arbitrary content followed by ' foo'" could be achieved by " foo", since 
the leading "" would NOT match the negative lookahead for PS2.

In other situations, where "..." is *not* the leading non-whitespace content, 
the old behavior suffices: the PS2 regex won't match anyways, so it'll be left 
for ELLIPSIS to process.

--

___
Python tracker 

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



[issue26543] [EASY] imaplib noop Debug: bytes vs Unicode bug in debug mode

2019-08-09 Thread Sanyam Khurana


Sanyam Khurana  added the comment:

Hey ankostis, 

Please let us know if you've time to complete the PR.

Thank you :)

--

___
Python tracker 

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



[issue26543] [EASY] imaplib noop Debug: bytes vs Unicode bug in debug mode

2019-08-09 Thread Sanyam Khurana


Sanyam Khurana  added the comment:

Removing 3.5 as it is in security fix mode. Also, the PR just contains the test 
case that would trigger the condition and not the actual code.

--
nosy: +CuriousLearner
stage:  -> patch review
versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.5

___
Python tracker 

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



[issue37785] argparse uses %s in gettext calls causing xgettext warnings

2019-08-09 Thread Sanyam Khurana


Sanyam Khurana  added the comment:

Hi Jakub,

Welcome and thank you for contributing. I've added a suggestion on your pull 
request.


Python 3.6 and Python 3.5 are in security fixes stage, so I've removed those 
tags from this bug.

--
nosy: +CuriousLearner
type:  -> behavior
versions:  -Python 3.5, Python 3.6

___
Python tracker 

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



[issue36714] Tweak doctest 'example' regex to allow a leading ellipsis in 'want' line

2019-08-09 Thread Brian Skinn

Brian Skinn  added the comment:

Mm, agreed--that regex wouldn't be hard to write.

The problem is, AFAICT there's irresolvable syntactic ambiguity in a line 
starting with exactly three periods, if the doctest PS2 specification is not 
constrained to be exactly "... ". In such a case, "..." could mark either (1) 
an ellipsis standing in for an entire line of 'want', or (2) a PS2, marking a 
blank line in 'source'.

I don't really think aggressive lookahead would help much -- an arbitrary 
number of following lines could contain exactly "...", and the intended 
transition from 'source' to 'want' could lie at any one of them.  The 
nonrecursive nature of regex is unhelpful here, but I don't think one could 
even write a recursive-descent parser, or similar, that could be 100% reliable 
on a single comparison. It would have to test the string against all the 
various splits between 'source' and 'want' along those "..." lines, and see if 
any match. Hairy mess.

AFAICT, defining "... " as PS2, and "..." as 'ellipsis representing a whole 
line' is the cleanest solution from a logical point of view.

Of course, then it's *visually* confusing, because trailing space. ¯\_(ツ)_/¯

--

___
Python tracker 

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



[issue35712] Make NotImplemented unusable in boolean context

2019-08-09 Thread Vedran Čačić

Vedran Čačić  added the comment:

Another reason why current behavior is confusing: what do you think

filter(2 .__eq__, 'text')

should yield? :-o

(Yes, I know this isn't the right way to do it, but

(element for element in 'text' if element == 2)

is twice longer.:)

--
nosy: +veky

___
Python tracker 

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



[issue16837] Number ABC can be instantiated

2019-08-09 Thread Sanyam Khurana


Sanyam Khurana  added the comment:

I'm changing the versions to Python 3.8 and 3.9 for this bug.

--
versions: +Python 3.8, Python 3.9 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue16837] Number ABC can be instantiated

2019-08-09 Thread Sanyam Khurana


Sanyam Khurana  added the comment:

Hi Alexander,

Can you please address the reviews and turn this patch into a GitHub PR, please?

--
nosy: +CuriousLearner

___
Python tracker 

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



[issue37398] contextlib.ContextDecorator decorating async functions

2019-08-09 Thread Nick Coghlan


Nick Coghlan  added the comment:

I wouldn't be OK with magic switching in the behaviour of ContextDecorator 
(that's not only semantically confusing, it's also going to make the contextlib 
function wrappers even slower than they already are).

I'm also entirely unclear on what you would expect a synchronous context 
manager to do when applied to an asynchronous function, as embedding an "await" 
call inside a synchronous with statement is unlikely to end well.

--

___
Python tracker 

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



[issue12128] Allow an abc.abstractproperty to be overridden by an instance data attribute

2019-08-09 Thread Sanyam Khurana


Sanyam Khurana  added the comment:

I was trying to search the mailing list archives for the URL posted by Eric: 
http://mail.python.org/pipermail/python-list/2011-May/1272604.html

But I couldn't find it. Also that URL shows 404.

Eric, is it possible for you to post the correct link?

--
nosy: +CuriousLearner

___
Python tracker 

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



[issue37752] Redundant Py_CHARMASK called in some files

2019-08-09 Thread hai shi


hai shi  added the comment:

typo error: delte->delete

--

___
Python tracker 

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



[issue37752] Redundant Py_CHARMASK called in some files

2019-08-09 Thread hai shi


hai shi  added the comment:

Due to this macro documented in 
https://docs.python.org/3.9/c-api/intro.html#c.Py_CHARMASK and we don't know 
how much user use this marco, I don't think we need delte this 
function(deleting operation should be careful).

--

___
Python tracker 

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



[issue37636] Deprecate slicing and ordering operations on sys.version

2019-08-09 Thread Nick Coghlan


Nick Coghlan  added the comment:

Regarding the "Would releasing 4.0 instead avoid problems?" Anthony actually 
did that experiment, too: it broke third party projects even more impressively 
than the 3.10 build did.

I think Serhiy's point is fairly compelling though - check whether or not 
pylint checks for this, and then close this issue with either a pointer to 
their documentation, or else a pointer to a feature request on their issue 
tracker.

--

___
Python tracker 

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



[issue26131] Raise ImportWarning when loader.load_module() is used

2019-08-09 Thread Brett Cannon


Brett Cannon  added the comment:

If you look at 
https://github.com/python/cpython/blob/master/Lib/importlib/_bootstrap.py and 
https://github.com/python/cpython/blob/master/Lib/importlib/_bootstrap_external.py
 you will notice a bunch of comments near all the calls to load_module(). Those 
are the places that should be somehow triggering a DeprecationWarning.

I think there's a compatibility shim function which would need to raise an 
exception so that anyone who has implemented load_module() as the only way to 
handle loading get a warning (but I think that requires certain loaders to have 
appropriate support which hopefully they have already but someone needs to 
double-check). After that every implementation of load_module() should have a 
warning.

--

___
Python tracker 

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



[issue37801] Compilation on MINGW64 fails (CODESET,wcstok,...)

2019-08-09 Thread Steve Dower


Steve Dower  added the comment:

Guessing it needs an extra header file that is implicitly included in the 
Windows headers?

--

___
Python tracker 

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



[issue37804] Remove Thread.isAlive

2019-08-09 Thread Dong-hee Na


Change by Dong-hee Na :


--
components: +Library (Lib)
title: Remove isAlive -> Remove Thread.isAlive

___
Python tracker 

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



[issue37804] Remove isAlive

2019-08-09 Thread Dong-hee Na


New submission from Dong-hee Na :

As we discussed https://bugs.python.org/issue35283.
Now is the time to remove Thread.isAlive.

If it is okay, I 'd like to work on this issue.

--
messages: 349293
nosy: asvetlov, corona10, vstinner
priority: normal
severity: normal
status: open
title: Remove isAlive
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



[issue34155] email.utils.parseaddr mistakenly parse an email

2019-08-09 Thread Ned Deily


Ned Deily  added the comment:


New changeset 13a19139b5e76175bc95294d54afc9425e4f36c9 by Ned Deily (Miss 
Islington (bot)) in branch '3.6':
bpo-34155: Dont parse domains containing @ (GH-13079) (GH-14826)
https://github.com/python/cpython/commit/13a19139b5e76175bc95294d54afc9425e4f36c9


--

___
Python tracker 

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



[issue21161] list comprehensions don't see local variables in pdb in python3

2019-08-09 Thread daniel hahler


Change by daniel hahler :


--
pull_requests: +14926
pull_request: https://github.com/python/cpython/pull/15194

___
Python tracker 

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



[issue37803] "python -m pdb --help" does not work

2019-08-09 Thread daniel hahler


Change by daniel hahler :


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

___
Python tracker 

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



[issue37803] "python -m pdb --help" does not work

2019-08-09 Thread daniel hahler


New submission from daniel hahler :

The long options passed to `getopt.getopt` should not include the leading 
dashes:


% python -m pdb --help
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
  File "/home/daniel/src/pdbpp/pdb.py", line 1672, in 
pdb.main()
  File "/usr/lib/python3.7/pdb.py", line 1662, in main
opts, args = getopt.getopt(sys.argv[1:], 'mhc:', ['--help', 
'--command='])
  File "/usr/lib/python3.7/getopt.py", line 93, in getopt
opts, args = do_longs(opts, args[0][2:], longopts, args[1:])
  File "/usr/lib/python3.7/getopt.py", line 157, in do_longs
has_arg, opt = long_has_args(opt, longopts)
  File "/usr/lib/python3.7/getopt.py", line 174, in long_has_args
raise GetoptError(_('option --%s not recognized') % opt, opt)
getopt.GetoptError: option --help not recognized

(it works in Python 2.7)

--
components: Library (Lib)
messages: 349291
nosy: blueyed
priority: normal
severity: normal
status: open
title: "python -m pdb --help" does not work
type: behavior
versions: 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



[issue37642] timezone allows no offset from range (23:59, 24:00)

2019-08-09 Thread Paul Ganssle


Paul Ganssle  added the comment:


New changeset 92c7e30adf5c81a54d6e5e555a6bdfaa60157a0d by Paul Ganssle (Ngalim 
Siregar) in branch 'master':
bpo-37642: Update acceptable offsets in timezone (GH-14878)
https://github.com/python/cpython/commit/92c7e30adf5c81a54d6e5e555a6bdfaa60157a0d


--

___
Python tracker 

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



[issue36714] Tweak doctest 'example' regex to allow a leading ellipsis in 'want' line

2019-08-09 Thread Paul Moore


Paul Moore  added the comment:

It shouldn't be hard to update the regex to accept either "... " followed by 
other text or "..." on a line on its own, surely?

--
nosy: +paul.moore

___
Python tracker 

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



[issue37752] Redundant Py_CHARMASK called in some files

2019-08-09 Thread Jordon.X


Jordon.X <9651...@qq.com> added the comment:

Hi Ma, 
I think this is a very valuable suggestion.
And if we want to delete the definition of Py_CHARMASK, maybe another issue 
needed.
I am not very sure about the considerations of this macro definition. And 
whether there are any side effects after deletion needs further discussion.

Thanks,
Best Regards

--

___
Python tracker 

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



[issue26131] Raise ImportWarning when loader.load_module() is used

2019-08-09 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:

Feel free to open a PR.

--

___
Python tracker 

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



[issue37802] micro-optimization of PyLong_FromSize_t()

2019-08-09 Thread Sergey Fedoseev


Change by Sergey Fedoseev :


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

___
Python tracker 

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



[issue26131] Raise ImportWarning when loader.load_module() is used

2019-08-09 Thread Michael Anckaert


Michael Anckaert  added the comment:

Clarification: the imp module shows a DeprecationWarning when imported. Was 
this what was meant?

--

___
Python tracker 

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



[issue37802] micro-optimization of PyLong_FromSize_t()

2019-08-09 Thread Sergey Fedoseev


New submission from Sergey Fedoseev :

Currently PyLong_FromSize_t() uses PyLong_FromLong() for values < PyLong_BASE. 
It's suboptimal because PyLong_FromLong() needs to handle the sign. Removing 
PyLong_FromLong() call and handling small ints directly in PyLong_FromSize_t() 
makes it faster:

$ python -m perf timeit -s "from itertools import repeat; _len = repeat(None, 
2).__length_hint__" "_len()" --compare-to=../cpython-master/venv/bin/python 
--duplicate=1
/home/sergey/tmp/cpython-master/venv/bin/python: . 18.7 ns 
+- 0.3 ns
/home/sergey/tmp/cpython-dev/venv/bin/python: . 16.7 ns +- 
0.1 ns
Mean +- std dev: [/home/sergey/tmp/cpython-master/venv/bin/python] 18.7 ns +- 
0.3 ns -> [/home/sergey/tmp/cpython-dev/venv/bin/python] 16.7 ns +- 0.1 ns: 
1.12x faster (-10%)

$ python -m perf timeit -s "from itertools import repeat; _len = repeat(None, 
2**10).__length_hint__" "_len()" --compare-to=../cpython-master/venv/bin/python 
--duplicate=1
/home/sergey/tmp/cpython-master/venv/bin/python: . 26.2 ns 
+- 0.0 ns
/home/sergey/tmp/cpython-dev/venv/bin/python: . 25.0 ns +- 
0.7 ns
Mean +- std dev: [/home/sergey/tmp/cpython-master/venv/bin/python] 26.2 ns +- 
0.0 ns -> [/home/sergey/tmp/cpython-dev/venv/bin/python] 25.0 ns +- 0.7 ns: 
1.05x faster (-5%)

$ python -m perf timeit -s "from itertools import repeat; _len = repeat(None, 
2**30).__length_hint__" "_len()" --compare-to=../cpython-master/venv/bin/python 
--duplicate=1
/home/sergey/tmp/cpython-master/venv/bin/python: . 25.6 ns 
+- 0.1 ns
/home/sergey/tmp/cpython-dev/venv/bin/python: . 25.6 ns +- 
0.0 ns
Mean +- std dev: [/home/sergey/tmp/cpython-master/venv/bin/python] 25.6 ns +- 
0.1 ns -> [/home/sergey/tmp/cpython-dev/venv/bin/python] 25.6 ns +- 0.0 ns: 
1.00x faster (-0%)


This change makes PyLong_FromSize_t() consistently faster than 
PyLong_FromSsize_t(). So it might make sense to replace PyLong_FromSsize_t() 
with PyLong_FromSize_t() in __length_hint__() implementations and other similar 
cases. For example:

$ python -m perf timeit -s "_len = iter(bytes(2)).__length_hint__" "_len()" 
--compare-to=../cpython-master/venv/bin/python --duplicate=1
/home/sergey/tmp/cpython-master/venv/bin/python: . 19.4 ns 
+- 0.3 ns
/home/sergey/tmp/cpython-dev/venv/bin/python: . 17.3 ns +- 
0.1 ns
Mean +- std dev: [/home/sergey/tmp/cpython-master/venv/bin/python] 19.4 ns +- 
0.3 ns -> [/home/sergey/tmp/cpython-dev/venv/bin/python] 17.3 ns +- 0.1 ns: 
1.12x faster (-11%)

$ python -m perf timeit -s "_len = iter(bytes(2**10)).__length_hint__" "_len()" 
--compare-to=../cpython-master/venv/bin/python --duplicate=1
/home/sergey/tmp/cpython-master/venv/bin/python: . 26.3 ns 
+- 0.1 ns
/home/sergey/tmp/cpython-dev/venv/bin/python: . 25.3 ns +- 
0.2 ns
Mean +- std dev: [/home/sergey/tmp/cpython-master/venv/bin/python] 26.3 ns +- 
0.1 ns -> [/home/sergey/tmp/cpython-dev/venv/bin/python] 25.3 ns +- 0.2 ns: 
1.04x faster (-4%)

$ python -m perf timeit -s "_len = iter(bytes(2**30)).__length_hint__" "_len()" 
--compare-to=../cpython-master/venv/bin/python --duplicate=1
/home/sergey/tmp/cpython-master/venv/bin/python: . 27.6 ns 
+- 0.1 ns
/home/sergey/tmp/cpython-dev/venv/bin/python: . 26.0 ns +- 
0.1 ns
Mean +- std dev: [/home/sergey/tmp/cpython-master/venv/bin/python] 27.6 ns +- 
0.1 ns -> [/home/sergey/tmp/cpython-dev/venv/bin/python] 26.0 ns +- 0.1 ns: 
1.06x faster (-6%)

--
components: Interpreter Core
messages: 349285
nosy: sir-sigurd
priority: normal
severity: normal
status: open
title: micro-optimization of PyLong_FromSize_t()
type: performance
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



[issue26131] Raise ImportWarning when loader.load_module() is used

2019-08-09 Thread Michael Anckaert


Michael Anckaert  added the comment:

I checked out the source (Lib/imp.py:219) and only see the docstring marking 
this method als Deprecated. No exceptions are being raised. 

I would like to work on this issue.

--
nosy: +michaelanckaert

___
Python tracker 

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



[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2019-08-09 Thread Kubilay Kocak


Change by Kubilay Kocak :


--
nosy: +koobs

___
Python tracker 

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



[issue37801] Compilation on MINGW64 fails (CODESET,wcstok,...)

2019-08-09 Thread Emmanuel Arias


Change by Emmanuel Arias :


--
nosy: +eamanu

___
Python tracker 

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



[issue37801] Compilation on MINGW64 fails (CODESET,wcstok,...)

2019-08-09 Thread Vadim Engelson


Vadim Engelson  added the comment:

(code from Python-3.8.0b3, but Python-3.7.2 had similar issues)

--

___
Python tracker 

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



[issue37801] Compilation on MINGW64 fails (CODESET,wcstok,...)

2019-08-09 Thread Vadim Engelson


New submission from Vadim Engelson :

Compilation on MINGW64 fails (CODESET,wcstok,...)
I am using the latest MINGW64 
(http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20190524.exe)
Versions: Python-3.7.2, Python-3.8.0b3

$ gcc -v
Using built-in specs.
COLLECT_GCC=C:\msys64\mingw64\bin\gcc.exe
COLLECT_LTO_WRAPPER=C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.1.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
gcc version 9.1.0 (Rev3, Built by MSYS2 project)

Result of make:

Python/initconfig.c: In function 'config_get_locale_encoding':
Python/initconfig.c:1427:28: error: implicit declaration of function 
'nl_langinfo' [-Werror=implicit-function-declaration]
 1427 | const char *encoding = nl_langinfo(CODESET);
  |^~~
Python/initconfig.c:1427:40: error: 'CODESET' undeclared (first use in this 
function); did you mean 'ECONNRESET'?
 1427 | const char *encoding = nl_langinfo(CODESET);
  |^~~
  |ECONNRESET
Python/initconfig.c:1427:40: note: each undeclared identifier is reported only 
once for each function it appears in
Python/initconfig.c: In function 'config_init_env_warnoptions':
Python/initconfig.c:1992:18: error: too many arguments to function 'wcstok'
 1992 | #  define WCSTOK wcstok
  |  ^~
Python/initconfig.c:2015:20: note: in expansion of macro 'WCSTOK'
 2015 | for (warning = WCSTOK(env, L",", );
  |^~
In file included from ./Include/Python.h:30,
 from Python/initconfig.c:1:
C:/msys64/mingw64/x86_64-w64-mingw32/include/string.h:147:20: note: declared 
here
  147 |   wchar_t *__cdecl wcstok(wchar_t * __restrict__ _Str,const wchar_t * 
__restrict__ _Delim) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
  |^~
Python/initconfig.c:1992:18: error: too many arguments to function 'wcstok'
 1992 | #  define WCSTOK wcstok
  |  ^~
Python/initconfig.c:2017:20: note: in expansion of macro 'WCSTOK'
 2017 |  warning = WCSTOK(NULL, L",", ))
  |^~
In file included from ./Include/Python.h:30,
 from Python/initconfig.c:1:
C:/msys64/mingw64/x86_64-w64-mingw32/include/string.h:147:20: note: declared 
here
  147 |   wchar_t *__cdecl wcstok(wchar_t * __restrict__ _Str,const wchar_t * 
__restrict__ _Delim) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
  |^~
cc1.exe: some warnings being treated as errors
make: *** [Makefile:1703: Python/initconfig.o] Error 1

--
components: Build, Interpreter Core, Windows
messages: 349282
nosy: paul.moore, steve.dower, tim.golden, vengelson, zach.ware
priority: normal
severity: normal
status: open
title: Compilation on MINGW64 fails (CODESET,wcstok,...)
type: compile error
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



[issue36402] threading._shutdown() race condition: test_threading test_threads_join_2() fails randomly

2019-08-09 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Please note that this fix appears to be the cause of #37788

--
nosy: +kristjan.jonsson

___
Python tracker 

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



[issue37800] Clean up the documentation on module attributes

2019-08-09 Thread Géry

Change by Géry :


--
assignee: docs@python
components: Documentation
nosy: docs@python, eric.snow, maggyero
priority: normal
pull_requests: 14923
severity: normal
status: open
title: Clean up the documentation on module attributes
type: enhancement
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



[issue37799] Renaming Doc/reference/ to Doc/language/

2019-08-09 Thread Géry

New submission from Géry :

The page https://docs.python.org/3/ lists these two parts:

- Library Reference
- Language Reference

So both parts are "references".

However in the cpython GitHub repository, the Doc/ directory contains these two 
directories:

- library/
- reference/

So to be consistent, shouldn't we rename the Doc/reference/ directory to 
Doc/language/?

--
assignee: docs@python
components: Documentation
messages: 349280
nosy: docs@python, maggyero
priority: normal
severity: normal
status: open
title: Renaming Doc/reference/ to Doc/language/
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



[issue37799] Renaming Doc/reference/ to Doc/language/

2019-08-09 Thread Géry

Change by Géry :


--
type:  -> enhancement

___
Python tracker 

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



[issue34155] email.utils.parseaddr mistakenly parse an email

2019-08-09 Thread miss-islington


miss-islington  added the comment:


New changeset 217077440a6938a0b428f67cfef6e053c4f8673c by Miss Islington (bot) 
in branch '3.8':
bpo-34155: Dont parse domains containing @ (GH-13079)
https://github.com/python/cpython/commit/217077440a6938a0b428f67cfef6e053c4f8673c


--

___
Python tracker 

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



[issue34155] email.utils.parseaddr mistakenly parse an email

2019-08-09 Thread miss-islington


miss-islington  added the comment:


New changeset c48d606adcef395e59fd555496c42203b01dd3e8 by Miss Islington (bot) 
in branch '3.7':
bpo-34155: Dont parse domains containing @ (GH-13079)
https://github.com/python/cpython/commit/c48d606adcef395e59fd555496c42203b01dd3e8


--

___
Python tracker 

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



[issue35181] Doc: Namespace Packages: Inconsistent documentation of __loader__ being None

2019-08-09 Thread Géry

Change by Géry :


--
pull_requests: +14922
pull_request: https://github.com/python/cpython/pull/15190

___
Python tracker 

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



[issue37764] email.Message.as_string infinite loop

2019-08-09 Thread Abhilash Raj


Change by Abhilash Raj :


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



[issue37764] email.Message.as_string infinite loop

2019-08-09 Thread Abhilash Raj


Abhilash Raj  added the comment:

This does look like a side-effect of the commit mentioned by mytran.

The issues seems to be that email._header_value_parser.get_unstructured 
wrongfully assumes that anything leading with '=?' would be a valid rfc 2047 
encoded word.

This is a smaller test case to reproduce this bug:

from email._header_value_parser import get_unstructured
get_unstructured('=?utf-8?q?FSaiz4vX3XMJPT4vrExGUZeOnp0o22pLBB7CYLH74Js=3DwOlK6Tfru2U47qR?=72OfyEY2p2/rA9xNFyvH+fBTCmazxwzF8nGkK6D')

--

___
Python tracker 

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



[issue37762] IDLE very slow due a super long line output in chunks

2019-08-09 Thread Bernhard Hiller


Bernhard Hiller  added the comment:

Please find enclosed a screen shot of the command line, when the same script is 
run there.
If you want to perform the tests yourself in order to get more information 
about the type of those characters, you may simply run the script mentioned in 
my first post.

Furthermore, when running the script from the Python command prompt, I see a 
process called "python.exe" (without "w") in the task manager, taking some 70% 
of CPU.

--
Added file: https://bugs.python.org/file48536/Python374-4.PNG

___
Python tracker 

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



[issue25172] Unix-only crypt should not be present on Windows.

2019-08-09 Thread Srinivas Nyayapati


Srinivas Nyayapati  added the comment:

When I try to put the skipUnless decorator on CryptTestCase, I am still seeing 
a failure when I try to run this. The error is -
File "C:\Users\srao\projects\cpython\lib\test\test_crypt.py", line 59, in 
CryptTestCase
@unittest.skipUnless(crypt.METHOD_SHA256 in crypt.methods or
AttributeError: 'NoneType' object has no attribute 'METHOD_SHA256'

Line 59 is the following decorator and method -
@unittest.skipUnless(crypt.METHOD_SHA256 in crypt.methods or
 crypt.METHOD_SHA512 in crypt.methods,
'requires support of SHA-2')
def test_sha2_rounds(self):

I tried a simple @skip decorator and that too fails on the same error. The 
class level skip is not helping here. Does it make sense to create a different 
test file for windows?

--

___
Python tracker 

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