[issue25940] SSL tests failed due to expired svn.python.org SSL certificate

2016-01-03 Thread Martin Panter
Martin Panter added the comment: In the meantime, this patch changes the tests to use the new DST root certificate. This seems to be the minimum to make the tests pass again, but someone else should probably review it because I’m not too experienced with SSL certificate stuff. -- keyw

[issue25940] SSL tests failed due to expired svn.python.org SSL certificate

2016-01-03 Thread Martin Panter
Martin Panter added the comment: Assuming it is practical, would it be appropriate to convert the failing tests to connect to a local server running in a background Python thread? Perhaps using the existing ThreadedEchoServer. That way the tests wouldn’t require an internet connection, and the

[issue24733] Logically Dead Code

2016-01-03 Thread Martin Panter
Martin Panter added the comment: This looks like some leftover cruft after refactoring the code: . Removing it looks fine to me. This does not seem to be applicable to Python 3. -- nosy: +martin.panter __

[issue19006] UnitTest docs should have a single list of assertions

2016-01-03 Thread Kushal Das
Kushal Das added the comment: The patch looks good to me. Commit :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue25810] Python 3 documentation for eval is incorrect

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti type: -> enhancement versions: -Python 3.4 ___ Python tracker ___ ___ Python-bugs-l

[issue25866] Reference 3. Data Model: miscellaneous minor cleanups on the word "sequence".

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- keywords: +easy nosy: +ezio.melotti stage: -> needs patch versions: +Python 2.7, Python 3.5, Python 3.6 ___ Python tracker ___ _

[issue25743] Clarify exactly what \w matches in UNICODE mode

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- components: +Regular Expressions nosy: +ezio.melotti, mrabarnett stage: -> needs patch type: -> enhancement versions: -Python 3.2, Python 3.3, Python 3.4 ___ Python tracker _

[issue25547] Improve repr for files to show whether the file is open or closed.

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- resolution: -> not a bug stage: needs patch -> resolved status: open -> pending ___ Python tracker ___ _

[issue25517] regex howto example in "Lookahead Assertions"

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- components: +Regular Expressions nosy: +ezio.melotti, mrabarnett versions: -Python 3.4 ___ Python tracker ___ __

[issue25433] whitespace in strip()/lstrip()/rstrip()

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- keywords: +easy nosy: +ezio.melotti stage: -> needs patch versions: +Python 3.6 ___ Python tracker ___ _

[issue25423] Deprecate benchmarks that execute too quickly

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- keywords: +easy nosy: +ezio.melotti stage: -> needs patch type: -> behavior ___ Python tracker ___ ___

[issue25403] urllib.parse.urljoin is broken in python 3.5

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue25381] Doc: Use of old description of raise in Python3

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti type: -> enhancement versions: -Python 3.4 ___ Python tracker ___ ___ Python-bugs-l

[issue25347] assert_has_calls output is formatted inconsistently

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue25282] regex: Support for recursive patterns

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- components: +Regular Expressions nosy: +ezio.melotti, mrabarnett versions: +Python 3.6 -Python 3.4 ___ Python tracker ___ ___

[issue25197] Allow documentation switcher to change url to /3/ and /dev/

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti, georg.brandl stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mai

[issue25179] PEP 498 f-strings need to be documented

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue26000] Crash in Tokenizer - Heap-use-after-free

2016-01-03 Thread William Bowling
William Bowling added the comment: Also a very similar source causes a slightly different crash (heap-buffer-overflow instead of heap-use-after-free): ./python -c 'with open("vuln2.py", "wb") as f: f.write(b"\x61\x73\x00\x0a\x79\x6e\x63\x5c\x0a\x00\x0d\xdd")' ./python vuln2.py Python 3.5.1+ (

[issue8728] 2.7 regression in httplib.py: AttributeError: 'NoneType' object has no attribute 'makefile'

2016-01-03 Thread Senthil Kumaran
Senthil Kumaran added the comment: Closing this since no further update was available from the original reporter. If this bug is still present, please open a new issue with test case to reproduce. -- nosy: +orsenthil resolution: -> not a bug stage: -> resolved status: pending -> clos

[issue25641] urllib/request.py/getproxies_environment() throws "dictionary changed size during iteration" error occasionally

2016-01-03 Thread Senthil Kumaran
Senthil Kumaran added the comment: os.environ is never changed by getproxies_environment() Like Martin Panter, I will curious to know as how the user experienced this issue in the place. @Raymond Hettinger: If the dict is only read and never modified in the fuction, does it still make sense t

[issue26001] Tutorial: write() does not expect string in binary mode

2016-01-03 Thread Upendra Kumar
Upendra Kumar added the comment: I also think that for better clarification, binary mode and text mode should be specified clearly for both methods read() and write(). For read(), I have changed it to: ' some quantity of data and returns it as a string (in text mode) or bytes object (in bina

[issue24898] Documentation for str.find() is confusing

2016-01-03 Thread Senthil Kumaran
Senthil Kumaran added the comment: Updated the docs as per Georg's suggestion. Thank you Ted Lemon for bringing this up. -- assignee: docs@python -> orsenthil nosy: +orsenthil resolution: -> fixed stage: needs patch -> resolved status: open -> closed versions: +Python 3.4

[issue24898] Documentation for str.find() is confusing

2016-01-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset da934a19855b by Senthil Kumaran in branch '2.7': Backport documentation improvement. https://hg.python.org/cpython/rev/da934a19855b -- ___ Python tracker _

[issue24898] Documentation for str.find() is confusing

2016-01-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7150e8a38c63 by Senthil Kumaran in branch '3.4': Issue24898 - Improve str.find documentation. https://hg.python.org/cpython/rev/7150e8a38c63 New changeset 164b564e3c1a by Senthil Kumaran in branch '3.5': merge from 3.4 https://hg.python.org/cpython/

[issue25999] Add support of negative number in bin()

2016-01-03 Thread SonokoMizuki
Changes by SonokoMizuki : -- title: Add support of native number in bin() -> Add support of negative number in bin() ___ Python tracker ___ _

[issue24959] unittest swallows part of stack trace when raising AssertionError in a TestCase

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti, michael.foord, rbcollins versions: +Python 3.5, Python 3.6 -Python 3.4 ___ Python tracker ___ __

[issue24922] assertWarnsRegex doesn't allow multiple warning messages

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti, michael.foord, rbcollins stage: -> needs patch versions: +Python 3.5, Python 3.6 -Python 3.4 ___ Python tracker ___ ___

[issue24918] Docs layout bug

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- keywords: +easy nosy: +ezio.melotti versions: -Python 3.2, Python 3.3, Python 3.4 ___ Python tracker ___ ___

[issue24898] Documentation for str.find() is confusing

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- keywords: +easy stage: -> needs patch type: -> enhancement versions: +Python 2.7, Python 3.5 ___ Python tracker ___ ___

[issue24896] It is undocumented that re.UNICODE affects re.IGNORECASE

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- components: +Regular Expressions nosy: +ezio.melotti, mrabarnett stage: -> needs patch type: -> enhancement versions: +Python 3.5, Python 3.6 -Python 3.4 ___ Python tracker __

[issue24780] unittest assertEqual difference output foiled by newlines

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- keywords: +easy nosy: +ezio.melotti, michael.foord, rbcollins stage: -> test needed versions: -Python 3.4 ___ Python tracker ___ __

[issue24733] Logically Dead Code

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- stage: -> patch review type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue24715] Sorting HOW TO: bad example for reverse sort stability

2016-01-03 Thread Ezio Melotti
Ezio Melotti added the comment: LGTM, however I would also show the sorted output too. -- nosy: +ezio.melotti stage: -> commit review type: -> enhancement versions: +Python 2.7, Python 3.5, Python 3.6 ___ Python tracker

[issue24632] Improve documentation about __main__.py

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ncoghlan versions: +Python 3.6 -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue24612] not operator expression raising a syntax error

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti versions: +Python 3.5, Python 3.6 -Python 3.4 ___ Python tracker ___ ___ Python-bugs-

[issue25919] http.client PUT method ignores error responses sent immediatly after headers

2016-01-03 Thread Martin Panter
Martin Panter added the comment: For non-blocking SSL sockets, the Python documentation suggests the results of select() do not directly indicate if data can be sent or received: . I guess this would also apply to blocking SSL socke

[issue25919] http.client PUT method ignores error responses sent immediatly after headers

2016-01-03 Thread Martin Panter
Martin Panter added the comment: Curl uses “Expect: 100-continue”. This is the relevant output from it: $ curl -v -T 300mb --no-fail https://api.onedrive.com/v1.0/drives/me/root:/test.file:/content [. . .] > PUT /v1.0/drives/me/root:/test.file:/content HTTP/1.1 > Host: api.onedrive.com > Conten

[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2016-01-03 Thread Andrew Turner
Andrew Turner added the comment: Can this be applied? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue25609] Add a ContextManager ABC and type

2016-01-03 Thread Guido van Rossum
Guido van Rossum added the comment: The abstract base class would be an ABC providing documentation and a template for implementations, and a way to test using isinstance(). This is how several other ABCs are used that have no particularly useful default implementation. In addition, the presen

[issue23677] Mention dict and set comps in library reference

2016-01-03 Thread Martin Panter
Martin Panter added the comment: The distiction about non-empty sets is a bit misleading. You can create an empty set via comprehension: >>> {x for x in ()} set() -- nosy: +martin.panter ___ Python tracker __

[issue25083] Python can sometimes create incorrect .pyc files

2016-01-03 Thread tzickel
Changes by tzickel : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue19576] "Non-Python created threads" documentation doesn't mention PyEval_InitThreads()

2016-01-03 Thread tzickel
tzickel added the comment: I think that the document regarding PyGILState_Ensure and PyEval_InitThreads should be clarified better, written in issue #26003 -- nosy: +tzickel ___ Python tracker

[issue26003] Issues with PyEval_InitThreads and PyGILState_Ensure

2016-01-03 Thread tzickel
Changes by tzickel : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/m

[issue26003] Issues with PyEval_InitThreads and PyGILState_Ensure

2016-01-03 Thread tzickel
New submission from tzickel: A few issues regarding threads: A. (Python 2 & 3) The documentation (https://docs.python.org/3/c-api/init.html) about initializing the GIL/Threading system does not specify that calling PyEval_InitThreads actually binds the calling thread as the main_thread in the

[issue25596] regular files handled as directories in the glob module

2016-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > os.scandir() is called recursively in the last patch and the file descriptors > are not closed until returning from the recursion. No, os.scandir() is called non-recursively in _iterdir(), and since _iterdir() results are always accumulated in a list, a re

[issue26000] Crash in Tokenizer - Heap-use-after-free

2016-01-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka priority: normal -> high ___ Python tracker ___ __

[issue25596] regular files handled as directories in the glob module

2016-01-03 Thread Xavier de Gaye
Xavier de Gaye added the comment: I may be missing something, anyway here are few comments on the patch: Is the call to entry.is_symlink() in _iterdir() necessary since is_dir() follows symlinks ? If _iterdir() would yield the DirEntry instance instead of DirEntry.name, then _rlistdir() could u

[issue25997] Tarfile.add with bytes path is failing

2016-01-03 Thread Patrik Dufresne
Patrik Dufresne added the comment: It's a bit tricky, but with help of surrogateescape I get the expected result. I'm closing this bug. Thanks -- status: open -> closed ___ Python tracker

[issue25596] regular files handled as directories in the glob module

2016-01-03 Thread Xavier de Gaye
Xavier de Gaye added the comment: os.scandir() is called recursively in the last patch and the file descriptors are not closed until returning from the recursion. The glob functions should fail explicitly when scandir() raises OSERROR with posix errno set to EMFILE (The process has too many fil

[issue26002] make statistics.median_grouped more efficient

2016-01-03 Thread SilentGhost
Changes by SilentGhost : -- nosy: +steven.daprano versions: -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue25999] Add support of native number in bin()

2016-01-03 Thread Larry Hastings
Larry Hastings added the comment: Even if this was a good idea, it's too late to change the behavior of the builtin function. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker

[issue26002] make statistics.median_grouped more efficient

2016-01-03 Thread Upendra Kumar
New submission from Upendra Kumar: statistics.median_grouped currently uses cf=data.index(x) to find the leftmost position of x in data ( line number 445 ). Here, data.index() has linear time complexity, which may not be good for long lists. But, here since the list 'data' is sorted beforehand

[issue26001] Tutorial: write() does not expect string in binary mode

2016-01-03 Thread Dimitri Papadopoulos Orfanos
New submission from Dimitri Papadopoulos Orfanos: About section "7.2.1. Methods of File Objects" of the tutorial: 1. Method read() is documented as follows: reads some quantity of data and returns it as a string or bytes object. Indeed read() returns a string in text mode and bytes in binary m

[issue26000] Crash in Tokenizer - Heap-use-after-free

2016-01-03 Thread William Bowling
New submission from William Bowling: Similar to https://bugs.python.org/issue25388 the following causes a crash on 3.5.1 and the latest 3.5 branch: ./python -c 'with open("vuln.py", "wb") as f: f.write(b"\x61\x73\x00\x0a\x79\x6e\x63\x5c\x0a\xef")' ./python vuln.py Python 3.5.1+ (default, Jan

[issue25999] Add support of native number in bin()

2016-01-03 Thread SonokoMizuki
SonokoMizuki added the comment: I see. I grasp to write own function is best. thanks (^-^) -- ___ Python tracker ___ ___ Python-bugs-l

[issue25999] Add support of native number in bin()

2016-01-03 Thread Eryk Sun
Eryk Sun added the comment: bin() returns a Python literal, which thankfully requires an explicit sign. 2's complement literals would be prone to human error. If you want 2's complement, you can write your own function. For example: def mybin(number, nbits=None, *, signed=True): if

[issue25999] Add support of native number in bin()

2016-01-03 Thread SonokoMizuki
SonokoMizuki added the comment: That's right. currently python can not distinguish positive number or negative number. >>> a = bin(-5,10) >>> int(a,2) 1019 I think reason of ambiguity is decode function( int() ). So, I suggest new decode function. (example) >>> b2i('0b1011',negative=True)

[issue22499] [SSL: BAD_WRITE_RETRY] bad write retry in _ssl.c:1636

2016-01-03 Thread Stefan Krah
Stefan Krah added the comment: As I said in msg254389, the read/write handling for non-blocking sockets is far from trivial. I'm not sure that this is a Python bug: Looking at dugong/__init__.py, I don't think this implements the recommendations in the OpenSSL book that I mentioned. The book r

[issue25999] Add support of native number in bin()

2016-01-03 Thread Peter Otten
Peter Otten added the comment: How would you disambiguate -1 and (for example) 2**64-1 on a 64-bit machine? Python's int is not limited to a specific number of bits. -- nosy: +peter.otten ___ Python tracker __

[issue25999] Add support of native number in bin()

2016-01-03 Thread SonokoMizuki
SonokoMizuki added the comment: It is nice solution. I can get negative number all right. thanks but, I feel bad that bin(-5) returns '-0b101' sorry -- ___ Python tracker ___ ___

[issue25999] Add support of native number in bin()

2016-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Use bin(n & (2**bitsize-1)). -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-lis

[issue25999] Add support of native number in bin()

2016-01-03 Thread SilentGhost
Changes by SilentGhost : -- components: +Interpreter Core -Argument Clinic versions: -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker ___ _

[issue21592] Make statistics.median run in linear time

2016-01-03 Thread Julian Taylor
Julian Taylor added the comment: the median of median of 5 is quite significantly slower than a quickselect. numpy implements an introselect which uses quickselect but falls back to median of median of 5 if not enough progress is done. In the numpy implementation for 10 element median (multi

[issue25999] Add support of native number in bin()

2016-01-03 Thread SonokoMizuki
New submission from SonokoMizuki: Add support of negative number in bin(). Currently, bin(-5) returns '-0b101', It is not intuitive. I think bin() should return two's complement. I suggest new bin(). New second argument is bit size. if first argument is negative number and bit size is given, bin

[issue21593] Clarify re.search documentation first match

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- components: +Regular Expressions nosy: +ezio.melotti, mrabarnett stage: resolved -> commit review versions: -Python 3.4 ___ Python tracker ___ _

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

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue23986] Inaccuracy about "in" keyword for list and tuple

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue23762] python.org page on new-style classes should be updated

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- resolution: -> third party status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue23677] Mention dict and set comps in library reference

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti stage: -> patch review type: -> enhancement versions: +Python 3.6 -Python 3.4 ___ Python tracker ___ __

[issue23702] docs.python.org/3/howto/descriptor.html still refers to "unbound methods"

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- versions: +Python 3.5, Python 3.6 -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue23675] glossary entry for 'method resolution order' links to something with python 2.3 in the title

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- assignee: -> docs@python components: +Documentation keywords: +easy nosy: +docs@python, ezio.melotti stage: -> needs patch type: -> enhancement ___ Python tracker ___

[issue23664] Modernize HTML output of difflib.HtmlDiff.make_file()

2016-01-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti versions: +Python 3.6 -Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue12606] Mutable Sequence Type works different for lists and bytearrays in slice[i:j:k]

2016-01-03 Thread py.user
py.user added the comment: Also memoryview() doesn't support: >>> m = memoryview(bytearray(b'abcde')) >>> m[::2] = () Traceback (most recent call last): File "", line 1, in TypeError: 'tuple' does not support the buffer interface >>> m[::2] = b'' Traceback (most recent call last): File "",

[issue21221] Minor struct_time documentation bug

2016-01-03 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- assignee: docs@python -> orsenthil nosy: +orsenthil resolution: -> fixed status: open -> closed versions: +Python 3.6 ___ Python tracker ___

[issue21221] Minor struct_time documentation bug

2016-01-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset f7324e5935f8 by Senthil Kumaran in branch '2.7': Backport doc improvements for Issue21221 - Explain the usage of tm_isdst https://hg.python.org/cpython/rev/f7324e5935f8 -- ___ Python tracker

[issue21221] Minor struct_time documentation bug

2016-01-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset fae779a811ec by Senthil Kumaran in branch '3.4': Issue21221 - Explain the usage of tm_isdst attribute of mktime, with valid https://hg.python.org/cpython/rev/fae779a811ec New changeset 3b7a7ea1214c by Senthil Kumaran in branch '3.5': merge from 3.4

[issue25995] os.walk() consumes a lot of file descriptors

2016-01-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file41483/walk_consume_fds_opt2.patch ___ Python tracker ___ ___ Python-bugs-

[issue25995] os.walk() consumes a lot of file descriptors

2016-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here are two alternative solutions for this issue. -- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file41482/walk_consume_fds_opt1.patch ___ Python tracker

[issue25596] regular files handled as directories in the glob module

2016-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think so too. I just wanted someone to confirmed that it is not overcautiousness. For now glob1() is used only in one place in the stdlib (issue16620). But there was other problem with previous patch, the same as with current implementation of os.walk() (