[issue32288] Inconsistent behavior with slice assignment?

2018-05-09 Thread Massimiliano Culpo

Massimiliano Culpo  added the comment:

Hi Serhiy,

I briefly checked out Python 3.7.0b3, and saw no changes with respect to:

   - Documenting what is the exact meaning of "extended slice" (but that
   now is also tracked by issue 32289)
   - Improving the docstring of list.insert (to say that [1, 2, 3,
   4].insert(-101, 0) is allowed?)
   - Fixing the inconsistent behavior for slices with step == -1

If I missed anything, please let me know. Otherwise, from my side, I think
it only depends on whether you want to track these issues (or even if you
consider any of the above an issue).

Cheers,

On Wed, May 9, 2018 at 11:33 AM, Serhiy Storchaka 
wrote:

>
> Serhiy Storchaka  added the comment:
>
> So this issue can be closed now?
>
> --
> nosy: +serhiy.storchaka
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling

2018-05-09 Thread Ned Deily

Ned Deily  added the comment:

> Ned, this is after the last beta but as far as I understand, we're still  
> fine committing fixes that maintain ABI until RC1, right?

Yes

--

___
Python tracker 

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



[issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling

2018-05-09 Thread Łukasz Langa

Change by Łukasz Langa :


--
Removed message: https://bugs.python.org/msg316344

___
Python tracker 

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



[issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling

2018-05-09 Thread Łukasz Langa

Łukasz Langa  added the comment:

Well, this is a rather big deal and I'd like to see it solved for 3.7.0. Ned, 
this is after the last beta but as far as I understand, we're still  fine 
committing fixes that maintain ABI until RC1, right?


Note that this isn't specific to the `annotations` future import. If a user 
actually writes:

  field: "ClassVar[SomeTypeReferencedLater]" = get_some_type_object()

the effect is the same.


There are two ways to solve it, the right way and the fast way.

The right way is to call `get_type_hints()` on the class which forces 
evaluation of all type annotations (including in base classes, if any). That 
way you can keep using your existing hack to check if a thing is a ClassVar. 
However, it's slow because it:

- forces evaluation of all type annotations at import time, which is even 
slower than without the `annotations` future import because now you're 
tokenizing, creating the AST and the code objects, too; and

- you force an import of typing for all users, regardless whether they use any 
annotations or not.


This is why attrs went with the fast way which covers most (but not all) bases 
in this case. If the annotation is a string, just check if it starts with 
"typing.ClassVar", "t.ClassVar", or just "ClassVar". That's a fast check and 
doesn't ever require importing typing.  On the flip side, the 0.001% of users 
[1]_ who import ClassVar differently, will not have their class variables 
recognized.

So, Eric, unless you really want to do the right thing here and make 
dataclasses forever slower to start up than attrs, I would be happy to provide 
you with a patch for this during sprints.



[1] .. Figure made up on the spot.

--

___
Python tracker 

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



[issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling

2018-05-09 Thread Łukasz Langa

Łukasz Langa  added the comment:

Well, this is a rather big deal and I'd like to see it solved for 3.7.0. Ned, 
this is after the last beta but as far as I understand, we're still 



Note that this isn't specific to the `annotations` future import. If a user 
actually writes:

  field: "ClassVar[SomeTypeReferencedLater]" = get_some_type_object()

the effect is the same.


There are two ways to solve it, the right way and the fast way.

The right way is to call `get_type_hints()` on the class which forces 
evaluation of all type annotations (including in base classes, if any). That 
way you can keep using your existing hack to check if a thing is a ClassVar. 
However, it's slow because it:

- forces evaluation of all type annotations at import time, which is even 
slower than without the `annotations` future import because now you're 
tokenizing, creating the AST and the code objects, too; and

- you force an import of typing for all users, regardless whether they use any 
annotations or not.


This is why attrs went with the fast way which covers most (but not all) bases 
in this case. If the annotation is a string, just check if it starts with 
"typing.ClassVar", "t.ClassVar", or just "ClassVar". That's a fast check and 
doesn't ever require importing typing.  On the flip side, the 0.001% of users 
[1]_ who import ClassVar differently, will not have their class variables 
recognized.

So, Eric, unless you really want to do the right thing here and make 
dataclasses forever slower to start up than attrs, I would be happy to provide 
you with a patch for this during sprints.



[1] .. Figure made up on the spot.

--
nosy: +ned.deily

___
Python tracker 

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



[issue33452] add user notification that parent init will not be called in dataclass init method

2018-05-09 Thread Rick Teachey

Rick Teachey  added the comment:

The init method that comes up for int, str, float, etc is just the object init:

assert int.__init__ is object.__init__

Probably the thing to do is grab any init methods that aren't the 
object.__init__ while stripping out the dataclass-created init methods? Maybe 
something like:

import warnings

if cls.__dataclass_params__.init:
for pcls in cls.mro():
if pcls.__init__ is not object.__init__:
try:
d_params = getattr(pcls, "__dataclass_params__")
except AttributeError:
warnings.warn('Found a not called init')
else:
if not d_params.init:
warnings.warn('Found a custom dataclass init')

--

___
Python tracker 

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



[issue27675] IDLE file completion has 2 bugs depending on open quote used

2018-05-09 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Thanks, Terry!

I'm able to recreate the autocomplete issue on Windows 7 using 3.6.3, but not 
on Ubuntu.  As you said, the color issue seems fine now for both platforms.

I'll take a look at those other issues for the test cases.

--

___
Python tracker 

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



[issue33452] add user notification that parent init will not be called in dataclass init method

2018-05-09 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



[issue16733] Solaris ctypes_test failures

2018-05-09 Thread Greg Onufer

Greg Onufer  added the comment:

Or probably just change the type of the bitfield from "int" to "signed int"!

--

___
Python tracker 

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



[issue33452] add user notification that parent init will not be called in dataclass init method

2018-05-09 Thread Eric V. Smith

Eric V. Smith  added the comment:

I'm okay with the concept, but I don't know how to implement it. You need to 
not only know if a class has a __init__, but also if it's expected to be called.

For example, these don't normally get called, but if you inherit from them (and 
everyone does inherit from object) you don't want a warning.

>>> hasattr(int, '__init__')
True
>>> hasattr(object, '__init__')
True

I'm open to ideas.

--

___
Python tracker 

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



[issue21983] segfault in ctypes.cast

2018-05-09 Thread miss-islington

miss-islington  added the comment:


New changeset 8ac158a6dfb86880e22003afe0ff39ec31b0a094 by Miss Islington (bot) 
in branch '3.6':
bpo-21983: Fix a crash in ctypes.cast() when passed a ctypes structured data 
type (GH-3859)
https://github.com/python/cpython/commit/8ac158a6dfb86880e22003afe0ff39ec31b0a094


--
nosy: +miss-islington

___
Python tracker 

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



[issue33453] from __future__ import annotations breaks dataclasses ClassVar and InitVar handling

2018-05-09 Thread Eric V. Smith

Eric V. Smith  added the comment:

This is a known issue, but it wasn't being tracked here. So, thanks for opening 
the issue.

https://github.com/ericvsmith/dataclasses/issues/92#issuecomment-382473127

Not to put Łukasz on the spot (he's sitting behind me even as we speak), but I 
think we missed the window for 3.7.0 for this. I'll discuss it with him.

--
nosy: +lukasz.langa
title: from __future__ import annotations breaks dataclasses ClassVar handling 
-> from __future__ import annotations breaks dataclasses ClassVar and InitVar 
handling

___
Python tracker 

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



[issue21983] segfault in ctypes.cast

2018-05-09 Thread Steve Dower

Steve Dower  added the comment:

The backport to 2.7 needs some help. I can't do it on my laptop for the next 
week, but I'll try to get to it eventually. Feel free to get there first.

--
versions: +Python 3.6

___
Python tracker 

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



[issue21983] segfault in ctypes.cast

2018-05-09 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6434

___
Python tracker 

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



[issue21983] segfault in ctypes.cast

2018-05-09 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6433
stage: backport needed -> patch review

___
Python tracker 

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



[issue33453] from __future__ import annotations breaks dataclasses ClassVar handling

2018-05-09 Thread Rick Teachey

Rick Teachey  added the comment:

Sorry, mean to say it works just fine *without* the import.

--

___
Python tracker 

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



[issue21983] segfault in ctypes.cast

2018-05-09 Thread Steve Dower

Change by Steve Dower :


--
assignee:  -> steve.dower
stage: patch review -> backport needed
versions: +Python 3.8 -Python 3.4

___
Python tracker 

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



[issue33453] from __future__ import annotations breaks dataclasses ClassVar handling

2018-05-09 Thread Rick Teachey

Rick Teachey  added the comment:

To be clear: it works just fine with the annotations import.

--

___
Python tracker 

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



[issue21983] segfault in ctypes.cast

2018-05-09 Thread Steve Dower

Steve Dower  added the comment:


New changeset d518d8bc8d5dac1a1270612f424d33e0e5afc2b5 by Steve Dower (Oren 
Milman) in branch 'master':
bpo-21983: Fix a crash in ctypes.cast() when passed a ctypes structured data 
type (GH-3859)
https://github.com/python/cpython/commit/d518d8bc8d5dac1a1270612f424d33e0e5afc2b5


--
nosy: +steve.dower

___
Python tracker 

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



[issue33453] from __future__ import annotations breaks dataclasses ClassVar handling

2018-05-09 Thread Rick Teachey

New submission from Rick Teachey :

This is broken in 3.7 (both beta 3 and 4):

from __future__ import annotations
from dataclasses import dataclass
from typing import ClassVar, Any

@dataclass
class C():
class_var: ClassVar[Any] = object()
data: str

Traceback:

Traceback (most recent call last):
  File "", line 1, in 
  File 
"C:\Users\ricky\AppData\Local\Programs\Python\Python37\lib\dataclasses.py", 
line 850, in dataclass
return wrap(_cls)
  File 
"C:\Users\ricky\AppData\Local\Programs\Python\Python37\lib\dataclasses.py", 
line 842, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash, frozen)
  File 
"C:\Users\ricky\AppData\Local\Programs\Python\Python37\lib\dataclasses.py", 
line 763, in _process_class
else 'self',
  File 
"C:\Users\ricky\AppData\Local\Programs\Python\Python37\lib\dataclasses.py", 
line 442, in _init_fn
raise TypeError(f'non-default argument {f.name!r} '
TypeError: non-default argument 'data' follows default argument

--
components: Library (Lib)
messages: 316333
nosy: Ricyteach, eric.smith
priority: normal
severity: normal
status: open
title: from __future__ import annotations breaks dataclasses ClassVar handling
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



[issue33015] Fix function cast warning in thread_pthread.h

2018-05-09 Thread Steve Dower

Steve Dower  added the comment:

Can't we just fix the cast? We shouldn't have to do heap allocations for this.

--
nosy: +steve.dower

___
Python tracker 

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



[issue33452] add user notification that parent init will not be called in dataclass init method

2018-05-09 Thread Rick Teachey

New submission from Rick Teachey :

The dataclasses module is incredibly easy to use. This is a good thing. BUT one 
downside is it will definitely be utilized by people who don't have a thorough 
understanding of how it does what it does.

Even for me, despite having a very good understanding of how it works, after 
heavily using it on a project for about 3 weeks now I made a mistake like the 
one below:

class ImportantMixin:
def __init__(self):
super().__init__()
important_task()

@dataclass
class NaiveDClass(ImportantMixin):
  data1 = int
  data2 = int

I then went on along my merry way. Obviously, ImportantMixin.__init__ never 
gets called and I didn't realize this until it was a bigger problem than it 
should have been (should have written better tests! but I digress).

It would seem like a good idea for the dataclasses module to let the user know 
they did this, probably via the warning system. Seems like it would be 
relatively easy to do: if there is an init method being create, just inspect 
the MRO for any previously defined init methods that weren't created by 
dataclasses.

Thanks.

--
components: Library (Lib)
messages: 316331
nosy: Ricyteach, eric.smith
priority: normal
severity: normal
status: open
title: add user notification that parent init will not be called in dataclass 
init method
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



[issue33451] Start pyc file lock the file

2018-05-09 Thread Jean-Louis Tamburini

New submission from Jean-Louis Tamburini :

Python v3.6.4:d48eceb
Windows 10.0.16299

I search on Internet and I don't find why Python Interpreter (v3.6.4) do that. 
With python 2.7, I don't have this "problem".

When I launch script like : 
c:\Python364\python.exe compile.py
While the execution, I can rename/modify the file "compile.py". 

But, when I compile the file to .pyc (with py_compile with an another script), 
and I launch the pyc like :
c:\Python364\python.exe dummy.pyc
While the execution, I CAN'T rename/modify the file because is locked by Python 
Interpreter. 

It's normal ?

--
components: Interpreter Core
messages: 316330
nosy: Jean-Louis Tamburini
priority: normal
severity: normal
status: open
title: Start pyc file lock the file
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue33294] Support complex expressions for py-print command.

2018-05-09 Thread Martin Liška

Martin Liška  added the comment:

May I please ping patch review..

--

___
Python tracker 

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



[issue33450] unexpected EPROTOTYPE returned by sendto on MAC OSX

2018-05-09 Thread Richard C

New submission from Richard C :

The following exception is raised unexpectedly on macOS versions 10.13, 10.12 & 
10.11 at least. It appears to be macOS specific (works okay on Linux).

Further information can be found at the following links:
https://github.com/benoitc/gunicorn/issues/1487
http://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/

[2017-03-20 00:46:39 +0100] [79068] [ERROR] Socket error processing request.
Traceback (most recent call last):
  File 
"/Users/ahmad/Projects/Side-Gigs/sa7beh-app/venv/lib/python3.6/site-packages/gunicorn-19.7.0-py3.6.egg/gunicorn/workers/async.py",
 line 66, in handle
six.reraise(*sys.exc_info())
  File 
"/Users/ahmad/Projects/Side-Gigs/sa7beh-app/venv/lib/python3.6/site-packages/gunicorn-19.7.0-py3.6.egg/gunicorn/six.py",
 line 625, in reraise
raise value
  File 
"/Users/ahmad/Projects/Side-Gigs/sa7beh-app/venv/lib/python3.6/site-packages/gunicorn-19.7.0-py3.6.egg/gunicorn/workers/async.py",
 line 56, in handle
self.handle_request(listener_name, req, client, addr)
  File 
"/Users/ahmad/Projects/Side-Gigs/sa7beh-app/venv/lib/python3.6/site-packages/gunicorn-19.7.0-py3.6.egg/gunicorn/workers/ggevent.py",
 line 152, in handle_request
super(GeventWorker, self).handle_request(*args)
  File 
"/Users/ahmad/Projects/Side-Gigs/sa7beh-app/venv/lib/python3.6/site-packages/gunicorn-19.7.0-py3.6.egg/gunicorn/workers/async.py",
 line 129, in handle_request
six.reraise(*sys.exc_info())
  File 
"/Users/ahmad/Projects/Side-Gigs/sa7beh-app/venv/lib/python3.6/site-packages/gunicorn-19.7.0-py3.6.egg/gunicorn/six.py",
 line 625, in reraise
raise value
  File 
"/Users/ahmad/Projects/Side-Gigs/sa7beh-app/venv/lib/python3.6/site-packages/gunicorn-19.7.0-py3.6.egg/gunicorn/workers/async.py",
 line 115, in handle_request
resp.write(item)
  File 
"/Users/ahmad/Projects/Side-Gigs/sa7beh-app/venv/lib/python3.6/site-packages/gunicorn-19.7.0-py3.6.egg/gunicorn/http/wsgi.py",
 line 362, in write
util.write(self.sock, arg, self.chunked)
  File 
"/Users/ahmad/Projects/Side-Gigs/sa7beh-app/venv/lib/python3.6/site-packages/gunicorn-19.7.0-py3.6.egg/gunicorn/util.py",
 line 321, in write
sock.sendall(data)
  File 
"/Users/ahmad/Projects/Side-Gigs/sa7beh-app/venv/lib/python3.6/site-packages/gevent-1.2.1-py3.6-macosx-10.12-x86_64.egg/gevent/_socket3.py",
 line 418, in sendall
data_sent += self.send(data_memory[data_sent:], flags)
  File 
"/Users/ahmad/Projects/Side-Gigs/sa7beh-app/venv/lib/python3.6/site-packages/gevent-1.2.1-py3.6-macosx-10.12-x86_64.egg/gevent/_socket3.py",
 line 391, in send
return _socket.socket.send(self._sock, data, flags)
OSError: [Errno 41] Protocol wrong type for socket

--
components: IO, macOS
messages: 316328
nosy: ned.deily, racitup, ronaldoussoren
priority: normal
severity: normal
status: open
title: unexpected EPROTOTYPE returned by sendto on MAC OSX
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



[issue33449] Documentation for email.charset confusing about the location of constants

2018-05-09 Thread Francois Labelle

New submission from Francois Labelle :

When mentioning the constants contained in the module email.charset, the 
documentation prefixes them with "Charset", for example: Charset.QP, 
Charset.BASE64, Charset.SHORTEST. This suggests that the constants can be found 
on the class "Charset" (uppercase first letter) in the module, while they are 
in fact contained in the the "charset" (lowercase first letter) module itself.

This is probably a left-over from when the module was called email.Charset (in 
2.2 I believe). Under Python 2.7, while the documentation uses the same 
nomenclature, at least the module is also importable under the name 
email.Charset so it makes more sense.

--
assignee: docs@python
components: Documentation
messages: 316327
nosy: Francois Labelle, docs@python
priority: normal
severity: normal
status: open
title: Documentation for email.charset confusing about the location of constants
type: enhancement
versions: Python 2.7, Python 3.4, 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



[issue33448] Output_Typo_Error

2018-05-09 Thread Mark Dickinson

Mark Dickinson  added the comment:

I can't reproduce. I'm looking at 
https://docs.python.org/3.6/tutorial/introduction.html#strings, and when I test 
things in Python 3.6.5, I see exactly the same output as given in the 
documentation:

Python 3.6.5 (default, Mar 29 2018, 15:37:32) 
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> '"Isn\'t," she said.'
'"Isn\'t," she said.'
>>> '"Isn\'t," she said.'
'"Isn\'t," she said.'
>>> print('"Isn\'t," she said.')
"Isn't," she said.

Please could you clarify? Perhaps you could copy and paste from an example 
interpreter session on your machine showing what you're seeing?

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue33448] Output_Typo_Error

2018-05-09 Thread vishva patel

New submission from vishva patel :

There is an out[ut typo error in the documentation of python in the module (An 
Informal Introductio To Python) 3.1.2 section Strings the first example last 
output the output of:
>>>Isn\'t is given as Isn\t #but it shuld be
>>>Isn\'t
Isn't

so fix it

--
messages: 316325
nosy: vishva_11
priority: normal
severity: normal
status: open
title: Output_Typo_Error
type: resource usage

___
Python tracker 

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



[issue33419] Add functools.partialclass

2018-05-09 Thread Neil Girdhar

Neil Girdhar  added the comment:

It seems like Python doesn't do very well with dynamically-generated classes.

For that reason, I'm losing interest on this feature.

Is there any interest in merging the documentation changes here: 
https://bugs.python.org/review/33419/diff/20050/Doc/library/functools.rst ?

I think we should use the terminology "partial function application" (see 
https://en.wikipedia.org/wiki/Partial_application) rather than "partial 
function".

Also, the existing paragraphs change subject from talking about the library 
function (e.g., partial) to the function returned by the library function, 
which is confusing.  I thought we should break them up.

Finally, the term "freezing" an interface is a bit weird since Python uses 
freezing in other another context to mean immutable (frozenset), and the 
interface returned by partial is overridable.

Also, I realize I didn't wait very long, but I think it would be best in the 
future to register one's "–1" on pyhton-ideas before someone embarks on 
implementing something everyone else approved.  This also happened with PEP 448 
too after I'd worked on it for weeks, and it was very frustrating.

Anyway, feel free to close.  If this keeps coming up over the next few years, 
someone else can work from this patch.

--

___
Python tracker 

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



[issue30167] site.main() does not work on Python 3.6 and superior if PYTHONSTARTUP is set

2018-05-09 Thread steverweber

Change by steverweber :


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

___
Python tracker 

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



[issue16733] Solaris ctypes_test failures

2018-05-09 Thread Mark Lawrence

Change by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue33038] GzipFile doesn't always ignore None as filename

2018-05-09 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



[issue33414] Make shutil.copytree use os.scandir to take advantage of cached is_(dir|file|symlink)

2018-05-09 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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



[issue33038] GzipFile doesn't always ignore None as filename

2018-05-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset afe5f633e49e0e873d42088ae56819609c803ba0 by Serhiy Storchaka (Bo 
Bayles) in branch '2.7':
bpo-33038: Fix gzip.GzipFile for file objects with a non-string name attribute. 
(GH-6095)
https://github.com/python/cpython/commit/afe5f633e49e0e873d42088ae56819609c803ba0


--

___
Python tracker 

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



[issue32626] Subscript unpacking raises SyntaxError

2018-05-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Issue32117 looks considering a more general question about iterable unpacking.

--
nosy: +serhiy.storchaka
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Tuple unpacking in return and yield statements

___
Python tracker 

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



[issue33311] cgitb: remove parentheses when the error is in module

2018-05-09 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue33311] cgitb: remove parentheses when the error is in module

2018-05-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 8cf4b34b3665b8bb39ea7111e6b5c3410899d3e4 by Serhiy Storchaka 
(sblondon) in branch 'master':
bpo-33311: Do not display parameters displayed in parentheses for module call. 
(GH-6677)
https://github.com/python/cpython/commit/8cf4b34b3665b8bb39ea7111e6b5c3410899d3e4


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue13525] Tutorial: Example of Source Code Encoding triggers error

2018-05-09 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.6, Python 3.7, Python 3.8 -Python 3.2, Python 3.3

___
Python tracker 

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



[issue13525] Tutorial: Example of Source Code Encoding triggers error

2018-05-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset d7e783b17feaedbe0f5b30467cb7f43cefadf904 by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-13525: Fix incorrect encoding name in the tutorial example. 
(GH-6738). (GH-6744)
https://github.com/python/cpython/commit/d7e783b17feaedbe0f5b30467cb7f43cefadf904


--

___
Python tracker 

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



[issue32288] Inconsistent behavior with slice assignment?

2018-05-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

So this issue can be closed now?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue32189] SyntaxError for yield expressions inside comprehensions & genexps

2018-05-09 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



[issue32055] Reconsider comparison chaining for containment tests

2018-05-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

On other hand, beginners are confused even by chained "==". There are regular 
reports about this on the tracker and questions on Python-related resources.

I have found the chained "in" is useful in the following case

len(string) >= 2 and string[0] == string[-1] in ("'", '"')

for testing if the string is quoted with a single or double quotes.

--

___
Python tracker 

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



[issue13525] Tutorial: Example of Source Code Encoding triggers error

2018-05-09 Thread miss-islington

miss-islington  added the comment:


New changeset fa40fc0593012893e447875632e9ed3df277561f by Miss Islington (bot) 
in branch '3.6':
bpo-13525: Fix incorrect encoding name in the tutorial example. (GH-6738)
https://github.com/python/cpython/commit/fa40fc0593012893e447875632e9ed3df277561f


--

___
Python tracker 

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



[issue13525] Tutorial: Example of Source Code Encoding triggers error

2018-05-09 Thread miss-islington

miss-islington  added the comment:


New changeset 834ea12ca6478d73a337ce52f33660f6f174 by Miss Islington (bot) 
in branch '3.7':
bpo-13525: Fix incorrect encoding name in the tutorial example. (GH-6738)
https://github.com/python/cpython/commit/834ea12ca6478d73a337ce52f33660f6f174


--
nosy: +miss-islington

___
Python tracker 

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



[issue6673] Uncaught comprehension SyntaxError eats up all memory

2018-05-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

"yield" in comprehensions is deprecated in 3.7:

../issue6673.py:22: DeprecationWarning: 'yield' inside list comprehension
  target.send([ (yield) for i in range(chunk_size) ])

and an error in 3.8:

  File "../issue6673.py", line 22
target.send([ (yield) for i in range(chunk_size) ])
 ^
SyntaxError: 'yield' inside list comprehension

--
nosy: +serhiy.storchaka
resolution:  -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder:  -> yield expression inside generator expression does nothing

___
Python tracker 

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



[issue13525] Tutorial: Example of Source Code Encoding triggers error

2018-05-09 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +6431

___
Python tracker 

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



[issue13525] Tutorial: Example of Source Code Encoding triggers error

2018-05-09 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6430

___
Python tracker 

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



[issue13525] Tutorial: Example of Source Code Encoding triggers error

2018-05-09 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6429

___
Python tracker 

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



[issue13525] Tutorial: Example of Source Code Encoding triggers error

2018-05-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset ddb6215a55b0218b621d5cb755e9dfac8dab231a by Serhiy Storchaka in 
branch 'master':
bpo-13525: Fix incorrect encoding name in the tutorial example. (GH-6738)
https://github.com/python/cpython/commit/ddb6215a55b0218b621d5cb755e9dfac8dab231a


--

___
Python tracker 

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



[issue26701] Documentation for int constructor mentions __int__ but not __trunc__

2018-05-09 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +6428

___
Python tracker 

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



[issue13525] Tutorial: Example of Source Code Encoding triggers error

2018-05-09 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue13525] Tutorial: Example of Source Code Encoding triggers error

2018-05-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Error message was fixed. In all supported versions it is:

$ ./python cp_1252broken.py
  File "cp_1252broken.py", line 1
SyntaxError: encoding problem: cp-1252

But the tutorial still contains non-working example. This is an easy issue, but 
it was open for long time.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue27675] IDLE file completion has 2 bugs depending on open quote used

2018-05-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I believe the report in August 2016 was about the time of the preliminary.0a4 
release, months before the final 3.6.0 release.  Something could have easily 
changed after.

I should have been more detailed and accurate is what I wrote.  In paragraph 2, 
I said I observed the color bug with ' or '''.  In paragraph 4, I said that the 
color bug depended on the number rather than type of quote.  The later was 
accurate.

My C: directory contains a Logs directory.  If in 3.5.4, I type '/, the / is 
green and the selction box appears.  When I type L, the L is green and the 
selection moves to Logs.  When I type o, the o is white (I am using IDLEDark).  
Or if I backspace and type L, the L is white.  Or if I move with the cursor, 
the inserted word is white.

This is not true in 3.6.5.  The color bug seems fixed.  The autocompletion 
window, which handles interaction when the window is open, was patched in 
#24570 for a Mac-specific bug.

The completion bug remains in 3.6.5 and newer.  If I type '/L' or '''/L''', L 
is not completed to Logs and the box does not disappear. The opposite is true 
for " and """.  "/L" completes to "/Logs" and the box goes away.  Also, "/L/ 
completes to "/Logs/, leaving the box open for selection of a subdirectory.  
"// does not complete to the first item in the box -- at least one action is 
needed.

The effect of // is analogous to .. in attribute completion.  []. brings up the 
box.  A second . completes the selected name and brings up a new box with 
subattributes.  This does not require an inbetween action.

Cheryl, is this clear enough to reproduce?  It is possible that Linux does not 
have the bug.  It should be in autocomplete_w.py and we already know that this 
has system-specific behavior.

I would be reluctant do anything beyond trivial without improving the 
autocomplete tests.  I added #30348 and #30666 as dependencies, at least for 
the present. This issue is a dependency master autocompletion issue #27609.

--
dependencies: +IDLE: Add test_autocomplete unittest, IDLE: add tests for 
autocomplete window.

___
Python tracker 

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



[issue27609] IDLE completions: format, factor, and fix

2018-05-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

In re-verifying #27675, the color bug seems to be gone.  The completion bug is 
still here, at least on Windows.

It would be good to sort the issues by whether they appear to affect 
autocomplete.py or autocomplete_w.py or both.

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