[issue2528] Change os.access to check ACLs under Windows

2015-05-23 Thread eryksun

eryksun added the comment:

In msg243815 you asked me to look over this patch. I hope this helps.

For GetFileSecurity you need to also request LABEL_SECURITY_INFORMATION. To 
test this in Vista+, use a file in the root directory of the system drive. This 
will inherit a high integrity level w/ no write up, which denies write access 
to a medium integrity (non-elevated) process. If you don't include the label 
information, the check will erroneously claim a non-elevated token has write 
access. 

You can set a file's integrity level to high using `icacls filename 
/setintegritylevel High`. This prevents write up. You can prevent read up and 
execute up by using the Windows API directly, or with other administration 
tools such as chml.

As a performance tweak you could get the file security with an initial buffer 
of 512 bytes. That should be big enough for most file security descriptors. I'd 
use PyMem_RawRealloc in a do loop (i.e. starting with pSD == NULL and cbSD == 
512). It should set PyExc_MemoryError on failure.

Regarding ImpersonateSelf, what if the thread is already impersonating? That's 
the token the kernel will actually use when checking access. Given that, I'd 
try OpenThreadToken, and only if it fails call ImpersonateSelf. Then 
RevertToSelf immediately after the 2nd OpenThreadToken call. Reverting doesn't 
have to be delayed until after the check. An alternative to ImpersonateSelf is 
to manually duplicate the process token as an impersonation token (i.e. 
OpenProcessToken; DuplicateToken). The benefit of this approach is that the 
duplicated token can be cached in a static variable.

For the access check itself, use the FILE_GENERIC_* / FILE_ALL_ACCESS 
constants, which are the standard and specific rights for the corresponding 
GENERIC_* rights. These include the standard READ_CONTROL and SYNCHRONIZE 
rights that are required for accessing files.

Also, there's no need to call MapGenericMask here, since you know that 
access_desired doesn't contain any generic rights.

Finally, for backward compatibility this new implementation should default to 
using only the old file-attribute check. Chaining to the ACL-based check should 
require a keyword-only argument such as "use_acl".

--
nosy: +eryksun
versions: +Python 3.5 -Python 3.4

___
Python tracker 

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



[issue24195] Add `Executor.filter` to concurrent.futures

2015-05-23 Thread Ram Rachum

Ram Rachum added the comment:

Raymond: Thank you. So the discussion is back on adding a recipe to the docs.

Brian: When I said "possible issues", I followed that with a couple of issues 
with the example I uploaded (filter_example.py).

--

___
Python tracker 

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



[issue24195] Add `Executor.filter` to concurrent.futures

2015-05-23 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Petr Viktorin

New submission from Petr Viktorin:

Here is the implementation for the recently accepted PEP 489.

Tested on Linux.

--
files: pep0489.patches
messages: 243893
nosy: encukou, eric.snow, ncoghlan
priority: normal
severity: normal
status: open
title: PEP 489 -- Multi-phase extension module initialization
Added file: http://bugs.python.org/file39470/pep0489.patches

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Petr Viktorin

Petr Viktorin added the comment:

And here are all changes in a single patch.

--
keywords: +patch
Added file: http://bugs.python.org/file39471/pep0489.patch

___
Python tracker 

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



[issue24056] Better expose closure, generator & coroutine status of functions

2015-05-23 Thread Nick Coghlan

Nick Coghlan added the comment:

I've also come to agree with Raymond that the repr may not be the best place 
for this additional information, and have updated the issue title accordingly.

For example, as one possible alternative, we might be able to put something in 
the inspect module (e.g. "inspect.callable_info()") that's a higher level 
alternative to "dis.code_info()".

The information displayed could potentially include:

- the object's repr
- the str() of the callable's signature (presented with the name or qualname if 
it has one)
- the names and current repr of any captured closure variables

More controversially, it might include an inferred return type annotation when 
there's no explicit annotation to display (defaulting to "typing.Any", but 
potentially more explicit if it's possible to tell from the code object flags 
that calling it will return a Coroutine or Generator)

--
title: Expose closure & generator status in function repr() -> Better expose 
closure, generator & coroutine status of functions

___
Python tracker 

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



[issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET)

2015-05-23 Thread Nick Coghlan

Nick Coghlan added the comment:

+1 from me.

--
nosy: +larry, rkuska

___
Python tracker 

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



[issue2528] Change os.access to check ACLs under Windows

2015-05-23 Thread Tim Golden

Tim Golden added the comment:

Thanks for the very thorough review. This isn't going to make it into 
3.5, but I'll rework it in the light of your comments and see if people 
are happy with it in the optional argument variation.

--

___
Python tracker 

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



[issue24267] test_venv.EnsurePipTest.test_with_pip version conflict

2015-05-23 Thread Nick Coghlan

Nick Coghlan added the comment:

There's two issues here:

1. The bundled pip should be upgraded to the recently released 7.0 (I believe 
we can do that after beta 1, due to the different-from-normal guidelines set up 
in PEP 453)

2. Neither the tests nor ensurepip itself should be touching the network by 
default, so we need to change the way we implicitly invoke pip to ensure the 
"up to date" check is disabled (it will still get triggered the first time a 
user invokes pip normally)

--
nosy: +larry

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Nick Coghlan

Nick Coghlan added the comment:

I'll get this merged tonight so we make the beta1 deadline, but I expect the 
initial docs to be fairly rudimentary and requiring further updates.

--
assignee:  -> ncoghlan
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



[issue24267] test_venv.EnsurePipTest.test_with_pip triggers version check over network

2015-05-23 Thread Martin Panter

Martin Panter added the comment:

Actually looks like I should have updated before I opened this bug. I just 
updated and I suspect revision 29b95625a07c (“Merge 3.4 into default, upgrading 
pip to 7.0.1”, a large binary change) fixed it for me.

But I did wonder why removing -unetwork didn’t affect the result, so perhaps we 
can leave this bug open to address that aspect. Feel free to clarify if I got 
the title wrong.

--
title: test_venv.EnsurePipTest.test_with_pip version conflict -> 
test_venv.EnsurePipTest.test_with_pip triggers version check over network

___
Python tracker 

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



[issue23377] HTTPResponse may drop buffer holding next response

2015-05-23 Thread Martin Panter

Martin Panter added the comment:

Thanks for the reviewing. Here is http-buffer.v3.patch:

* Merged with current code
* Better HTTPResponse(sock) compatibility suggested by Demian
* New HTTPConnection.request(close=True) feature also suggested by Demian. This 
sends “Connection: close” in the request, and arranges for the response to be 
detached from the HTTPConnection instance, making some hacks in urllib.request 
redundant.

--
Added file: http://bugs.python.org/file39472/http-buffer.v3.patch

___
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

2015-05-23 Thread Nick Coghlan

Nick Coghlan added the comment:

types.prepare_class() also needs to be updated to use OrderedDict() by default.

--
dependencies: +Add OrderedDict written in C

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-05-23 Thread Nick Coghlan

Nick Coghlan added the comment:

I'd suggest also taking a look into whether or not the PEP 412 keysharing might 
be causing problems.

--
nosy: +ncoghlan

___
Python tracker 

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



[issue23509] Speed up Counter operators

2015-05-23 Thread Jörn Hees

Jörn Hees added the comment:

> I'm closing this because the OP's original concern about wanting an in-place 
> operation was already solved

Was it? Are you referring to http://bugs.python.org/issue13121 ?

My main concern was that += is considerably slower than .update(), kind of 
catching me off-guard. As you closed this, i'd be very happy if you could maybe 
add a note to the docs 
https://docs.python.org/3/_sources/library/collections.txt that points this 
behavior out. Maybe by changing this:

* The multiset methods are designed only for use cases with positive values.
  The inputs may be negative or zero, but only outputs with positive values
  are created.  There are no type restrictions, but the value type needs to
  support addition, subtraction, and comparison.

* The :meth:`elements` method requires integer counts.  It ignores zero and
  negative counts.


to this:

* The multiset methods (``+``, ``-`` and ``+=``, ``-=``) are designed only
  for use cases with positive values.
  The inputs may be negative or zero, but only outputs with positive values
  are created.  There are no type restrictions, but the value type needs to
  support addition, subtraction, and comparison.

* Because of the necessary additional checks for positive values, a ``c += 
d``
  can be considerably slower than a ``c.update(d)``.

* The :meth:`elements` method requires integer counts.  It ignores zero and
  negative counts.

--

___
Python tracker 

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



[issue23965] test_ssl failure on Fedora 22

2015-05-23 Thread Nick Coghlan

Nick Coghlan added the comment:

Digging into the test_options failure suggests Christian is right (although I 
think it has more to do with 
https://fedoraproject.org/wiki/Changes/CryptoPolicy than it does with FIPS):

>>> ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
>>> bin(ctx.options)
'0b10110011'
>>> bin(ssl.OP_ALL | ssl.OP_NO_SSLv2)
'0b10010011'
>>> bin(ssl.OP_ALL | ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3)
'0b10110011'

The tests' assumptions about the default SSL configuration are out of date, so 
the tests have started failing on F22. We should like check the default options 
to see if they turn off SSLv3 when test_ssl is imported, and use that as a 
check to skip affected tests (as well as to adjust what test_options checks for 
as the default state)

--
nosy: +ncoghlan

___
Python tracker 

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



[issue24260] TabError behavior doesn't match documentation

2015-05-23 Thread Stefan Krah

Stefan Krah added the comment:

I would go further and forbid tabs after spaces entirely. Tabs
used for indentation with spaces following for formatting are
okay (though unusual in Python).

--
nosy: +skrah

___
Python tracker 

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



[issue24260] TabError behavior doesn't match documentation

2015-05-23 Thread Mark Lawrence

Mark Lawrence added the comment:

>From https://www.python.org/dev/peps/pep-0008/


Tabs or Spaces?
Spaces are the preferred indentation method.

Tabs should be used solely to remain consistent with code that is already 
indented with tabs.

Python 3 disallows mixing the use of tabs and spaces for indentation.

Python 2 code indented with a mixture of tabs and spaces should be converted to 
using spaces exclusively.

When invoking the Python 2 command line interpreter with the -t option, it 
issues warnings about code that illegally mixes tabs and spaces. When using -tt 
these warnings become errors. These options are highly recommended!


--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue24260] TabError behavior doesn't match documentation

2015-05-23 Thread Stefan Krah

Stefan Krah added the comment:

Then pep-008 is wrong, too, since the implementation *does* allow
Evgeny's example.

The current implementation just checks if the same INDENT/DEDENT
tokens are generated for tab widths 1 and 8.

--

___
Python tracker 

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



[issue24269] Few improvements to the collections documentation

2015-05-23 Thread Dmitry Kazakov

New submission from Dmitry Kazakov:

collections.Counter: Formatted the code in the "See also" section.

collections.deque.remove: "Removed the first occurrence of value." -> "Remove 
..."

collections.deque.index (a followup from issue23704):

Changed [, end] to [, stop] in the signature, because the implementation and 
the docstring of deque.index use 'stop'. Also, adapted the brief explanation 
from the Common Sequence Operations table.

https://docs.python.org/3/library/stdtypes.html#common-sequence-operations

--
assignee: docs@python
components: Documentation
files: collections_doc.diff
keywords: patch
messages: 243909
nosy: docs@python, vlth
priority: normal
severity: normal
status: open
title: Few improvements to the collections documentation
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file39473/collections_doc.diff

___
Python tracker 

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



[issue23237] Interrupts are lost during readline PyOS_InputHook processing (reopening)

2015-05-23 Thread Martin Panter

Changes by Martin Panter :


--
nosy: +vadmium

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Nick Coghlan

Nick Coghlan added the comment:

Attached patch is the one I'm looking to commit, but -R 3:3 shows significant 
reference leaks in test_importlib, and possible problems in other tests as well.

I'm about to revert it to see if there were any pre-existing refleak issues 
before applying this.

--
Added file: 
http://bugs.python.org/file39474/pep0489-multiphase-extension-module-import-v2.patch

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Nick Coghlan

Nick Coghlan added the comment:

Initial implementation checked in at 
https://hg.python.org/cpython/rev/e729b946cc03

Larry, FYI regarding the refleak in test_importlib I just committed: as 
described in the commit message, I'm pretty sure it's a real refleak in the 
current PEP 489 implementation, it's just a beast to track down because there 
are a lot of moving parts when it comes to module cleanup, especially for 
extension modules.

Aside from that, the tests all pass, so I hope you're OK with my checking it in 
its current state for beta 1, with the aim of fixing the bug for beta 2 (I 
would have asked first, but time zones intervened - I'm about to head to bed, 
and I expect you'll have closed 3.5 to new features by the time I get up)

--
nosy: +larry

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Nick Coghlan

Nick Coghlan added the comment:

Regarding the extraneous whitespace changes in modsupport.h, those are courtesy 
of running "make patchcheck" as part of preparing the commit.

--

___
Python tracker 

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



[issue24267] test_venv.EnsurePipTest.test_with_pip triggers version check over network

2015-05-23 Thread Donald Stufft

Donald Stufft added the comment:

Yea, I already upgraded pip. I did forget that we'll want to add 
--disable-pip-version-check to the pip invocation inside of ensurepip.

--

___
Python tracker 

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



[issue24270] PEP 485 (math.isclose) implementation

2015-05-23 Thread Nick Coghlan

New submission from Nick Coghlan:

Tracking issue for the PEP 485 math.isclose() implementation: 
https://www.python.org/dev/peps/pep-0485/

Chris's implementation review request to python-dev: 
https://mail.python.org/pipermail/python-dev/2015-May/140031.html

Working repo: https://github.com/PythonCHB/close_pep

--
messages: 243914
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: PEP 485 (math.isclose) implementation
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



[issue16991] Add OrderedDict written in C

2015-05-23 Thread Eric Snow

Eric Snow added the comment:

Good point, Nick.  I'd checked that earlier but did not see any relationship.  
At this point it's worth checking again. :)

--

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Petr Viktorin

Petr Viktorin added the comment:

Fix some refleaks

- one in PyModule_FromDefAndSpec2 - this is my fault
- one in PyType_FromSpecWithBases - I guess this is
the first time PEP-384 built-in types are GC'd
- one in the new PEP 489 tests

There's still one more in the new testing module, _testmultiphase. I'm working 
on it.

--
Added file: http://bugs.python.org/file39475/refleak-fix.patch

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7f2e6f236202 by Nick Coghlan in branch 'default':
Issue #24268: Address some PEP 489 refleaks
https://hg.python.org/cpython/rev/7f2e6f236202

--
nosy: +python-dev

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Nick Coghlan

Nick Coghlan added the comment:

Thanks, that reduces the refleaks shown for "./python -m test -R3:3 
test_importlib" from 102 to 50 for me.

However, I suspect there may still be a leak in the machinery, as I'm still 
seeing the total number of objects growing when importing the array module and 
then dropping the references to it:

$ ./python -X showrefcount
Python 3.5.0a4+ (default:e729b946cc03+, May 24 2015, 00:58:18) 
[GCC 5.1.1 20150422 (Red Hat 5.1.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
[54384 refs, 15894 blocks]
>>> import array; del array; del sys.modules['array']
[54654 refs, 15974 blocks]
>>> import array; del array; del sys.modules['array']
[54695 refs, 15986 blocks]
>>> import array; del array; del sys.modules['array']
[54736 refs, 15997 blocks]
>>> import array; del array; del sys.modules['array']
[54777 refs, 16008 blocks]
>>> import array; del array; del sys.modules['array']
[54818 refs, 16019 blocks]
>>> import array; del array; del sys.modules['array']
[54859 refs, 16030 blocks]

--

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Nick Coghlan

Nick Coghlan added the comment:

Once we sort these out, any that impact Python 3.4 (like the 
PyType_FromSpecAndBases one) should be backported to the maintenance branch.

I wouldn't assume the one you found in PyType_FromSpecAndBases is the only one, 
though - I believe the tests for this PEP are managing to exercise parts of the 
module cleanup machinery that it's never been practical to properly test in the 
past.

And now I really am heading to bed :)

--

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Petr Viktorin

Petr Viktorin added the comment:

The array module is good if you *really* drop references:

$ ./python -X showrefcount
Python 3.5.0a4+ (default, May 23 2015, 16:44:38) 
[GCC 4.9.2 20150212 (Red Hat 4.9.2-6)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys, gc
[54618 refs, 15960 blocks]
>>> import array; del array; del sys.modules['array']; gc.collect()
6
[54851 refs, 15973 blocks]
>>> import array; del array; del sys.modules['array']; gc.collect()
6
[54851 refs, 15973 blocks]
>>> import array; del array; del sys.modules['array']; gc.collect()
6
[54851 refs, 15973 blocks]

There is a cycle between a each built-in function and its module. Modules 
aren't optimized for being unloaded.

--

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Petr Viktorin

Petr Viktorin added the comment:

FWIW, the remaining refleak occurs when unloading an extension module object. 
This is something that wasn't possible before PEP 489 -- extension modules were 
never deleted.

--

___
Python tracker 

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



[issue24271] Python site randomly scrolls up when on mobile.

2015-05-23 Thread Ram Rachum

New submission from Ram Rachum:

I was trying to read this page:

https://www.python.org/dev/peps/pep-0492/#acceptance

On my mobile. (Nexus 5, chrome.) But when scrolling down the page, the browser 
sometimes scrolls up to the top of the page. This makes reading very annoying 
because I have to find the place I was reading at every time it does that.

--
assignee: docs@python
components: Documentation
messages: 243922
nosy: cool-RR, docs@python
priority: normal
severity: normal
status: open
title: Python site randomly scrolls up when on mobile.
type: behavior

___
Python tracker 

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



[issue24269] Few improvements to the collections documentation

2015-05-23 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: docs@python -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue24271] Python site randomly scrolls up when on mobile.

2015-05-23 Thread Ned Deily

Ned Deily added the comment:

Problems with the python.org website are tracked at 
https://github.com/python/pythondotorg/issues.  This is a duplicate of 
https://github.com/python/pythondotorg/issues/531.

--
nosy: +ned.deily
resolution:  -> third party
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



[issue22931] cookies with square brackets in value

2015-05-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 710cdba13323 by Benjamin Peterson in branch '3.2':
allow square brackets in cookie values (closes #22931)
https://hg.python.org/cpython/rev/710cdba13323

New changeset c7b3a50a2f01 by Benjamin Peterson in branch '3.3':
merge 3.2 (#22931)
https://hg.python.org/cpython/rev/c7b3a50a2f01

New changeset a43f5515e3a2 by Benjamin Peterson in branch '3.4':
merge 3.3 (#22931)
https://hg.python.org/cpython/rev/a43f5515e3a2

New changeset c58f3e76dc6c by Benjamin Peterson in branch 'default':
merge 3.4 (#22931)
https://hg.python.org/cpython/rev/c58f3e76dc6c

New changeset 2a7b0e145945 by Benjamin Peterson in branch '2.7':
allow square brackets in cookie values (#22931)
https://hg.python.org/cpython/rev/2a7b0e145945

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



[issue24269] Few improvements to the collections documentation

2015-05-23 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Thanks for the patch.  I've applied all of it except for the expansion of code 
in the multiset example where I've keep the style of the itertools recipes.

--

___
Python tracker 

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



[issue24269] Few improvements to the collections documentation

2015-05-23 Thread Raymond Hettinger

Changes by Raymond Hettinger :


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



[issue24269] Few improvements to the collections documentation

2015-05-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4d92ce08de6a by Raymond Hettinger in branch 'default':
Issue #24269: Minor doc fixups.
https://hg.python.org/cpython/rev/4d92ce08de6a

--
nosy: +python-dev

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a811f5561c99 by Steve Dower in branch 'default':
Issue #24268: Fixes generation of init import name on Windows.
https://hg.python.org/cpython/rev/a811f5561c99

--

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Steve Dower

Steve Dower added the comment:

For the sake of getting things running again, I went ahead and fixed the format 
string in dynload_win.c. Feel free to change it again if that isn't what was 
intended.

--
nosy: +steve.dower

___
Python tracker 

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



[issue23970] Update distutils.msvccompiler for VC14

2015-05-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b2ee6206fa5e by Steve Dower in branch 'default':
Issue #23970: Adds distutils._msvccompiler for new Visual Studio versions.
https://hg.python.org/cpython/rev/b2ee6206fa5e

--
nosy: +python-dev

___
Python tracker 

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



[issue24204] string.strip() documentation is misleading

2015-05-23 Thread Carol Willing

Carol Willing added the comment:

Updated patch with Terry's suggested changes. Thanks Terry and Raymond for the 
review of the initial patch.

--
Added file: http://bugs.python.org/file39476/iss24204b.patch

___
Python tracker 

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



[issue23970] Update distutils.msvccompiler for VC14

2015-05-23 Thread Steve Dower

Changes by Steve Dower :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue24204] string.strip() documentation is misleading

2015-05-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 367e3923532f by Raymond Hettinger in branch 'default':
Issue #24204:  Elaborate of the str.strip() documentation.
https://hg.python.org/cpython/rev/367e3923532f

--
nosy: +python-dev

___
Python tracker 

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



[issue24204] string.strip() documentation is misleading

2015-05-23 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
status: open -> closed

___
Python tracker 

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



[issue24204] string.strip() documentation is misleading

2015-05-23 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: docs@python -> rhettinger
resolution:  -> fixed
stage: patch review -> resolved

___
Python tracker 

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



[issue14373] C implementation of functools.lru_cache

2015-05-23 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Serhiy, go ahead and apply your patch, lru_cache2.patch.  I'll fix-up the 
make_key() code after the beta1 (like the pure python version, it needs to 
guarantee that hash is called no more than once per key).

--
assignee: rhettinger -> serhiy.storchaka

___
Python tracker 

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



[issue21718] sqlite3 cursor.description seems to rely on incomplete statement parsing for detection

2015-05-23 Thread Tom Tanner

Tom Tanner added the comment:

is this going to be fixed in 2.7.10?

--

___
Python tracker 

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



[issue21114] wsgiref.simple_server doesn't handle multi-line headers correctly

2015-05-23 Thread Tom Tanner

Tom Tanner added the comment:

The patch is waiting for inclusion in 2.7.10 :/

--

___
Python tracker 

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



[issue23509] Speed up Counter operators

2015-05-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The OrderedCounter recipe doesn't support well multiset operations, because the 
result type is hardcoded to Counter. The order is already scrambled. update() 
and substract() don't work well with overloaded __missing__().

Proposed implementations of __add__ and __or__ simplify the code. If you don't 
want that overloaded inplace operation affect non-inplace operations (I 
consider this rather as a benefit), Counter.__iadd__(result, other) can be used 
instead of result += other.

Optimized __neg__ just contains inlined substraction (note that current 
implementation of __neg__ and __pos__ violate the open-closed-principle), with 
removed no-op code.

My second step would be to add C implementation of _keep_positive(), because 
this function is used in a number of multiset methods. It could be more 
efficient and preserve the order.

In any case thank you for spending your time Raymond.

--

___
Python tracker 

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



[issue23970] Update distutils.msvccompiler for VC14

2015-05-23 Thread Benjamin Peterson

Benjamin Peterson added the comment:

b2ee6206fa5e broke every non-Windows buildbot. 
http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%203.x/builds/3229/steps/test/logs/stdio

--
nosy: +benjamin.peterson
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue24209] Allow IPv6 bind in http.server

2015-05-23 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag
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



[issue23970] Update distutils.msvccompiler for VC14

2015-05-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 32e6123f9f8c by Steve Dower in branch 'default':
Issue #23970: Fixes bdist_wininst not working on non-Windows platform.
https://hg.python.org/cpython/rev/32e6123f9f8c

--

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Petr Viktorin

Petr Viktorin added the comment:

Thank you, Steve.
A similar problem is on other platforms as well. This patch should fix it; 
could someone look at it?

--
Added file: http://bugs.python.org/file39477/fix-dynload-init-name.patch

___
Python tracker 

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



[issue14373] C implementation of functools.lru_cache

2015-05-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 57776eee74f2 by Serhiy Storchaka in branch 'default':
Issue #14373: Added C implementation of functools.lru_cache().  Based on
https://hg.python.org/cpython/rev/57776eee74f2

--
nosy: +python-dev

___
Python tracker 

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



[issue14373] C implementation of functools.lru_cache

2015-05-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks Raymond.

I tried to write an implementation with locking, but it would be too 
complicated (much more complex than all proposed before patches), because 
recursive locks are needed. In any case I think that GIL is enough here. 
Locking in Python implementation is needed for atomic modifying linked list.

--

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Steve Dower

Steve Dower added the comment:

That patch looks good to me. Totally didn't think to look for copy-paste 
issues...

--

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Larry Hastings

Larry Hastings added the comment:

If it makes sense, can you guys check it in soon, like in real-time here?  I 
tag 3.5 beta 1 in about an hour, and since this is a "bug-fix" it's legitimate 
to go in.

--

___
Python tracker 

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



[issue2528] Change os.access to check ACLs under Windows

2015-05-23 Thread Paul Moore

Changes by Paul Moore :


--
nosy: +paul.moore

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Petr Viktorin

Petr Viktorin added the comment:

Steve, could you please merge it?

--

___
Python tracker 

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



[issue23973] PEP 484 implementation

2015-05-23 Thread Guido van Rossum

Guido van Rossum added the comment:

This was committed (rev 3e96d7ca3f51). I'm keeping this open because there is 
more to do (see https://github.com/ambv/typehinting/labels/bug).

--
priority: release blocker -> normal

___
Python tracker 

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



[issue24272] PEP 484 docs

2015-05-23 Thread Guido van Rossum

Changes by Guido van Rossum :


--
stage:  -> needs patch
type:  -> enhancement

___
Python tracker 

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



[issue24272] PEP 484 docs

2015-05-23 Thread Guido van Rossum

New submission from Guido van Rossum:

Would be nice if there were more docs for the typing module (PEP 484). Looking 
for volunteers. (There's stuff in the PEP that can serve as a starting point.)

Note: support for isinstance() and issubclass() will be withdrawn in beta 2.

--
assignee: docs@python
components: Documentation
messages: 243945
nosy: docs@python, gvanrossum
priority: normal
severity: normal
status: open
title: PEP 484 docs
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



[issue23973] PEP 484 implementation

2015-05-23 Thread Guido van Rossum

Guido van Rossum added the comment:

I've opened a separate bug (http://bugs.python.org/issue24272) for docs.

--

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7b5f5f8b26a6 by Steve Dower in branch 'default':
Issue #24268: Fix import naming when loading extension modules. Patch by Petr 
Viktorin.
https://hg.python.org/cpython/rev/7b5f5f8b26a6

--

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Mark Lawrence

Mark Lawrence added the comment:

error C2079: 'PyModuleDef_Type' uses undefined struct '_typeobject' 
c:\cpython\include\moduleobject.h is occurring on both 32 and 64 bit release 
builds on Windows 8.1 VS2015.  I don't know what is causing it but figured I'd 
better flag it up pronto, and as you guys are here...

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Steve Dower

Steve Dower added the comment:

I think it's missing PyAPI_DATA, as it's probably supposed to be an external 
reference than a declaration. If it builds fine now, I'll commit that, but 
whoever made the change should confirm that's what it is supposed to be.

--

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Steve Dower

Steve Dower added the comment:

It also required updating PC/python3.def to put the new functions into the 
stable API.

This is the reason we should auto-gen that file (+Zach), to make sure that 
anything people can #include under the limited ABI can actually be used.

Just double checking all the build configurations and then I'll push.

--
nosy: +zach.ware

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset af167a62e2a3 by Steve Dower in branch 'default':
Issue #24268: Adds PyModuleDef_Init and PyModuleDef_Type to python3.def (stable 
ABI)
https://hg.python.org/cpython/rev/af167a62e2a3

--

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Mark Lawrence

Mark Lawrence added the comment:

FTR I've now built everything successfully.

--

___
Python tracker 

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



[issue21961] Add What's New for Idle.

2015-05-23 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I just added a generic entry to the 3.4 and 3.5 What's New docs pointing people 
to idlelib/NEWS.txt.  

+  idlelib and IDLE
+
+
+Since idlelib implements the IDLE shell and editor and is not intended for
+import by other programs, it gets improvements with every release. See
+:file:`Lib/idlelib/NEWS.txt` for a cumulative list of changes since 3.4.0,
+as well as changes made in future 3.5.x releases. This file is also available
+from the IDLE Help -> About Idle dialog.
+

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Nick Coghlan

Nick Coghlan added the comment:

Thanks for getting the Windows side sorted out folks, and my apologies for
the breakage. The overlap between the current import system maintainers and
Windows developers is unfortunately the null set :(

--

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Steve Dower

Steve Dower added the comment:

Since you're up, any chance you can help diagnose these test failures:

Traceback (most recent call last):
  File 
"D:\buildarea\3.x.bolen-windows8\build\lib\test\test_importlib\extension\test_loader.py",
 line 93, in setUp
assert self.spec
AssertionError

>From 
>http://buildbot.python.org/all/builders/AMD64%20Windows8%203.x/builds/925/steps/test/logs/stdio

It happens for 22 tests in 
test.test_importlib.extension.test_loader.Frozen_MultiPhaseExtensionModuleTests

--

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Steve Dower

Steve Dower added the comment:

Actually, that probably means we're not building a new extension module on 
Windows, right?

--

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 42ec976f627e by Steve Dower in branch 'default':
Issue #24268: Adds PCBuild project to build _testmultiphase module.
https://hg.python.org/cpython/rev/42ec976f627e

--

___
Python tracker 

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



[issue24268] PEP 489 -- Multi-phase extension module initialization

2015-05-23 Thread Steve Dower

Steve Dower added the comment:

Confirmed that when we build the module needed by the test, the test works fine 
:)

Unfortunately, I think it missed the branch for b1, so people who install and 
run the test suite will see failures there. I'll make sure it gets into the 3.5 
branch once that opens up.

--

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-05-23 Thread Matthew Barnett

Matthew Barnett added the comment:

In "odict_new", if "_odict_initialize" fails, will the dict pointed to by 
"od_inst_dict" be deallocated?

In "odictiter_new", there's "Py_INCREF(od);". If "di->di_result == NULL" fails, 
"od" isn't DECREFed.

--

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-05-23 Thread Eric Snow

Eric Snow added the comment:

Good catch.  I've fixed odictiter_new in the feature branch.  However, I'm not 
sure there's anything to be fixed in odict_new.  It follows the same pattern as 
dict_new (over in Objects/dictobject.c).

--

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-05-23 Thread Eric Snow

Changes by Eric Snow :


--
hgrepos: +309

___
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

2015-05-23 Thread Eric Snow

Changes by Eric Snow :


--
hgrepos: +310

___
Python tracker 

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



[issue24273] _scproxy.so causes EXC_BAD_ACCESS (SIGSEGV)

2015-05-23 Thread Jacob

New submission from Jacob:

This looks very related to: http://bugs.python.org/issue13829

I have very simple test code that looks like this:

import requests
r = requests.get('http://www.google.com')
print('requests.get() succeeded')

The above code works fine. However, when:

requests.get('http://www.google.com')

is run inside an rq Queue (redis queue) worker I see this problem.

Any fixes or known workarounds for this?




Process:   Python [34628]
Path:  
/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/Resources/Python.app/Contents/MacOS/Python
Identifier:Python
Version:   3.4.3 (3.4.3)
Code Type: X86-64 (Native)
Parent Process:Python [34626]
Responsible:   Terminal [333]
User ID:   501

Date/Time: 2015-05-24 08:57:29.055 +0700
OS Version:Mac OS X 10.10.3 (14D136)
Report Version:11
Anonymous UUID:341D1B65-8C01-92A4-0CB5-DC7470E594BF

Sleep/Wake UUID:   5DCBEBD5-671C-48C9-8402-765FABE76C61

Time Awake Since Boot: 23 seconds
Time Since Wake:   4700 seconds

Crashed Thread:0  Dispatch queue: com.apple.main-thread

Exception Type:EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:   KERN_INVALID_ADDRESS at 0x0110

VM Regions Near 0x110:
-->
__TEXT 000100239000-00010023b000 [8K] r-x/rwx 
SM=COW  
/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/Resources/Python.app/Contents/MacOS/Python

Application Specific Information:
*** multi-threaded process forked ***
crashed on child side of fork pre-exec

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libdispatch.dylib   0x7fff80f9616f 
_dispatch_async_f_slow + 395
1   com.apple.CoreFoundation0x7fff8c571541 
_CFPrefsWithDaemonConnection + 305
2   com.apple.CoreFoundation0x7fff8c540ac6 
__80-[CFPrefsSearchListSource 
generationCountFromListOfSources:count:allowFetching:]_block_invoke + 150
3   com.apple.CoreFoundation0x7fff8c5409d2 
-[CFPrefsSearchListSource 
generationCountFromListOfSources:count:allowFetching:] + 258
4   com.apple.CoreFoundation0x7fff8c3fcea5 
-[CFPrefsSearchListSource alreadylocked_copyDictionary] + 133
5   com.apple.CoreFoundation0x7fff8c3f7dba 
-[CFPrefsSearchListSource alreadylocked_copyValueForKey:] + 42
6   com.apple.CoreFoundation0x7fff8c57211c 
___CFPreferencesCopyAppValueWithContainer_block_invoke + 60
7   com.apple.CoreFoundation0x7fff8c53f979 
+[CFPrefsSearchListSource withSearchListForIdentifier:container:perform:] + 729
8   com.apple.CoreFoundation0x7fff8c572097 
_CFPreferencesCopyAppValueWithContainer + 183
9   com.apple.SystemConfiguration   0x7fff8c989dd4 
SCDynamicStoreCopyProxiesWithOptions + 153
10  _scproxy.so 0x000100fea8f2 get_proxy_settings + 
24
11  org.python.python   0x0001002e0c87 PyEval_EvalFrameEx + 
18047
12  org.python.python   0x0001002e3e8d fast_function + 203
13  org.python.python   0x0001002e0b2a PyEval_EvalFrameEx + 
17698
14  org.python.python   0x0001002e3e8d fast_function + 203
15  org.python.python   0x0001002e0b2a PyEval_EvalFrameEx + 
17698
16  org.python.python   0x0001002e3e8d fast_function + 203
17  org.python.python   0x0001002e0b2a PyEval_EvalFrameEx + 
17698
18  org.python.python   0x0001002e3e8d fast_function + 203
19  org.python.python   0x0001002e0b2a PyEval_EvalFrameEx + 
17698
20  org.python.python   0x0001002e3e8d fast_function + 203
21  org.python.python   0x0001002e0b2a PyEval_EvalFrameEx + 
17698
22  org.python.python   0x0001002dc459 PyEval_EvalCodeEx + 
1593
23  org.python.python   0x00010026b562 function_call + 372
24  org.python.python   0x00010024b12e PyObject_Call + 103
25  org.python.python   0x0001002e12d5 PyEval_EvalFrameEx + 
19661
26  org.python.python   0x0001002dc459 PyEval_EvalCodeEx + 
1593
27  org.python.python   0x00010026b562 function_call + 372
28  org.python.python   0x00010024b12e PyObject_Call + 103
29  org.python.python   0x0001002e12d5 PyEval_EvalFrameEx + 
19661
30  org.python.python   0x0001002dc459 PyEval_EvalCodeEx + 
1593
31  org.python.python   0x0001002e3f03 fast_function + 321
32  org.python.python   0x0001002e0b2a PyEval_EvalFrameEx + 
17698
33  org.python.python   0x0001002dc459 PyEval_EvalCodeEx + 
1593
34  org.python.python   0x000

[issue14373] C implementation of functools.lru_cache

2015-05-23 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Thanks Serhiy.  I'll work on the next steps after the beta.

--
assignee: serhiy.storchaka -> rhettinger

___
Python tracker 

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



[issue24273] _scproxy.so causes EXC_BAD_ACCESS (SIGSEGV)

2015-05-23 Thread Ned Deily

Ned Deily added the comment:

One workaround should be to disable network proxy lookups by defining the 
environment variable 'no_proxy' with value '*' in the Python process, for 
example:

env no_proxy='*' python3.4 ...

--

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-05-23 Thread Jim Jewett

Jim Jewett added the comment:

Eric, unless I'm misreading your debugging info, it is the other way around -- 
something is in the dict, but not in the list that you iterate over.  

And since the list that you iterate over looks right, I have to wonder if it 
was something internal-to-configparser (or its various converters and proxies). 
 Perhaps the __root used by the collections.OrderedDict that it uses by default?

Can you iterate over it as a dict, instead of as an ordered dict, to find the 
discrepancy?

--

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-05-23 Thread Jim Jewett

Jim Jewett added the comment:

(Just putting my review summary in the main ticket)

I'm going to echo the previous comment that maybe trying to emulate the 
existing dict implementation too carefully just adds complexity.

The split-keys implementation shows that there is at least some flexibility to 
the implementation.  Enough that the keys could map to an array offset, rather 
than directly to the values?

A simple array of key/value pairs (hashing only to ensure hashability, but 
ignoring it otherwise) should be faster for the really small dicts you care 
about, like keyword dicts.  (Admittedly, those timing data are fairly out of 
date, but I would be surprised if it weren't still true.)

--

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2015-05-23 Thread Jim Jewett

Jim Jewett added the comment:

Should dictobject.h get a bit more changes?  In particular, should the 
following be expanded?


#define PyDictKeys_Check(op) (Py_TYPE(op) == &PyDictKeys_Type)
#define PyDictItems_Check(op) (Py_TYPE(op) == &PyDictItems_Type)
#define PyDictValues_Check(op) (Py_TYPE(op) == &PyDictValues_Type)
/* This excludes Values, since they are not sets. */
# define PyDictViewSet_Check(op) \
(PyDictKeys_Check(op) || PyDictItems_Check(op))

--

___
Python tracker 

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



[issue14373] C implementation of functools.lru_cache

2015-05-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Unfortunately the patch caused a crash in test_ipaddress. Larry granted special 
exclusion for adding this feature after feature freeze if it will be fixed 
before beta 2.

--

___
Python tracker 

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



[issue24274] erroneous comments in dictobject.c

2015-05-23 Thread Jim Jewett

New submission from Jim Jewett:

https://hg.python.org/cpython/file/2df7c958974e/Objects/dictobject.c#l451

The comments near lookdict suggest that specialized versions such as 
lookdict_unicode and lookdict_unicode_nodummy cannot return NULL, as that would 
indicate an Exception was raised during comparison.

They can return NULL, because if the *search* key is not unicode, they replace 
themselves with the generic lookdict and then return its result, which may be 
NULL.

--
components: Interpreter Core
messages: 243968
nosy: Jim.Jewett
priority: normal
severity: normal
status: open
title: erroneous comments in dictobject.c
type: enhancement

___
Python tracker 

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



[issue24275] lookdict_* give up too soon

2015-05-23 Thread Jim Jewett

New submission from Jim Jewett:

The specialized lookdict_* variants replace themselves with the generic 
lookdict as soon as a non-unicode key is looked up.  

They could reasonably leave the replacement to insertdict (line 819, currently 
assert rather than a replacement), when a non-unicode key is actually inserted 
into the dict. 

While inserts are less common than (all lookups including insert), I see the 
main advantage as reducing the number of duplications of the replacement logic.

--
components: Interpreter Core
messages: 243969
nosy: Jim.Jewett
priority: normal
severity: normal
status: open
title: lookdict_* give up too soon
type: enhancement

___
Python tracker 

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



[issue24275] lookdict_* give up too soon

2015-05-23 Thread Dmitry Kazakov

Changes by Dmitry Kazakov :


--
nosy: +vlth

___
Python tracker 

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