[issue30917] IDLE: Add idlelib.config.IdleConf unittest

2017-07-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: Whatever is merged with PR_2691, further improvements can be made in further PRs either on this issue or others that work on config code. I still think this test is slower than it should be -- the change to deep copy either made no difference or made it

Re: cPickle fails on manually compiled and executed Python function

2017-07-17 Thread dieter
"Jan Gosmann" writes: > today I came across some weird behaviour (a bug?) in Python 2.7.13 (on > Linux) with the cPickle module. The pickle module works and so does > the pickle module in Python 3. > > I have a file fn.py with a minimal function definition: > > ``` > def

[issue1442493] IDLE shell window gets very slow when displaying long lines

2017-07-17 Thread Louie Lu
Louie Lu added the comment: Besides warping text, there has a performance issue inside the RPCServer and Client. The (console, write, (text, file), {}) command is sent by server `asynccall`->`putmessage`. It should be sent by chunk size to client, and render on IDLE shell. The result is

[issue28638] Optimize namedtuple creation

2017-07-17 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks Raymond and Jelle. The bar for a reimplementation in C is much higher (though we'll have to agree that Jelle's version is fast enough before we reject it). The bar for backporting this to 3.6 is much higher as well and I think it's not worth

Re: Users of namedtuple: do you use the _source attribute?

2017-07-17 Thread Michele Simionato
Il giorno lunedì 17 luglio 2017 19:20:04 UTC+2, Steve D'Aprano ha scritto: > collections.namedtuple generates a new class using exec, and records the > source > code for the class as a _source attribute. > > Although it has a leading underscore, it is actually a public attribute. The > leading

[issue18875] Idle: Auto insertion of the closing parens, brackets, and braces

2017-07-17 Thread Louie Lu
Louie Lu added the comment: Charles, good to saw the patch, would you like to convert it into GitHub PR? also, it would have to adjust some coding style to satisfy PEP8. I can help you on GitHub to review this patch. -- nosy: +louielu ___ Python

[issue30953] Fatal python error when jumping into except clause

2017-07-17 Thread Louie Lu
Louie Lu added the comment: You will need to use `dis` to see what actually done by bytecode. $ ./python -m dis tests.py Disassembly of : 9 0 SETUP_EXCEPT 4 (to 6) 10 2 POP_BLOCK 4 JUMP_FORWARD12 (to 18) 11 >>6 POP_TOP

[issue28638] Optimize namedtuple creation

2017-07-17 Thread Jelle Zijlstra
Changes by Jelle Zijlstra : -- resolution: rejected -> ___ Python tracker ___ ___

[issue28638] Optimize namedtuple creation

2017-07-17 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Should we consider a C-based implementation like https://github.com/ll/cnamedtuple? It could improve speed even more, but would be harder to maintain and test and harder to keep compatible. My sense is that it's not worth it unless benchmarks show a

[issue28638] Optimize namedtuple creation

2017-07-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: Re-opening per discussion on python-dev. Goals: * Extend Jelle's patch to incorporate lazy support for "_source" and "verbose" so that the API is unchanged from the user's point of view. * Make sure the current test suite still passes and that the current

Re: Users of namedtuple: do you use the _source attribute?

2017-07-17 Thread Rick Johnson
On Monday, July 17, 2017 at 12:20:04 PM UTC-5, Steve D'Aprano wrote: > collections.namedtuple generates a new class using exec, > and records the source code for the class as a _source > attribute. Although it has a leading underscore, it is > actually a public attribute. The leading underscore >

[issue30934] Document how to run coverage for repository idlelib files.

2017-07-17 Thread Louie Lu
Louie Lu added the comment: I update how to prepare coverage on Linux and MacOS. I first thought user will prepare as Terry wrote at the top of `5. Test Coverage`. Cheryl's method is good, the update guide is borrow from here. First create a virtualenv, then install coverage via pip in venv.

Re: Users of namedtuple: do you use the _source attribute?

2017-07-17 Thread Steve D'Aprano
On Tue, 18 Jul 2017 05:44 am, Rob Gaddi wrote: > That said, it sure feels (as someone who hasn't tried it) like there's a > straightforward namedtuple implementation that calls type() directly > rather than having to exec. I know that exec-gunshyness is overblown, > but is there a simple answer

Re: Combining every pair of list items and creating a new list.

2017-07-17 Thread Rick Johnson
On Monday, July 17, 2017 at 3:10:51 PM UTC-5, aaron.m@gmail.com wrote: > Hi, > > I'm having difficulty thinking about how to do this as a Python beginner. > > But I have a list that is represented as: > > [1,2,3,4,5,6,7,8] > > and I would like the following results: > > [1,2] [3,4] [5,6]

cPickle fails on manually compiled and executed Python function

2017-07-17 Thread Jan Gosmann
Hi, today I came across some weird behaviour (a bug?) in Python 2.7.13 (on Linux) with the cPickle module. The pickle module works and so does the pickle module in Python 3. I have a file fn.py with a minimal function definition: ``` def fn(): pass ``` The actual code that I run is in

[issue27268] Incorrect error message on float('')

2017-07-17 Thread Pedro Lacerda
Changes by Pedro Lacerda : -- pull_requests: +2805 ___ Python tracker ___ ___

[issue30888] import class not isinstance of the class

2017-07-17 Thread 邱伟略
邱伟略 added the comment: ok. i see what you mean. so python mark the class from the import way -- resolution: not a bug -> works for me stage: -> resolved status: pending -> closed ___ Python tracker

[issue30956] ftplib socket timeout can't be handled

2017-07-17 Thread R. David Murray
R. David Murray added the comment: Given: import socket from ftplib import FTP try: ftp = FTP('host.i.know.will.hang.com', timeout=4) except socket.timeout: print('caught') I see 'caught' printed on the console. However, if I increase the timeout to 400, then on both 3.5 tip and 3.6

[issue28638] Optimize namedtuple creation

2017-07-17 Thread Guido van Rossum
Guido van Rossum added the comment: On python-dev Raymond agreed to reopen the issue and consider Jelle's implementation (https://github.com/python/cpython/pull/2736). -- nosy: +gvanrossum ___ Python tracker

Re: Users of namedtuple: do you use the _source attribute?

2017-07-17 Thread Ethan Furman
On 07/17/2017 12:44 PM, Rob Gaddi wrote: On 07/17/2017 09:57 AM, Steve D'Aprano wrote: collections.namedtuple generates a new class using exec, and records the source code for the class as a _source attribute. Although it has a leading underscore, it is actually a public attribute. The

[issue30956] ftplib socket timeout can't be handled

2017-07-17 Thread Arlo Clarke
New submission from Arlo Clarke: Stack overflow question with full details: https://stackoverflow.com/questions/45150568/python-ftp-socket-timeout-handling Socket timeout in ftplib can't be handled; a program crash occurs even when the relevant code is wrapped in a general catch-all.

Re: Users of namedtuple: do you use the _source attribute?

2017-07-17 Thread Gregory Ewing
Steve D'Aprano writes: Is there anyone here who uses the namedtuple _source attribute? I didn't know it existed either, and if I did I would have assumed it was an implementation detail and would never have written code that relied on it. I certainly won't miss it

Re: Grapheme clusters, a.k.a.real characters

2017-07-17 Thread Gregory Ewing
Steve D'Aprano wrote: I don't think that it is even a given that "atomic units of language" exist. To quote a Hindi speaker earlier in this thread, की is a letter, and yet it can be decomposed into की = क + ई, so it isn't "atomic". If letters aren't atomic, then what are? They're like

[issue30955] \\N in f-string causes next { to be literal if not escaped

2017-07-17 Thread Ned Deily
Ned Deily added the comment: Thanks for the report. This problem has been fixed in Python 3.6.2 which was just released. I believe it was fixed by the changes for Issue29104. -- nosy: +ned.deily resolution: -> out of date stage: -> resolved status: open -> closed

[issue30955] \\N in f-string causes next { to be literal if not escaped

2017-07-17 Thread Mital Ashok
New submission from Mital Ashok: Take this format python code: import unicodedata c = chr(0x012345) To print that character as a string literal, you would expect to do: print(f"'\\N{{{unicodedata.name(c)}}}'") Which should print a literal quote (`'`), a backwards slash (`\\` ->

[issue30954] backport unittest.TestCase.assertLogs to 2.7?

2017-07-17 Thread R. David Murray
R. David Murray added the comment: There is, however, unittest2 on pypi that has most of the python3 features backported. -- ___ Python tracker ___

[issue30954] backport unittest.TestCase.assertLogs to 2.7?

2017-07-17 Thread R. David Murray
R. David Murray added the comment: No. 2.7 is in maintenance mode and gets no new features. -- nosy: +r.david.murray resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker

Grapheme clusters, a.k.a.real characters

2017-07-17 Thread Mikhail V
ChrisA wrote: >Yep! Nobody would take any notice of the fact that you just put dots >on all those letters. It's not like it's going to make any difference >to anything. We're not dealing with matters of life and death here. >Oh wait.

[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-07-17 Thread Steve Dower
Steve Dower added the comment: Ah, there's also a nuget.org outage affecting AppVeyor (but not me because I'm in Italy and so connecting to the EU mirror automatically) - https://appveyor.statuspage.io/ When that recovers it should be fine again. The workaround for those without py.exe is to

[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-07-17 Thread Steve Dower
Steve Dower added the comment: Yeouch, it's been causing AppVeyor builds to get stuck, and then they time out after an hour. Luckily mine is up next in a minute or so, so I'll try to merge quickly and avoid anyone else getting held up. I also restored HOST_PYTHON in the PR, as a fallback for

[issue30954] backport unittest.TestCase.assertLogs to 2.7?

2017-07-17 Thread Dan Lipsitt
New submission from Dan Lipsitt: Would it be appropriate to backport unittest.TestCase.assertLogs to python 2.7? This would be a useful feature for me. -- components: Library (Lib) messages: 298558 nosy: Dan Lipsitt, ezio.melotti, michael.foord, rbcollins priority: normal severity:

[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-07-17 Thread Steve Dower
Changes by Steve Dower : -- assignee: zach.ware -> steve.dower resolution: fixed -> stage: resolved -> commit review status: closed -> open ___ Python tracker

[issue30952] include Math extension in SQlite

2017-07-17 Thread R. David Murray
Changes by R. David Murray : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___

[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-07-17 Thread Steve Dower
Changes by Steve Dower : -- pull_requests: +2804 ___ Python tracker ___ ___

[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-07-17 Thread Steve Dower
Steve Dower added the comment: Hmm... looks like there's another way to fail I didn't account for that goes down a different path in the batch file. I'll try being less clever. -- ___ Python tracker

[issue30953] Fatal python error when jumping into except clause

2017-07-17 Thread ppperry
New submission from ppperry: trying to execute the following code: import sys def trace(frame, event, arg): if event == "line" and frame.f_lineno > 12: frame.f_lineno = 12 return None return trace sys.settrace(trace) def error(): try: pass except:

Re: Combining every pair of list items and creating a new list.

2017-07-17 Thread MRAB
On 2017-07-17 21:10, aaron.m.weisb...@gmail.com wrote: Hi, I'm having difficulty thinking about how to do this as a Python beginner. But I have a list that is represented as: [1,2,3,4,5,6,7,8] and I would like the following results: [1,2] [3,4] [5,6] [7,8] Any ideas? Thanks Those are

[issue30952] include Math extension in SQlite

2017-07-17 Thread Big Stone
New submission from Big Stone: I would be interested in having SQLite shipped with the math extension in python-3.7. The log / exponential function are important for some sql use case like exp(sum(log(x))) -- components: Extension Modules messages: 298555 nosy: Big Stone priority:

[issue18875] Idle: Auto insertion of the closing parens, brackets, and braces

2017-07-17 Thread Charles Wohlganger
Charles Wohlganger added the comment: I've written an extension (see file) that does auto insertion of closing parens, brackets, braces, ticks, and quotes. It also (optionally) skips the closers when they are typed right next to the already exiting one. It also takes into account triple-ticks

[issue30949] Provide assertion functions in unittest.mock

2017-07-17 Thread ppperry
ppperry added the comment: You can already do this, although it it somewhat of a hack: >>> assert_called_once=Mock.assert_called_once # This will be an AttributeError >>> assert_called_once_with=Mock.assert_called_once_with >>> example = Mock() >>> assert_caled_once_with(example, ...) # A

brew pip: "ImportError: No module named packaging.version"

2017-07-17 Thread akprasad
Hiya. I'm running El Capitan and have a Homebrew install of python (as well as one in /usr/bin/python, which I can't recall how I installed). I had some trouble pip installing Keras: $ sudo pip install keras … DEPRECATION: Uninstalling a distutils installed project (numpy) has been

Combining every pair of list items and creating a new list.

2017-07-17 Thread aaron . m . weisberg
Hi, I'm having difficulty thinking about how to do this as a Python beginner. But I have a list that is represented as: [1,2,3,4,5,6,7,8] and I would like the following results: [1,2] [3,4] [5,6] [7,8] Any ideas? Thanks -- https://mail.python.org/mailman/listinfo/python-list

Re: Users of namedtuple: do you use the _source attribute?

2017-07-17 Thread Ben Finney
Steve D'Aprano writes: > collections.namedtuple generates a new class using exec, and records > the source code for the class as a _source attribute. The documentation tells me that ‘_source’ is “New in version 3.3.” I wasn't aware that the ‘namedtuple’ interface

Re: Users of namedtuple: do you use the _source attribute?

2017-07-17 Thread Rob Gaddi
On 07/17/2017 09:57 AM, Steve D'Aprano wrote: collections.namedtuple generates a new class using exec, and records the source code for the class as a _source attribute. Although it has a leading underscore, it is actually a public attribute. The leading underscore distinguishes it from a named

[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-07-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: I just got a download failure on an AppVeyor build: https://ci.appveyor.com/project/python/cpython/build/3.7.0a0.4571 Downloading nuget... Invoke-WebRequest : The operation has timed out. At line:1 char:1 + Invoke-WebRequest https://aka.ms/nugetclidl -OutFile

[issue18558] Iterable glossary entry needs clarification

2017-07-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: The problem with the Iterable ABC is that 'iterable' and 'iterator' are *dynamically* defined, with a possibly infinite time required to possibly destructively check either definition. In general, an algorithmic *static* check can only guess whether an

[issue30951] Documentation error in inspect module

2017-07-17 Thread Alex
Changes by Alex : -- pull_requests: +2803 ___ Python tracker ___ ___ Python-bugs-list

Re: [RELEASE] Python 3.6.2 is now available

2017-07-17 Thread jladasky
On Monday, July 17, 2017 at 3:02:01 AM UTC-7, bream...@gmail.com wrote: > On Monday, July 17, 2017 at 10:41:02 AM UTC+1, wxjm...@gmail.com wrote: > > Poor Python. > > Once it was working. > > Dear RUE, > > A bad workman always blames his tools. > > Mark Lawrence. +1. --

[issue30951] Documentation error in inspect module

2017-07-17 Thread Alex
Changes by Alex : -- pull_requests: +2802 ___ Python tracker ___ ___ Python-bugs-list

[issue19896] Exposing "q" and "Q" to multiprocessing.sharedctypes

2017-07-17 Thread Gareth Rees
Changes by Gareth Rees : -- pull_requests: +2801 ___ Python tracker ___ ___

[issue30576] http.server should support HTTP compression (gzip)

2017-07-17 Thread R. David Murray
R. David Murray added the comment: I do not have a strong opinion on this issue, but I share Martin's doubts that it should be added. It certainly should not be on by default if it is added. We should get input from other core devs. -- nosy: +r.david.murray

RE: Users of namedtuple: do you use the _source attribute?

2017-07-17 Thread Dan Strohl via Python-list
I have never used it personally. It always looked interesting, but I never ran into a need to generate the source for it. -Original Message- From: Python-list [mailto:python-list-bounces+d.strohl=f5@python.org] On Behalf Of Steve D'Aprano Sent: Monday, July 17, 2017 9:58 AM To:

[issue30919] Shared Array Memory Allocation Regression

2017-07-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Serhiy, I've changed the strategy in PR 2708: now the partition free space is tested before deciding to locate the file there or not. -- ___ Python tracker

[issue19896] Exposing "q" and "Q" to multiprocessing.sharedctypes

2017-07-17 Thread Gareth Rees
Gareth Rees added the comment: (If he hasn't, I don't think I can make a PR because I read his patch and so any implementation I make now is based on his patch and so potentially infringes his copyright.) -- ___ Python tracker

[issue19896] Exposing "q" and "Q" to multiprocessing.sharedctypes

2017-07-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: According to the asterisk displayed right of his name, he has, yes. -- ___ Python tracker ___

[issue19896] Exposing "q" and "Q" to multiprocessing.sharedctypes

2017-07-17 Thread Gareth Rees
Gareth Rees added the comment: Has Antony Lee has made a copyright assignment? -- ___ Python tracker ___ ___

[issue30951] Documentation error in inspect module

2017-07-17 Thread Alex Vig
New submission from Alex Vig: The documentation for co_names in the inspect module is: "tuple of names of local variables" Local variable names are however in co_varnames while co_names contains global variable names. This description should read: "tuple of names of global variables"

[issue18558] Iterable glossary entry needs clarification

2017-07-17 Thread R. David Murray
R. David Murray added the comment: "things with __getitem__ are clearly iterable" This is false. IMO it should be fixed in the glossary. It should say "or __getitem__ method implementing sequence semantics". That plus the addition to the Iterable docs will close this issue. --

Users of namedtuple: do you use the _source attribute?

2017-07-17 Thread Steve D'Aprano
collections.namedtuple generates a new class using exec, and records the source code for the class as a _source attribute. Although it has a leading underscore, it is actually a public attribute. The leading underscore distinguishes it from a named field potentially called "source", e.g.

[issue19896] Exposing "q" and "Q" to multiprocessing.sharedctypes

2017-07-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Uh, it's a pity this patch has been overlooked. Gareth, would you want to make a Github PR out of this? -- nosy: +pitrou type: -> enhancement versions: +Python 3.7 -Python 3.4 ___ Python tracker

[issue30940] Documentation for round() is incorrect.

2017-07-17 Thread Mark Dickinson
Mark Dickinson added the comment: Sure, fine with me to add AC support for round. -- ___ Python tracker ___

PyCA cryptography 2.0 released

2017-07-17 Thread Paul Kehrer
PyCA cryptography 2.0 has been released to PyPI. cryptography includes both high level recipes and low level interfaces to common cryptographic algorithms such as symmetric ciphers, message digests, and key derivation functions. We support Python 2.6-2.7, Python 3.4+, and PyPy. * BACKWARDS

Re: Grapheme clusters, a.k.a.real characters

2017-07-17 Thread Rhodri James
On 17/07/17 05:10, Rustom Mody wrote: Hint1: Ask your grandmother whether unicode's notion of character makes sense. Ask 10 gmas from 10 language-L's Hint2: When in doubt gma usually is right "For every complex problem there is an answer that is clear, simple and wrong." (H.L. Mencken).

Re: Is this PEP viable?

2017-07-17 Thread Peter Otten
Evan Adler wrote: > I would like to submit the following proposal. In the logging module, I > would like handlers (like file handlers and stream handlers) to have a > field for exc_info printing. This way, a call to logger.exception() will > write the stack trace to the handlers with this flag

Re: Is this PEP viable?

2017-07-17 Thread breamoreboy
On Monday, July 17, 2017 at 3:41:12 PM UTC+1, Evan Adler wrote: > I would like to submit the following proposal. In the logging module, I > would like handlers (like file handlers and stream handlers) to have a > field for exc_info printing. This way, a call to logger.exception() will > write the

Re: Grapheme clusters, a.k.a.real characters

2017-07-17 Thread Chris Angelico
On Tue, Jul 18, 2017 at 1:36 AM, Steve D'Aprano wrote: > On Mon, 17 Jul 2017 02:10 pm, Rustom Mody wrote: >> Hint1: Ask your grandmother whether unicode's notion of character makes >> sense. > > What on earth makes you think that my grandmother is a valid judge of

[issue30950] Convert round() to Arument Clinic

2017-07-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Documentation for round() is incorrect. nosy: +mark.dickinson, rhettinger ___ Python tracker

[issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption

2017-07-17 Thread Guido van Rossum
Guido van Rossum added the comment: There's no need. You seem to have accidentally shown a use case for getting the buffered data -- it can contain an error message explaining why the connection was closed. -- ___ Python tracker

[issue27640] add the '--disable-test-suite' option to configure

2017-07-17 Thread Ed Morley
Changes by Ed Morley : -- nosy: +edmorley ___ Python tracker ___ ___ Python-bugs-list

[issue30950] Convert round() to Arument Clinic

2017-07-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +2800 ___ Python tracker ___ ___

[issue18558] Iterable glossary entry needs clarification

2017-07-17 Thread Vedran Čačić
Vedran Čačić added the comment: Yes, the mapping/sequence distinction was (at least declaratively) the reason the ABCs were introduced, but that isn't an obstacle here: whether a mapping or a sequence, it _is_ iterable, right? --- In case anybody is interested, here's how I came to this

[issue30950] Convert round() to Arument Clinic

2017-07-17 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: When the builtins module was converted to Argument Clinic, round() was omitted because existing signature of round() wasn't supported with the inspect module. Now round() supports None as the value for the ndigits arguments, and this is the default value.

Re: Grapheme clusters, a.k.a.real characters

2017-07-17 Thread Steve D'Aprano
On Mon, 17 Jul 2017 02:10 pm, Rustom Mody wrote: >> Please don't feed the trolls. > > Its usually called 'joke' Steven! Did the word fall out of your dictionary > in the last upgrade? > Rick was no more trolling than Marko Funny you say that. I often think Marko is trolling, but if he is, he

[issue30940] Documentation for round() is incorrect.

2017-07-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I prepared a patch for this but wanted to make sure this is a desirable > behavior. That seems reasonable to me. Mark, what do you think? -- ___ Python tracker

[issue30940] Documentation for round() is incorrect.

2017-07-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: round() was not converted to Argument Clinic. There is a special comment about this: /* AC: cannot convert yet, as needs PEP 457 group support in inspect * or a semantic change to accept None for "ndigits" */ *Now* round() can be converted to Argument

[issue30948] Docs for __subclasses__(): Add hint that Python imports are lazy

2017-07-17 Thread R. David Murray
R. David Murray added the comment: Thanks for the suggestion, but I don't think so. Python imports are not lazy. They are ordered. Python is an *interpreted* language, so __subclasses__ is only going to hold those subclasses whose class definitions have been executed. This is fundamental to

[issue18558] Iterable glossary entry needs clarification

2017-07-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Or at least, if we cannot do that because of backward > compatibility:-(, to explicitly document that Iterable ABC > _does not_ fully encompass what we mean by "being iterable". That would be a reasonable amendment to collections.abc.Iterable docs. I

[issue30949] Provide assertion functions in unittest.mock

2017-07-17 Thread tribaal
Changes by tribaal : -- nosy: +tribaal ___ Python tracker ___ ___ Python-bugs-list

Is this PEP viable?

2017-07-17 Thread Evan Adler
I would like to submit the following proposal. In the logging module, I would like handlers (like file handlers and stream handlers) to have a field for exc_info printing. This way, a call to logger.exception() will write the stack trace to the handlers with this flag set, and only print the

[issue18558] Iterable glossary entry needs clarification

2017-07-17 Thread Vedran Čačić
Vedran Čačić added the comment: Raymond, I think you didn't understand the issue. Glossary already _has_ the ammendment you mention (at least for the __getitem__ - I'm not sure any of other examples you mention are counterexamples to that interpretation: callable_iterators and generators _do_

[issue30949] Provide assertion functions in unittest.mock

2017-07-17 Thread Daniel Watkins
New submission from Daniel Watkins: The convenience assertion methods on mock objects can be easily mistyped and if they are mistyped, they will silently pass. This can be quite user-hostile. Consider the following: >>> example = Mock() >>> example.assert_called_once() >>>

[issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption

2017-07-17 Thread pfreixes
pfreixes added the comment: The following links point to three different implementations of the same scenario using a Twisted, Node and Python blocking clients that try to reproduce the same scenario. - Twisted https://gist.github.com/pfreixes/0d8b24b98567e557d6059b3308aa07ca - Node

[issue30940] Documentation for round() is incorrect.

2017-07-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Wasn't this change a mistake? Now that it is deployed, it should probably be left alone (it is has to take back an API change), but this should be a cautionary note for arg-clinic enthusiasts to not change existing APIs. When Argument Clinic is too

[issue18558] Iterable glossary entry needs clarification

2017-07-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: The wold "iterable" just means "can be looped over". There are many ways to implement this capability (two-arg form of iter(), the __iter__ method, generators, __getitem__ with integer indexing, etc). collections.abc.Iterable is more limited and that is

[issue30947] Update embeded copy of libexpat to 2.2.2

2017-07-17 Thread STINNER Victor
STINNER Victor added the comment: About the 3 security fixes (is the last change a security fix?). """ #43 Protect against compilation without any source of high quality entropy enabled, e.g. with CMake build system; commit

[issue30947] Update embeded copy of libexpat to 2.2.2

2017-07-17 Thread STINNER Victor
STINNER Victor added the comment: > #51 Address lack of stdint.h in Visual Studio 2003 to 2008 FYI this change only impacts Python 2.7, since Python 3.3 and newer requires Visual Studio 2010 or newer, and I already backported (cherry-picked) this specific commit in Python 2.7:

[issue30948] Docs for __subclasses__(): Add hint that Python imports are lazy

2017-07-17 Thread Thomas Guettler
New submission from Thomas Guettler: AFAIK cls.__subclasses__() only returns the classes which the interpreter has already loaded. This means there can be more subclasses in modules where not imported by the current interpreter up to now.

[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-07-17 Thread Jeremy Kloth
Jeremy Kloth added the comment: > Is that an actual convention? I didn't see any other references, so I figured > Zach had made it up. It has existed in the Windows build files since 2.5, when x64 supported was initially added by MvL. -- nosy: +jeremy.kloth

[issue30947] Update embeded copy of libexpat to 2.2.2

2017-07-17 Thread STINNER Victor
New submission from STINNER Victor: libexpat released a new version 2.2.2 which seems to contain 2 or 3 security fixes. I'm not sure that Python is affected by these bugs. https://github.com/libexpat/libexpat/blob/R_2_2_2/expat/Changes#L5 Release 2.2.2 Wed July 12 2017 Security fixes:

[issue26781] os.walk max_depth

2017-07-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I think there is a little need in this feature. I concur with Serhiy and think we're better-off without this proposal. Marking this as closed. -- nosy: +rhettinger resolution: -> rejected stage: -> resolved status: open -> closed

[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-07-17 Thread Jeremy Kloth
Jeremy Kloth added the comment: > In this case, the Powershell dependency fails on Windows 7 since it does not > have the Invoke-WebRequest command (unless you've been installing all your > updates). Just to note, PowerShell must be updated *manually* (at least on Win7). Plus you need to

[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-07-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think that's used on Unix when cross-compiling, but I don't know about Windows... -- ___ Python tracker ___

[issue30830] HTTPHandlerTest of test_logging leaks a "dangling" thread on AMD64 FreeBSD CURRENT Non-Debug 3.x

2017-07-17 Thread STINNER Victor
STINNER Victor added the comment: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/587/steps/test/logs/stdio test_listen_config_10_ok (test.test_logging.ConfigDictTest) ... Warning -- threading_cleanup() failed to cleanup -1 threads after 3 sec (count: 0,

[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-07-17 Thread Steve Dower
Steve Dower added the comment: > use the preexisting convention of the HOST_PYTHON envvar that was used prior > to the recent merged PRs Is that an actual convention? I didn't see any other references, so I figured Zach had made it up. -- ___

[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-07-17 Thread Jeremy Kloth
Jeremy Kloth added the comment: Or, use the preexisting convention of the HOST_PYTHON envvar that was used prior to the recent merged PRs -- nosy: +jkloth ___ Python tracker

[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-07-17 Thread Steve Dower
Steve Dower added the comment: The buildbots have already successfully built, so I'm declaring this and issue30916 resolved. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-07-17 Thread Steve Dower
Steve Dower added the comment: New changeset efa26bcd5085279fc4e9ae96d052272a5214c2bd by Steve Dower in branch 'master': bpo-30450: Fall back to git.exe if no Python is found. (#2739) https://github.com/python/cpython/commit/efa26bcd5085279fc4e9ae96d052272a5214c2bd --

[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-07-17 Thread Steve Dower
Steve Dower added the comment: Unfortunately, "install " is often a blocking requirement for many developers (typically the ones who get paid well to do this), so I'd rather have no requirements. Currently we achieve this if PowerShell is up to date or Python+py.exe are installed, both of

[issue28638] Optimize namedtuple creation

2017-07-17 Thread STINNER Victor
STINNER Victor added the comment: > It's possible to expose StructSeq somewhere. Hum, when I mentioned structseq: my idea was more to reimplement namedtuple using the existing structseq code, since structseq is well tested and very fast. -- ___

[issue28638] Optimize namedtuple creation

2017-07-17 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___

  1   2   >