[issue27945] Various segfaults with dict

2016-11-20 Thread INADA Naoki

INADA Naoki added the comment:

LGTM.

Performance on Azure VM (AMD Opteron(tm) Processor 4171 HE):

$ ~/local/py36/bin/patched -m perf compare_to master.json patched.json -G
Slower (10):
- spectral_norm: 915 ms +- 17 ms -> 967 ms +- 25 ms: 1.06x slower
- nbody: 774 ms +- 28 ms -> 805 ms +- 22 ms: 1.04x slower
- regex_dna: 965 ms +- 18 ms -> 993 ms +- 22 ms: 1.03x slower
- go: 1.93 sec +- 0.05 sec -> 1.99 sec +- 0.06 sec: 1.03x slower
- python_startup_no_site: 29.7 ms +- 2.0 ms -> 30.5 ms +- 2.0 ms: 1.03x slower
- xml_etree_parse: 1.02 sec +- 0.03 sec -> 1.04 sec +- 0.04 sec: 1.02x slower
- python_startup: 52.7 ms +- 3.6 ms -> 53.7 ms +- 3.6 ms: 1.02x slower
- xml_etree_generate: 962 ms +- 24 ms -> 978 ms +- 25 ms: 1.02x slower
- pickle_dict: 188 us +- 8 us -> 191 us +- 8 us: 1.02x slower
- scimark_fft: 2.19 sec +- 0.04 sec -> 2.20 sec +- 0.05 sec: 1.00x slower

Faster (26):
- fannkuch: 3.76 sec +- 0.07 sec -> 3.55 sec +- 0.09 sec: 1.06x faster
- call_method_slots: 59.4 ms +- 9.0 ms -> 56.6 ms +- 3.4 ms: 1.05x faster
- sqlite_synth: 27.6 us +- 1.4 us -> 26.4 us +- 1.2 us: 1.05x faster
- nqueens: 852 ms +- 19 ms -> 813 ms +- 20 ms: 1.05x faster
- django_template: 1.35 sec +- 0.04 sec -> 1.29 sec +- 0.03 sec: 1.05x faster
- unpack_sequence: 407 ns +- 16 ns -> 390 ns +- 16 ns: 1.04x faster
- call_method: 60.6 ms +- 1.4 ms -> 58.1 ms +- 1.6 ms: 1.04x faster
- xml_etree_iterparse: 918 ms +- 29 ms -> 881 ms +- 32 ms: 1.04x faster
- unpickle_pure_python: 3.44 ms +- 0.14 ms -> 3.31 ms +- 0.19 ms: 1.04x faster
- richards: 608 ms +- 20 ms -> 585 ms +- 15 ms: 1.04x faster
- chaos: 921 ms +- 22 ms -> 891 ms +- 24 ms: 1.03x faster
- mako: 189 ms +- 8 ms -> 183 ms +- 8 ms: 1.03x faster
- meteor_contest: 699 ms +- 23 ms -> 677 ms +- 26 ms: 1.03x faster
- regex_compile: 1.52 sec +- 0.03 sec -> 1.48 sec +- 0.04 sec: 1.03x faster
- chameleon: 101 ms +- 5 ms -> 97.8 ms +- 4.0 ms: 1.03x faster
- regex_v8: 153 ms +- 7 ms -> 149 ms +- 6 ms: 1.03x faster
- 2to3: 2.59 sec +- 0.05 sec -> 2.52 sec +- 0.05 sec: 1.03x faster
- crypto_pyaes: 797 ms +- 20 ms -> 776 ms +- 18 ms: 1.03x faster
- genshi_xml: 653 ms +- 23 ms -> 637 ms +- 27 ms: 1.03x faster
- pickle_pure_python: 4.54 ms +- 0.19 ms -> 4.42 ms +- 0.20 ms: 1.03x faster
- regex_effbot: 18.4 ms +- 0.7 ms -> 18.1 ms +- 0.6 ms: 1.02x faster
- unpickle: 107 us +- 4 us -> 105 us +- 5 us: 1.02x faster
- deltablue: 61.2 ms +- 3.4 ms -> 60.0 ms +- 3.5 ms: 1.02x faster
- raytrace: 4.34 sec +- 0.14 sec -> 4.26 sec +- 0.10 sec: 1.02x faster
- telco: 63.9 ms +- 3.1 ms -> 62.9 ms +- 3.2 ms: 1.02x faster
- pidigits: 965 ms +- 14 ms -> 955 ms +- 20 ms: 1.01x faster

Benchmark hidden because not significant (28): call_method_unknown, 
call_simple, dulwich_log, float, genshi_text, hexiom, html5lib, json_dumps, 
json_loads, logging_format, logging_silent, logging_simple, pathlib, pickle, 
pickle_list, scimark_lu, scimark_monte_carlo, scimark_sor, 
scimark_sparse_mat_mult, sqlalchemy_declarative, sqlalchemy_imperative, 
sympy_expand, sympy_integrate, sympy_str, sympy_sum, tornado_http, 
unpickle_list, xml_etree_process

--

___
Python tracker 

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



[issue28032] --with-lto builds segfault in many situations

2016-11-20 Thread Ned Deily

Ned Deily added the comment:

For 3.6 at least, there are still mentions of --with-optimizations in 
Doc/whatsnew/3.6.rst and README.

--

___
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-20 Thread Ned Deily

Ned Deily added the comment:

We are two weeks from producing the release candidate for 3.6.0.  I don't think 
we should be rushing to add a new security-critical API which, IIUC, won't be 
used in the initial release anyway.  Let's target it for 3.7 after proper 
review and then we can decide whether it makes sense to backport to a 3.6.x 
maint release if the security issues it may solve warrant it.

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



[issue28747] Expose SSL_CTX_set_cert_verify_callback

2016-11-20 Thread Ned Deily

Ned Deily added the comment:

And, as it stands, the tests fail (at least on macOS):

==
ERROR: test_set_cert_verify_callback (test.test_ssl.SimpleBackgroundTests)
--
Traceback (most recent call last):
  File 
"/py/dev/36/root/fwd_macports/Library/Frameworks/pytest_10.12.framework/Versions/3.6/lib/python3.6/test/test_ssl.py",
 line 1782, in test_set_cert_verify_callback
ctx._set_cert_verify_callback(callback)
AttributeError: 'SSLContext' object has no attribute '_set_cert_verify_callback'

==
ERROR: test_set_cert_verify_callback_error (test.test_ssl.SimpleBackgroundTests)
--
Traceback (most recent call last):
  File 
"/py/dev/36/root/fwd_macports/Library/Frameworks/pytest_10.12.framework/Versions/3.6/lib/python3.6/test/test_ssl.py",
 line 1805, in test_set_cert_verify_callback_error
ctx._set_cert_verify_callback(raise_error)
AttributeError: 'SSLContext' object has no attribute '_set_cert_verify_callback'

==
ERROR: test_set_cert_verify_callback_suppress_error 
(test.test_ssl.SimpleBackgroundTests)
--
Traceback (most recent call last):
  File 
"/py/dev/36/root/fwd_macports/Library/Frameworks/pytest_10.12.framework/Versions/3.6/lib/python3.6/test/test_ssl.py",
 line 1827, in test_set_cert_verify_callback_suppress_error
ctx._set_cert_verify_callback(raise_error)
AttributeError: 'SSLContext' object has no attribute '_set_cert_verify_callback'

--
Ran 130 tests in 27.416s

FAILED (errors=3, skipped=8)

--

___
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-20 Thread Ned Deily

Ned Deily added the comment:

With the patch (_2), clang (and gcc 4.2) on macOS warn:

./Modules/_ssl.c:3968:7: warning: assigning to 'unsigned char *' from 'char *'
  converts between pointers to integer types with different sign 
[-Wpointer-sign]
p = PyBytes_AS_STRING(enc_cert);
  ^ ~~~

--

___
Python tracker 

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



[issue28756] robotfileparser always uses default Python user-agent

2016-11-20 Thread Ezio Melotti

Changes by Ezio Melotti :


--
stage:  -> resolved

___
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-20 Thread Xiang Zhang

Changes by Xiang Zhang :


--
versions: +Python 3.7 -Python 3.5

___
Python tracker 

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



[issue28756] robotfileparser always uses default Python user-agent

2016-11-20 Thread Xiang Zhang

Xiang Zhang added the comment:

Hi, John. This issue of robotparser has been reported in #15851. I'll close 
this as duplicate and you can discuss in that thread.

--
nosy: +xiang.zhang
resolution:  -> duplicate
status: open -> closed
superseder:  -> Lib/robotparser.py doesn't accept setting a user agent string, 
instead it uses the default.
versions:  -Python 2.7, Python 3.3, Python 3.4, 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



[issue28758] UnicodeDecodeError: 'gbk' codec can't decode byte 0xab in position 74: illegal multibyte sequence

2016-11-20 Thread dontbugme

New submission from dontbugme:

you can see https://github.com/mintty/mintty/issues/609
os.popen('chcp 65001 && ' + JAVA + ' -jar ' + CHECKSTYLE_JAR + ' -c ' + 
CHECKSTYLE_XML + ' "%s/%s"' % (COMMIT_TEMP_DIT, changed)).read()

--
messages: 281322
nosy: dontbugme
priority: normal
severity: normal
status: open
title: UnicodeDecodeError: 'gbk' codec can't decode byte 0xab in position 74: 
illegal multibyte sequence
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



[issue4347] Circular dependency causes SystemError when adding new syntax

2016-11-20 Thread Martin Panter

Martin Panter added the comment:

Equivalent patch for 2.7

--
Added file: http://bugs.python.org/file45576/graminit-dep.py2.patch

___
Python tracker 

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



[issue20572] subprocess.Popen.wait() undocumented "endtime" parameter

2016-11-20 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Works for me. Thanks :)

Maybe it's ok to close this ticket now?

--

___
Python tracker 

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



[issue25659] ctypes.Array.from_buffer segmentation fault when trying to create from array.array

2016-11-20 Thread Martin Panter

Changes by Martin Panter :


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



[issue10656] "Out of tree" build fails on AIX

2016-11-20 Thread Martin Panter

Changes by Martin Panter :


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



[issue28757] Installation Failure

2016-11-20 Thread Sophia I. Salinas

New submission from Sophia I. Salinas:

I downloaded Python 3.2 for Mac but when I tried to install it, I got an error 
that says:
"The installation failed. The installer could not install the software because 
there was no software found to install."

--
messages: 281319
nosy: sophiaisa
priority: normal
severity: normal
status: open
title: Installation Failure
type: behavior

___
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-20 Thread Steve Dower

Steve Dower added the comment:

Should have assigned this to me, as I expect I'll be the one to apply it.

Christian - I need to look to you for whether I've exposed the right function 
here and it's not adding security risk (obviously excluding a broken callback 
implementation). I *think* it's okay, but I trust your greater experience here.

3.6.0b4 is being tagged tomorrow and I think this is worth getting in - hence 
why I added Ned. There's no added functionality and no impact if the API isn't 
used. The latest patch removes the '_' prefix but happy to put it back and 
leave it as undocumented.

If neither of you have any concerns, I'll check it in. As I mentioned, at some 
point early in Python 3.6's release I should have a library available that lets 
the OS do certificate validation, but it needs this callback exposed.

--
assignee: christian.heimes -> steve.dower

___
Python tracker 

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



[issue28556] typing.py upgrades

2016-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 75c7bc2c1ad8 by Guido van Rossum in branch '3.5':
Issue #28556: upstream improvements to docstrings and error messages by Ivan 
Levkivskyi (#331)
https://hg.python.org/cpython/rev/75c7bc2c1ad8

New changeset 294525aac5eb by Guido van Rossum in branch '3.6':
Issue #28556: upstream improvements to docstrings and error messages by Ivan 
Levkivskyi (#331) (3.5->3.6)
https://hg.python.org/cpython/rev/294525aac5eb

New changeset 30f154d9abf0 by Guido van Rossum in branch 'default':
Issue #28556: upstream improvements to docstrings and error messages by Ivan 
Levkivskyi (#331) (3.6->3.7)
https://hg.python.org/cpython/rev/30f154d9abf0

--

___
Python tracker 

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



[issue28756] robotfileparser always uses default Python user-agent

2016-11-20 Thread John Nagle

John Nagle added the comment:

(That's from a subclass I wrote.  As a change to RobotFileParser, __init__ 
should start like this.)

def __init__(self, url='', user_agent=None):
self.user_agent = user_agent# save user agent
...

--

___
Python tracker 

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



[issue28756] robotfileparser always uses default Python user-agent

2016-11-20 Thread John Nagle

John Nagle added the comment:

Suggest adding a user_agent optional parameter, as shown here:

def __init__(self, url='', user_agent=None):
urllib.robotparser.RobotFileParser.__init__(self, url)  # init parent
self.user_agent = user_agent# save user agent
 
def read(self):
"""
Reads the robots.txt URL and feeds it to the parser.
Overrides parent read function.
"""
try:
req = urllib.request.Request(   # request with user 
agent specified
self.url, 
data=None)
if self.user_agent is not None :# if overriding user 
agent
req.add_header("User-Agent", self.user_agent)
f = urllib.request.urlopen(req) # open connection
except urllib.error.HTTPError as err:
if err.code in (401, 403):
self.disallow_all = True
elif err.code >= 400 and err.code < 500:
self.allow_all = True
else:
raw = f.read()
self.parse(raw.decode("utf-8").splitlines())

--

___
Python tracker 

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



[issue28756] robotfileparser always uses default Python user-agent

2016-11-20 Thread John Nagle

New submission from John Nagle:

urllib.robotparser.RobotFileParser always uses the default Python user agent. 
This agent is now blacklisted by many sites, and it's not possible to read the 
robots.txt file at all.

--
components: Library (Lib)
messages: 281314
nosy: nagle
priority: normal
severity: normal
status: open
title: robotfileparser always uses default Python user-agent
type: enhancement
versions: Python 2.7, Python 3.3, 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



[issue28032] --with-lto builds segfault in many situations

2016-11-20 Thread Stephen J. Turnbull

Stephen J. Turnbull added the comment:

FWIW, XEmacs has used a bit of m4 magic to make --with-* and --enable-* 
equivalent for 15 years, and nobody has ever complained.  The autotools 
convention is a distinction without a difference, and confuses users when a 
program feature depends on an external library (especially where there are 
alternative implementations).

--
nosy: +sjt

___
Python tracker 

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



[issue20572] subprocess.Popen.wait() undocumented "endtime" parameter

2016-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 54b2f377653d by Gregory P. Smith in branch 'default':
issue 20572: remove the deprecation notice for the deleted endtime parameter.
https://hg.python.org/cpython/rev/54b2f377653d

--

___
Python tracker 

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



[issue20572] subprocess.Popen.wait() undocumented "endtime" parameter

2016-11-20 Thread Gregory P. Smith

Gregory P. Smith added the comment:

thanks for the patch.  I reworked it slightly including the test.  warning in 
3.6, gone in 3.7.  i still need to update the 3.7 docs to remove it.

--

___
Python tracker 

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



[issue20572] subprocess.Popen.wait() undocumented "endtime" parameter

2016-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0e8aa537c565 by Gregory P. Smith in branch '3.6':
Issue #20572: The subprocess.Popen.wait method's undocumented endtime
https://hg.python.org/cpython/rev/0e8aa537c565

New changeset f02422c6110a by Gregory P. Smith in branch 'default':
Issue #20572: Remove the subprocess.Popen.wait endtime parameter.
https://hg.python.org/cpython/rev/f02422c6110a

--

___
Python tracker 

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



[issue25659] ctypes.Array.from_buffer segmentation fault when trying to create from array.array

2016-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5f061870d49c by Martin Panter in branch '3.5':
Issue #25659: Change assert to TypeError in from_buffer/_copy()
https://hg.python.org/cpython/rev/5f061870d49c

New changeset 1253ef20c947 by Martin Panter in branch '3.6':
Issue #25659: Merge ctypes fix from 3.5
https://hg.python.org/cpython/rev/1253ef20c947

New changeset 821da4891051 by Martin Panter in branch 'default':
Issue #25659: Merge ctypes fix from 3.6
https://hg.python.org/cpython/rev/821da4891051

New changeset 4de956751cf1 by Martin Panter in branch '2.7':
Issue #25659: Change assert to TypeError in from_buffer/_copy()
https://hg.python.org/cpython/rev/4de956751cf1

--
nosy: +python-dev

___
Python tracker 

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



[issue10656] "Out of tree" build fails on AIX

2016-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4852321a by Martin Panter in branch '3.5':
Issue #10656: Fix out-of-tree building on AIX
https://hg.python.org/cpython/rev/4852321a

New changeset 76d1f8001e27 by Martin Panter in branch '3.6':
Issue #10656: Merge AIX build fix from 3.5
https://hg.python.org/cpython/rev/76d1f8001e27

New changeset 180f046b597e by Martin Panter in branch 'default':
Issue #10656: Merge AIX build fix from 3.6
https://hg.python.org/cpython/rev/180f046b597e

New changeset ca46883fc5cf by Martin Panter in branch '2.7':
Issue #10656: Fix out-of-tree building on AIX
https://hg.python.org/cpython/rev/ca46883fc5cf

--
nosy: +python-dev

___
Python tracker 

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



[issue28666] Make test.support.rmtree() able to remove non-writable directories

2016-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset dd378356c77c by Martin Panter in branch '2.7':
Issue #28666: Fix stat import
https://hg.python.org/cpython/rev/dd378356c77c

--

___
Python tracker 

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



[issue28755] Rework syntax highlighing in howto/clinic.rst

2016-11-20 Thread Julien Palard

Changes by Julien Palard :


Added file: http://bugs.python.org/file45575/issue28755-2.diff

___
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-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This looks too complicated. groups, indexgroup and groupindex are unambiguously 
derived from pattern string. If caching works different pattern strings are 
compiled to different pattern objects. Currently they are not equal, even if 
their codes are equal. And I don't see large need to consider them equal.

--

___
Python tracker 

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



[issue28512] PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject() always set the offset attribute to None

2016-11-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch that makes PyErr_SyntaxLocationObject() setting correct offset.

--
keywords: +patch
stage:  -> patch review
Added file: 
http://bugs.python.org/file45574/PyErr_SyntaxLocationObject-offset.patch

___
Python tracker 

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



[issue28755] Rework syntax highlighing in howto/clinic.rst

2016-11-20 Thread Julien Palard

Changes by Julien Palard :


--
keywords: +patch
Added file: http://bugs.python.org/file45573/issue28755.diff

___
Python tracker 

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



[issue28755] Rework syntax highlighing in howto/clinic.rst

2016-11-20 Thread Julien Palard

New submission from Julien Palard:

I was reading `howto/clinic.html` and though I'll fix syntax highlighting.

--
assignee: docs@python
components: Argument Clinic, Documentation
messages: 281304
nosy: docs@python, larry, mdk
priority: normal
severity: normal
status: open
title: Rework syntax highlighing in howto/clinic.rst
versions: Python 2.7, 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



[issue28754] Argument Clinic for bisect.bisect_left

2016-11-20 Thread Julien Palard

Julien Palard added the comment:

The whole diff is reviewable in `issue28754-3.diff`.

--

___
Python tracker 

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



[issue28754] Argument Clinic for bisect.bisect_left

2016-11-20 Thread Julien Palard

Changes by Julien Palard :


Added file: http://bugs.python.org/file45572/issue28754-3.diff

___
Python tracker 

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



[issue28754] Argument Clinic for bisect.bisect_left

2016-11-20 Thread Julien Palard

Changes by Julien Palard :


Added file: http://bugs.python.org/file45571/insort-left.diff

___
Python tracker 

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



[issue28754] Argument Clinic for bisect.bisect_left

2016-11-20 Thread Julien Palard

Changes by Julien Palard :


Added file: http://bugs.python.org/file45568/bisect_left.diff

___
Python tracker 

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



[issue28754] Argument Clinic for bisect.bisect_left

2016-11-20 Thread Julien Palard

Changes by Julien Palard :


Added file: http://bugs.python.org/file45570/insort.diff

___
Python tracker 

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



[issue28754] Argument Clinic for bisect.bisect_left

2016-11-20 Thread Julien Palard

Changes by Julien Palard :


Added file: http://bugs.python.org/file45569/bisect.diff

___
Python tracker 

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



[issue28754] Argument Clinic for bisect.bisect_left

2016-11-20 Thread Julien Palard

Julien Palard added the comment:

Here it is for the whole bisect module.

I separated my work in commits, but I'm not sure how rietveld will eat that as 
they'll have unknown references, so I'll probably also upload a single patch 
with a known reference.

--

___
Python tracker 

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



[issue26359] CPython build options for out-of-the box performance

2016-11-20 Thread Gregory P. Smith

Gregory P. Smith added the comment:

per comments in issue28032 the new configure flag has been renamed from 
--with-optimizations to --enable-optimizations in all branches it was added to:

remote: notified python-check...@python.org of incoming changeset c0ea81315fb6
remote: notified python-check...@python.org of incoming changeset 58c1a49a10b4
remote: notified python-check...@python.org of incoming changeset 11cacf9f9a33
remote: notified python-check...@python.org of incoming changeset 0d2b42344ae5
remote: notified python-check...@python.org of incoming changeset 2d1d70b53376
remote: notified python-check...@python.org of incoming changeset d5ff5a2f33fd

--

___
Python tracker 

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



[issue28032] --with-lto builds segfault in many situations

2016-11-20 Thread Gregory P. Smith

Gregory P. Smith added the comment:

The configure flag has been renamed to --enable-optimizations in the following 
commits for 3,5, 3.6, default, & 2.7 branches (everywhere it exists):

remote: notified python-check...@python.org of incoming changeset c0ea81315fb6
remote: notified python-check...@python.org of incoming changeset 58c1a49a10b4
remote: notified python-check...@python.org of incoming changeset 11cacf9f9a33
remote: notified python-check...@python.org of incoming changeset 0d2b42344ae5
remote: notified python-check...@python.org of incoming changeset 2d1d70b53376
remote: notified python-check...@python.org of incoming changeset d5ff5a2f33fd

--

___
Python tracker 

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



[issue28754] Argument Clinic for bisect.bisect_left

2016-11-20 Thread Julien Palard

Julien Palard added the comment:

I searched an occurrence of what I'm describing which is already using clinic 
and there is, at least, one in Modules/binascii.c line 1090:

TL;DR: The idea is to use the `modulename.fnname [as c_basename] = 
modulename.existing_fn_name` clinic syntax, drop a "This function is also 
available as …" in the docstring, and check if they return the same thing in 
the tests.

This way looks good to me, it uses the dedicated syntax which looks right, and 
I'll drop the `self.assertEqual(self.module.bisect, self.module.bisect_right)` 
which is an implementation detail, replacing it by tests checking that both 
have the same behavior.

```
/*[clinic input]
binascii.b2a_hex

data: Py_buffer
/

Hexadecimal representation of binary data.

The return value is a bytes object.  This function is also
available as "hexlify()".
[clinic start generated code]*/

static PyObject *
binascii_b2a_hex_impl(PyObject *module, Py_buffer *data)
/*[clinic end generated code: output=92fec1a95c9897a0 input=96423cfa299ff3b1]*/
{
return _Py_strhex_bytes((const char *)data->buf, data->len);
}

/*[clinic input]
binascii.hexlify = binascii.b2a_hex

Hexadecimal representation of binary data.

The return value is a bytes object.
[clinic start generated code]*/

static PyObject *
binascii_hexlify_impl(PyObject *module, Py_buffer *data)
/*[clinic end generated code: output=749e95e53c14880c input=2e3afae7f083f061]*/
{
return _Py_strhex_bytes((const char *)data->buf, data->len);
}
```

--

___
Python tracker 

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



[issue28748] Make _Py_PackageContext of type "const char *"

2016-11-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Added a What's New note.

On GitHub I found only three projects (besides clones of CPython sources) that 
use _Py_PackageContext. They are not affected by this change.

--
Added file: http://bugs.python.org/file45567/_Py_PackageContext-const-2.patch

___
Python tracker 

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



[issue28666] Make test.support.rmtree() able to remove non-writable directories

2016-11-20 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



[issue28753] Clinic: Converting Your First Function is not up to date

2016-11-20 Thread Larry Hastings

Larry Hastings added the comment:

Let's see what Victor has to say.

--

___
Python tracker 

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



[issue28753] Clinic: Converting Your First Function is not up to date

2016-11-20 Thread Julien Palard

Julien Palard added the comment:

Should we keep this open for the FASTCALL bit?

--

___
Python tracker 

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



[issue28753] Clinic: Converting Your First Function is not up to date

2016-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0a18d2cfeb52 by Larry Hastings in branch 'default':
Issue 28753: Argument Clinic howto docfix, courtesy Julien Palard.
https://hg.python.org/cpython/rev/0a18d2cfeb52

--
nosy: +python-dev

___
Python tracker 

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



[issue28753] Clinic: Converting Your First Function is not up to date

2016-11-20 Thread Larry Hastings

Changes by Larry Hastings :


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

___
Python tracker 

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



[issue28753] Clinic: Converting Your First Function is not up to date

2016-11-20 Thread Julien Palard

Julien Palard added the comment:

Thanks for proof-reading my english, your editions are really nice: LGTM.

--

___
Python tracker 

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



[issue28753] Clinic: Converting Your First Function is not up to date

2016-11-20 Thread Larry Hastings

Larry Hastings added the comment:

I understand your concern as a non-English speaker, but your patch was really 
pretty good.  I did edit it a little; how's this?

--
Added file: http://bugs.python.org/file45566/larry.issue28753.diff

___
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-20 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

> On Nov 20, 2016, at 12:34 PM, Serhiy Storchaka  wrote:
> 
> The only way is to define both __reduce_ex__ and __reduce__ for time and 
> datewtime.

OK. I'll review your patch and get it committed shortly.

--

___
Python tracker 

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



[issue28666] Make test.support.rmtree() able to remove non-writable directories

2016-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 573fd9607c75 by Serhiy Storchaka in branch '3.5':
Issue #28666: Fix removing readonly directories on Windows.
https://hg.python.org/cpython/rev/573fd9607c75

New changeset 01f867e9cd34 by Serhiy Storchaka in branch '2.7':
Issue #28666: Fix removing readonly directories on Windows.
https://hg.python.org/cpython/rev/01f867e9cd34

New changeset b9e1a51a2d19 by Serhiy Storchaka in branch '3.6':
Issue #28666: Fix removing readonly directories on Windows.
https://hg.python.org/cpython/rev/b9e1a51a2d19

--

___
Python tracker 

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



[issue28753] Clinic: Converting Your First Function is not up to date

2016-11-20 Thread Julien Palard

Julien Palard added the comment:

@Larry: As a french-speaking guy, I typically don't write non-internal doc in 
english, fearing it sound weird for natives. I prefer translating it back in 
french (I'm the current leader of https://github.com/afpy/python_doc_fr)

Here, here is a patch.

--
keywords: +patch
Added file: http://bugs.python.org/file45565/issue28753.diff

___
Python tracker 

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



[issue28666] Make test.support.rmtree() able to remove non-writable directories

2016-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset da1880183693 by Serhiy Storchaka in branch 'default':
Issue #28666: Try to fix removing readonly directories on Windows.
https://hg.python.org/cpython/rev/da1880183693

--

___
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-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> Other way is to define __reduce_ex__ instead of __reduce__ in datetime.date.

Sorry, I was wrong. This would wouldn't work with C implementation. And 
explicitly setting __reduce__ = object.__reduce__ doesn't work. The only way is 
to define both __reduce_ex__ and __reduce__ for time and datewtime.

--

___
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-20 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

> On Nov 20, 2016, at 11:10 AM, Serhiy Storchaka  wrote:
> 
> Other way is to define __reduce_ex__ instead of __reduce__ in datetime.date.

I would prefer this solution.

--

___
Python tracker 

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



[issue28753] Clinic: Converting Your First Function is not up to date

2016-11-20 Thread Larry Hastings

Larry Hastings added the comment:

The bit about the "clinic/_" include is a good point.  Care to write a doc 
patch?

The bit about FASTCALL I don't know anything about because I haven't worked 
with FASTCALL.  I've added Victor Stinner, the author of the FASTCALL patch, 
maybe he can address your concerns about FASTCALL.

--
nosy: +haypo

___
Python tracker 

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



[issue28754] Argument Clinic for bisect.bisect_left

2016-11-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue28754] Argument Clinic for bisect.bisect_left

2016-11-20 Thread Larry Hastings

Larry Hastings added the comment:

Oh, and, if the code literally asserts they're the same function, that's just a 
sanity check based on the implementation.  You could preserve that if you care 
to, or you could just write a new function and remove the assertion.  Do what 
you think is best, then post your patch to the tracker and we'll all argue 
about it forever, how's that sound?

--

___
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-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Proposed patch restores the __reduce__() methods and makes Python and C 
implementations more consistent.

--
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file45564/datetime-reduce.patch

___
Python tracker 

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



[issue28754] Argument Clinic for bisect.bisect_left

2016-11-20 Thread Larry Hastings

Larry Hastings added the comment:

There's special syntax to handle aliases.  From comments in clinic.py:

# alternatively:
# modulename.fnname [as c_basename] = modulename.existing_fn_name
# clones the parameters and return converter from that
# function.  you can't modify them.  you must enter a
# new docstring.

Sorry the docs are out of date--patches welcome.  And speaking of patches, 
thanks for the patch!  I'll review it when you say it's ready.

--

___
Python tracker 

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



[issue28754] Argument Clinic for bisect.bisect_left

2016-11-20 Thread Julien Palard

Changes by Julien Palard :


Added file: http://bugs.python.org/file45563/issue28754-2.diff

___
Python tracker 

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



[issue28754] Argument Clinic for bisect.bisect_left

2016-11-20 Thread Julien Palard

New submission from Julien Palard:

Today I read https://docs.python.org/3.6/howto/clinic.html so I tried one: 
bisect.bisect_left.

I was unable to do `bisect_right`, as it's an "alias" for `bisect`, and there's 
a unit-test checking `self.assertEqual(self.module.bisect, 
self.module.bisect_right)`. Any hint welcome.

--
components: Argument Clinic
messages: 281282
nosy: larry, mdk
priority: normal
severity: normal
status: open
title: Argument Clinic for bisect.bisect_left

___
Python tracker 

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



[issue28754] Argument Clinic for bisect.bisect_left

2016-11-20 Thread Julien Palard

Changes by Julien Palard :


--
keywords: +patch
Added file: http://bugs.python.org/file45562/issue28754.diff

___
Python tracker 

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



[issue28753] Clinic: Converting Your First Function is not up to date

2016-11-20 Thread Julien Palard

Changes by Julien Palard :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
type:  -> enhancement

___
Python tracker 

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



[issue28753] Clinic: Converting Your First Function is not up to date

2016-11-20 Thread Julien Palard

Changes by Julien Palard :


--
components: +Argument Clinic
nosy: +larry
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



[issue28753] Clinic: Converting Your First Function is not up to date

2016-11-20 Thread Julien Palard

Changes by Julien Palard :


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



[issue28753] Clinic: Converting Your First Function is not up to date

2016-11-20 Thread Julien Palard

New submission from Julien Palard:

It looks like the "Converting Your First Function" has been written with 
clinic-generated C code interspersed with user C code. But it looks like 
nowadays a `clinic/{}.c.h` file is generated, so the "Converting Your First 
Function" should tell us to add the `#include "clinic/…`.

Also, the documentation states:

> If any of these items differ in any way, adjust your Argument
> Clinic function specification and rerun Tools/clinic/clinic.py
> until they are the same.

But since `METH_FASTCALL` it may be wrong (Clinic generated `METH_FASTCALL` but 
it was `METH_VARARGS|METH_KEYWORDS`).

--
messages: 281281
nosy: mdk
priority: normal
severity: normal
status: open
title: Clinic: Converting Your First Function is not up to date

___
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-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Now pickling of the datetime.datetime objects is implemented with 
__reduce_ex__. __reduce__ is not defined in datetime.datetime and is inherited 
from datetime.date.

>>> datetime.datetime.__reduce_ex__

>>> datetime.datetime.__reduce__


__reduce_ex__ has higher priority and is called instead of __reduce__. It is 
weird that __reduce_ex__ and __reduce__ are not consistent. __reduce__ should 
be defined as

def __reduce__(self):
return self.__reduce_ex__(2)

or just

__reduce__ = object.__reduce__

Other way is to define __reduce_ex__ instead of __reduce__ in datetime.date.

--
components: +Extension Modules
nosy: +belopolsky, serhiy.storchaka
type:  -> behavior

___
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-20 Thread Jason R. Coombs

Jason R. Coombs added the comment:

Pickle still works, so pickle must be relying on a different protocol for 
serialization.

$ python
Python 3.6.0b3 (v3.6.0b3:8345e066c0ed, Oct 31 2016, 18:05:23) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pickle
>>> import datetime
>>> pickle.loads(pickle.dumps(datetime.datetime.now()))
datetime.datetime(2016, 11, 20, 10, 56, 43, 264436)

--

___
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-20 Thread Jason R. Coombs

New submission from Jason R. Coombs:

On Python 3.5, the datetime would reduce and restore cleanly.

$ python3.5 -c "import datetime; func, params = 
datetime.datetime.now().__reduce__(); func(*params)"

With Python 3.6.0b3, it now fails with a TypeError.

$ python3.6 -c "import datetime; func, params = 
datetime.datetime.now().__reduce__(); func(*params)"
Traceback (most recent call last):
  File "", line 1, in 
TypeError: an integer is required (got type bytes)

--
messages: 281278
nosy: jason.coombs
priority: normal
severity: normal
status: open
title: datetime object fails to restore from reduction
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



[issue28666] Make test.support.rmtree() able to remove non-writable directories

2016-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b51607ea54c5 by Serhiy Storchaka in branch '2.7':
Issue #28666: Now test.test_support.rmtree is able to remove unwritable or
https://hg.python.org/cpython/rev/b51607ea54c5

New changeset 9e23b8996584 by Serhiy Storchaka in branch '3.5':
Issue #28666: Now test.support.rmtree is able to remove unwritable or
https://hg.python.org/cpython/rev/9e23b8996584

New changeset 82ca763882f5 by Serhiy Storchaka in branch '3.6':
Issue #28666: Now test.support.rmtree is able to remove unwritable or
https://hg.python.org/cpython/rev/82ca763882f5

New changeset 593ec9658f4b by Serhiy Storchaka in branch 'default':
Issue #28666: Now test.support.rmtree is able to remove unwritable or
https://hg.python.org/cpython/rev/593ec9658f4b

--

___
Python tracker 

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



[issue28750] Replace string with bytes in doc of unicode-escape an raw-unicode-escape

2016-11-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue28750] Replace string with bytes in doc of unicode-escape an raw-unicode-escape

2016-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 059b8e15b738 by Serhiy Storchaka in branch '3.5':
Issue #28750: Fixed docs of of unicode-escape an raw-unicode-escape C API.
https://hg.python.org/cpython/rev/059b8e15b738

New changeset 0c6fccf04a79 by Serhiy Storchaka in branch '3.6':
Issue #28750: Fixed docs of of unicode-escape an raw-unicode-escape C API.
https://hg.python.org/cpython/rev/0c6fccf04a79

New changeset deff7bf26d00 by Serhiy Storchaka in branch 'default':
Issue #28750: Fixed docs of of unicode-escape an raw-unicode-escape C API.
https://hg.python.org/cpython/rev/deff7bf26d00

--
nosy: +python-dev

___
Python tracker 

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



[issue28750] Replace string with bytes in doc of unicode-escape an raw-unicode-escape

2016-11-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

--
assignee: docs@python -> serhiy.storchaka

___
Python tracker 

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



[issue28655] Tests altered the execution environment in isolated mode

2016-11-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Most warnings are fixed in issue19398. The only warnings are left in 
test_import and test_lib2to3.

$ ./python -I -S -m test.regrtest -vv test_import test_lib2to3 >/dev/null
Warning -- files was modified by test_import
  Before: []
  After:  ['@test_15631_tmp.pyc'] 
/home/serhiy/py/cpython3.6/Lib/lib2to3/tests/test_parser.py:393: UserWarning: 
ParseError on file /home/serhiy/py/cpython3.6/Lib/lib2to3/main.py (bad input: 
type=22, value='=', context=('', (130, 38)))
  warnings.warn('ParseError on file %s (%s)' % (filepath, err))
/home/serhiy/py/cpython3.6/Lib/lib2to3/tests/test_parser.py:393: UserWarning: 
ParseError on file 
/home/serhiy/py/cpython3.6/Lib/lib2to3/tests/pytree_idempotency.py (bad input: 
type=22, value='=', context=('', (49, 33)))
  warnings.warn('ParseError on file %s (%s)' % (filepath, err))

--

___
Python tracker 

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



[issue28750] Replace string with bytes in doc of unicode-escape an raw-unicode-escape

2016-11-20 Thread Julien Palard

Julien Palard added the comment:

So, lgtm.

--

___
Python tracker 

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



[issue28750] Replace string with bytes in doc of unicode-escape an raw-unicode-escape

2016-11-20 Thread Xiang Zhang

Xiang Zhang added the comment:

> But I think the word "Python" in "Python bytes object" is redundant. It was 
> needed in "Python string object" to distinguish from "C string" and "Python 
> Unicode object".

Make sense. This "Python" actually appears in many places in the docs. I only 
change the related parts of this issue.

--
Added file: http://bugs.python.org/file45561/unicode-escape-doc_v3.patch

___
Python tracker 

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



[issue28667] FD_SETSIZE is unsigned on FreeBSD

2016-11-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue28750] Replace string with bytes in doc of unicode-escape an raw-unicode-escape

2016-11-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

For PyUnicode_AsCharmapString and PyUnicode_EncodeCharmap see issue28749.

--

___
Python tracker 

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



[issue28750] Replace string with bytes in doc of unicode-escape an raw-unicode-escape

2016-11-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Good catch Xiang!

But I think the word "Python" in "Python bytes object" is redundant. It was 
needed in "Python string object" to distinguish from "C string" and "Python 
Unicode object".

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue28750] Replace string with bytes in doc of unicode-escape an raw-unicode-escape

2016-11-20 Thread Julien Palard

Julien Palard added the comment:

The inconcistencies were introduced in hg changeset 41703:7993f23ad46c, git 
commit:

commit 40ec96630b96f077c8b5746ab0ec038f95aede8b
Author: Walter Dörwald 
Date:   Sat May 12 11:08:06 2007 +

Change PyUnicode_EncodeUnicodeEscape() to return a bytes object.
However PyUnicode_AsUnicodeEscapeString() (which is used by
Objects/fileobject.c::file_repr()) still returns a str8 object.
Give unicode_repr() it's own implementation which returns a str8
object (it was formerly just calling unicodeescape_string()
which was used to implement PyUnicode_EncodeUnicodeEscape() too),
because once repr() is required to return unicode objects it
needs its own implementation anyway.

(PyUnicode_EncodeUnicodeEscape was the old name for 
PyUnicode_AsUnicodeEscapeString (since 
06ade3ac0d12beacd84382bd5fc8baf1c21c0e74).)

I searched in the documentation for "python string" and it looks like  
PyUnicode_EncodeCharmap is documented to return a string, but it returns bytes 
(same issue), therefore, the same issue happen for PyUnicode_AsCharmapString 
which uses PyUnicode_EncodeCharmap.

--
nosy: +mdk

___
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-20 Thread Emanuel Barry

Changes by Emanuel Barry :


--
nosy: +ebarry

___
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-20 Thread Ned Batchelder

Changes by Ned Batchelder :


--
keywords: +patch
Added file: http://bugs.python.org/file45560/28751.patch

___
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-20 Thread Ned Batchelder

New submission from Ned Batchelder:

A field moved in PyCodeObject, but comments mentioning it were not updated. 
Also, there's a stray word?

--
messages: 281268
nosy: brett.cannon, nedbat
priority: normal
severity: normal
status: open
title: Fix comments in code.h
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



[issue28750] Replace string with bytes in doc of unicode-escape an raw-unicode-escape

2016-11-20 Thread Emanuel Barry

Changes by Emanuel Barry :


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



[issue28666] Make test.support.rmtree() able to remove non-writable directories

2016-11-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks Kushal.

--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue28750] Replace string with bytes in doc of unicode-escape an raw-unicode-escape

2016-11-20 Thread Xiang Zhang

Changes by Xiang Zhang :


Added file: http://bugs.python.org/file45559/unicode-escape-doc_v2.patch

___
Python tracker 

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



[issue28748] Make _Py_PackageContext of type "const char *"

2016-11-20 Thread Nick Coghlan

Nick Coghlan added the comment:

It technically could (if they're passing it to a function that takes a "char 
*"), but if they are and they can't change the affected function to take "const 
char *" instead, then that's an actual bug in the way they're using it.

So +1 from me for explicitly declaring the immutability in 3.7+ - it will need 
a note in the What's New porting guide though.

--

___
Python tracker 

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



[issue28666] Make test.support.rmtree() able to remove non-writable directories

2016-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 63820871014d by Serhiy Storchaka in branch '2.7':
Issue #28666: Now test.support.rmtree is able to remove unwritable or
https://hg.python.org/cpython/rev/63820871014d

New changeset c92f9be77b9b by Serhiy Storchaka in branch '3.5':
Issue #28666: Now test.support.rmtree is able to remove unwritable or
https://hg.python.org/cpython/rev/c92f9be77b9b

New changeset efe2993b20e2 by Serhiy Storchaka in branch '3.6':
Issue #28666: Now test.support.rmtree is able to remove unwritable or
https://hg.python.org/cpython/rev/efe2993b20e2

New changeset 3a1e75ecc17d by Serhiy Storchaka in branch 'default':
Issue #28666: Now test.support.rmtree is able to remove unwritable or
https://hg.python.org/cpython/rev/3a1e75ecc17d

--
nosy: +python-dev

___
Python tracker 

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



[issue10049] Add a "no-op" (null) context manager to contextlib (Rejected: use contextlib.ExitStack())

2016-11-20 Thread Nick Coghlan

Nick Coghlan added the comment:

Unfortunately, the redundancy doesn't buy enough to justify the permanent 
documentation and style guide cost of providing two ways to do exactly the same 
thing.

--

___
Python tracker 

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



[issue28750] Replace string with bytes in doc of unicode-escape an raw-unicode-escape

2016-11-20 Thread Emanuel Barry

Changes by Emanuel Barry :


--
nosy: +ebarry

___
Python tracker 

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



[issue28750] Replace string with bytes in doc of unicode-escape an raw-unicode-escape

2016-11-20 Thread Xiang Zhang

New submission from Xiang Zhang:

The docs of the encoders of unicode-escape and raw-unicode-escape still tell 
the result of the encoding is Python string object. It should be Python bytes 
object.

--
assignee: docs@python
components: Documentation
files: unicode-escape-doc.patch
keywords: patch
messages: 281263
nosy: docs@python, xiang.zhang
priority: normal
severity: normal
stage: patch review
status: open
title: Replace string with bytes in doc of unicode-escape an raw-unicode-escape
versions: Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file45558/unicode-escape-doc.patch

___
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-20 Thread Steve Dower

Steve Dower added the comment:

> Basically you want to replace OpenSSL's X509 verification with Windows' cert 
> validation and just leave the handshake and encryption to OpenSSL?

Yep. (See WinVerifyTrust for the Windows API I'm using.)

--

___
Python tracker 

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



[issue28710] Sphinx incompatible markup in configparser.ConfigParser.

2016-11-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +georg.brandl

___
Python tracker 

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



[issue28710] Sphinx incompatible markup in configparser.ConfigParser.

2016-11-20 Thread Patrick Lehmann

Patrick Lehmann added the comment:

I also found some docstrings using double back-tick plus double single quotes.

For example: ``x.y = v'' in builtins.py in function setattr(...).

--

___
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-20 Thread Christian Heimes

Christian Heimes added the comment:

IMHO SSL CTX set cert verify callback() is the wrong approach. Your are 
completely bypassing cert validation checks of OpenSSL. The callback has to 
build the chain and perform all checks on its own. By all checks I literally 
mean *all*, 
https://wiki.openssl.org/index.php/Manual:SSL_CTX_set_cert_verify_callback(3)#WARNINGS

Basically you want to replace OpenSSL's X509 verification with Windows' cert 
validation and just leave the handshake and encryption to OpenSSL?

--

___
Python tracker 

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



[issue28749] Fixed the documentation of the mapping codec APIs

2016-11-20 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Proposed patch adds the documentation of PyUnicode_Translate() and fixes the 
documentation of other mapping codec APIs (it is incorrect in Python 3): 
PyUnicode_DecodeCharmap(), PyUnicode_AsCharmapString(), 
PyUnicode_EncodeCharmap(), and PyUnicode_TranslateCharmap().

--
assignee: docs@python
components: Documentation, Unicode
files: docs-PyUnicode_Translate.patch
keywords: patch
messages: 281259
nosy: docs@python, ezio.melotti, haypo, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Fixed the documentation of the mapping codec APIs
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file45557/docs-PyUnicode_Translate.patch

___
Python tracker 

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



[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2016-11-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Arfrever, could you please provide your proposition as a patch?

--

___
Python tracker 

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



[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2016-11-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 75fe67538905 by Serhiy Storchaka in branch '3.5':
Issue #19569: Suggested more appropriate replacements for deprecated Unicode
https://hg.python.org/cpython/rev/75fe67538905

New changeset f26d3f9a958a by Serhiy Storchaka in branch '3.6':
Issue #19569: Suggested more appropriate replacements for deprecated Unicode
https://hg.python.org/cpython/rev/f26d3f9a958a

New changeset 2ae992bc2def by Serhiy Storchaka in branch 'default':
Issue #19569: Suggested more appropriate replacements for deprecated Unicode
https://hg.python.org/cpython/rev/2ae992bc2def

New changeset f692dafe6797 by Serhiy Storchaka in branch 'default':
Issue #19569: Compiler warnings are now emitted if use most of deprecated
https://hg.python.org/cpython/rev/f692dafe6797

--
nosy: +python-dev

___
Python tracker 

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



[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2016-11-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



  1   2   >