[issue31380] test_undecodable_filename() in Lib/test/test_httpservers.py broken on APFS

2017-11-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I suggest to catch an error and skip the test if OSError with the specific 
errno has been raised.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue32120] python 3.6.0 is not importing sqlite3

2017-11-27 Thread Abinaya

Abinaya  added the comment:

Sorry to re-open.

Please anyone let me know why python 3.6.0 not supporting sqlite3.
our customers request to give the clarification.
i have tried a lot and spend more time on this but i couldn't get the exact 
reason.

--
status: closed -> open

___
Python tracker 

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



[issue32118] Doc for comparison of sequences with non-orderable elements

2017-11-27 Thread Dubslow

Dubslow  added the comment:

I like Terry's suggestion much better. I've closed my GitHub PR in favor of 
Terry's change.

My only suggested tweak might be throwing in something like "(e.g." None)", 
perhaps e.g. "Instances of an unordered class (e.g. None) become ordered...", 
but even as is, is a major improvement over mine. Thanks.

--

___
Python tracker 

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



[issue31380] test_undecodable_filename() in Lib/test/test_httpservers.py broken on APFS

2017-11-27 Thread Ned Deily

Ned Deily  added the comment:

More background: APFS became available in macOS 10.12 although not used by 
default.  But with the current macOS 10.13 (High Sierra), root file systems on 
certain devices, such as SSDs, are automatically migrated from HFS+ to APFS so 
are much more likely to be seen starting in 10.13 and, in general, there is no 
easy way of knowing what type of FS a particular file resides on.

# TMPDIR on APFS volume
$ ./bin/python3.7 -m test test_httpservers
Run tests sequentially
0:00:00 load avg: 1.43 [1/1] test_httpservers
test test_httpservers failed -- Traceback (most recent call last):
  File ".../lib/python3.7/test/support/__init__.py", line 598, in wrapper
return func(*args, **kw)
  File ".../lib/python3.7/test/test_httpservers.py", line 395, in 
test_undecodable_filename
with open(os.path.join(self.tempdir, filename), 'wb') as f:
OSError: [Errno 92] Illegal byte sequence: 
'/var/folders/sn/0m4rnbyj2z1byjs68sz83830gn/T/tmpqeg89k76/@test_64005_tmp\udce7w\udcf0.txt'

test_httpservers failed

1 test failed:
test_httpservers

Total duration: 3 sec
Tests result: FAILURE
# TMPDIR redirected to HFS+ volume
$ TMPDIR=/Volumes/euterpe/a ./bin/python3.7 -m test test_httpservers
Run tests sequentially
0:00:00 load avg: 1.28 [1/1] test_httpservers
1 test OK.

Total duration: 3 sec
Tests result: SUCCESS

@vstinner, as the expert in this area, what do you suggest as the best way to 
deal with this?  In support.__init__.py?  Or test_httpservers itself?

--

___
Python tracker 

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



[issue31453] Debian Sid/Buster: Cannot enable TLS 1.0/1.1 with PROTOCOL_TLS

2017-11-27 Thread Ned Deily

Ned Deily  added the comment:

FWIW, Debian seems to have re-enabled TLS 1.0 and 1.1 in "testing".  As a 
result, test_ssl now passes again.

openssl (1.1.0g-1) unstable; urgency=medium

  * New upstream version
- Fixes CVE-2017-3735
- Fixes CVE-2017-3736
  * Remove patches applied upstream
  * Temporary enable TLS 1.0 and 1.1 again (#875423)
  * Attempt to fix testsuite race condition
  * update no-symbolic.patch to apply

 -- Kurt Roeckx   Thu, 02 Nov 2017 15:22:48 +0100

--
nosy: +ned.deily

___
Python tracker 

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



[issue32107] test_uuid uses the incorrect bitmask

2017-11-27 Thread STINNER Victor

STINNER Victor  added the comment:

The commit 9522a218f7dff95c490ff359cc60e8c2af35f5c8 broke multiple buildbots. 
Since I don't how to fix it, I reverted it, to get more time to design, 
implement and test a proper fix.

--

___
Python tracker 

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



[issue32107] test_uuid uses the incorrect bitmask

2017-11-27 Thread Barry A. Warsaw

Change by Barry A. Warsaw :


--
pull_requests: +4520

___
Python tracker 

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



[issue32107] test_uuid uses the incorrect bitmask

2017-11-27 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

On Nov 27, 2017, at 18:38, STINNER Victor  wrote:
> 
> STINNER Victor  added the comment:
> 
> The commit 9522a218f7dff95c490ff359cc60e8c2af35f5c8 broke multiple buildbots. 
> Since I don't how to fix it, I reverted it, to get more time to design, 
> implement and test a proper fix.

Thanks.  There was no way to predict the failures, but I thought that it could 
happen.  I think at this point the only proper fix is to remove the bitmask 
test.  I’ll work up a follow-on branch and port that back to 2.7 and 3.6.

--

___
Python tracker 

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



[issue32142] heapq.heappop - documentation misleading or doesn't work

2017-11-27 Thread Raymond Hettinger

Change 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



[issue32107] test_uuid uses the incorrect bitmask

2017-11-27 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset c9409f7c4533f75b11a4c44e839d95a1403f8a0a by Victor Stinner in 
branch 'master':
Revert "bpo-32107 - Better merge of #4494 (#4576)" (#4593)
https://github.com/python/cpython/commit/c9409f7c4533f75b11a4c44e839d95a1403f8a0a


--

___
Python tracker 

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



[issue32118] Doc for comparison of sequences with non-orderable elements

2017-11-27 Thread Raymond Hettinger

Change by Raymond Hettinger :


--
assignee: docs@python -> rhettinger

___
Python tracker 

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



[issue31245] Asyncio UNIX socket and SOCK_DGRAM

2017-11-27 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 28e61650b23119b68cd7943ccc01b8b9af1b4103 by Victor Stinner in 
branch 'master':
bpo-31245: asyncio: Fix typo, isistance => isinstance (#4594)
https://github.com/python/cpython/commit/28e61650b23119b68cd7943ccc01b8b9af1b4103


--
nosy: +vstinner

___
Python tracker 

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



[issue31245] Asyncio UNIX socket and SOCK_DGRAM

2017-11-27 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +4519

___
Python tracker 

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



[issue32107] test_uuid uses the incorrect bitmask

2017-11-27 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +4518

___
Python tracker 

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



[issue32149] bolen-dmg-3.x: compiled failed with: blurb: command not found

2017-11-27 Thread Ned Deily

Ned Deily  added the comment:

Reverting the change should now have fixed the build failure.  We'll see for 
sure next time the installer build runs.

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



[issue32107] test_uuid uses the incorrect bitmask

2017-11-27 Thread STINNER Victor

STINNER Victor  added the comment:

http://buildbot.python.org/all/#/builders/16/builds/252

==
FAIL: test_ifconfig_getnode (test.test_uuid.TestInternalsWithoutExtModule)
--
Traceback (most recent call last):
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/test/test_uuid.py", 
line 538, in test_ifconfig_getnode
self.check_node(node, 'ifconfig')
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/test/test_uuid.py", 
line 531, in check_node
self.assertFalse(node & (1 << 41), '%012x' % node)
AssertionError: 219902322 is not false : 0230
==
FAIL: test_ip_getnode (test.test_uuid.TestInternalsWithoutExtModule)
--
Traceback (most recent call last):
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/test/test_uuid.py", 
line 543, in test_ip_getnode
self.check_node(node, 'ip')
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/test/test_uuid.py", 
line 531, in check_node
self.assertFalse(node & (1 << 41), '%012x' % node)
AssertionError: 219902322 is not false : 0230

--
nosy: +vstinner

___
Python tracker 

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



[issue32136] Move embedding tests to their own test module

2017-11-27 Thread Nick Coghlan

Change by Nick Coghlan :


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



[issue32136] Move embedding tests to their own test module

2017-11-27 Thread Nick Coghlan

Nick Coghlan  added the comment:


New changeset 39f0bb5ad0715dbfc0a2d5dd6d0ddea9e4c65ae2 by Nick Coghlan in 
branch 'master':
bpo-32136: Separate embedding tests from C API tests (GH-4567)
https://github.com/python/cpython/commit/39f0bb5ad0715dbfc0a2d5dd6d0ddea9e4c65ae2


--

___
Python tracker 

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



[issue30256] Adding a SyncManager Queue proxy to a SyncManager dict or Namespace proxy raises an exception

2017-11-27 Thread Alexander Prokhorov

Change by Alexander Prokhorov :


--
nosy: +Alexander Prokhorov

___
Python tracker 

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



[issue32149] bolen-dmg-3.x: compiled failed with: blurb: command not found

2017-11-27 Thread Ned Deily

Ned Deily  added the comment:


New changeset 122fc136b34e11906466851e77bb6959946467ee by Ned Deily in branch 
'master':
Revert "bpo-30487: automatically create a venv and install Sphinx when running 
make (GH-4346)" (#4592)
https://github.com/python/cpython/commit/122fc136b34e11906466851e77bb6959946467ee


--

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-27 Thread Guido van Rossum

Guido van Rossum  added the comment:

OK, great.

--

___
Python tracker 

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



[issue30487] DOC: automatically create a venv and install Sphinx when running make

2017-11-27 Thread Ned Deily

Ned Deily  added the comment:


New changeset 122fc136b34e11906466851e77bb6959946467ee by Ned Deily in branch 
'master':
Revert "bpo-30487: automatically create a venv and install Sphinx when running 
make (GH-4346)" (#4592)
https://github.com/python/cpython/commit/122fc136b34e11906466851e77bb6959946467ee


--

___
Python tracker 

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



[issue32144] email.policy.SMTP and SMTPUTF8 doesn't honor linesep's value

2017-11-27 Thread Abhilash Raj

Abhilash Raj  added the comment:

I understand that the line endings are meant for "outputs", but what 
constitutes as output in this case?

I now see that `EmailMessage.as_string()` gives me `\r\n` as line endings and, 
which is probably what you mean by output and `get_content()` given me internal 
representation of the Email's content?

--

___
Python tracker 

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



[issue30487] DOC: automatically create a venv and install Sphinx when running make

2017-11-27 Thread Caleb Hattingh

Caleb Hattingh  added the comment:

Yep, sounds good.

--

___
Python tracker 

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



[issue30487] DOC: automatically create a venv and install Sphinx when running make

2017-11-27 Thread Ned Deily

Ned Deily  added the comment:

"Now that blurb is there too, the logic for checking what is and isn't already 
present becomes a bit complex to reason through."

Yeah, it is a bit complicated.  There's also the issue of trying to use a make 
recipe to ensure a "venv" exists and is up-to-date.  I don't necessarily want 
to abandon the idea (and sorry I wasn't around to review the proposed change 
initially) but let's at least hold off until 370a3 is out the door.

--

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-27 Thread Nick Coghlan

Nick Coghlan  added the comment:

As far as I'm aware, there's nothing that specifically promises these 
constructs will do anything in Py3 at all - the existing behaviour is just an 
accident of implementation arising from the way nested scopes and yield 
expressions interact in general.

Tinkering with "await" in comprehensions and generator expressions would be 
different, since PEP 530 actually does make promises about how we expect that 
to work.

--

___
Python tracker 

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



[issue30487] DOC: automatically create a venv and install Sphinx when running make

2017-11-27 Thread Caleb Hattingh

Caleb Hattingh  added the comment:

It looks like the check for an existing sphinx-build passes, and so no new venv 
is made, but this also means that blurb doesn't get installed.  I was concerned 
about this, but figured that at least the buildbots would create new envs each 
time, and this would only be an issue that a user with an odd configuration 
might have.

Sorry for the trouble.

The feature was simpler when it was only sphinx.  Now that blurb is there too, 
the logic for checking what is and isn't already present becomes a bit complex 
to reason through.

--

___
Python tracker 

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



[issue32144] email.policy.SMTP and SMTPUTF8 doesn't honor linesep's value

2017-11-27 Thread R. David Murray

R. David Murray  added the comment:

Your are reading the documentation wrong.  For linesep, it says "The string to 
be used to terminate lines in serialized output."  The key word there is 
"output".  email operates in "universal newline mode" when parsing messages, 
turning all line endings into python's internal \n format.  What the linesep 
policy controls is the *output* line separator.

Note that the python2 behavior for decode=True is arguably a bug, but not one 
we are going to fix for backward compatibility reasons.

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



[issue32107] test_uuid uses the incorrect bitmask

2017-11-27 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

On Nov 27, 2017, at 16:21, Ned Deily  wrote:
> 
> The latest checkin seems to have broken several buildbots:
> 
> http://buildbot.python.org/all/#builders/47/builds/243
> http://buildbot.python.org/all/#builders/88/builds/248
> http://buildbot.python.org/all/#builders/13/builds/255
> http://buildbot.python.org/all/#builders/16/builds/252

Those are all locally administered MAC addresses.  Does that mean some of the 
buildbot machines also have no universally administered MAC address, like 
Travis?  Or is something wrong with our logic?

If it’s the former, then it might just make better sense to remove the 42nd bit 
test in all cases.

--

___
Python tracker 

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



[issue30487] DOC: automatically create a venv and install Sphinx when running make

2017-11-27 Thread Ned Deily

Change by Ned Deily :


--
pull_requests: +4516
stage: needs patch -> patch review

___
Python tracker 

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



[issue32149] bolen-dmg-3.x: compiled failed with: blurb: command not found

2017-11-27 Thread Ned Deily

Change by Ned Deily :


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

___
Python tracker 

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



[issue30487] DOC: automatically create a venv and install Sphinx when running make

2017-11-27 Thread Zachary Ware

Zachary Ware  added the comment:

Go ahead with the revert, Ned.

--

___
Python tracker 

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



[issue30487] DOC: automatically create a venv and install Sphinx when running make

2017-11-27 Thread Ned Deily

Ned Deily  added the comment:

One problem is that the venv can't always be automatically built in all 
environments, as a recent Python 3 needs to be available in the right location.

--

___
Python tracker 

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



[issue30487] DOC: automatically create a venv and install Sphinx when running make

2017-11-27 Thread Caleb Hattingh

Caleb Hattingh  added the comment:

Hi Ned

It's still supposed to allow both. It sounds like it's not working properly. 
I'll have a look. FYI, I worked on this for Zach Ware who is the primary 
stakeholder for this feature. 

Rgds
Caleb

> On 28 Nov 2017, at 7:12 AM, Ned Deily  wrote:
> 
> 
> Ned Deily  added the comment:
> 
> I don't think this is a good idea. It has already caused problems with one 
> buildbot (Issue32149) and will likely break other build scripts.  As the Doc 
> Makefile stood previous to this commit, the Doc builds could take advantage 
> of either a system-installed or user-supplied Sphinx and blurb without having 
> to use the venv step.  Unless there are major objections, I am going to at 
> least temporarily revert it.
> 
> --
> nosy: +ned.deily
> resolution: fixed -> 
> stage: resolved -> needs patch
> status: closed -> open
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue32107] test_uuid uses the incorrect bitmask

2017-11-27 Thread Ned Deily

Ned Deily  added the comment:

The latest checkin seems to have broken several buildbots:

 http://buildbot.python.org/all/#builders/47/builds/243
 http://buildbot.python.org/all/#builders/88/builds/248
 http://buildbot.python.org/all/#builders/13/builds/255
 http://buildbot.python.org/all/#builders/16/builds/252

--
nosy: +ned.deily

___
Python tracker 

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



[issue32149] bolen-dmg-3.x: compiled failed with: blurb: command not found

2017-11-27 Thread Ned Deily

Ned Deily  added the comment:

I think the new change in Issue30487 should be reverted.  It will likely break 
other build scripts.

--

___
Python tracker 

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



[issue30487] DOC: automatically create a venv and install Sphinx when running make

2017-11-27 Thread Ned Deily

Ned Deily  added the comment:

I don't think this is a good idea. It has already caused problems with one 
buildbot (Issue32149) and will likely break other build scripts.  As the Doc 
Makefile stood previous to this commit, the Doc builds could take advantage of 
either a system-installed or user-supplied Sphinx and blurb without having to 
use the venv step.  Unless there are major objections, I am going to at least 
temporarily revert it.

--
nosy: +ned.deily
resolution: fixed -> 
stage: resolved -> needs patch
status: closed -> open

___
Python tracker 

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



[issue32107] test_uuid uses the incorrect bitmask

2017-11-27 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

On Nov 27, 2017, at 16:08, Serhiy Storchaka  wrote:
> 
> We shouldn't check the 42nd bit in maintenance releases. This check will fail 
> on some computers.

Oh, without the preferential return of the universally administered MAC, you’re 
right.  So we should just remove the check for the 41st bit and not add the 
check for the 42nd bit.

--

___
Python tracker 

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



[issue32107] test_uuid uses the incorrect bitmask

2017-11-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

We shouldn't check the 42nd bit in maintenance releases. This check will fail 
on some computers.

--

___
Python tracker 

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




[issue32107] test_uuid uses the incorrect bitmask

2017-11-27 Thread Barry A. Warsaw

Change by Barry A. Warsaw :


--
pull_requests: +4515

___
Python tracker 

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



[issue32107] test_uuid uses the incorrect bitmask

2017-11-27 Thread Barry A. Warsaw

Change by Barry A. Warsaw :


--
pull_requests: +4514

___
Python tracker 

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



[issue32107] test_uuid uses the incorrect bitmask

2017-11-27 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

On Nov 27, 2017, at 15:18, Serhiy Storchaka  wrote:
> 
> My apologies for my dim comment and my obliviousness that leaded to spending 
> your time on trying to fix a wrong issue.

No worries at all.  Thanks for working with me to make the fix as good as it 
can be.

> Do you mind to fix the original issue (by removing the wrong check) in 
> maintenance branches?

I don’t mind, but interestingly enough, test_uuid does not fail for me locally 
in either the 2.7 or 3.6 branches!  I don’t know what’s different, since I’m 
running them on exactly the same machine, but that does seem to be the case.

Still, I think it makes sense to backport the change in check, without 
backporting the feature change or code cleanups, so I’ll work on branches for 
those.

--

___
Python tracker 

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



[issue32149] bolen-dmg-3.x: compiled failed with: blurb: command not found

2017-11-27 Thread David Bolen

David Bolen  added the comment:

Yeah, I'm not sure if I can do anything on my side.  It looks like it's  an 
issue with the build patch (issue30487, commit d8d6b91, assuming that's what 
Zachary is referring to).  The blurb complaint is about something that appears 
should have been installed in a venv during the build process.  

If I need to upgrade or install something on the worker to support this change, 
I can certainly do that, but I don't immediately see what that should be.

--

___
Python tracker 

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



[issue32107] test_uuid uses the incorrect bitmask

2017-11-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

My apologies for my dim comment and my obliviousness that leaded to spending 
your time on trying to fix a wrong issue.

Do you mind to fix the original issue (by removing the wrong check) in 
maintenance branches?

--

___
Python tracker 

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



[issue32107] test_uuid uses the incorrect bitmask

2017-11-27 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:


New changeset 9522a218f7dff95c490ff359cc60e8c2af35f5c8 by Barry Warsaw in 
branch 'master':
bpo-32107 - Better merge of #4494 (#4576)
https://github.com/python/cpython/commit/9522a218f7dff95c490ff359cc60e8c2af35f5c8


--

___
Python tracker 

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



[issue32150] Expand tabs to spaces in C files

2017-11-27 Thread Guido van Rossum

Guido van Rossum  added the comment:

Yeah, some editors don't clean up trailing ws. Even with Emacs it occasionally 
happens to me.

--

___
Python tracker 

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



[issue32150] Expand tabs to spaces in C files

2017-11-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Tools/scripts/patchcheck.py does this check. It is used for .py and .rst files, 
and there is issue8912 for applying it to .c/.h files.

patchcheck.py also checks trailing whitespaces. While I and other core 
developers constantly remove trailing whitespaces (the recent clean up is PR 
4130), the new trailing whitespaces are constantly added (for example in PR 
4150).

--

___
Python tracker 

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



[issue32150] Expand tabs to spaces in C files

2017-11-27 Thread Guido van Rossum

Guido van Rossum  added the comment:

Maybe we also need (in a separate PR) a git pre-commit hook that prevents tabs 
in the source (except in the few exceptions you left alone).

--

___
Python tracker 

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



[issue32151] -mvenv vs minor python version updates

2017-11-27 Thread Ric Anderson

New submission from Ric Anderson :

When a site updates python3 from 3.5 to 3.6 (based on 
https://docs.python.org/3/faq/general.html#how-does-the-python-version-numbering-scheme-work,
 this is would be a minor version update),pre-upgrade venv setups created with 
"python3 -menv ..." break because "python3" in the venv is really 3.5, and 
needs the system libpython3.5m.so.1.0, which is no longer in the library search 
list.

Should "python -mvenv ..." copy the libpython3.5m.so.1.0 to the venv 
directory/lib, or add the system path to libpython3.5m.so.1.0 to 
LD_LIBRARY_PATH, or should the minor version number (.5 ,or .6) be excluded 
from the library name, so that minor version updates don't break existing venv 
setups or ???

--
components: Installation, Interpreter Core, Library (Lib)
messages: 307072
nosy: Ric Anderson
priority: normal
severity: normal
status: open
title: -mvenv vs minor python version updates
type: behavior
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue32150] Expand tabs to spaces in C files

2017-11-27 Thread Guido van Rossum

Guido van Rossum  added the comment:

I think I'm cool with this (even though it will make blame-finding on
GitHub a tad harder -- what's the magic URL appendage again?)

--

___
Python tracker 

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



[issue32071] Add py.test-like "-k" test selection to unittest

2017-11-27 Thread Jonas H.

Jonas H.  added the comment:

https://github.com/python/cpython/pull/4589

- Add 3.7 What's New entry
- Fix regression (thanks Tim for the report)

--

___
Python tracker 

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



[issue32071] Add py.test-like "-k" test selection to unittest

2017-11-27 Thread Jonas H.

Change by Jonas H. :


--
pull_requests: +4513

___
Python tracker 

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



[issue32149] bolen-dmg-3.x: compiled failed with: blurb: command not found

2017-11-27 Thread Zachary Ware

Zachary Ware  added the comment:

This is likely due to a change I merged yesterday.

--
nosy: +zach.ware

___
Python tracker 

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



[issue32150] Expand tabs to spaces in C files

2017-11-27 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +4512

___
Python tracker 

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



[issue32150] Expand tabs to spaces in C files

2017-11-27 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

While most C files use spaces for indenting and aligning, there are few sites 
in which tabs are left. Sometimes mixed tabs and spaces are used in the same 
file.

This adds a noise in the diff if the committer uses an editor which doesn't 
preserve tabs (see for example PR 4390). This can hide semantic changes in tab 
expansion changes.

I reviewed many patches with accidentally expanded tabs to spaces. Usually I 
request removing unrelated changes from the patch. But this still happened, and 
tabs slowly are disappeared from the sources. There are less tabs in the 
current default branch than in any maintained branch.

I think it is better to make the expansion in a single not so large commit that 
allow them be mixed with semantical changes. PR 4583 does this. The changes 
first were made automatically, and after that I have edited them manually for 
removing excessive indentations in some files (4 spaces are enough). Tabs have 
been kept only in generated file Modules/unicodedata_db.h and in imported files 
Modules/_ctypes/* and Modules/expat/siphash.h.

--
components: Interpreter Core
messages: 307068
nosy: gvanrossum, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Expand tabs to spaces in C files
versions: Python 3.7

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-27 Thread Guido van Rossum

Guido van Rossum  added the comment:

After the tiresome debate I am happy to see this just as a "what's new" entry 
rather than soliciting more debate with a PEP. (However there may be some 
existing PEP that suggests it should work? That PEP should be amended with a 
note that this is being deprecated. But I don't know if there is such a PEP.)

--

___
Python tracker 

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



[issue32107] test_uuid uses the incorrect bitmask

2017-11-27 Thread STINNER Victor

Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue32149] bolen-dmg-3.x: compiled failed with: blurb: command not found

2017-11-27 Thread STINNER Victor

Change by STINNER Victor :


--
components: +macOS
nosy: +ned.deily, ronaldoussoren

___
Python tracker 

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



[issue32149] bolen-dmg-3.x: compiled failed with: blurb: command not found

2017-11-27 Thread STINNER Victor

STINNER Victor  added the comment:

@David Bolen: Would you mind to take a look?

--
nosy: +db3l

___
Python tracker 

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



[issue32149] bolen-dmg-3.x: compiled failed with: blurb: command not found

2017-11-27 Thread STINNER Victor

New submission from STINNER Victor :

/bin/sh: line 1: blurb: command not found

http://buildbot.python.org/all/#/builders/69/builds/51

Running make frameworkinstallextras
(...)
copy 
/Users/db3l/buildarea.dmg/bolen-dmg-3.x/build/Mac/../Tools/unittestgui/README.txt
 
/Users/db3l/buildarea.dmg/bolen-dmg-3.x/build/dmg/_root/Library/Frameworks/Python.framework/Versions/3.7/share/doc/python3.7/examples/Tools/unittestgui/README.txt
copy 
/Users/db3l/buildarea.dmg/bolen-dmg-3.x/build/Mac/../Tools/unittestgui/unittestgui.py
 
/Users/db3l/buildarea.dmg/bolen-dmg-3.x/build/dmg/_root/Library/Frameworks/Python.framework/Versions/3.7/share/doc/python3.7/examples/Tools/unittestgui/unittestgui.py
Copying required shared libraries
Fix file modes
Install python documentation
rm -rf build/* ./venv/*
make: `venv' is up to date.
/bin/sh: line 1: blurb: command not found
make: *** [build] Error 127
Traceback (most recent call last):
mkdir -p build
Building NEWS from Misc/NEWS.d with blurb
  File 
"/Users/db3l/buildarea.dmg/bolen-dmg-3.x/build/Mac/BuildScript/build-installer.py",
 line 1659, in 
main()
  File 
"/Users/db3l/buildarea.dmg/bolen-dmg-3.x/build/Mac/BuildScript/build-installer.py",
 line 1621, in main
buildPythonDocs()
  File 
"/Users/db3l/buildarea.dmg/bolen-dmg-3.x/build/Mac/BuildScript/build-installer.py",
 line 1094, in buildPythonDocs
runCommand('make html PYTHON=venv/bin/python')
  File 
"/Users/db3l/buildarea.dmg/bolen-dmg-3.x/build/Mac/BuildScript/build-installer.py",
 line 531, in runCommand
raise RuntimeError("command failed: %s"%(commandline,))
RuntimeError: command failed: make html PYTHON=venv/bin/python
program finished with exit code 1
elapsedTime=1288.975592

--
components: Build
keywords: buildbot
messages: 307065
nosy: vstinner
priority: normal
severity: normal
status: open
title: bolen-dmg-3.x: compiled failed with: blurb: command not found
versions: Python 3.7

___
Python tracker 

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



[issue32107] test_uuid uses the incorrect bitmask

2017-11-27 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

On Nov 27, 2017, at 01:24, Serhiy Storchaka  wrote:
> 
> 3. Makes methods for getting the address of the real network card preferring 
> universally administered addresses and falling back to locally  administered 
> address only if universally administered addresses are not found. This is a 
> new feature. But are there computers that have both universally and locally 
> administered addresses (and with locally administered addresses enumerated 
> first)?

There are certainly computers that have both universal and local admin MAC 
addresses, as proven by the MBP+TouchBar case that triggered this.  I don’t 
know whether we can assume anything about the order in which those are 
enumerated.

--

___
Python tracker 

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



[issue32071] Add py.test-like "-k" test selection to unittest

2017-11-27 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> @Core devs: Should I revert to original behaviour with the order of the 
> prefix check and the getattr() call, and add a regression test that 
> guarantees this behaviour?

Yes, that sounds reasonable to me.

--

___
Python tracker 

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



[issue32071] Add py.test-like "-k" test selection to unittest

2017-11-27 Thread Jonas H.

Jonas H.  added the comment:

Ah, the problem isn't that it's running getattr() on test methods, but that it 
runs getattr() on all methods.

Former code: attrname.startswith(prefix) and \
callable(getattr(testCaseClass, attrname))

New code: testFunc = getattr(testCaseClass, attrname)
isTestMethod = attrname.startswith(self.testMethodPrefix) and 
callable(testFunc)

This is trivial to fix. @Core devs: Should I revert to original behaviour with 
the order of the prefix check and the getattr() call, and add a regression test 
that guarantees this behaviour?

--

___
Python tracker 

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



[issue27535] Ignored ResourceWarning warnings leak memory in warnings registries

2017-11-27 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +4511

___
Python tracker 

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



[issue32148] Python 2.7.14 has Tkinter with big T letter.

2017-11-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

In Python 2 you should import the Tkinter module, with the big letter T.

--
nosy: +serhiy.storchaka
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



[issue27535] Ignored ResourceWarning warnings leak memory in warnings registries

2017-11-27 Thread STINNER Victor

STINNER Victor  added the comment:

I consider that PR 4489 is a bugfix, so I proposed backports to Python 2.7 (PR 
4588) and 3.6 (PR 4587).

--

___
Python tracker 

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



[issue27535] Ignored ResourceWarning warnings leak memory in warnings registries

2017-11-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Thank you Victor!

--
assignee: serhiy.storchaka -> vstinner
versions: +Python 3.7 -Python 3.6

___
Python tracker 

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



[issue27535] Ignored ResourceWarning warnings leak memory in warnings registries

2017-11-27 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4510

___
Python tracker 

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



[issue27535] Ignored ResourceWarning warnings leak memory in warnings registries

2017-11-27 Thread STINNER Victor

STINNER Victor  added the comment:

https://github.com/python/cpython/pull/4489#issuecomment-346673704

Serhiy: "Could you please make a benchmark for warnings emitted in a tight loop 
in the C code. It would be nice to know what is the worst case. If it is less 
than 2x slower I will prefer this simpler PR."

I merged my PR since it's not 2x slower. I also prefer the simple PR 4489, 
rather than the complex PR 4502.

I rejected my PR 4502 since it's backward incompatible. I don't think that it's 
worth it, even if it's faster.

--

___
Python tracker 

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



[issue27535] Ignored ResourceWarning warnings leak memory in warnings registries

2017-11-27 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset c9758784eb321fb9771e0bc7205b296e4d658045 by Victor Stinner in 
branch 'master':
bpo-27535: Fix memory leak with warnings ignore (#4489)
https://github.com/python/cpython/commit/c9758784eb321fb9771e0bc7205b296e4d658045


--

___
Python tracker 

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



[issue32071] Add py.test-like "-k" test selection to unittest

2017-11-27 Thread Tim Graham

Tim Graham  added the comment:

This is appearing as a backwards incompatible change for Django because test 
case class attributes are now evaluated at load time before setUpClass runs 
(which initializes some things that those class attributes use). It's possible 
to adapt Django for this change, but it might affect other projects as well.

Traceback from Django's tests:

$ python -Wall tests/runtests.py 
Testing against Django installed in '/home/tim/code/django/django' with up to 3 
processes
Traceback (most recent call last):
  File "tests/runtests.py", line 477, in 
options.exclude_tags,
  File "tests/runtests.py", line 282, in django_tests
extra_tests=extra_tests,
  File "/home/tim/code/django/django/test/runner.py", line 598, in run_tests
suite = self.build_suite(test_labels, extra_tests)
  File "/home/tim/code/django/django/test/runner.py", line 513, in build_suite
tests = self.test_loader.discover(start_dir=label, **kwargs)
  File "/home/tim/code/cpython/Lib/unittest/loader.py", line 346, in discover
tests = list(self._find_tests(start_dir, pattern))
  File "/home/tim/code/cpython/Lib/unittest/loader.py", line 403, in _find_tests
full_path, pattern, namespace)
  File "/home/tim/code/cpython/Lib/unittest/loader.py", line 457, in 
_find_test_path
return self.loadTestsFromModule(module, pattern=pattern), False
  File "/home/tim/code/cpython/Lib/unittest/loader.py", line 124, in 
loadTestsFromModule
tests.append(self.loadTestsFromTestCase(obj))
  File "/home/tim/code/cpython/Lib/unittest/loader.py", line 90, in 
loadTestsFromTestCase
testCaseNames = self.getTestCaseNames(testCaseClass)
  File "/home/tim/code/cpython/Lib/unittest/loader.py", line 234, in 
getTestCaseNames
testFnNames = list(filter(shouldIncludeMethod, dir(testCaseClass)))
  File "/home/tim/code/cpython/Lib/unittest/loader.py", line 227, in 
shouldIncludeMethod
testFunc = getattr(testCaseClass, attrname)
  File "/home/tim/code/django/django/utils/decorators.py", line 172, in __get__
return self.fget(cls)
  File "/home/tim/code/django/django/test/testcases.py", line 1269, in 
live_server_url
return 'http://%s:%s' % (cls.host, cls.server_thread.port)
AttributeError: type object 'AdminSeleniumTestCase' has no attribute 
'server_thread'

--
nosy: +Tim.Graham

___
Python tracker 

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



[issue32148] Python 2.7.14 has Tkinter with big T letter.

2017-11-27 Thread Hasan Mahmood

New submission from Hasan Mahmood :

Using python 2.7.14.
Importing Dialogs
Got problem in importing tkinter. In doccumentation of tkinter, it is stated 
the big letter  T in Tkinter is used only used in python 3 but. 
It is expected that it is possible to use tkinter with small letter T beccause 
I use python 2.7.14

--
components: Tkinter
files: Tkinter.PNG
messages: 307055
nosy: HMahmood
priority: normal
severity: normal
status: open
title: Python 2.7.14 has Tkinter with big  T letter.
versions: Python 2.7
Added file: https://bugs.python.org/file47299/Tkinter.PNG

___
Python tracker 

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



[issue31854] Add mmap.ACCESS_DEFAULT to namespace

2017-11-27 Thread Berker Peksag

Berker Peksag  added the comment:

PR 4093 has been merged. Closing this as 'fixed'. Thank you for the PR, Justus.

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



[issue30855] [2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5

2017-11-27 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
assignee: serhiy.storchaka -> zach.ware

___
Python tracker 

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



[issue32147] improve performance of binascii.unhexlify() by using conversion table

2017-11-27 Thread Sergey Fedoseev

Change by Sergey Fedoseev :


--
components: +Library (Lib)

___
Python tracker 

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



[issue32147] improve performance of binascii.unhexlify() by using conversion table

2017-11-27 Thread Sergey Fedoseev

Change by Sergey Fedoseev :


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

___
Python tracker 

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



[issue32147] improve performance of binascii.unhexlify() by using conversion table

2017-11-27 Thread Sergey Fedoseev

New submission from Sergey Fedoseev :

Before:

$ ./python -m timeit -s "from binascii import unhexlify; b = b'aa'*2**20" 
"unhexlify(b)"
50 loops, best of 5: 5.68 msec per loop

After:

$ ./python -m timeit -s "from binascii import unhexlify; b = b'aa'*2**20" 
"unhexlify(b)"
100 loops, best of 5: 2.06 msec per loop

--
messages: 307053
nosy: sir-sigurd
priority: normal
severity: normal
status: open
title: improve performance of binascii.unhexlify() by using conversion table
type: performance

___
Python tracker 

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



[issue27035] Cannot set exit code in atexit callback

2017-11-27 Thread Torsten Landschoff

Torsten Landschoff  added the comment:

As this bug report clearly states this worked as documented in Python 2.7 and 
stopped working sometime in the Python 3 series.

I just ran into this while porting some code to Python 3 which uses an atexit 
handler to wind down some resources on process exit. This sometimes gets stuck 
and instead of hanging indefinitely the cleanup is aborted if it takes longer 
than a few seconds.

As this is actually an error, the registered exit function raises SystemExit to 
modify the exit code in this case. This used to work fine but does not 
anymore...

Observe:


## Python 2.7 works fine

$ sudo docker run python:2.7 python -c "import 
atexit,sys;atexit.register(sys.exit,124)"; echo $?
124

## Python 3.2 (oldest Python 3 on docker hub) swallows the exit code (but 
prints it)

$ sudo docker run python:3.2 python -c "import 
atexit,sys;atexit.register(sys.exit,124)"; echo $?
Error in atexit._run_exitfuncs:
SystemExit: 124
0

## Same for 3.3 up to 3.6

$ sudo docker run python:3.3 python -c "import 
atexit,sys;atexit.register(sys.exit,124)"; echo $?
Error in atexit._run_exitfuncs:
SystemExit: 124
0
$ sudo docker run python:3.5 python -c "import 
atexit,sys;atexit.register(sys.exit,124)"; echo $?
Error in atexit._run_exitfuncs:
SystemExit: 124
0

$ sudo docker run python:3.6 python -c "import 
atexit,sys;atexit.register(sys.exit,124)"; echo $?
Error in atexit._run_exitfuncs:
SystemExit: 124
0

## Python 3.7 swallows the exit code *and does not even print it*:

$ /opt/python-dev/bin/python3.7 -c "import 
atexit,sys;atexit.register(sys.exit,124)"; echo $?
0

--
nosy: +torsten
type: enhancement -> behavior

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Note that the DeprecationWarning exception is replaced with a SyntaxError to 
get a more accurate error report.

$ cat yield-gen.py 
def f():
return ((yield x) for x in range(3))

$ ./python -Wd yield-gen.py
yield-gen.py:2: DeprecationWarning: 'yield' inside generator expression
  return ((yield x) for x in range(3))

$ ./python -We yield-gen.py
  File "yield-gen.py", line 2
return ((yield x) for x in range(3))
   ^
SyntaxError: 'yield' inside generator expression


Without this replacement the result would be:

$ ./python -We yield-gen.py
DeprecationWarning: 'yield' inside generator expression

--

___
Python tracker 

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



[issue32089] In developer mode (-X dev), ResourceWarning is only emited once per line numbers

2017-11-27 Thread STINNER Victor

STINNER Victor  added the comment:

The "default warning filters" are documented, but only for Python compiled in 
release mode:
https://docs.python.org/dev/library/warnings.html#default-warning-filters

So I didn't touch this documentation.

The initial issue is now fixed: the development mode (-X dev) now behaves as 
the debug mode (pydebug build) for the default warning filters.

The second issue, Antoine's complain about the "always" action, was also fixed.

I close the issue. At the end, we should get a better debug experience ;-)

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



[issue32089] In developer mode (-X dev), ResourceWarning is only emited once per line numbers

2017-11-27 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 21c7730761e2a768e33b89b063a095d007dcfd2c by Victor Stinner in 
branch 'master':
bpo-32089: Use default action for ResourceWarning (#4584)
https://github.com/python/cpython/commit/21c7730761e2a768e33b89b063a095d007dcfd2c


--

___
Python tracker 

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



[issue31233] socketserver.ThreadingMixIn leaks running threads after server_close()

2017-11-27 Thread STINNER Victor

STINNER Victor  added the comment:

Klon666 added 
https://github.com/python/cpython/commit/96a6cbc5b0aee267f47e5efb50fba183b52cd8c6
 repository. But this URL is unrelated. It looks like a bot spamming the bug 
tracker and I don't see how to remove the URL...

--

___
Python tracker 

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



[issue32138] android: test_faulthandler fails also on API 24

2017-11-27 Thread STINNER Victor

STINNER Victor  added the comment:

> I propose to skip those tests whatever the value of the Android API level.

Works for me.

--

___
Python tracker 

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



[issue32071] Add py.test-like "-k" test selection to unittest

2017-11-27 Thread Jonas H.

Jonas H.  added the comment:

Sure!

--

___
Python tracker 

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



[issue32136] Move embedding tests to their own test module

2017-11-27 Thread STINNER Victor

STINNER Victor  added the comment:

> Modules/_testcapi.c -> Lib/test/test_capi.py
> Progams/_testembed.c -> Lib/test/test_embed.py

I like it :-)

--

___
Python tracker 

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



[issue30855] [2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5

2017-11-27 Thread STINNER Victor

STINNER Victor  added the comment:

Serhiy: "It still uses Tcl/Tk 8.5.15."

pythoninfo says:
---
tkinter.TCL_VERSION: 8.5
tkinter.TK_VERSION: 8.5
tkinter.info_patchlevel: 8.5.15
---

The compilation says:
---
Fetching external libraries...
(...)
tcl-8.5.19.0 already exists, skipping.
tk-8.5.19.0 already exists, skipping.
tix-8.4.3.5 already exists, skipping.
(...)
Project "D:\buildarea\2.7.ware-win81-release\build\PCbuild\_tkinter.vcxproj" 
(24) is building 
"D:\buildarea\2.7.ware-win81-release\build\PCbuild\tcl.vcxproj" (25) on node 1 
(default targets).
(...)
cd /D "D:\buildarea\2.7.ware-win81-release\build\externals\tcl-8.5.19.0\win"
  nmake -f makefile.vc MACHINE=AMD64 OPTS= 
INSTALLDIR="D:\buildarea\2.7.ware-win81-release\build\externals\tcltk64" 
INSTALL_DIR="D:\buildarea\2.7.ware-win81-release\build\externals\tcltk64"  core 
shell dlls
  nmake -f makefile.vc MACHINE=AMD64 OPTS= 
INSTALLDIR="D:\buildarea\2.7.ware-win81-release\build\externals\tcltk64" 
INSTALL_DIR="D:\buildarea\2.7.ware-win81-release\build\externals\tcltk64"
---

--

___
Python tracker 

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



[issue32146] multiprocessing freeze_support needed outside win32

2017-11-27 Thread Daniel Colascione

New submission from Daniel Colascione :

multiprocessing's freeze_support makes freshly-launched subprocesses integrate 
correctly until the multiprocessing ecosystem even when the main executable is 
some application binary instead of a Python interpreter. The documentation and 
code assume that this support is needed only on win32, but it's equally 
applicable to POSIX systems using the spawn strategy in combination with 
systems like cx_freeze.

In particular:

1) The special case in context.py's version of freeze_support() for win32 
should be removed

2) The semaphore tracker should correctly tickle the freeze support

3) The documentation should be updated to be platform-neutral

--
components: Library (Lib)
messages: 307043
nosy: dancol
priority: normal
severity: normal
status: open
title: multiprocessing freeze_support needed outside win32
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue30855] [2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5

2017-11-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

It still uses Tcl/Tk 8.5.15.

--

___
Python tracker 

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



[issue32071] Add py.test-like "-k" test selection to unittest

2017-11-27 Thread STINNER Victor

STINNER Victor  added the comment:

IMHO it's a big enhancement for the base unittest test runner and deserves to 
be documend in What's New in Python 3.7! Jonas: do you want to write a PR to 
patch Doc/whatsnew/3.7.rst?

--

___
Python tracker 

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



[issue30855] [2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5

2017-11-27 Thread STINNER Victor

STINNER Victor  added the comment:

Bad news: the problem is not gone. Fail at commit 
180372c08a25332429f6175d6aa036c1ec643ca3 (the commit after Zach's commit 
be1faabeef0821f188a28dd7cc6b744b89e85e94 in the Python 2.7 branch):

http://buildbot.python.org/all/#/builders/70/builds/28

test_use (test_tkinter.test_widgets.ToplevelTest) ... ERROR
test_visual (test_tkinter.test_widgets.ToplevelTest) ... ok
test test_tk failed -- Traceback (most recent call last):
  File 
"D:\buildarea\2.7.ware-win81-release\build\lib\lib-tk\test\test_tkinter\test_widgets.py",
 line 93, in test_use
widget2 = self.create(use=wid)
  File 
"D:\buildarea\2.7.ware-win81-release\build\lib\lib-tk\test\test_tkinter\test_widgets.py",
 line 67, in create
return tkinter.Toplevel(self.root, **kwargs)
  File "D:\buildarea\2.7.ware-win81-release\build\lib\lib-tk\Tkinter.py", line 
2138, in __init__
BaseWidget.__init__(self, master, 'toplevel', cnf, {}, extra)
  File "D:\buildarea\2.7.ware-win81-release\build\lib\lib-tk\Tkinter.py", line 
2095, in __init__
(widgetName, self._w) + extra + self._options(cnf))
TclError: integer value too large to represent
test_width (test_tkinter.test_widgets.ToplevelTest) ... ok
==
ERROR: test_use (test_tkinter.test_widgets.ToplevelTest)
--
Traceback (most recent call last):
  File 
"D:\buildarea\2.7.ware-win81-release\build\lib\lib-tk\test\test_tkinter\test_widgets.py",
 line 93, in test_use
widget2 = self.create(use=wid)
  File 
"D:\buildarea\2.7.ware-win81-release\build\lib\lib-tk\test\test_tkinter\test_widgets.py",
 line 67, in create
return tkinter.Toplevel(self.root, **kwargs)
  File "D:\buildarea\2.7.ware-win81-release\build\lib\lib-tk\Tkinter.py", line 
2138, in __init__
BaseWidget.__init__(self, master, 'toplevel', cnf, {}, extra)
  File "D:\buildarea\2.7.ware-win81-release\build\lib\lib-tk\Tkinter.py", line 
2095, in __init__
(widgetName, self._w) + extra + self._options(cnf))
TclError: integer value too large to represent

--

___
Python tracker 

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



[issue32089] In developer mode (-X dev), ResourceWarning is only emited once per line numbers

2017-11-27 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +4507
stage: resolved -> patch review

___
Python tracker 

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



[issue10544] yield expression inside generator expression does nothing

2017-11-27 Thread Nick Coghlan

Nick Coghlan  added the comment:

Guido, should we write this change up as a PEP, or are you happy to just cover 
it as a section in the What's New document for 3.7?

--

___
Python tracker 

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



[issue20891] PyGILState_Ensure on non-Python thread causes fatal error

2017-11-27 Thread Marcin Kasperski

Marcin Kasperski  added the comment:

Is this fix released? I can't find it in the changelog…

(I faced this bug on 3.5.2, released a couple of months after this bug was 
closed…)

--
nosy: +Mekk

___
Python tracker 

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



[issue32145] Wrong ExitStack Callback recipe

2017-11-27 Thread Maurizio Zucchelli

New submission from Maurizio Zucchelli :

The documentation for contextlib.ExitStack 
(https://docs.python.org/3.7/library/contextlib.html#replacing-any-use-of-try-finally-and-flag-variables)
 shows an helper class (Callback) to perform cleanup using a callback.
Problem is, Callback.cancel() calls ExitStack.pop_all(), which in turn calls 
type(self)(), this is not a valid constructor for Callback, since it always 
expects at least one element.

(I have marked only Python 3.4 and 3.6 since those are the versions where I 
verified this, but it likely applies to every version.)

--
assignee: docs@python
components: Documentation
messages: 307037
nosy: Denaun, docs@python
priority: normal
severity: normal
status: open
title: Wrong ExitStack Callback recipe
type: crash
versions: Python 3.4, Python 3.6

___
Python tracker 

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