[issue20483] Missing network resource checks in test_urllib2 & test_smtplib

2016-09-10 Thread Berker Peksag

Changes by Berker Peksag :


--
resolution:  -> works for me
stage: needs patch -> 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



[issue26081] Implement asyncio Future in C to improve performance

2016-09-10 Thread Guido van Rossum

Guido van Rossum added the comment:

Thanks! I can't review the whole thing, but I patched it in and tried running 
the asyncio/examples/crawl.py example, like so:

$ ~/src/cpython36/python.exe examples/crawl.py xkcd.com -q
Exception RuntimeError('yield was used instead of yield from in task > with ._call_check_cancel() at 
/Users/guido/src/cpython36/Lib/asyncio/futures.py:472]>',) for ('xkcd.com', 80)
ERROR:asyncio:Task exception was never retrieved
future:  exception=RuntimeError('yield was used instead of yield 
from in task > with ._call_check_cancel() at 
/Users/guido/src/cpython36/Lib/asyncio/futures.py:472]>',)>
Traceback (most recent call last):
  File "/Users/guido/src/cpython36/Lib/asyncio/tasks.py", line 241, in _step
result = coro.throw(exc)
  File "examples/crawl.py", line 778, in fetch
yield from fetcher.fetch()  # Fetcher gonna fetch.
  File "examples/crawl.py", line 507, in fetch
yield from self.request.connect()
  File "examples/crawl.py", line 315, in connect
self.port, self.ssl)
  File "examples/crawl.py", line 143, in get_connection
ipaddrs = yield from self.loop.getaddrinfo(host, port)
RuntimeError: yield was used instead of yield from in task > with ._call_check_cancel() at 
/Users/guido/src/cpython36/Lib/asyncio/futures.py:472]>
*** Report ***
http://xkcd.com no response object
Finished 0 urls in 0.041 secs (max_tasks=100) (0.000 urls/sec/task)
Todo: 0
Busy: 1
Done: 0
Date: Sat Sep 10 21:50:08 2016 local time
Traceback (most recent call last):
  File "examples/crawl.py", line 864, in 
main()
  File "examples/crawl.py", line 852, in main
loop.run_until_complete(crawler.crawl())  # Crawler gonna crawl.
  File "/Users/guido/src/cpython36/Lib/asyncio/base_events.py", line 438, in 
run_until_complete
return future.result()
  File "/Users/guido/src/cpython36/Lib/asyncio/tasks.py", line 241, in _step
result = coro.throw(exc)
  File "examples/crawl.py", line 766, in crawl
yield from self.termination.wait()
  File "/Users/guido/src/cpython36/Lib/asyncio/locks.py", line 326, in wait
yield from fut
RuntimeError: yield was used instead of yield from in task  
cb=[_run_until_complete_cb() at 
/Users/guido/src/cpython36/Lib/asyncio/base_events.py:164]> with 

Without your diff, that works, and the output includes this line:

Finished 1786 urls in 7.105 secs (max_tasks=100) (2.514 urls/sec/task)

--

___
Python tracker 

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



[issue23722] During metaclass.__init__, super() of the constructed class does not work

2016-09-10 Thread Nick Coghlan

Nick Coghlan added the comment:

And done - thanks for the patch Martin!

The one additional change needed was to increment the magic number for pyc 
files, as this changed the code emitted for class definitions.

I also picked up a latent defect in PC/launcher.c which hadn't been updated for 
the last couple of magic number bumps.

--
resolution:  -> fixed
stage: commit 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



[issue23722] During metaclass.__init__, super() of the constructed class does not work

2016-09-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset feb1ae9d5381 by Nick Coghlan in branch 'default':
Issue #23722: Initialize __class__ from type.__new__()
https://hg.python.org/cpython/rev/feb1ae9d5381

--
nosy: +python-dev

___
Python tracker 

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



[issue23722] During metaclass.__init__, super() of the constructed class does not work

2016-09-10 Thread Nick Coghlan

Nick Coghlan added the comment:

Reassigning to myself given Guido's +1

--
assignee: ned.deily -> ncoghlan
stage:  -> commit review
type:  -> behavior

___
Python tracker 

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



[issue20885] Little Endian PowerPC64 Linux

2016-09-10 Thread Berker Peksag

Changes by Berker Peksag :


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



[issue27680] Reduce Github pull request rate

2016-09-10 Thread Berker Peksag

Changes by Berker Peksag :


--
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue28022] SSL releated deprecation for 3.6

2016-09-10 Thread Nick Coghlan

Nick Coghlan added the comment:

That sounds like the "re" module would be a better exemplar for an SSL module 
convenience API design than "random" then - that has a similar model of needing 
an LRU cache for the compiled patterns for performance reasons, while still 
making working with the compiled form in your own code optional (which means 
you don't need to find a place to store it to gain the performance benefits of 
pattern reuse).

It would need to be a hidden cache, though - since SSLContext objects are 
mutable, it wouldn't be a good idea to expose any implicitly shared ones.

--

___
Python tracker 

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



[issue26081] Implement asyncio Future in C to improve performance

2016-09-10 Thread INADA Naoki

INADA Naoki added the comment:

Oh, I'm sorry.
I usually working on git, and convert git diff to hg diff when posting patch.

I've used `patch -p1` instead of `hg import --no-edit` to apply git patch into 
hg workdir.
I wonder if Rietveld accepts git diff format...

--
Added file: http://bugs.python.org/file44544/fastfuture.patch

___
Python tracker 

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



[issue28022] SSL releated deprecation for 3.6

2016-09-10 Thread Donald Stufft

Donald Stufft added the comment:

Thinking about that more, it's a bit harder than the Random module as well. The 
only state the random module has to worry about is the seed and internal state 
of the RNG.

However, many of the arguments to ssl.wrap_socket change the SSLContext options 
for things like what ciphers are active, what trust stores, etc. So we couldn't 
have a single SSLContext at the global level without removing those options 
from wrap_socket. Otherwise we'd need some sort of dict of SSLContexts that 
keyed off of the options passed to wrap_socket.

--

___
Python tracker 

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



[issue28022] SSL releated deprecation for 3.6

2016-09-10 Thread Donald Stufft

Donald Stufft added the comment:

An implicit global SSL Context? It kinda sounds a bit gross.

--

___
Python tracker 

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



[issue28022] SSL releated deprecation for 3.6

2016-09-10 Thread Nick Coghlan

Nick Coghlan added the comment:

I asked in more detail about this on the list, but my main question is why 
can't wrap_socket() be fixed by doing a rip-and-replace on its internals (e.g. 
by using a model similar to the one in random, where there's an implicit global 
Random instance that gets invoked if you use the module level API instead of 
creating your own instance), rather than having to tell users to change *their* 
code.

Like Random, I'd like to see SSLContext as a lower level implementation detail 
that's there for when people need it, but can be largely ignored if they just 
want the default behaviours (i.e. system trust store with python-dev specified 
SSL/TLS settings)

--

___
Python tracker 

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



[issue28074] Add Configuration file parser action

2016-09-10 Thread Chris Nyland

New submission from Chris Nyland:

I have recently developed a action for the argparse module that allows 
arguments to be read in from configuration files. It is different in 
functionality than the convert_arg_line_to_args in that the file path(s) is 
passed to the action and then opened. This allows a user to sub class the 
action and use which ever parser they chose. For a default option the action 
uses the built in configparser module. 

To implement it properly I had to adjust some of the code in the the parse 
functions of the ArgumentParser class. Namely I had to make the take_action 
function a method of the class so that it could be called by the action. I also 
had to make a few variables that were private to the function attributes of the 
class.

If the patch is accepted I would be willing to write some tests as well as 
documentation. This is my first time submitting a patch like this so any feed 
back would be appreciated. 

Adding it to the core library would seem to fit nicely into the batteries 
included idea of Python.

--
components: Library (Lib)
files: ConfigFileAction.patch
keywords: patch
messages: 275725
nosy: Chris Nyland
priority: normal
severity: normal
status: open
title: Add Configuration file parser action
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file44543/ConfigFileAction.patch

___
Python tracker 

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



[issue18233] SSLSocket.getpeercertchain()

2016-09-10 Thread Miroslav Shubernetskiy

Changes by Miroslav Shubernetskiy :


--
nosy: +miki725

___
Python tracker 

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



[issue26141] typing module documentation incomplete

2016-09-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7187d167abe8 by Guido van Rossum in branch 'default':
Issue #26141: Update docs for typing.py. Ivan Levkivskyi.
https://hg.python.org/cpython/rev/7187d167abe8

New changeset 1dc45beca118 by Guido van Rossum in branch '3.5':
Issue #26141: Update docs for typing.py. Ivan Levkivskyi. (Backport from the 
3.6 version)
https://hg.python.org/cpython/rev/1dc45beca118

New changeset 960a73507d4d by Guido van Rossum in branch 'default':
Issue #26141: Update docs for typing.py. Ivan Levkivskyi. (null merge 3.5->3.6)
https://hg.python.org/cpython/rev/960a73507d4d

--
nosy: +python-dev

___
Python tracker 

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



[issue26141] typing module documentation incomplete

2016-09-10 Thread Guido van Rossum

Guido van Rossum added the comment:

Thanks!

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue26141] typing module documentation incomplete

2016-09-10 Thread Guido van Rossum

Guido van Rossum added the comment:

I'll figure it out.

--

___
Python tracker 

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



[issue28073] Update documentation about None vs type(None) in typing

2016-09-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 75514816741a by Guido van Rossum in branch '3.5':
Issue #28073: Improve wording around None. Michael Lee.
https://hg.python.org/cpython/rev/75514816741a

New changeset 7a4a16a880a4 by Guido van Rossum in branch 'default':
Issue #28073: Improve wording around None. Michael Lee. (3.5->3.6)
https://hg.python.org/cpython/rev/7a4a16a880a4

--
nosy: +python-dev

___
Python tracker 

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



[issue28073] Update documentation about None vs type(None) in typing

2016-09-10 Thread Guido van Rossum

Guido van Rossum added the comment:

Thanks! Busy Saturday  night, right? :-)

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue26141] typing module documentation incomplete

2016-09-10 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

The patch contains docs for both new 3.6 features and missing 3.5:

ClassVar, Collection, plus also Sized, Hashable, DefaultDict, @overload, 
TYPE_CHECKING

Should I generate a separate patch for 3.5 with only 3.5 omissions?

--

___
Python tracker 

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



[issue28073] Update documentation about None vs type(None) in typing

2016-09-10 Thread Michael Lee

New submission from Michael Lee:

For some reason, the section of the typing docs about Optional stated that 
Optional[T] was equivalent to Union[T, type(None)]. While this is true, it's 
somewhat inconsistent and potentially confusing since everywhere else in the 
docs, we just use None.

This patch modifies that line to use Union[T, type(None)] instead, and moves 
the line explaining that None is special-cased to mean type(None) to the first 
usage of None as a type within the docs.

--
assignee: docs@python
components: Documentation
files: update-none-vs-type-none.patch
keywords: patch
messages: 275718
nosy: docs@python, gvanrossum, michael0x2a
priority: normal
severity: normal
status: open
title: Update documentation about None vs type(None) in typing
versions: Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file44542/update-none-vs-type-none.patch

___
Python tracker 

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



[issue26141] typing module documentation incomplete

2016-09-10 Thread Guido van Rossum

Guido van Rossum added the comment:

Most things mentioned by Ben have been added (thanks Michael Lee!), but it 
seems the 3.5 docs and the 3.6 docs have deviated more than they ought to. I 
guess updating the 3.6 docs is more urgent because of the upcoming 3.6b1 
release. I'll look later.

--

___
Python tracker 

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



[issue26141] typing module documentation incomplete

2016-09-10 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Here is the patch for some omissions in typing module documentation.

Guido, please take a look.

--
keywords: +patch
nosy: +gvanrossum
Added file: http://bugs.python.org/file44541/typing-doc.diff

___
Python tracker 

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



[issue27932] platform.win32_ver() leaks in 2.7.12

2016-09-10 Thread Eryk Sun

Eryk Sun added the comment:

The leak is due the pointer-type cache that ctypes.POINTER uses. The type the 
pointer refers to is used as the key. In this case, VS_FIXEDFILEINFO is created 
each time win32_ver is called, so the pointer-type cache grows without bound. 
Example leak:

>>> import psutil, platform
>>> proc = psutil.Process()
>>> proc.memory_info().rss
14704640
>>> for i in range(1):
... v = platform.win32_ver()
...
>>> proc.memory_info().rss
92704768
>>> for i in range(1):
... v = platform.win32_ver()
...
>>> proc.memory_info().rss
168861696

Clearing the cache followed by a collect() reclaims the leaked memory for the 
most part:

>>> import gc, ctypes
>>> gc.collect()
333
>>> proc.memory_info().rss
168849408
>>> ctypes._pointer_type_cache.clear()
>>> gc.collect()
74
>>> proc.memory_info().rss
20303872

It's a moot point, since Steve plans to re-implement this check in C, but the 
minimal change to fix this leak is to bypass the pointer-type cache by manually 
subclassing ctypes._Pointer:

class PVS_FIXEDFILEINFO(_Pointer):
_type_ = VS_FIXEDFILEINFO

pvi = PVS_FIXEDFILEINFO()

There's no more leak after this change:

>>> import psutil, platform
>>> proc = psutil.Process()
>>> proc.memory_info().rss
15450112
>>> for i in range(1):
... v = platform.win32_ver()
...
>>> proc.memory_info().rss
16592896
>>> for i in range(1):
... v = platform.win32_ver()
...
>>> proc.memory_info().rss
16601088

--
nosy: +eryksun

___
Python tracker 

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



[issue28072] Empty Strings are not parsed to None.

2016-09-10 Thread Ethan Furman

Ethan Furman added the comment:

Empty strings are empty strings, not None.

An better way for your code example would be:

def ...():
if url:
   
else:
   raise URLError(...URL cannot be empty...)

--
nosy: +ethan.furman
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue28072] Empty Strings are not parsed to None.

2016-09-10 Thread Decorater

Changes by Decorater :


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



[issue28072] Empty Strings are not parsed to None.

2016-09-10 Thread Decorater

New submission from Decorater:

I noticed that the Python interpreter does not interpret a empty string as None 
so I have to do this unclean workaround every time in functions that cannot 
have a empty string passed to them.

Here is some example Code I have to do to bypass this (the function itself):

def create_one(url):
if url == '':
url = None
if url is not None:
url_data = urllib.parse.urlencode(dict(url=url))
byte_data = str.encode(url_data)
ret = urllib.request.urlopen(API_CREATE, data=byte_data).read().strip()
almost_result = str(ret)
closer_result = almost_result.strip("b")
result = closer_result.strip("'")
return result
else:
URLError('The given URL Cannot be \'None\'.')

So yeah I suggest for the interpreter to interpret empty strings as None so 
that way it can cleanup some lines of trying to parse it to None which can be a 
lot of work. It also makes code simpler as well.

--
messages: 275713
nosy: Decorater
priority: normal
severity: normal
status: open
title: Empty Strings are not parsed to None.

___
Python tracker 

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



[issue28066] [Patch] Fix the ability to cross compile Python when doing a rebuild of importlib.h

2016-09-10 Thread Martin Panter

Martin Panter added the comment:

Can you get your importlib changes so they are compatible with a native build? 
If so, maybe you can build the frozen module with a native build rather than a 
cross build.

“freeze_importlib is built using the compiler for the target”: I may be 
mistaken, but I thought we recently prevented this from being cross-compiled: 
Issue 27641, revision bc677cb34889, Jul 2016. Your patch seems to be based 
ontop of this change. Perhaps you have found some way to bypass that 
cross-compilation detection logic.

The addition of $(FREEZE_IMPORTLIB) is a bit like the outdated 
cross-override.patch I once proposed for Issue 22625.

--
nosy: +martin.panter

___
Python tracker 

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



[issue28046] Remove the concept of platform-specific directories

2016-09-10 Thread Xavier de Gaye

Xavier de Gaye added the comment:

One of the test_sysconfig failed test is caused by the changes made in issue 
27917. I will fix it there. The other one is caused by a change in my android 
build setup that does not install anymore include/python3.6m/pyconfig.h, this 
is fixed now and the test does not fail anymore.

Pending code reviews, I will commit the patch after changing the env var name 
from _SYSCONFIGDATA_NAME to _PYTHON_SYSCONFIGDATA_NAME.

--
stage: patch review -> commit review

___
Python tracker 

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



[issue27358] BUILD_MAP_UNPACK_WITH_CALL is slow

2016-09-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch that gets rid of calculating intersections. I didn't make 
benchmarking still.

--
Added file: 
http://bugs.python.org/file44540/faster_build_map_unpack_with_call.patch

___
Python tracker 

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



[issue28070] 3.6 regression: re.compile not handling flags with X correctly

2016-09-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your report Chi Hsuan Yen!

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



[issue28070] 3.6 regression: re.compile not handling flags with X correctly

2016-09-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bee52e5f8fb1 by Serhiy Storchaka in branch 'default':
Issue #28070: Fixed parsing inline verbose flag in regular expressions.
https://hg.python.org/cpython/rev/bee52e5f8fb1

New changeset 842e75f0e592 by Serhiy Storchaka in branch '3.5':
Backported tests for issue #28070.
https://hg.python.org/cpython/rev/842e75f0e592

New changeset afc0d4478083 by Serhiy Storchaka in branch '2.7':
Backported tests for issue #28070.
https://hg.python.org/cpython/rev/afc0d4478083

--
nosy: +python-dev

___
Python tracker 

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



[issue25283] Make tm_gmtoff and tm_zone available on all platforms

2016-09-10 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
keywords: +patch
stage: needs patch -> commit review
Added file: http://bugs.python.org/file44539/issue25283.diff

___
Python tracker 

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



[issue25901] `make test` crashes in test_httpservers

2016-09-10 Thread Martin Panter

Changes by Martin Panter :


--
status: open -> pending

___
Python tracker 

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



[issue28071] Stop set.difference when set is empty

2016-09-10 Thread Terry J. Reedy

New submission from Terry J. Reedy:

Proposal from SO: in the iteration loop for 'myset.difference(iterable)', add 
equivalent of "if not myset: break'.
https://stackoverflow.com/questions/39378043/why-does-pythons-set-difference-method-take-time-with-an-empty-set

In the toy example for testing that this is currently not so, myset starts 
empty, but it was noted by the OP that a more realistic example would be that 
myset becomes empty after deletions.

Postulated reasons why not to do this (as opposed to why it has not been done 
yet ;-):

1) averaged over all uses, the time saved not iterating would be less than the 
time spent testing emptyness.

2) an implicit guarantee to complete the iteration for possible side-effects.

One answer notes that myset.difference(anotherset) is special-cased and faster 
than the equivalent non-set iterable.

I searched the tracker for 'empty set difference' and got no hits.  If I 
remember, I will post any disposition of this issue back to SO.

--
messages: 275707
nosy: rhettinger, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Stop set.difference when set is empty
type: performance
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue28070] 3.6 regression: re.compile not handling flags with X correctly

2016-09-10 Thread SilentGhost

SilentGhost added the comment:

I get normal behaviour on e3dbe8b7279a

--
nosy: +SilentGhost

___
Python tracker 

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



[issue28070] 3.6 regression: re.compile not handling flags with X correctly

2016-09-10 Thread Chi Hsuan Yen

New submission from Chi Hsuan Yen:

This test script:


import re

print(re.compile(r'(?ix)A').flags == re.I | re.X | re.U)
print(re.compile(r'(?ix)A').flags == re.X | re.U)
print(re.compile(r'(?im)A').flags == re.I | re.M | re.U)


gives False, True, True on default:b28b37de9470+. Python 3.5.2 gives True, 
False, True.

Seems re.compile does not handle flags with X correctly?

--
components: Regular Expressions
messages: 275705
nosy: Chi Hsuan Yen, ezio.melotti, mrabarnett, serhiy.storchaka
priority: normal
severity: normal
status: open
title: 3.6 regression: re.compile not handling flags with X correctly
type: behavior
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue19500] Add client-side SSL session resumption

2016-09-10 Thread Christian Heimes

Christian Heimes added the comment:

I have committed the feature with rudimentary documentation. I will provide 
more documentation and an example before 3.6.0b2.

--
assignee:  -> christian.heimes
components: +Documentation
priority: normal -> high

___
Python tracker 

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



[issue19500] Add client-side SSL session resumption

2016-09-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6f2644738876 by Christian Heimes in branch 'default':
Issue #19500: Add client-side SSL session resumption to the ssl module.
https://hg.python.org/cpython/rev/6f2644738876

--
nosy: +python-dev

___
Python tracker 

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



[issue27744] Add AF_ALG (Linux Kernel crypto) to socket module

2016-09-10 Thread Christian Heimes

Christian Heimes added the comment:

x86-64 Ubuntu 15.10 Skylake CPU 3.x is still blocking. It looks like I have to 
add another workaround for a Ubuntu quirk.

--

___
Python tracker 

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



[issue15883] Add Py_errno to work around multiple CRT issue

2016-09-10 Thread Christian Heimes

Christian Heimes added the comment:

It's no longer a problem with new VS.

--
resolution:  -> wont fix
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



[issue19763] Make it easier to backport statistics to 2.7

2016-09-10 Thread Christian Heimes

Changes by Christian Heimes :


--
resolution:  -> wont fix
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



[issue4558] ./configure --with-stdc89 to test ANSI C conformity

2016-09-10 Thread Christian Heimes

Changes by Christian Heimes :


--
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue28022] SSL releated deprecation for 3.6

2016-09-10 Thread Christian Heimes

Christian Heimes added the comment:

I have pushed all deprecation except ssl.wrap_socket(). Nick raised some 
concerns. I like to discourage people to use it because it hurts performance 
and is no longer best practice. How about we mark the function as legacy 
function and move it to a less prominent place in the documentation?

--

___
Python tracker 

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



[issue28022] SSL releated deprecation for 3.6

2016-09-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset aed3c541b2f1 by Christian Heimes in branch 'default':
Issue #28022: Deprecate ssl-related arguments in favor of SSLContext.
https://hg.python.org/cpython/rev/aed3c541b2f1

--
nosy: +python-dev

___
Python tracker 

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



[issue27350] Compact and ordered dict

2016-09-10 Thread Joshua Bronson

Changes by Joshua Bronson :


--
nosy: +jab

___
Python tracker 

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



[issue28068] Error in freeze.py due to unguarded sys.abiflags usage under Windows

2016-09-10 Thread SilentGhost

SilentGhost added the comment:

Here is the patch, I'm not sure if any more changes are needed there, so it 
would be good to test.

--
components: +Windows
keywords: +patch
nosy: +SilentGhost, paul.moore, steve.dower, tim.golden, zach.ware
stage:  -> patch review
type: compile error -> behavior
versions: +Python 3.6
Added file: http://bugs.python.org/file44538/28068.diff

___
Python tracker 

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



[issue23722] During metaclass.__init__, super() of the constructed class does not work

2016-09-10 Thread Guido van Rossum

Guido van Rossum added the comment:

Nick, if you feel like doing this, go ahead, either before or after
beta1 (but if you want to do it before please do it quickly).

(Off-topic: boy do I miss CI that triggers when you send a patch for review...)

On Sat, Sep 10, 2016 at 11:14 AM, Martin Teichmann
 wrote:
>
> Martin Teichmann added the comment:
>
> This is the originial patch rebased such that it applies to the current 
> master.
>
> As a detail in the discussion: "__classcell__" is not visible during the 
> execution of the class body, as it is added at the end of the class body. In 
> this regard, it is different from "__qualname__", which is set at the 
> beginning of the class body such that it may be changed.
>
> The new __classcell__ does show up, however, in the namespace parameter to 
> the __new__ method of the metaclass.
>
> --
> Added file: http://bugs.python.org/file44533/classcell.patch
>
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue28061] Python crashes on 'from test import support'

2016-09-10 Thread Emanuel Barry

Changes by Emanuel Barry :


--
components: +Windows
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



[issue28069] signalmodule.c does "is" comparisons for SIG_IGN and SIG_DFL

2016-09-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This was not a problem before 3.5 since IgnoreHandler and DefaultHandler were 
singletons exposed in the signal module as SIG_DFL and SIG_IGN. But in 
issue21076 they were converted to enums. This involves converting between enums 
and ints. All works only while SIG_DFL and SIG_IGN are small integers and there 
is small integer cache. I proposed either revert this change 
(signal_no_enum_handlers.patch in issue21076) or even make SIG_DFL and SIG_IGN 
non-integer singletons (issue23325).

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue28067] Do not call localtime (gmtime) in datetime module

2016-09-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c7e477fa9e09 by Alexander Belopolsky in branch 'default':
#28067: Fixed another typo.
https://hg.python.org/cpython/rev/c7e477fa9e09

--

___
Python tracker 

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



[issue28043] Sane defaults for SSLContext options and ciphers

2016-09-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1b4c5d06c028 by Christian Heimes in branch 'default':
Issue 28043: SSLContext has improved default settings
https://hg.python.org/cpython/rev/1b4c5d06c028

--
nosy: +python-dev

___
Python tracker 

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



[issue28043] Sane defaults for SSLContext options and ciphers

2016-09-10 Thread Christian Heimes

Changes by Christian Heimes :


--
assignee:  -> christian.heimes
stage: patch review -> commit review
status: open -> pending

___
Python tracker 

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



[issue28061] Python crashes on 'from test import support'

2016-09-10 Thread Emanuel Barry

Emanuel Barry added the comment:

I compiled, I got a "Python stopped working" during compiling (but it went on 
anyway), and then launched it from VS in Debugging mode. I did 'from test 
import support' and then it crashed. VS said this line was the faulty one, and 
didn't give me anything else useful (no call stack, no access to locals, etc.). 
I'm sadly not home until Monday, so I can't further investigate this.

--

___
Python tracker 

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



[issue28067] Do not call localtime (gmtime) in datetime module

2016-09-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5bdfe132e4ed by Alexander Belopolsky in branch 'default':
#28067: Fixed a typo.
https://hg.python.org/cpython/rev/5bdfe132e4ed

--

___
Python tracker 

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



[issue28067] Do not call localtime (gmtime) in datetime module

2016-09-10 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

> What is gmime_s?

A typo.  Should be gmtime_s.

--

___
Python tracker 

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



[issue28067] Do not call localtime (gmtime) in datetime module

2016-09-10 Thread Mark Dickinson

Mark Dickinson added the comment:

What is gmime_s?

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue28067] Do not call localtime (gmtime) in datetime module

2016-09-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8a504694d92f by Alexander Belopolsky in branch 'default':
Closes #28067: Do not call localtime (gmtime) in datetime module.
https://hg.python.org/cpython/rev/8a504694d92f

--
nosy: +python-dev
resolution:  -> fixed
stage: commit 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



[issue28067] Do not call localtime (gmtime) in datetime module

2016-09-10 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
title: Do not call localtime in datetime module -> Do not call localtime 
(gmtime) in datetime module

___
Python tracker 

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



[issue28069] signalmodule.c does "is" comparisons for SIG_IGN and SIG_DFL

2016-09-10 Thread Mark Dickinson

Mark Dickinson added the comment:

Also applies to 2.7, 3.5.

--
versions: +Python 2.7, Python 3.5

___
Python tracker 

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



[issue28069] signalmodule.c does "is" comparisons for SIG_IGN and SIG_DFL

2016-09-10 Thread Mark Dickinson

New submission from Mark Dickinson:

Modules/signalmodule.c contains this code:

if (handler == IgnoreHandler)
func = SIG_IGN;
else if (handler == DefaultHandler)
func = SIG_DFL;
...

Here IgnoreHandler and DefaultHandler are ints. The code above effectively does 
an "is" comparison with those ints, assuming that SIG_IGN and SIG_DFL are 
amongst the small interned ints.

--
messages: 275687
nosy: mark.dickinson
priority: normal
severity: normal
status: open
title: signalmodule.c does "is" comparisons for SIG_IGN and SIG_DFL
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



[issue28068] Error in freeze.py due to unguarded sys.abiflags usage under Windows

2016-09-10 Thread Gevorg Voskanyan

New submission from Gevorg Voskanyan:

Traceback (most recent call last):
  File ".../freeze.py", line 493, in 
main()
  File ".../freeze.py", line 222, in main
flagged_version = version + sys.abiflags
AttributeError: module 'sys' has no attribute 'abiflags'

--
components: Demos and Tools
messages: 275686
nosy: gevorg
priority: normal
severity: normal
status: open
title: Error in freeze.py due to unguarded sys.abiflags usage under Windows
type: compile error
versions: Python 3.5

___
Python tracker 

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



[issue27629] Cannot create ssl.SSLSocket without existing socket

2016-09-10 Thread Christian Heimes

Christian Heimes added the comment:

I'm considering to not fix this bug and rather remove the dead code. This 
feature was never documented and has been broken since 3.3, maybe earlier. It's 
also hard to use it correctly because you need to pass the correct socket 
family and type.

For 3.6 I'm planning to deprecate SSLSocket.__init__() in favor of 
SSLContext.wrap_socket() anyway. Please use 
https://docs.python.org/3/library/socket.html#socket.socket with fileno 
argument. It auto-detects the correct socket type and family.

--

___
Python tracker 

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



[issue28067] Do not call localtime in datetime module

2016-09-10 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
keywords: +patch
stage:  -> commit review
Added file: http://bugs.python.org/file44537/issue28067.diff

___
Python tracker 

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



[issue22627] Calling timestamp() on a datetime object modifies the timestamp of a different datetime object.

2016-09-10 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Superseded by #28067.

--
resolution:  -> duplicate
status: open -> closed
superseder:  -> Do not call localtime in datetime module

___
Python tracker 

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



[issue28059] Windows: test_platform.test_architecture_via_symlink() regression

2016-09-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 94563ec74e1d by Steve Dower in branch '3.5':
Closes #28059: Fixes test_platform to set PYTHONPATH for .pyd files
https://hg.python.org/cpython/rev/94563ec74e1d

New changeset 3ec4feb52a5b by Steve Dower in branch 'default':
Closes #28059: Fixes test_platform to set PYTHONPATH for .pyd files
https://hg.python.org/cpython/rev/3ec4feb52a5b

--
nosy: +python-dev
resolution:  -> fixed
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



[issue28059] Windows: test_platform.test_architecture_via_symlink() regression

2016-09-10 Thread Steve Dower

Steve Dower added the comment:

This bug is entirely because _ctypes cannot be found when we launch from the 
symlink without also setting PYTHONPATH.

I've already removed the import of _ctypes, but I'll also set PYTHONPATH in the 
test as there's no reason to require only builtins here.

--

___
Python tracker 

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



[issue25221] PyLong_FromLong() potentially returns irregular object when small_ints[] isn't used

2016-09-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9eb0f7762999 by Mark Dickinson in branch '3.5':
Issue #25221: Fix corrupted result from PyLong_FromLong(0) when Python is 
compiled with NSMALLPOSINTS = 0.
https://hg.python.org/cpython/rev/9eb0f7762999

New changeset c7b48798dbaa by Mark Dickinson in branch 'default':
Issue #25221: merge from 3.5.
https://hg.python.org/cpython/rev/c7b48798dbaa

--
nosy: +python-dev

___
Python tracker 

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



[issue25221] PyLong_FromLong() potentially returns irregular object when small_ints[] isn't used

2016-09-10 Thread Mark Dickinson

Mark Dickinson added the comment:

Thanks for the report! Fixed.

--
resolution:  -> fixed
stage: commit 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



[issue28067] Do not call localtime in datetime module

2016-09-10 Thread Alexander Belopolsky

New submission from Alexander Belopolsky:

POSIX localtime function mutates global state which leads to subtle bugs on 
some platforms.  We should call localtime_r or localtime_s instead.

See issue 22627.

--
assignee: belopolsky
messages: 275678
nosy: belopolsky
priority: normal
severity: normal
status: open
title: Do not call localtime in datetime module
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



[issue28060] Clean up division fast paths in Objects/longobject.c

2016-09-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The patch LGTM. I'll open separate issue for guaranteeing that a->ob_digit[0] 
is 0 in case of Py_SIZE(a) == 0 and using this fact for simplifying and 
optimizing the code.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue28046] Remove the concept of platform-specific directories

2016-09-10 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Much thanks! It's now building fine and running fine with my configuration. The 
test suite is still running and I believe there won't be more surprise than 
failed tests.

--

___
Python tracker 

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



[issue28064] String executed inside a function ignores global statements

2016-09-10 Thread Xiang Zhang

Xiang Zhang added the comment:

Not a bug. Put the global statement inside:

>>> variable = 'test'
>>> def changeVariable():
... exec("global variable; variable = 'newText'")
... 
>>> changeVariable()
>>> print(variable)
newText

--
nosy: +xiang.zhang
resolution:  -> not a bug
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



[issue28060] Clean up division fast paths in Objects/longobject.c

2016-09-10 Thread Mark Dickinson

Mark Dickinson added the comment:

Serhiy: thanks for the review. Replying here, since I get a 500 error every 
time I try to reply from Rietveld.

I'd rather not rely on either NSMALLPOSINTS > 0 or on digit 0 existing when 
Py_SIZE is 0. We don't rely on that elsewhere, and the code should stay simple 
where possible.

--

___
Python tracker 

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



[issue25221] PyLong_FromLong() potentially returns irregular object when small_ints[] isn't used

2016-09-10 Thread Mark Dickinson

Changes by Mark Dickinson :


--
assignee:  -> mark.dickinson
nosy: +mark.dickinson
stage:  -> commit review
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



[issue28066] [Patch] Fix the ability to cross compile Python when doing a rebuild of importlib.h

2016-09-10 Thread Ed Schouten

New submission from Ed Schouten:

For CloudABI 
(https://mail.python.org/pipermail/python-dev/2016-July/145708.html) we're 
providing packages containing a precompiled copy of Python. As we had to make 
some changes to importlib (namely to deal with directory file descriptors), we 
have to do a rebuild of importlib.h during the cross compilation process, using 
Programs/_freeze_importlib.

We've run into a couple of issues that require us to patch up the build system 
to make this work:

- First of all, Programs/_freeze_importlib is built using the compiler for the 
target. There is no way to override this. The OpenWRT folks have also run into 
this issue and have patched up the Makefile to add a $FREEZE_IMPORTLIB that 
allows you to use a different executable:

https://github.com/openwrt/packages/blob/master/lang/python3/patches/013-make-freeze-import-lib-into-an-override-able-var.patch

This patch is almost correct; it doesn't prevent _freeze_importlib from being 
built, which is needed in our case as it doesn't build cleanly on CloudABI.

- Second, if an out-of-tree build is performed, we need to make sure that 
Python/frozen.c imports the right copy of importlib.h. We must add -IPython to 
the compiler flags to realise.

Attached is a patch that contains the modifications that we've made to 
Makefile.pre.in to make cross compilation work for us.

--
components: Interpreter Core
files: patch-freeze-importlib
messages: 275674
nosy: EdSchouten
priority: normal
severity: normal
status: open
title: [Patch] Fix the ability to cross compile Python when doing a rebuild of 
importlib.h
versions: Python 3.7
Added file: http://bugs.python.org/file44536/patch-freeze-importlib

___
Python tracker 

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



[issue27932] platform.win32_ver() leaks in 2.7.12

2016-09-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset dbfcb3b9c3c1 by Steve Dower in branch '3.5':
Issue #27932: Backs out change
https://hg.python.org/cpython/rev/dbfcb3b9c3c1

--

___
Python tracker 

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



[issue27932] platform.win32_ver() leaks in 2.7.12

2016-09-10 Thread Steve Dower

Steve Dower added the comment:

Backed out because of issue28059. I'll rewrite this to properly use native code.

--
assignee:  -> steve.dower

___
Python tracker 

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



[issue27593] Deprecate sys._mercurial and create sys._git

2016-09-10 Thread Brett Cannon

Brett Cannon added the comment:

Here is a patch to add sys._git and update Py_GetBuildInfo() as necessary. I 
would like to see this in Python 3.6 as 3.6.0 will be released using Mercurial 
but (hopefully) subsequent releases will be on git, so any reviews will be 
appreciated.

I will hold off on removing sys._mercurial until 3.7 as that will be the first 
release that doesn't span version control systems.

--
keywords: +patch
nosy: +ned.deily
priority: normal -> release blocker
versions: +Python 3.6
Added file: http://bugs.python.org/file44535/issue27593.diff

___
Python tracker 

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



[issue28065] Update Windows build to xz-5.2.2

2016-09-10 Thread Zachary Ware

New submission from Zachary Ware:

Attached patch builds xz-5.2.2 ourselves rather than relying on pre-built 
binaries.  It copies the project file from xz and modifies it to fit our setup, 
so updates may not be a 3 line change like a sqlite3 update.

This is rather beta-quality, I'm sure there's some cleanup that can be done.  
If nobody gets a chance to look at it before tomorrow, I'm going to sneak it in 
anyway before b1.

--
assignee: zach.ware
components: Build, Windows
files: build_xz.diff
keywords: patch
messages: 275670
nosy: paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: patch review
status: open
title: Update Windows build to xz-5.2.2
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file44534/build_xz.diff

___
Python tracker 

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



[issue10342] trace module cannot produce coverage reports for zipped modules

2016-09-10 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
versions: +Python 3.7 -Python 3.5

___
Python tracker 

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



[issue9004] datetime.utctimetuple() should not set tm_isdst flag to 0

2016-09-10 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
versions: +Python 3.6 -Python 3.5

___
Python tracker 

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



[issue24693] zipfile: change RuntimeError to more appropriate exception type

2016-09-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Changed cases 3, 4, 5, 7, and 8.

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



[issue766910] fix one or two bugs in trace.py

2016-09-10 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
assignee: belopolsky -> 
versions: +Python 3.7 -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



[issue26885] Add parsing support for more types in xmlrpc

2016-09-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue9398] Unify sys.settrace and sys.setprofile tests

2016-09-10 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
assignee: belopolsky -> 
versions:  -Python 3.5

___
Python tracker 

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



[issue5516] equality not symmetric for subclasses of datetime.date and datetime.datetime

2016-09-10 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
versions: +Python 3.7 -Python 3.3

___
Python tracker 

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



[issue8915] Use locale.nl_langinfo in _strptime

2016-09-10 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
versions: +Python 3.7 -Python 3.4

___
Python tracker 

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



[issue15390] PEP 3121, 384 refactoring applied to datetime module

2016-09-10 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
assignee: belopolsky -> 
versions: +Python 3.7 -Python 3.4

___
Python tracker 

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



[issue2380] Raise a Py3K warning for catching nested tuples with non-BaseException exceptions

2016-09-10 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
assignee: belopolsky -> 
versions:  -Python 2.6, Python 2.7

___
Python tracker 

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



[issue24693] zipfile: change RuntimeError to more appropriate exception type

2016-09-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 22112359abcf by Serhiy Storchaka in branch 'default':
Issue #24693: Changed some RuntimeError's in the zipfile module to more
https://hg.python.org/cpython/rev/22112359abcf

--
nosy: +python-dev

___
Python tracker 

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



[issue28046] Remove the concept of platform-specific directories

2016-09-10 Thread Zachary Ware

Zachary Ware added the comment:

LGTM, thank you Xavier!

--

___
Python tracker 

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



[issue25969] Update lib2to3 grammar to include missing unpacking generalizations.

2016-09-10 Thread Gregory P. Smith

Gregory P. Smith added the comment:

Haha whoops, that'd be my debugging. I'll remove it this weekend if nobody
else has gotten to it.

On Sat, Sep 10, 2016, 9:44 AM Xiang Zhang  wrote:

>
> Xiang Zhang added the comment:
>
> Gregory, the change adds a print in:
> https://hg.python.org/cpython/file/tip/Lib/lib2to3/fixes/fix_reload.py#l29
>
> ./python -m test test_lib2to3
> Run tests sequentially
> 0:00:00 [1/1] test_lib2to3
> obj: Leaf(1, 'a')
> obj: Leaf(1, 'a')
> obj: Leaf(1, 'a')
> obj: Leaf(1, 'a')
> obj: Leaf(1, 'a')
> obj: Leaf(1, 'a')
> obj: Node(star_expr, [Leaf(16, '*'), Leaf(1, 'h')])
> obj: Node(argument, [Leaf(36, '**'), Leaf(1, 'i')])
> 1 test OK.
>
> Total duration: 12 sec
> Tests result: SUCCESS
>
> --
> nosy: +xiang.zhang
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue23722] During metaclass.__init__, super() of the constructed class does not work

2016-09-10 Thread Martin Teichmann

Martin Teichmann added the comment:

This is the originial patch rebased such that it applies to the current master.

As a detail in the discussion: "__classcell__" is not visible during the 
execution of the class body, as it is added at the end of the class body. In 
this regard, it is different from "__qualname__", which is set at the beginning 
of the class body such that it may be changed.

The new __classcell__ does show up, however, in the namespace parameter to the 
__new__ method of the metaclass.

--
Added file: http://bugs.python.org/file44533/classcell.patch

___
Python tracker 

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



[issue28046] Remove the concept of platform-specific directories

2016-09-10 Thread Xavier de Gaye

Xavier de Gaye added the comment:

With the attached patch, the python test suite runs smoothly on android and 
without errors on linux. On android, there are two new failed test cases in 
test_sysconfig that I will look into later (in the frame of this issue, I guess 
?), but otherwise about the same tests fail that were failing before.

Here are some details about the fix:

> Another problem is that the shared libraries names of the extension modules 
> are now suffixed with the wrong triplet.

This is because _init_posix() in Lib/distutils/sysconfig.py still imports the 
native python sysconfigdata module instead of the newly built one for the 
target host.

After _init_posix() is fixed, another problem occurs: extension modules are now 
built by including /usr/include from the native system and this leads to some 
unresolved dlopen references at run time on android. The reason is that 
add_gcc_paths() in setup.py calls sysconfig.get_config_var('CC') and this 
returns the native compiler instead of the cross-compiler.

So a solution is to set the _SYSCONFIGDATA_NAME environment variable in 
PYTHON_FOR_BUILD.

--
Added file: http://bugs.python.org/file44532/sysconfigdata_env_var.diff

___
Python tracker 

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



[issue28059] Windows: test_platform.test_architecture_via_symlink() regression

2016-09-10 Thread STINNER Victor

STINNER Victor added the comment:

> Though ctypes here is incorrect anyway. I really ought to rewrite it into the 
> winapi module.

I agree, it's much better to avoid ctypes in the stdlib.

--

___
Python tracker 

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



[issue24254] Make class definition namespace ordered by default

2016-09-10 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

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



[issue24254] Make class definition namespace ordered by default

2016-09-10 Thread Brett Cannon

Brett Cannon added the comment:

All reasonable points. You just sounded upset and I wanted to point out the 
decision was not made lightly, without discussion with the person in charge of 
the proposal and the BDFL, or we were breaking backwards-compatibility due to 
some drunken ordered dictionary stupor we were in. :)

Anyway, that's it and any further comments I have on this specific topic I'll 
put on the python-dev thread.

--

___
Python tracker 

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



[issue28059] Windows: test_platform.test_architecture_via_symlink() regression

2016-09-10 Thread Steve Dower

Steve Dower added the comment:

Though ctypes here is incorrect anyway. I really ought to rewrite it into the 
winapi module.

I'll revert the memory leak fix and fix the tests for b1, then look at 
converting it into a native function for b2.

--

___
Python tracker 

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



[issue24254] Make class definition namespace ordered by default

2016-09-10 Thread Nick Coghlan

Nick Coghlan added the comment:

While I hadn't read the related thread at the point where I made that comment 
(so thank you for at least raising the question there), I'm still on the 
opposite side of the planet, so any decision made in less than 24 hours from 
proposal to resolution is necessarily "too fast" for global collaboration (and 
48 hours is better).

I'm not particularly fond of __definition_order__ either, but one of the 
specific points raised in the PEP 520 discussions due to Inada-san's pending 
patch was whether or not making class namespaces ordered by default would 
eliminate the need for the attribute, and the conclusion was that it 
*wouldn't*. So the "We made class namespaces ordered, so now 
__definition_order__ is gone" sounded a lot like folks forgetting that part of 
the discussions, and instead getting rid of a feature that was there for 
multiple reasons, not just because __dict__ didn't preserve the order.

--

___
Python tracker 

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



  1   2   >