[issue28740] Add sys.getandroidapilevel()

2016-11-18 Thread Xavier de Gaye
Xavier de Gaye added the comment: Patch tested with success on the android-24 emulator. -- ___ Python tracker ___

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

2016-11-18 Thread Xavier de Gaye
Xavier de Gaye added the comment: issue #28740: Add sys.getandroidapilevel() -- dependencies: +Add sys.getandroidapilevel() ___ Python tracker ___

[issue28745] Python 3.5.2 "from ... import" statement is different from official documentation

2016-11-18 Thread woo yoo
woo yoo added the comment: Thanks for your advice. -- nosy: -docs@python, steven.daprano ___ Python tracker ___

[issue28740] Add sys.getandroidapilevel()

2016-11-18 Thread Xavier de Gaye
Xavier de Gaye added the comment: > I proposed to add a new function to the sys module: sys.getandroidapilevel() This would also help fixing the long standing issue 16255, and possibly also issue 16353. -- ___ Python tracker

Re: help on "from deen import *" vs. "import deen"

2016-11-18 Thread Chris Angelico
On Sat, Nov 19, 2016 at 3:34 PM, Steve D'Aprano wrote: > What happens if you do this? > > spam = eggs = cheese = obj > > Is that different from: > > spam = obj > eggs = obj > cheese = obj > > > or from this? > > spam = obj > eggs = spam > cheese = eggs > ... > These

[issue28745] Python 3.5.2 "from ... import" statement is different from official documentation

2016-11-18 Thread Josh Rosenberg
Josh Rosenberg added the comment: Why is this unexpected? Per the docs, the process is: find the module specified in the from clause, loading and initializing it if necessary; for each of the identifiers specified in the import clauses: check if the imported module has an

[issue28745] Python 3.5.2 "from ... import" statement is different from official documentation

2016-11-18 Thread woo yoo
woo yoo added the comment: The link associated with the documentation is https://docs.python.org/3/reference/simple_stmts.html#import. My package layout is : --l007 --l009.py My code is : >from l007 import l009 The excution was ok, which was not the case i had expected. --

[issue28745] Python 3.5.2 "from ... import" statement is different from official documentation

2016-11-18 Thread Steven D'Aprano
Steven D'Aprano added the comment: If you're quoting from the docs, its a good idea to give the URL to *which* documentation you are reading, not just a copy of the text. -- ___ Python tracker

[issue28745] Python 3.5.2 "from ... import" statement is different from official documentation

2016-11-18 Thread Steven D'Aprano
Steven D'Aprano added the comment: Please don't post screen shots of text. Copy and paste the text into the bug report. Some people (those who are blind, visually impaired or using a screen-reader for some other reason) cannot see the screen shot, and even those who can prefer to deal with

[issue28745] Python 3.5.2 "from ... import" statement is different from official documentation

2016-11-18 Thread woo yoo
New submission from woo yoo: I've experiment with the statement,however the result did not match the official description. I created a namespace package named l007, within which submodule named l009 was placed.I typed "from l007 import l009" in the interpreter, the execution was ok, while in

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

2016-11-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a problem to me too. -- nosy: +serhiy.storchaka ___ Python tracker ___

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

2016-11-18 Thread Martin Blais
Martin Blais added the comment: Adding nullcontext = ExitStack in the source file would solve this problem in a single line of code. -- nosy: +blais ___ Python tracker

Re: How to append a modified list into a list?

2016-11-18 Thread jfong
Oh, I don't know slice well enough:-( So, slice tbl[:] will create a new object (a copy of tbl) which can be passed as a function argument m.append(tbl[:]) or bind to a new name w=tbl[:] or re-bind to itself w[:]=tbl Thanks you, Ian and Steve. Steve D'Aprano at 2016/11/19 11:01:26AM wrote: >

[issue28681] About function renaming in the tutorial

2016-11-18 Thread Vedran Čačić
Vedran Čačić added the comment: Obligatory link: https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/ :-P Yes, Python objects are simpler than people, but still not completely trivial. The core issue is "who does the calling". Even one's native language might

Re: help on "from deen import *" vs. "import deen"

2016-11-18 Thread Steve D'Aprano
On Sat, 19 Nov 2016 05:50 am, Dennis Lee Bieber wrote: > Python's name binding is very easy to state in English: Assignment in > Python attaches the name (on the left hand side of the statement) to the > object (that is the result of the right hand side). What do you mean "attach"? What's a

[issue28710] Sphinx incompatible markup in configparser.ConfigParser.

2016-11-18 Thread Patrick Lehmann
Patrick Lehmann added the comment: I signed the CLA. -- ___ Python tracker ___ ___ Python-bugs-list

[issue28710] Sphinx incompatible markup in configparser.ConfigParser.

2016-11-18 Thread Patrick Lehmann
Patrick Lehmann added the comment: Hello, I used this regexp on all files: -- match pattern: `([A-Za-z0-9_]+)' replace pattern ``\1`` -- I assumed that only identifiers where quoted in such way. I think my editor found

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

2016-11-18 Thread Martin Panter
Martin Panter added the comment: Okay I will assume that $(srcdir) reference was just due to a mistake or bad cargo-culting then. Will commit this soon unless anyone has a good idea to avoid embedding @abs_srcdir@. -- stage: patch review -> commit review

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

2016-11-18 Thread Nick Coghlan
Nick Coghlan added the comment: The problem Martin is referring to is the SEO one, which is that the top link when searching for either "null context manager python" or "no-op context manager python" is this thread, rather than the "Use ExitStack for that" recipe in the docs:

Re: How to append a modified list into a list?

2016-11-18 Thread Steve D'Aprano
On Sat, 19 Nov 2016 12:44 pm, jf...@ms4.hinet.net wrote: > I have a working list 'tbl' and recording list 'm'. I want to append 'tbl' > into 'm' each time when the 'tbl' was modified. I will record the change > by append it through the function 'apl'. [...] > Obviously the most intuitive way

[issue28548] http.server parse_request() bug and error reporting

2016-11-18 Thread Martin Panter
Martin Panter added the comment: Okay committed to 3.7 for the moment. I think that is all we can reasonably do unless we drop the pseudo-HTTP-0.9 support. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python

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

2016-11-18 Thread Martin Panter
Martin Panter added the comment: Thanks Mariatta. Some people like to use the warn(stacklevel=2) parameter, then the warning message is potentially more useful. Also, I think it would be good to write a brief test case for the warning. There are probably lots of examples in the test suite,

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

2016-11-18 Thread Martin Panter
Changes by Martin Panter : -- stage: -> patch review versions: +Python 3.6, Python 3.7 ___ Python tracker ___

Re: How to append a modified list into a list?

2016-11-18 Thread Ian Kelly
On Nov 18, 2016 6:47 PM, wrote: I have a working list 'tbl' and recording list 'm'. I want to append 'tbl' into 'm' each time when the 'tbl' was modified. I will record the change by append it through the function 'apl'. For example: >>>tbl=[0,0] >>>m=[] >>>tbl[0]=1

Re: how to multiply two matrices with different size?

2016-11-18 Thread Ian Kelly
On Fri, Nov 18, 2016 at 6:51 PM, wrote: > Hi :) > I'm trying to multiply two matrices that has different size. > > -code- > > import numpy as np > > a = np.random.randn(4, 3) > b = np.random.randn(4, 1) > > print

[issue28744] Basic precision calc error

2016-11-18 Thread Zachary Ware
Zachary Ware added the comment: https://docs.python.org/3/tutorial/floatingpoint.html -- nosy: +zach.ware resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

how to multiply two matrices with different size?

2016-11-18 Thread limetree377
Hi :) I'm trying to multiply two matrices that has different size. -code- import numpy as np a = np.random.randn(4, 3) b = np.random.randn(4, 1) print a print b -code- How

[issue28744] Basic precision calc error

2016-11-18 Thread Renner
New submission from Renner: Simple code: print('%.55f' %(1.1 + 2.2 - 3.3)) print('%.55f' %(1.1 + 2.2)) is supposed to produce 0.000 3.300 But when I run it, Actually it produces

How to append a modified list into a list?

2016-11-18 Thread jfong
I have a working list 'tbl' and recording list 'm'. I want to append 'tbl' into 'm' each time when the 'tbl' was modified. I will record the change by append it through the function 'apl'. For example: >>>tbl=[0,0] >>>m=[] >>>tbl[0]=1 >>>apl(tbl) >>>m [[1,0]] >>>tbl[1]=2 >>>apl(tbl) >>>m

[issue28548] http.server parse_request() bug and error reporting

2016-11-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7c98768368cb by Martin Panter in branch 'default': Issue #28548: Parse HTTP request version even if too many words received https://hg.python.org/cpython/rev/7c98768368cb -- nosy: +python-dev ___ Python

[issue28742] argparse.ArgumentDefaultsHelpFormatter sometimes provides inaccurate documentation of defaults, so they should be overrideable

2016-11-18 Thread Peter Eckersley
Peter Eckersley added the comment: Patch is now against the latest Python development tree, and includes test cases: https://gist.github.com/pde/daec08cadc21bca0d62852020887ee13 -- ___ Python tracker

[issue28739] PEP 498: docstrings as f-strings

2016-11-18 Thread Ned Deily
Ned Deily added the comment: Since this was previously discussed and rejected (in Issue25179), I don't think we should revisit this now for 3.6, other than potentially a documentation tweak. -- nosy: +ned.deily versions: -Python 3.6 ___ Python

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

2016-11-18 Thread Martin Panter
Martin Panter added the comment: Here is a patch implementing Eryk’s suggestion, for both from_buffer() and from_buffer_copy() methods. This is exactly how it is already handled for Array.from_address(). The two buffer methods were added more recently than from_address(). --

[issue28739] PEP 498: docstrings as f-strings

2016-11-18 Thread Guido van Rossum
Guido van Rossum added the comment: Might I point out the precedent of b-strings? Those also don't contribute to __doc__. -- ___ Python tracker ___

Re: IDLEX association

2016-11-18 Thread eryk sun
On Fri, Nov 18, 2016 at 7:09 PM, Dennis Lee Bieber wrote: > On Fri, 18 Nov 2016 04:46:46 -0800 (PST), Luis Marzulli > declaimed the following: > >>When I double click a .py file, a windows appears and immediately disappears. >>How can I associate

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

2016-11-18 Thread Martin Panter
New submission from Martin Panter: Revision 32bfc8b6 added test.test_random.MersenneTwister_TestBasicOps.test_choices_algorithms(), which runs the following code: n = 13132817 # 13 million self.gen.choices(range(n), [1]*n, k=1) When I build Python with the “--with-pydebug” configure

[issue28742] argparse.ArgumentDefaultsHelpFormatter sometimes provides inaccurate documentation of defaults, so they should be overrideable

2016-11-18 Thread Peter Eckersley
Peter Eckersley added the comment: One thing I noticed when testing my patch by vendorizing it into the Certbot tree was that if a developer had somehow inherited from a version of argparse.Action that *doesn't* have this patch applied to it, and then passes in instances of those inheriting

[issue28742] argparse.ArgumentDefaultsHelpFormatter sometimes provides inaccurate documentation of defaults, so they should be overrideable

2016-11-18 Thread Peter Eckersley
New submission from Peter Eckersley: When argparse lists the default values for cli flags and arguments, it shows argparse's view of the internal Pythonic default, not the default behaviour of the program as a whole. This can be wrong in many cases, as documented at

[issue28739] PEP 498: docstrings as f-strings

2016-11-18 Thread Eric V. Smith
Eric V. Smith added the comment: It's Ned's call, but I wouldn't recommend changing this in 3.6, at least not 3.6.0. As Martin points out, the reason f'foo' is a "normal" string has to do with how strings and f-strings are assembled and concatenated. Similarly: 'foo' f'bar' 'baz' is a normal

[issue28732] spawnl crash on windows7

2016-11-18 Thread Steve Dower
Steve Dower added the comment: Looks like a few functions in os module need this. os_execve_impl also doesn't release the GIL at any point, but I don't see why it shouldn't. I'll try and get to this over the weekend if nobody else comes up with a patch first. --

Re: Encountering fatal error x80070643 while installing Python

2016-11-18 Thread eryk sun
On Fri, Nov 18, 2016 at 5:55 PM, MRAB wrote: > On 2016-11-18 11:40, Irene Venditti wrote: >> >> This didn't seem to be a problem, since version 3.5.1 installed to my >> C:\Users\username\appdata\local\... directory. But when I tried to install >> Python 3.5.2 and

[issue10049] Add a "no-op" (null) context manager to contextlib

2016-11-18 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: ExitStack() already covers the "null ctx mgr" use case described in the first message. Original example: with transaction or contextlib.null(): ... By using ExitStack: with transaction or ExitStack(): ... You can push this further and do

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

2016-11-18 Thread Martin Panter
Martin Panter added the comment: Here is another way to remember that the filter list has already been initialized. I made a new immortal _warnings.filters_initialized flag at the C level. It is actually a list so that it can be mutated and remembered across module reloads, but it is either

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

2016-11-18 Thread Martin Panter
Changes by Martin Panter : Added file: http://bugs.python.org/file45542/immortal-filters.patch ___ Python tracker ___

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

2016-11-18 Thread STINNER Victor
STINNER Victor added the comment: New approach: patch 5 now compares indexgroup, groupindex and code instead of comparing pattern, to handle correctly two equal pattern strings compiled with the re.LOCALE flag and two different locales. The patch also converts indexgroup list to a tuple to be

[issue10049] Add a "no-op" (null) context manager to contextlib

2016-11-18 Thread Martin Blais
Martin Blais added the comment: I've been looking for this today; I would have used it. Instead of an obvious (and explicit) null context manager, I had to read through this entire thread to eventually find out that I can use something called ExitStack(), which is designed for another use

Re: need help to get my python image to move around using tkinter

2016-11-18 Thread Thomas Grops via Python-list
thankyou so much, that is the exact help I required to put me in the right direction :D -- https://mail.python.org/mailman/listinfo/python-list

[issue28729] Exception from sqlite3 adapter masked by sqlite3.InterfaceError

2016-11-18 Thread Julien Palard
Julien Palard added the comment: By moving: ``` /* else set the right exception and return NULL */ PyErr_SetString(pysqlite_ProgrammingError, "can't adapt"); ``` from `pysqlite_microprotocols_adapt` to `pysqlite_adapt` (to avoid changing the semantics from the outside) make the

[issue28739] PEP 498: docstrings as f-strings

2016-11-18 Thread Martin Panter
Martin Panter added the comment: Having an unassigned f-string as the first statement is still valid syntax, so could at most be a warning, not a SyntaxError. -- ___ Python tracker

[issue28739] PEP 498: docstrings as f-strings

2016-11-18 Thread Martin Panter
Martin Panter added the comment: Actually, testing your code fragment, it seems you do get a doc string when the f-string has no substitutions in curly brackets, otherwise you don’t get any doc string. Maybe this is due to how different forms of string are compiled. >>> class Foo: ...

[issue28741] PEP 498: single '}' is not allowed

2016-11-18 Thread Yury Selivanov
New submission from Yury Selivanov: The PEP should document the "single '}' is not allowed" error. -- assignee: docs@python components: Documentation messages: 281173 nosy: docs@python, eric.smith, yselivanov priority: normal severity: normal status: open title: PEP 498: single '}' is

[issue28739] PEP 498: docstrings as f-strings

2016-11-18 Thread Yury Selivanov
Yury Selivanov added the comment: > IMO it would be simpler do disallow all f-strings as docstrings. How exactly you want to disallow them? Raise SyntaxError? If you don't raise anything, then the behaviour is just confusing -- the interpreter parses them, but __doc__ is None. I think this

[issue28740] Add sys.getandroidapilevel()

2016-11-18 Thread STINNER Victor
STINNER Victor added the comment: Ah, I wrote a patch to implement the function. I used ANDROID_API_LEVEL from pyconfig.h. I chose to simply return an integer. I don't know if it's the most future-proof API :-) -- keywords: +patch Added file:

[issue28596] on Android _bootlocale on startup relies on too many library modules

2016-11-18 Thread STINNER Victor
STINNER Victor added the comment: I created the issue #28740: Add sys.getandroidapilevel(). -- ___ Python tracker ___

[issue28740] Add sys.getandroidapilevel()

2016-11-18 Thread STINNER Victor
New submission from STINNER Victor: Android slowly becomes a first-citizen class platform in CPython thanks to Xavier de Gaye and other motivated developers, thanks to all of them :-) To fix the issue #28596, we need a function to check if we are running Android. Chi Hsuan Yen proposed to use

[issue28739] PEP 498: docstrings as f-strings

2016-11-18 Thread Martin Panter
Martin Panter added the comment: There was a bit of discussion at the top of . IMO it would be simpler do disallow all f-strings as docstrings. Otherwise, what would the result of this be: name = "module level" class C: name = "class level"

[issue28735] Mock is equal to ANY but MagicMock is not

2016-11-18 Thread SilentGhost
Changes by SilentGhost : -- nosy: +michael.foord versions: +Python 3.6, Python 3.7 ___ Python tracker ___

[issue28739] PEP 498: docstrings as f-strings

2016-11-18 Thread Eric V. Smith
Eric V. Smith added the comment: As you've seen, the answer is "no"! We'd need to add logic to evaluate them at function definition time. That would be a slight noticeable change, if the expressions had side effects. -- ___ Python tracker

[issue28739] PEP 498: docstrings as f-strings

2016-11-18 Thread Yury Selivanov
New submission from Yury Selivanov: Can f-strings be used as docstrings? Right now: class Foo: f'spam' Foo.__doc__ is None I couldn't find that f-strings cannot be used as docstrings in neither PEP 498 not in the 3.6 documentation, so I suppose this is a bug. --

[issue28710] Sphinx incompatible markup in configparser.ConfigParser.

2016-11-18 Thread R. David Murray
R. David Murray added the comment: I think that we do not generally use ReST markup in our docstrings. So replacing `x' with 'x' would be more correct, I think. In many cases the quotes could just be omitted entirely. The patch command says: patch unexpectedly ends in middle of line

[issue28687] Python 2.7.12 windows x64 installer fails after previous bad uninstall

2016-11-18 Thread Steve Dower
Steve Dower added the comment: > ...is to Repair first and then reinstall Repair and then *un*install (obviously). -- ___ Python tracker ___

[issue28687] Python 2.7.12 windows x64 installer fails after previous bad uninstall

2016-11-18 Thread Steve Dower
Steve Dower added the comment: So the fix for pre-2.7.13 here is to Repair first and then reinstall. But we've actually fixed this for 2.7.13 by making the pip uninstall step non-vital (the work was sponsored by Microsoft because it affects the Visual Studio installer). See issue27888 for

[issue28710] Sphinx incompatible markup in configparser.ConfigParser.

2016-11-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: As far as I looked, the patch changes `xyz' in docstrings and quotes to ``xyz``. A rst expert should verify that this is correct. In printed strings, `zyz' is changed to 'xyz', which I consider to be correct. Before applying this, I would want to review in

[issue28159] Deprecate isdst argument in email.utils.localtime

2016-11-18 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Keeping localtime as a convenience function in email.util is fine, but isdst argument should be eliminated at some point. There is a fundamental problem with disambiguating fold times with isdst: some folds do not involve the change in dst or happen in

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

2016-11-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: I have doubts also. The issue is the same for NotImplemented, though the occurrence is much rarer, and similar for Ellipsis. >>> NotImplemented.foo Traceback (most recent call last): File "", line 1, in NotImplemented.foo AttributeError:

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

2016-11-18 Thread Wojtek Ruszczewski
New submission from Wojtek Ruszczewski: SIGBREAK should be listed as acceptable for signal.signal() under Windows. Some context. Registering a handler for SIGBREAK may be useful as this is the signal that generating CTRL_BREAK_EVENT results in (and the latter combined with the

Re: Parsing a single-level JSON file

2016-11-18 Thread mike . reider
the end result file looks like this cat fields.json {"myField1": {"id": "customfield_10600"}, "myField2": {"id": "customfield_11334"}, "myField3": {"id": "customfield_993434"}, etc etc -- https://mail.python.org/mailman/listinfo/python-list

Re: Parsing a single-level JSON file

2016-11-18 Thread mike . reider
On Friday, November 18, 2016 at 1:23:18 PM UTC-5, mike@gmail.com wrote: > hi all, > > Im reading in a JSON file that looks like this > > > [ >{ > "name":"myField1", > "searchable":true, > "navigable":true, > "custom":true, > "clauseNames":[ >

Re: need help to get my python image to move around using tkinter

2016-11-18 Thread Peter Otten
twgrops--- via Python-list wrote: > Hi I am new here and to python, > > I am currently studying towards my degree in computer science and have to > build a program but I have hit a brick wall. I am trying to make an image > move around the canvas. I can make a rectangle move using the following:

[issue28736] multiprocessing.Lock() no longer has .acquire()

2016-11-18 Thread Zachary Ware
Changes by Zachary Ware : -- resolution: -> not a bug stage: -> resolved ___ Python tracker ___

[issue28693] No HKSCS support in Windows cp950

2016-11-18 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: -Python 3.3, Python 3.4 ___ Python tracker ___

[issue28687] Python 2.7.12 windows x64 installer fails after previous bad uninstall

2016-11-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: I had something like this happen with early 3.y.z. I believe I re-downloaded and re-installed the old version before either uninstalling or upgrading. I now keep the installer for x.y.z around until it is deleted or replaced. (I don't now if this is still

[issue28736] multiprocessing.Lock() no longer has .acquire()

2016-11-18 Thread Eric Leadbetter
Eric Leadbetter added the comment: It was a typographical error on my part. My mistake. -- status: open -> closed ___ Python tracker ___

[issue28705] Clean up design FAQ question about compiling to C

2016-11-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset a0a3dab4ed66 by Brett Cannon in branch '3.6': Issue #28705: greatly simplify the FAQ entry on transpiling. https://hg.python.org/cpython/rev/a0a3dab4ed66 New changeset 89e2201142f9 by Brett Cannon in branch 'default': Merge for issue #28705

[issue28705] Clean up design FAQ question about compiling to C

2016-11-18 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

Re: Parsing a single-level JSON file

2016-11-18 Thread Peter Otten
mike.rei...@gmail.com wrote: > hi all, > > Im reading in a JSON file that looks like this > > > [ >{ > "name":"myField1", > "searchable":true, > "navigable":true, > "custom":true, > "clauseNames":[ > "cf[10190]", > "Log Details" >

Re: Parsing a single-level JSON file

2016-11-18 Thread MRAB
On 2016-11-18 18:23, mike.rei...@gmail.com wrote: hi all, Im reading in a JSON file that looks like this [ { "name":"myField1", "searchable":true, "navigable":true, "custom":true, "clauseNames":[ "cf[10190]", "Log Details" ],

Re: Parsing a single-level JSON file

2016-11-18 Thread John Gordon
In John Gordon writes: > In > mike.rei...@gmail.com writes: > with open("json.dat", "r") as fp: > data = json.load(fp) > for item in data: > if

Re: Parsing a single-level JSON file

2016-11-18 Thread John Gordon
In mike.rei...@gmail.com writes: > Im reading in a JSON file that looks like this > ... snip ... > Lets say I want to get the ID # of MyField1, how can I parse this with > json lib? Theyre all on the same level, not sure how to target it to

[issue28681] About function renaming in the tutorial

2016-11-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: It took me a moment to realize that 'value of the function name' meant 'the function object associated with the name'. I think David's rewrite is a substantial improvement. I would just change the end 'can be used as a function' to 'can be used to access

[issue24452] Make webbrowser support Chrome on Mac OS X

2016-11-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0c8270cbdc62 by Brett Cannon in branch 'default': Issue #24452: add attribution https://hg.python.org/cpython/rev/0c8270cbdc62 -- ___ Python tracker

Parsing a single-level JSON file

2016-11-18 Thread mike . reider
hi all, Im reading in a JSON file that looks like this [ { "name":"myField1", "searchable":true, "navigable":true, "custom":true, "clauseNames":[ "cf[10190]", "Log Details" ], "orderable":true, "id":"customfield_10190",

[issue28596] on Android _bootlocale on startup relies on too many library modules

2016-11-18 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: -pitrou ___ Python tracker ___ ___ Python-bugs-list

Re: Encountering fatal error x80070643 while installing Python

2016-11-18 Thread MRAB
On 2016-11-18 11:40, Irene Venditti wrote: Hi everybody, I've got a problem with the installation of Python. I am a translator and currently I'm translating a book on programming Minecraft with Python, from English to Dutch. My computer is a Windows 10 computer, 64-bits (Toshiba Qosmio all in

[issue28736] multiprocessing.Lock() no longer has .acquire()

2016-11-18 Thread R. David Murray
R. David Murray added the comment: What gives you the idea that the multiprocessing Lock implementation has been changed? Are you confusing the asyncio Lock with the threading Lock? Is there a documentation crosslink somewhere that is going to the wrong place? -- nosy:

[issue28596] on Android _bootlocale on startup relies on too many library modules

2016-11-18 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Version 2 - use sys.implementation._multiarch to determine whether it's Android or not -- Added file: http://bugs.python.org/file45537/android-locale-utf8.patch ___ Python tracker

[issue28677] difficult to parse sentence structure in "When an instance attribute is referenced that isn't a data attribute"

2016-11-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: David's wording looks good. -- nosy: +terry.reedy ___ Python tracker ___

[issue28673] pyro4 with more than 15 threads often crashes 2.7.12

2016-11-18 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: -> test needed title: When using pyro4 with more than 15 threads, python 2.7.12 cores frequently -> pyro4 with more than 15 threads often crashes 2.7.12 ___ Python tracker

[issue28694] tkinter interface to fontchooser

2016-11-18 Thread Zachary Ware
Zachary Ware added the comment: I would recommend backing out your commit (hg rollback if you haven't pulled or otherwise changed your checkout since you made your commit), and just do 'hg diff' at the point where you would commit. In this particular case, if there are no changes other than

[issue28728] test_host_resolution in test_socket fails

2016-11-18 Thread SilentGhost
SilentGhost added the comment: Of course, you're right, that was my mistake. The last three addresses fail to raise, namely: '::1q', '::1::2' and '1:1:1:1:1:1:1:1:1'. -- stage: patch review -> title: test_host_resolution in test_socket fails on duplicate assert ->

[issue28728] test_host_resolution in test_socket fails on duplicate assert

2016-11-18 Thread SilentGhost
Changes by SilentGhost : Removed file: http://bugs.python.org/file45524/test_socket.diff ___ Python tracker ___

[issue28398] Return singleton empty string in _PyUnicode_FromASCII

2016-11-18 Thread Xiang Zhang
Xiang Zhang added the comment: > My question is simple: in what circumstances the patch has an effect? My original intention is that there is no need for the caller to check for the empty string. Even there is no use case now, it could be in future. But Serhiy, I am actually very glad to get

[issue28398] Return singleton empty string in _PyUnicode_FromASCII

2016-11-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: My question is simple: in what circumstances the patch has an effect? -- ___ Python tracker ___

Re: Style().configure don't works for all widgets

2016-11-18 Thread Peter Otten
Luis Marzulli wrote: > ttk.Style().configure(".", font=('Courier New', 30, "bold")) > > works for Button and Label widgets (and maybe others) and don't works for > Entry widget? > > Example in Python 3: > from tkinter import * > from tkinter import ttk > from tkinter import font > > root =

[issue28737] Document that tp_dealloc handler must call PyObject_GC_UnTrack if Py_TPFLAGS_HAVE_GC is set

2016-11-18 Thread Sam Gross
New submission from Sam Gross: In general, an a PyTypeObject that has Py_TPFLAGS_HAVE_GC set must call PyObject_GC_UnTrack() before it frees any PyObject* references it owns. The only reference to this requirement I found is in

[issue28531] Improve utf7 encoder memory usage

2016-11-18 Thread STINNER Victor
STINNER Victor added the comment: > I remember that we fixed bugs introduced by using _PyUnicodeWriter or > _PyBytesWriter many months after changing the code. Yeah, now I recall it (vaguely), that's why I closed the bug :-) -- ___ Python tracker

[issue28531] Improve utf7 encoder memory usage

2016-11-18 Thread STINNER Victor
STINNER Victor added the comment: Oh no, now I'm afraid of breaking something :-D I don't trust anymore our test suite for the UTF-7 codec, so I close the issue :-) Sorry Xiang, but as we said, this rarely used codec is not important enough to require optimization. -- resolution: ->

[issue28531] Improve utf7 encoder memory usage

2016-11-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I fixed many long living bugs in the UTF-7 codec in the past, and I remember that we fixed bugs introduced by using _PyUnicodeWriter or _PyBytesWriter many months after changing the code. Since the UTF-7 codec is rarely used, there is a risk of introducing

[issue28398] Return singleton empty string in _PyUnicode_FromASCII

2016-11-18 Thread STINNER Victor
STINNER Victor added the comment: > We should know what is the benefit of the patch before committing it. The purpose of the patch is to use the empty string singleton to reduce the memory footprint, instead of creating multiple empty (Unicode) string objects. --

[issue28736] multiprocessing.Lock() no longer has .acquire()

2016-11-18 Thread Eric Leadbetter
New submission from Eric Leadbetter: The documentation on the multiprocessing library in Python 3 uses Lock.acquire()/Lock.release() in the example for primitive synchronization (https://docs.python.org/3/library/multiprocessing.html#synchronization-between-processes). Lock() has been changed

  1   2   >