[issue28769] Make PyUnicode_AsUTF8 returning "const char *" rather of "char *"

2016-11-21 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

PyUnicode_AsUTF8AndSize() and PyUnicode_AsUTF8() return a reference to cached 
readonly UTF-8 representation of a string. Changing the content of the UTF-8 
representation is an error. Proposed patch makes these functions returning 
"const char *" rather of "char *" to force this restriction.

This is backward-incompatible change. Since PyUnicode_AsUTF8AndSize() and 
PyUnicode_AsUTF8() can return an error, it is more likely that the result is 
saved in a local variable rather than passing to other function. If the type of 
this variable is "char *" rather than "const char *", this would cause a 
compiler error. The fix is simple -- just add the const qualifier to the local 
variable declaration (more preferable) or cast the result of 
PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8() to "char *".

Both functions are not in stable API.

--
components: Interpreter Core
files: PyUnicode_AsUTF8-const.patch
keywords: patch
messages: 281439
nosy: ncoghlan, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Make PyUnicode_AsUTF8 returning "const char *" rather of "char *"
type: enhancement
versions: Python 3.7
Added file: http://bugs.python.org/file45596/PyUnicode_AsUTF8-const.patch

___
Python tracker 

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



[issue28766] Remove the semicolon in source code

2016-11-21 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Sorry Yuwei, but this is irrelevant and not appropriate for a Python 2.7 
backport at this time.

--
nosy: +rhettinger
status: open -> closed

___
Python tracker 

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



[issue28573] Python 3.6.0b4 64-bit has no sys._mercurial info

2016-11-21 Thread Steve Dower

Steve Dower added the comment:

Wasn't fixed as well as I'd like, so I clearly need a better approach here.

--
resolution: fixed -> 
stage: resolved -> 
status: closed -> open
title: Python 3.6.0b3 64-bit has no sys._mercurial info -> Python 3.6.0b4 
64-bit has no sys._mercurial info

___
Python tracker 

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



[issue28761] Add the const qualifier to fields name and doc of public structs

2016-11-21 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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

___
Python tracker 

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



[issue28761] Add the const qualifier to fields name and doc of public structs

2016-11-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks Nick.

--

___
Python tracker 

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



[issue5830] heapq item comparison problematic with sched's events

2016-11-21 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
stage:  -> resolved

___
Python tracker 

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



[issue5830] heapq item comparison problematic with sched's events

2016-11-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Agreed, "seq" is better name.

Thanks Raymond.

--

___
Python tracker 

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



[issue28761] Add the const qualifier to fields name and doc of public structs

2016-11-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 42b0ba372ec2 by Serhiy Storchaka in branch 'default':
Issue #28761: The fields name and doc of structures PyMemberDef, PyGetSetDef,
https://hg.python.org/cpython/rev/42b0ba372ec2

--
nosy: +python-dev

___
Python tracker 

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



[issue28766] Remove the semicolon in source code

2016-11-21 Thread Yuwei Ba

Yuwei Ba added the comment:

I know this is not a functional 'fix', though it's the fact that there should 
not be a semicolon. It can make user confusing. There might be another user who 
found this semicolon and create an issue again since there are still lots of 
Python27 codes running on tons of machines.

So if possible, I'll persist on this patch to be applied. Though it's not so 
urgent, it's a right thing. ;)

--
resolution: rejected -> not a bug
status: closed -> open

___
Python tracker 

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



[issue28635] Update What's New for 3.6

2016-11-21 Thread INADA Naoki

INADA Naoki added the comment:

I added ``-VV`` option to python command (issue28532).
Which section should I add the entry about it?

--
nosy: +inada.naoki

___
Python tracker 

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



[issue28763] Use en-dashes for ranges in docs

2016-11-21 Thread Martin Panter

Martin Panter added the comment:

Sure, I was just saying that for whatever reason, 50% of the documentation uses 
hyphens for number ranges, and 50% uses en dashes.

--

___
Python tracker 

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



[issue28763] Use en-dashes for ranges in docs

2016-11-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The rest single hyphens between digits are meaningful hypens in iso-8859-1, 
ISDNs, sample outputs, etc.

--

___
Python tracker 

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



[issue28702] Confusing error message when None used in expressions, eg. "'NoneType' object has no attribute 'foo'"

2016-11-21 Thread Greg Ward

Greg Ward added the comment:

> Is it worth changing about 800 places in CPython code? Not counting 
> third-party code.

Definitely not. My aim is not to fix every possible reference to "instance of 
'NoneType'", just the handful of cases that are most frequently encountered, 
especially if we think they are likely to be confusing to beginners. That's why 
I've only modified getting and setting attributes so far; I wanted to see what 
the cost/benefit is like.

Renaming 'NoneType' to 'None' sounds like a much easier approach, if it works. 
But then saying "instance of" + tp_name comes out weird. "Instance of NoneType" 
is confusing if technically accurate; "instance of None" is both confusing and 
technically inaccurate.

H. Still mulling.

--

___
Python tracker 

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



[issue28738] Document SIGBREAK as argument for signal() under Windows.

2016-11-21 Thread Eryk Sun

Changes by Eryk Sun :


--
keywords: +easy
priority: normal -> low
stage:  -> patch review
versions: +Python 3.6

___
Python tracker 

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



[issue23106] Remove smalltable from set objects

2016-11-21 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Based on the performance hit, I am retracting this.

--
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue27100] Attempting to use class with both __enter__ & __exit__ undefined yields __exit__ attribute error

2016-11-21 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Thanks for the patch Jonathan.  Nick, thanks for chiming in.

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

___
Python tracker 

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



[issue27100] Attempting to use class with both __enter__ & __exit__ undefined yields __exit__ attribute error

2016-11-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3aafb232f2db by Raymond Hettinger in branch '3.6':
Issue #27100:  With statement reports missing __enter__ before __exit__.  
(Contributed by Jonathan Ellington.)
https://hg.python.org/cpython/rev/3aafb232f2db

--
nosy: +python-dev

___
Python tracker 

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



[issue28766] Remove the semicolon in source code

2016-11-21 Thread Martin Panter

Martin Panter added the comment:

This was added to 2.7 in r68532 (Issue 4879), but the semicolon never made it 
to the Python 3 branch that I can see, so I don’t think there is anything to 
fix there. Your patch is against the 2.7 branch, which is only open for bug 
fixes now, and I don’t think this qualifies, sorry :)

--
nosy: +martin.panter
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue28688] Warning -- warnings.filters was modified by test_warnings

2016-11-21 Thread Martin Panter

Changes by Martin Panter :


--
superseder: Warning -- warnings.filters was modified by test_warnings -> 
Implement comparison (x==y and x!=y) for _sre.SRE_Pattern

___
Python tracker 

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



[issue28688] Warning -- warnings.filters was modified by test_warnings

2016-11-21 Thread Martin Panter

Martin Panter added the comment:

As long as we are restricted by backwards compatibility, it will be hard to 
find a hack-free solution. The ideal solution IMO is to re-create 
_warnings.filters from scratch when _warnings is reloaded, but such a change 
would be safer only for 3.7.

So I am happy to leave things as they are. At least until something upsets 
things again :)

--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed
superseder:  -> Warning -- warnings.filters was modified by test_warnings

___
Python tracker 

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



[issue26163] FAIL: test_hash_effectiveness (test.test_set.TestFrozenSet)

2016-11-21 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue26163] FAIL: test_hash_effectiveness (test.test_set.TestFrozenSet)

2016-11-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e0f0211d314d by Raymond Hettinger in branch '3.6':
Issue #26163:  Disable periodically failing test which was overly demanding of 
the frozenset hash function effectiveness
https://hg.python.org/cpython/rev/e0f0211d314d

--
nosy: +python-dev

___
Python tracker 

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



[issue26163] FAIL: test_hash_effectiveness (test.test_set.TestFrozenSet)

2016-11-21 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Rather than making futile further attempts to scramble the bits in the final 
hash to hide the effect of weak upstream hash inputs, I'm inclined to disable 
this particular test which was already a crazily harsh torture test.  I suspect 
that even the tuple hash wouldn't survive variants of this test.

--

___
Python tracker 

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



[issue28763] Use en-dashes for ranges in docs

2016-11-21 Thread Martin Panter

Martin Panter added the comment:

Personally I prefer en dashes where practical, but I fear the change may 
conflict with other people’s styles and preferences. I quickly counted 22 
single hyphens (obviously I missed a few that your patch caught) and also 22 
existing en dashes.

--

___
Python tracker 

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



[issue5830] heapq item comparison problematic with sched's events

2016-11-21 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Thanks Serhiy.

FWIW, I changed the variable name from "l" to "seq" for readability.

--
status: open -> closed

___
Python tracker 

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



[issue5830] heapq item comparison problematic with sched's events

2016-11-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ecc6f7940e02 by Raymond Hettinger in branch '3.6':
Issue #5830:  Add test for ee476248a74a.  (Contributed by Serhiy Storchaka.)
https://hg.python.org/cpython/rev/ecc6f7940e02

--

___
Python tracker 

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



[issue27825] Make the documentation for statistics' data argument clearer.

2016-11-21 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Sounds good. Thanks, Raymond :)

--

___
Python tracker 

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



[issue28587] list.index documentation missing start and stop arguments

2016-11-21 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Okay, applied.

--
status: open -> closed

___
Python tracker 

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



[issue27825] Make the documentation for statistics' data argument clearer.

2016-11-21 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Thanks Mariatta.

As discussed in chat, I dropped the extra fractions examples because they 
didn't seem to add value.

--
nosy: +rhettinger
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue28587] list.index documentation missing start and stop arguments

2016-11-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset efac7ac53933 by Raymond Hettinger in branch '3.6':
Issue #28587: Improve list examples in the tutorial
https://hg.python.org/cpython/rev/efac7ac53933

--

___
Python tracker 

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



[issue27825] Make the documentation for statistics' data argument clearer.

2016-11-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 71dd21a3b9cc by Raymond Hettinger in branch '3.6':
Issue #27825: Improve for statistics data arguments. (Contributed by Mariatta 
Wijaya.)
https://hg.python.org/cpython/rev/71dd21a3b9cc

--
nosy: +python-dev

___
Python tracker 

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



[issue28743] test_choices_algorithms() in test_random uses lots of memory

2016-11-21 Thread Martin Panter

Martin Panter added the comment:

Thanks Raymond, now the test is noticeably faster and fine with my memory 
situation :)

--
stage:  -> resolved

___
Python tracker 

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



[issue28587] list.index documentation missing start and stop arguments

2016-11-21 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Thanks Raymond. The new set of examples is much better than the previous one.
+1

--

___
Python tracker 

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



[issue28587] list.index documentation missing start and stop arguments

2016-11-21 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Attaching an improved list example:
* Replaced abstract and hard to follow numerical example with fruits
* Demonstrate the non-mutating methods first

--
Added file: http://bugs.python.org/file45595/new_list_example.diff

___
Python tracker 

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



[issue28587] list.index documentation missing start and stop arguments

2016-11-21 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Thanks for noticing.   I tested against the original list rather than the 
subsequently modified version.  I'm starting to think that this whole example 
section is annoyingly hard to follow and uninformative.

--

___
Python tracker 

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



[issue28587] list.index documentation missing start and stop arguments

2016-11-21 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Thanks, Raymond and Martin :)

Not sure what the procedure is for fixing this. Do I upload another patch?

--

___
Python tracker 

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



[issue28587] list.index documentation missing start and stop arguments

2016-11-21 Thread Martin Panter

Martin Panter added the comment:

The committed change looks wrong in the new example. I think Mariatta’s patch 
was right; it the index found is 3, not 2:

>>> a
[66.25, 333, -1, 333, 1, 1234.5, 333]
>>> a.index(333)
1
>>> a.index(333, 2)  # search for 333 starting at index 2
3

--
nosy: +martin.panter
status: closed -> open
versions: +Python 3.6, Python 3.7

___
Python tracker 

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



[issue15851] Lib/robotparser.py doesn't accept setting a user agent string, instead it uses the default.

2016-11-21 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: rhettinger -> 

___
Python tracker 

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



[issue28743] test_choices_algorithms() in test_random uses lots of memory

2016-11-21 Thread Raymond Hettinger

Raymond Hettinger added the comment:

A smaller value suffices for this test.  It was trying to make sure the 
underlying algorithms are as in-sync as possible without going to extremes.

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

___
Python tracker 

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



[issue28743] test_choices_algorithms() in test_random uses lots of memory

2016-11-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3551fca2c6ae by Raymond Hettinger in branch '3.6':
Issue #28743:  Reduce memory consumption for random module tests
https://hg.python.org/cpython/rev/3551fca2c6ae

--
nosy: +python-dev

___
Python tracker 

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



[issue28743] test_choices_algorithms() in test_random uses lots of memory

2016-11-21 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger

___
Python tracker 

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



[issue28743] test_choices_algorithms() in test_random uses lots of memory

2016-11-21 Thread Martin Panter

Martin Panter added the comment:

Gareth, are you sure that fixes the main memory problem? Did you see Serhiy’s 
cum_weights list? Looking at the code, a list of every number from one to 13 
million will use more memory (to hold each unique integer) than the initial 
list of repeated ones.

I think the problem may also be causing buildbot failures:

Crash in test_random:
http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.x/builds/5373/steps/test/logs/stdio
0:19:42 [368/404] test_random crashed -- running: test_zipfile (48 sec), 
test_tools (139 sec)
Traceback (most recent call last):
  [. . .]
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/libregrtest/runtest_mp.py",
 line 221, in run_tests_multiprocess
raise Exception(msg)
Exception: Child error on test_random: Exit code -9

Timeout in choices():
http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/5464/steps/test/logs/stdio
0:17:05 [215/404] test_random crashed
Timeout (0:15:00)!
Thread 0x000802006400 (most recent call first):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_random.py", 
line 637 in test_choices_algorithms
  [. . .]
Traceback (most recent call last):
  [. . .]
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/libregrtest/runtest_mp.py",
 line 221, in run_tests_multiprocess
raise Exception(msg)
Exception: Child error on test_random: Exit code 1

--

___
Python tracker 

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



[issue28587] list.index documentation missing start and stop arguments

2016-11-21 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Mariatta, thank you for the patch.  And Chris, thanks for the observant bug 
report.

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

___
Python tracker 

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



[issue28587] list.index documentation missing start and stop arguments

2016-11-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 62c16fafa7d4 by Raymond Hettinger in branch '3.6':
Issue 28587:  list.index documentation missing start and stop arguments. 
(Contributed by Mariatta Wijaya.)
https://hg.python.org/cpython/rev/62c16fafa7d4

--
nosy: +python-dev

___
Python tracker 

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



[issue28652] Make loop methods reject socket kinds they do not support.

2016-11-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0ee76f3afd70 by Yury Selivanov in branch '3.5':
Issue #28652: Partially rollback previous changes
https://hg.python.org/cpython/rev/0ee76f3afd70

New changeset a40159071359 by Yury Selivanov in branch '3.6':
Merge 3.5 (issue #28652)
https://hg.python.org/cpython/rev/a40159071359

New changeset a759fcba1866 by Yury Selivanov in branch 'default':
Merge 3.6 (issue #28652)
https://hg.python.org/cpython/rev/a759fcba1866

--

___
Python tracker 

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



[issue28475] Misleading error on random.sample when k < 0

2016-11-21 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Thanks Franscisco.  

I ended-up not modifying the docs because I think it clutters that clarity with 
an irrelevant side issue.  The more important part was to make sure the error 
message wasn't misleading and the test that edge case.  I didn't backport to 
Python 2.7 because I don't think it meets the threshold of being interesting 
enough to warrant a backport to an old release.

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

___
Python tracker 

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



[issue28752] datetime object fails to restore from reduction

2016-11-21 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

It looks like Serhiy has already committed it.  Thanks!

--

___
Python tracker 

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



[issue28752] datetime object fails to restore from reduction

2016-11-21 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


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



[issue28475] Misleading error on random.sample when k < 0

2016-11-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 89f95c78e0ab by Raymond Hettinger in branch '3.6':
Issue 28475:  Improve error message for random.sample() with k < 0. 
(Contributed by Francisco Couzo).
https://hg.python.org/cpython/rev/89f95c78e0ab

--
nosy: +python-dev

___
Python tracker 

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



[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-11-21 Thread STINNER Victor

STINNER Victor added the comment:

issue27414.patch is not good: see my review.

--
nosy: +haypo

___
Python tracker 

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



[issue28752] datetime object fails to restore from reduction

2016-11-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0a2a0061e425 by Serhiy Storchaka in branch '3.6':
Issue #28752: Restored the __reduce__() methods of datetime objects.
https://hg.python.org/cpython/rev/0a2a0061e425

New changeset 23140bd66d86 by Serhiy Storchaka in branch 'default':
Issue #28752: Restored the __reduce__() methods of datetime objects.
https://hg.python.org/cpython/rev/23140bd66d86

--
nosy: +python-dev

___
Python tracker 

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



[issue28752] datetime object fails to restore from reduction

2016-11-21 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

> If you can push this in the next hour or two ...

I'll do it now.

--

___
Python tracker 

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



[issue28752] datetime object fails to restore from reduction

2016-11-21 Thread Ned Deily

Ned Deily added the comment:

If you can push this in the next hour or two, it can still make b4.

--

___
Python tracker 

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



[issue28751] Fix comments in code.h

2016-11-21 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Thanks Ned.

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

___
Python tracker 

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



[issue28751] Fix comments in code.h

2016-11-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0a916174 by Raymond Hettinger in branch '3.6':
Issue 28751: Fix comments in code.h.  (Contributed by Ned Batchelder).
https://hg.python.org/cpython/rev/0a916174

--
nosy: +python-dev

___
Python tracker 

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



[issue15851] Lib/robotparser.py doesn't accept setting a user agent string, instead it uses the default.

2016-11-21 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue28751] Fix comments in code.h

2016-11-21 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue28532] Show sys.version when -V option is supplied twice.

2016-11-21 Thread Martin Panter

Martin Panter added the comment:

The text looks okay. I’m not sure about putting it in the “Porting to Python 
3.6” section, but there doesn’t seem to be a more appropriate existing heading. 
Perhaps we need a new heading, say “Other Improvement”, near “Optimizations” 
and “Build and C API Changes”. A previous What’s New had 
.

--

___
Python tracker 

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



[issue28689] OpenSSL 1.1.0c test failures

2016-11-21 Thread Charalampos Stratakis

Charalampos Stratakis added the comment:

Fixed upstream:
https://github.com/openssl/openssl/commit/beacb0f0c1ae7b0542fe053b95307f515b578eb7

--
nosy: +cstratak

___
Python tracker 

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



[issue28747] Expose SSL_CTX_set_cert_verify_callback

2016-11-21 Thread Steve Dower

Steve Dower added the comment:

For the sake of review, I fixed the patch and rebased it on default.

--
Added file: http://bugs.python.org/file45594/28747_3.patch

___
Python tracker 

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



[issue28768] Warning: implicit declaration of function '_setmode'

2016-11-21 Thread Masayuki Yamamoto

Changes by Masayuki Yamamoto :


Added file: http://bugs.python.org/file45593/2.7-include-io.h.patch

___
Python tracker 

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



[issue28768] Warning: implicit declaration of function '_setmode'

2016-11-21 Thread Masayuki Yamamoto

New submission from Masayuki Yamamoto:

Platform that appeared warning is Vista Cygwin x86. Interpreter execution 
doesn't crash because _setmode function is supplied from cygwin1.dll that 
always linked.
Warning reason is header io.h [*] doesn't include to source file. Therefore I 
wrote two patches for 3.7 and 2.7.

[*] https://msdn.microsoft.com/en-us/library/tw4k6df8.aspx (Cygwin also 
avaliable)

build log on 3.7:

gcc -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes-std=c99 -Wextra -Wno-unused-result 
-Wno-unused-parameter -Wno-missing-field-initializers   -I. -I./Include
-DPy_BUILD_CORE -o Modules/main.o Modules/main.c
Modules/main.c: In function 'Py_Main':
Modules/main.c:599:5: warning: implicit declaration of function '_setmode' 
[-Wimplicit-function-declaration]
 _setmode(fileno(stdin), O_BINARY);
 ^
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes-std=c99 -Wextra -Wno-unused-result 
-Wno-unused-parameter -Wno-missing-field-initializers   -I. -I./Include
-DPy_BUILD_CORE  -I./Modules/_io -c ./Modules/_io/fileio.c -o Modules/fileio.o
./Modules/_io/fileio.c: In function '_io_FileIO___init___impl':
./Modules/_io/fileio.c:478:5: warning: implicit declaration of function 
'_setmode' [-Wimplicit-function-declaration]
 _setmode(self->fd, O_BINARY);
 ^

--
components: Build
files: include-io.h.patch
keywords: patch
messages: 281389
nosy: benjamin.peterson, masamoto, stutzbach
priority: normal
severity: normal
status: open
title: Warning: implicit declaration of function '_setmode'
type: compile error
versions: Python 2.7, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file45592/include-io.h.patch

___
Python tracker 

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



[issue28752] datetime object fails to restore from reduction

2016-11-21 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +ned.deily

___
Python tracker 

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



[issue28752] datetime object fails to restore from reduction

2016-11-21 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

The patch LGTM.  I'll commit it tonight unless Serhiy beats me to it.

--
nosy: +alexandre.vassalotti, haypo, tim.peters

___
Python tracker 

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



[issue28752] datetime object fails to restore from reduction

2016-11-21 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
assignee:  -> belopolsky
stage: patch review -> commit review

___
Python tracker 

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



[issue4347] Circular dependency causes SystemError when adding new syntax

2016-11-21 Thread Brett Cannon

Brett Cannon added the comment:

So what does having the tokenizer not depend on pgen accomplish? Does it break 
a circular dependency where the tokenizer will get rebuilt with pgen before a 
full build starts?

--

___
Python tracker 

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



[issue28751] Fix comments in code.h

2016-11-21 Thread Brett Cannon

Brett Cannon added the comment:

Patch LGTM.

--
stage:  -> commit review

___
Python tracker 

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



[issue28767] Readd __index__ support on ipaddress objects

2016-11-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Why __index__ support is needed?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue28767] Readd __index__ support on ipaddress objects

2016-11-21 Thread Josh Rosenberg

New submission from Josh Rosenberg:

It looks like, due to #16722, in #15559, __index__ was removed from ipaddress 
objects. #16722 was fixed a few months later, but the comments asking for it to 
be readded were put on a closed issue, so no one noticed.

Can __index__ support be readded now? Should be as simple as undoing 
https://hg.python.org/cpython/rev/5abea8a43f19 (probably manually, assuming the 
subsequent history would make a direct rollback nonfeasible).

Nosying the folks involved in fixing the original bugs.

--
messages: 281384
nosy: benjamin.peterson, josh.r, ncoghlan
priority: normal
severity: normal
status: open
title: Readd __index__ support on ipaddress objects
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue28172] Upper-case all example enum members

2016-11-21 Thread Ethan Furman

Changes by Ethan Furman :


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



[issue28172] Upper-case all example enum members

2016-11-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b9801dab214a by Ethan Furman in branch '3.6':
close issue28172: Change all example enum member names to uppercase, per Guido; 
patch by Chris Angelico.
https://hg.python.org/cpython/rev/b9801dab214a

New changeset 5ec8d4c51363 by Ethan Furman in branch 'default':
close issue28172: Change all example enum member names to uppercase, per Guido; 
patch by Chris Angelico.
https://hg.python.org/cpython/rev/5ec8d4c51363

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



[issue28747] Expose SSL_CTX_set_cert_verify_callback

2016-11-21 Thread Steve Dower

Steve Dower added the comment:

Whoops, that's what I get for renaming something. Easily fixed, but I'm happy 
to aim for 3.7.

--

___
Python tracker 

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



[issue28764] test_mailbox fails when run as a non-root user on Android API 24

2016-11-21 Thread R. David Murray

R. David Murray added the comment:

LGTM.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue28765] _sre.compile(): be more strict on types of indexgroup and groupindex

2016-11-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

If make groupindex and indexgroup a dict and a tuple, we could use concrete 
dict and tuple API instead of generic mapping and sequence APIs.

Note that groups, groupindex and indexgroup are not independent. Actually 
indexgroup is derived from groups and groupindex (in Python code), but groups 
and groupindex could be derived from indexgroup. groups could be derived from 
code. The interface of _sre.compile() can be simplified by passing only 
groupindex or indexgroup. Current interface is only for backward compatibility. 
I don't know whether this still is needed.

--

___
Python tracker 

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



[issue28082] re: convert re flags to (much friendlier) IntFlag constants

2016-11-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 493359386360 by Ethan Furman in branch '3.6':
issue28082: actually include NEWS entry
https://hg.python.org/cpython/rev/493359386360

--

___
Python tracker 

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



[issue28766] Remove the semicolon in source code

2016-11-21 Thread Yuwei Ba

New submission from Yuwei Ba:

As we do not often use semicolons in Python world. I hope this historical semi 
would be cleaned in a future release.

Source: Lib/httplib.py:1117

--
components: Library (Lib)
files: mywork.patch
hgrepos: 361
keywords: patch
messages: 281378
nosy: ibigbug
priority: normal
severity: normal
status: open
title: Remove the semicolon in source code
type: enhancement
versions: Python 2.7
Added file: http://bugs.python.org/file45591/mywork.patch

___
Python tracker 

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



[issue23591] enum: Add Flags and IntFlags

2016-11-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f404a59d834e by Ethan Furman in branch '3.6':
closes issue23591: add NEWS entry
https://hg.python.org/cpython/rev/f404a59d834e

--
status: open -> closed

___
Python tracker 

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



[issue28082] re: convert re flags to (much friendlier) IntFlag constants

2016-11-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 176fc21f8430 by Ethan Furman in branch '3.6':
closes issue28082: doc update and NEWS entry
https://hg.python.org/cpython/rev/176fc21f8430

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



[issue28740] Add sys.getandroidapilevel()

2016-11-21 Thread Xavier de Gaye

Xavier de Gaye added the comment:

I agree with Marc-Andre, Windows has sys.getwindowsversion() returning system 
information for the Windows version, and a platform.win32_ver() returning 
additional version information from the Registry obtained at run time. So it is 
consistent to add the sys.getandroidapilevel() function returning the version 
based on the ANDROID_API_LEVEL macro (a build, system level data, that 
specifies the libc version Python has been built against) and to add the 
platform.android_ver() version returning the device/emulator run time version 
obtained from the local properties system.

--

___
Python tracker 

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



[issue28727] Implement comparison (x==y and x!=y) for _sre.SRE_Pattern

2016-11-21 Thread STINNER Victor

STINNER Victor added the comment:

For stricter checks on _sre.compile() arguments, I created the issue #28765: 
"_sre.compile(): be more strict on types of indexgroup and groupindex".

--

___
Python tracker 

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



[issue28765] _sre.compile(): be more strict on types of indexgroup and groupindex

2016-11-21 Thread STINNER Victor

New submission from STINNER Victor:

Attached patch makes _sre.compile() more strict on types: groupindex must be a 
dictionary and indexgroup must be a tuple.

Currently, indexgroup is passed as a list. I chose to convert it to a tuple to 
use less memory and to prevent unwanted changes. For unwanted changed, I'm not 
sure because groupindex remains a mutable dictionary. Do you think that it's 
worth it to require a tuple? Another option is to accept a list but to convert 
it to a list, but this change is more specific to the current implementation.

--
files: sre_types.patch
keywords: patch
messages: 281373
nosy: haypo, serhiy.storchaka
priority: normal
severity: normal
status: open
title: _sre.compile(): be more strict on types of indexgroup and groupindex
type: enhancement
versions: Python 3.7
Added file: http://bugs.python.org/file45590/sre_types.patch

___
Python tracker 

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



[issue28731] _PyDict_NewPresized() creates too small dict

2016-11-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b708b3190ecb by INADA Naoki in branch 'default':
Issue #28731: Optimize _PyDict_NewPresized() to create correct size dict
https://hg.python.org/cpython/rev/b708b3190ecb

--
nosy: +python-dev

___
Python tracker 

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



[issue28688] Warning -- warnings.filters was modified by test_warnings

2016-11-21 Thread STINNER Victor

STINNER Victor added the comment:

I implemented x==y operator for _sre.SRE_Pattern in Python 3.6 and 3.7, it 
fixed this issue.

For Python 3.5, I removed the warnings.filters test, as we discussed.

@Martin Panter: immortal-filters.patch works because I'm not super excited by 
the change. Somehow, it looks like a hack... even if I don't see any better 
solution for Python 3.5.

Since the bug only impacts Python test suite in the practical, is it really 
worth it to fix it in Python 3.5 which is almost in the "security fix only" 
stage?


@Martin: It's up to you, I have no strong opinion on your patch.


> I agree there is no need to change Python 2 at this stage.

Ok.

--

___
Python tracker 

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



[issue28731] _PyDict_NewPresized() creates too small dict

2016-11-21 Thread INADA Naoki

INADA Naoki added the comment:

Thanks.
As @haypo suggests, I'll commit this to default branch first, and
backport to 3.6 after 3.6.0 is released.

--

___
Python tracker 

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



[issue28727] Implement comparison (x==y and x!=y) for _sre.SRE_Pattern

2016-11-21 Thread STINNER Victor

STINNER Victor added the comment:

Serhiy Storchaka: "pattern_compare-6.patch LGTM."

Thank you very much for your very useful reviews! I pushed the change.

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

___
Python tracker 

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



[issue28688] Warning -- warnings.filters was modified by test_warnings

2016-11-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 75b1091594f8 by Victor Stinner in branch '3.5':
Issue #28688: Remove warnings.filters check from regrtest
https://hg.python.org/cpython/rev/75b1091594f8

New changeset a2616863de06 by Victor Stinner in branch '3.6':
Issue #28688: Null merge 3.5
https://hg.python.org/cpython/rev/a2616863de06

New changeset da042eec6743 by Victor Stinner in branch 'default':
Issue #28688: Null merge 3.6
https://hg.python.org/cpython/rev/da042eec6743

--
nosy: +python-dev

___
Python tracker 

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



[issue28023] python-gdb.py must be updated for the new Python 3.6 compact dict

2016-11-21 Thread INADA Naoki

Changes by INADA Naoki :


Added file: http://bugs.python.org/file45589/dict_gdb2.patch

___
Python tracker 

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



[issue26865] Meta-issue: support of the android platform

2016-11-21 Thread Xavier de Gaye

Xavier de Gaye added the comment:

New issues raised upon testing on the Android API 24 emulator:
  issue #28683: bind() on a unix socket raises PermissionError on Android for a 
non-root user
  issue #28684: [asyncio] bind() on a unix socket raises PermissionError on 
Android for a non-root user
  issue #28746: cannot set_inheritable() for a file descriptor on Android
  issue #28759: access to mkfifo, mknod and hard links is controled by SELinux 
MAC on Android
  issue #28762: configure links with lockf and F_LOCK is not declared in 
Android API 24
  issue #28764: test_mailbox fails when run as a non-root user on Android API 24

--
dependencies: +[asyncio] bind() on a unix socket raises PermissionError on 
Android for a non-root user, access to mkfifo, mknod and hard links is 
controled by SELinux MAC on Android, bind() on a unix socket raises 
PermissionError on Android for a non-root user, cannot set_inheritable() for a 
file descriptor on Android, configure links with lockf and F_LOCK is not 
declared in Android API 24, test_mailbox fails when run as a non-root user on 
Android API 24

___
Python tracker 

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



[issue28727] Implement comparison (x==y and x!=y) for _sre.SRE_Pattern

2016-11-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5e8ef1493843 by Victor Stinner in branch '3.6':
Implement rich comparison for _sre.SRE_Pattern
https://hg.python.org/cpython/rev/5e8ef1493843

--
nosy: +python-dev

___
Python tracker 

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



[issue18383] test_warnings modifies warnings.filters when running with "-W default"

2016-11-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5e8ef1493843 by Victor Stinner in branch '3.6':
Implement rich comparison for _sre.SRE_Pattern
https://hg.python.org/cpython/rev/5e8ef1493843

--

___
Python tracker 

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



[issue28764] test_mailbox fails when run as a non-root user on Android API 24

2016-11-21 Thread Xavier de Gaye

New submission from Xavier de Gaye:

The patch fixes the problem that on Android API 24, a non-root user is not 
allowed to create the hard links used by the mailbox module.
Related to issue 28759.

--
assignee: xdegaye
components: Library (Lib)
files: test_mailbox_link.patch
keywords: patch
messages: 281364
nosy: xdegaye
priority: normal
severity: normal
stage: patch review
status: open
title: test_mailbox fails when run as a non-root user on Android API 24
type: behavior
versions: Python 3.6, Python 3.7
Added file: http://bugs.python.org/file45588/test_mailbox_link.patch

___
Python tracker 

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



[issue28727] Implement comparison (x==y and x!=y) for _sre.SRE_Pattern

2016-11-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

pattern_compare-6.patch LGTM.

--
assignee:  -> haypo
stage: patch review -> commit review

___
Python tracker 

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



[issue28727] Implement comparison (x==y and x!=y) for _sre.SRE_Pattern

2016-11-21 Thread STINNER Victor

STINNER Victor added the comment:

Back to basis, patch 6:

* revert changes on indexgroup and groupindex types: I will fix this later, 
once this issue is fixed
* pattern_richcompare() and pattern_hash() also uses pattern, but don't use 
groups, indexgroup nor groupindex anymore

I removed the @cpython_only unit test and rewrote test_pattern_compare_bytes() 
to make it easier to follow.

re.compile('abc', re.IGNORECASE) is different than re.compile('ABC', 
re.IGNORECASE), but it's a deliberate choice to not test it. I consider that 
the behaviour can change depending on the Python implementation and in a future 
version.

--
Added file: http://bugs.python.org/file45587/pattern_compare-6.patch

___
Python tracker 

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



[issue28763] Use en-dashes for ranges in docs

2016-11-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Some of these double hyphens are in code examples. Thus the actual number of 
en-dashes that can be changed to em-dashes is smaller.

--

___
Python tracker 

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



[issue28763] Use en-dashes for ranges in docs

2016-11-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

353 en-dashes with spaces.
479 em-dashes with spaces.
89 em-dashes without spaces.

And some number of hyphens with spaces. It is hard to automatically distinguish 
them from minuses in code examples, but in issue18529 I provided large patches 
that converted all of them to dashes.

--

___
Python tracker 

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



[issue28023] python-gdb.py must be updated for the new Python 3.6 compact dict

2016-11-21 Thread STINNER Victor

STINNER Victor added the comment:

I reviewed dict_gdb.patch.

--

___
Python tracker 

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



[issue28763] Use en-dashes for ranges in docs

2016-11-21 Thread Ezio Melotti

Ezio Melotti added the comment:

While you are at it, have you checked how many en-dashes have been used instead 
of em-dashes?  "--" is commonly used to indicate em-dashes (e.g. in emails), 
but in rst it renders to an en-dash.

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue28761] Add the const qualifier to fields name and doc of public structs

2016-11-21 Thread Nick Coghlan

Nick Coghlan added the comment:

+1 from me. The only thing I noticed in the patch was that the issue number 
needs filling in now that you've filed it.

--

___
Python tracker 

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



[issue28638] Creating namedtuple is too slow to be used in common stdlib (e.g. functools)

2016-11-21 Thread Nick Coghlan

Nick Coghlan added the comment:

Ah, I had forgotten that Larry had already included Python support in Argument 
Clinic.

With the inline code auto-generated from the pure Python implementation, that 
addresses the main maintenance concerns I had. I did briefly wonder about the 
difficulties of bootstrapping Argument Clinic (since it uses functools), but 
that's already accounted for in the comment-based design of Argument Clinic 
itself (i.e. since the generated code is checked in, the previous iteration can 
be used to generate the updated one when the namedtuple template changes).

Raymond, how does this variant look to you?

--

___
Python tracker 

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



[issue28731] _PyDict_NewPresized() creates too small dict

2016-11-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I think function scope constant is good. Similar code in dictresize() should 
have different bound.

The patch LGTM.

--
stage: patch review -> commit review

___
Python tracker 

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



  1   2   >