Re: Python JSON processing - extra data error

2015-03-31 Thread dieter
karthik.sha...@gmail.com writes: I have the following python program to read a set of JSON files do some processing on it and dump them back to the same folder. However When I run the below program and then try to see the output of the JSON file using `cat file.json | python -m json.tool`

Re: Python 3 success story

2015-03-31 Thread Terry Reedy
On 3/30/2015 8:24 PM, Mario Figueiredo wrote: On Mon, 30 Mar 2015 19:28:16 -0400, Terry Reedy tjre...@udel.edu wrote: So I suggested going ahead and testing PyBrain by using it. This appears to have worked out well. I believe the only 2-3 issue she ran into was a '/' that needed to become

[issue2211] Cookie.Morsel interface needs update

2015-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you David, all LGTM. I noted that the :func: role sometimes is used for methods in the whatsnew file (and perhaps in other rst files). Perhaps it should be changed to :meth:. But this is other issue. --

[issue19176] DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser

2015-03-31 Thread Martin Panter
Martin Panter added the comment: The difference of calling XMLParser.doctype() between the implementations is another argument for removing it completely. With all these bugs, and no opposition that I know of, I think it should be okay to remove the deprecated doctype() method in 3.5.

[issue19176] DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser

2015-03-31 Thread Martin Panter
Martin Panter added the comment: inherit-doctype.v2.patch inverts the logic in the C module. This patch may still be useful if people want to apply it to 3.4, or do not want to remove the deprecated method from 3.5. -- Added file:

[issue19176] DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser

2015-03-31 Thread Martin Panter
Martin Panter added the comment: doctype-remove.v3.patch includes an entry on the What’s New page. -- Added file: http://bugs.python.org/file38757/doctype-remove.v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19176

Re: A simple single line, triple-quoted comment is giving syntax error. Why?

2015-03-31 Thread Ian Kelly
On Sun, Mar 29, 2015 at 4:41 AM, Thomas 'PointedEars' Lahn pointede...@web.de wrote: Ian Kelly wrote: […] Thomas 'PointedEars' Lahn […] wrote: Ian Kelly wrote: Why should the burden of proof be on me in the first place? Because *you* made the claim that “STRING+” could be part of an AST in

Re: Hypothesis 1.0: A production quality property-based testing library for Python

2015-03-31 Thread David MacIver
On 31 March 2015 at 02:46, Terry Reedy tjre...@udel.edu wrote: On 3/30/2015 4:46 PM, David MacIver wrote: On 30 March 2015 at 22:37, Terry Reedy tjre...@udel.edu mailto:tjre...@udel.edu wrote: https://www.python.org/dev/__peps/pep-0484/ https://www.python.org/dev/peps/pep-0484/

Re: Hypothesis 1.0: A production quality property-based testing library for Python

2015-03-31 Thread David MacIver
On 31 March 2015 at 02:51, Paul Rubin no.email@nospam.invalid wrote: David MacIver da...@drmaciver.com writes: Hypothesis is based on Quickcheck (https://wiki.haskell.org/Introduction_to_QuickCheck2) This is great. Have you looked at the Erlang version of Quickcheck? It may have aspects

Re: Using csv DictWriter - add a extra field

2015-03-31 Thread Peter Otten
Victor Hooi wrote: Hi, I have a dict named connections, with items like the following: In [18]: connections Out[18]: {'3424234': {'end_timestamp': datetime.datetime(2015, 3, 25, 5, 31, 30, {406000, tzinfo=datetime.timezone(datetime.timedelta(-1, 61200))), 'ip_address':

Re: Using csv DictWriter - add a extra field

2015-03-31 Thread Victor Hooi
Hi, Aha, yeah, I can add the connection_id as another field in the inner dict - the only drawback is that the data is duplicated twice. However, I suppose even if it's not elegant, it does work. However, that ChainMap does look interesting =). And yes, I am actually using Python 3.x (mainly

[issue23466] PEP 461: Inconsistency between str and bytes formatting of integers

2015-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23466

Re: Using csv DictWriter - add a extra field

2015-03-31 Thread Peter Otten
Victor Hooi wrote: Aha, yeah, I can add the connection_id as another field in the inner dict - the only drawback is that the data is duplicated twice. However, I suppose even if it's not elegant, it does work. The elegance lies in its simplicity, so it's still my personal favourite.

[issue22035] Fatal error in dbm.gdbm

2015-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22035 ___ ___ Python-bugs-list

[issue23793] Support __add__, __mul__, and __imul__ for deques.

2015-03-31 Thread Josh Rosenberg
Josh Rosenberg added the comment: I agree that popping old inputs is the normal way. What I'm trying to say is that it doesn't feel like old or inputs when you multiply. In that case (and maybe this is just me), it feels like a reasonable outcome could be to get an outcome similar to

Project, how to debug

2015-03-31 Thread Robert Clove
Hi All, I am facing a problem. I have been given a project written in python and asked to debug it. I have not been given the flow they said understand and debug. Can someone suggest me how to debug it in Wings IDE. Project have approx 10 files. Regards --

Re: A simple single line, triple-quoted comment is giving syntax error. Why?

2015-03-31 Thread Jean-Michel Pichavant
- Original Message - From: Terry Reedy tjre...@udel.edu To: python-list@python.org Sent: Wednesday, 18 March, 2015 10:47:40 PM Subject: Re: A simple single line, triple-quoted comment is giving syntax error. Why? On 3/18/2015 3:53 PM, Thomas 'PointedEars' Lahn wrote: I must

[issue23360] Content-Type when sending data with urlopen()

2015-03-31 Thread Martin Panter
Martin Panter added the comment: I think we should avoid mentioning bytes-like objects until Issue 23740 (http.client support), Issue 23756 (clarify definition), and/or SSLSocket.sendall() support are sorted out. Changes in non-urlencoded.3.patch: * Removed iterable object as direct urlopen()

Re: Strategy/ Advice for How to Best Attack this Problem?

2015-03-31 Thread Saran A
On Monday, March 30, 2015 at 2:36:02 PM UTC-4, Dave Angel wrote: On 03/30/2015 12:45 PM, Saran A wrote: On Sunday, March 29, 2015 at 10:04:45 PM UTC-4, Chris Angelico wrote: On Mon, Mar 30, 2015 at 12:08 PM, Paul Rubin no.email@nospam.invalid wrote: Saran Ahluwalia

[issue23611] Pickle nested names with protocols 4

2015-03-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset ca12465418bd by Serhiy Storchaka in branch 'default': Issue #23611: Serializing more lookupable objects (such as unbound methods https://hg.python.org/cpython/rev/ca12465418bd -- nosy: +python-dev ___

Re: Project, how to debug

2015-03-31 Thread Peter Otten
Robert Clove wrote: Hi All, I am facing a problem. I have been given a project written in python and asked to debug it. I have not been given the flow they said understand and debug. Can someone suggest me how to debug it in Wings IDE. Are those specific bugs that you are supposed to

[issue11344] Add os.path.splitpath(path) function

2015-03-31 Thread Paul Moore
Paul Moore added the comment: Assuming new code should be using pathlib, I agree this should probably be closed now as obsolete. One proviso - pathlib objects don't take a bytestring path in the constructor. If there's a need for a low-level splitpath taking bytes objects, there may still be

[issue23485] PEP 475: handle EINTR in the select and selectors module

2015-03-31 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23485 ___

[issue13583] sqlite3.Row doesn't support slice indexes

2015-03-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset e47f520eb756 by Serhiy Storchaka in branch 'default': Issue #13583: sqlite3.Row now supports slice indexing. https://hg.python.org/cpython/rev/e47f520eb756 -- nosy: +python-dev ___ Python tracker

[issue23618] PEP 475: handle EINTR in the socket module (connect)

2015-03-31 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: Removed file: http://bugs.python.org/file38743/test_selectors.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23618 ___

[issue23812] asyncio.Queue.put_nowait(), followed get() task cancellation leads to item being lost

2015-03-31 Thread Gustavo J. A. M. Carneiro
Gustavo J. A. M. Carneiro added the comment: So I uploaded a new patch version fixing a similar problem in put(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23812 ___

[issue10395] new os.path function to extract common prefix based on path components

2015-03-31 Thread Paul Moore
Paul Moore added the comment: The patch looks good to me. rhettinger: I'm not sure I see a problem with the doc changes in the latest patch - noting that commonprefix may return an invalid path is fine, and what the current docs say. Directing people to commonpath if they don't want invalid

[issue23485] PEP 475: handle EINTR in the select and selectors module

2015-03-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset b017ca5d28bc by Victor Stinner in branch 'default': Issue #23485: select.kqueue.control() is now retried when interrupted by a signal https://hg.python.org/cpython/rev/b017ca5d28bc New changeset f54bc2c52dfd by Victor Stinner in branch 'default':

[issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING

2015-03-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8d86dfe53b97 by Serhiy Storchaka in branch '3.4': Issue #18473: Fixed 2to3 and 3to2 compatible pickle mappings. https://hg.python.org/cpython/rev/8d86dfe53b97 New changeset 5980e81219ed by Serhiy Storchaka in branch 'default': Issue #18473: Fixed

[issue13583] sqlite3.Row doesn't support slice indexes

2015-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: ghaering - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13583 ___

[issue13583] sqlite3.Row doesn't support slice indexes

2015-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The implementation can be much simpler, but in any case thank you for your patches Lucas and Jessica. -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker

[issue23817] Consider FreeBSD like any other OS in SOVERSION

2015-03-31 Thread STINNER Victor
STINNER Victor added the comment: https://hg.python.org/cpython/file/47b2d1ff9743/configure.ac#l963 This command was added by the changeset 6fc10306bf31. -- nosy: +haypo, koobs ___ Python tracker rep...@bugs.python.org

[issue19660] decorator syntax: allow testlist instead of just dotted_name

2015-03-31 Thread Ximin Luo
Ximin Luo added the comment: Yes, please get rid of this restriction. It's trivial to get around - you don't even need to define your own pass-through, one already exists in the standard library: @(lambda: [lambda x: x][0])() File stdin, line 1 @(lambda: [lambda x: x][0])() ^

Re: generator/coroutine terminology

2015-03-31 Thread Albert van der Horst
In article 83d579c1-ab61-4a3d-a834-e65d28eac...@googlegroups.com, Rustom Mody rustompm...@gmail.com wrote: On Saturday, March 14, 2015 at 8:59:22 PM UTC+5:30, Rustom Mody wrote: On Saturday, March 14, 2015 at 11:34:27 AM UTC+5:30, Steven D'Aprano wrote: A generator (function) may be a

Python regex exercise

2015-03-31 Thread Robert Clove
Hi All, Do anyone have good links to python regex or other python problems for beginners but with solution. Please mail me. Regards -- https://mail.python.org/mailman/listinfo/python-list

[issue23817] Consider FreeBSD like any other OS in SOVERSION

2015-03-31 Thread bapt
bapt added the comment: Adding a patch on configure.ac (I bet configure should not be patched but regenerated) Considering the comment here: http://bugs.python.org/issue1044395#msg47064 about ldconfig(1) the output of ldconfig(1) is buggy in that regard, and the ports tree does not depends

[issue23817] Consider FreeBSD like any other OS in SOVERSION

2015-03-31 Thread koobs
koobs added the comment: +1 -- stage: - needs patch type: - enhancement versions: +Python 2.7, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23817 ___

[issue23818] test_enum failing test_class_nested_enum_and_pickle_protocol_four

2015-03-31 Thread Brett Cannon
New submission from Brett Cannon: test test_enum failed -- Traceback (most recent call last): File /Users/bcannon/Repositories/cpython/default/Lib/test/test_enum.py, line 580, in test_class_nested_enum_and_pickle_protocol_four protocol=(0, 3)) File

[issue23779] imaplib authenticate raises TypeError if authenticator tries to abort

2015-03-31 Thread R. David Murray
R. David Murray added the comment: The patch looks good to me, except that I think it would be better if the test verified that the '*' response is received by the server (perhaps return OK if we don't get it?) -- components: +email nosy: +barry, r.david.murray stage: test needed -

[issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING

2015-03-31 Thread STINNER Victor
STINNER Victor added the comment: Buildbots are unhappy. Example: http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/11437/steps/test/logs/stdio == ERROR: test_name_mapping

Re: Project, how to debug

2015-03-31 Thread Chris Angelico
On Tue, Mar 31, 2015 at 10:23 PM, Robert Clove cloverob...@gmail.com wrote: I am facing a problem. I have been given a project written in python and asked to debug it. I have not been given the flow they said understand and debug. Can someone suggest me how to debug it in Wings IDE. Project

[issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING

2015-03-31 Thread STINNER Victor
STINNER Victor added the comment: A different error: http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%203.x/builds/2880/steps/test/logs/stdio == FAIL: test_class_nested_enum_and_pickle_protocol_four

[issue22035] Fatal error in dbm.gdbm

2015-03-31 Thread STINNER Victor
STINNER Victor added the comment: I would prefer to avoid setgmp/longjmp, it's kind of a hack. It's maybe more a design issue in the gdbm library to report errors. I proposed a generic signal handler using setjmp/longjmp to convert SIGSEGV to regular Python exceptions, but it was rejected:

Re: Project, how to debug

2015-03-31 Thread Robert Clove
On Tue, Mar 31, 2015 at 5:19 PM, Peter Otten __pete...@web.de wrote: Robert Clove wrote: Hi All, I am facing a problem. I have been given a project written in python and asked to debug it. I have not been given the flow they said understand and debug. Can someone suggest me how to

[issue22035] Fatal error in dbm.gdbm

2015-03-31 Thread STINNER Victor
STINNER Victor added the comment: Oh, Mark, please stop shaking up bug tracker. I agree: please stop posting useless messages, and review patches instead. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22035

[issue23618] PEP 475: handle EINTR in the socket module (connect)

2015-03-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset e8246baad0f6 by Victor Stinner in branch 'default': Issue #23618: Refactor the _socket module https://hg.python.org/cpython/rev/e8246baad0f6 New changeset fa5542660b17 by Victor Stinner in branch 'default': Issue #23618: Refactor internal_select()

[issue23618] PEP 475: handle EINTR in the socket module (connect)

2015-03-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 47b2d1ff9743 by Victor Stinner in branch 'default': Issue #23618: Fix internal_connect_select() https://hg.python.org/cpython/rev/47b2d1ff9743 -- ___ Python tracker rep...@bugs.python.org

[issue10395] new os.path function to extract common prefix based on path components

2015-03-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset ec6c812fbc1f by Serhiy Storchaka in branch 'default': Issue #10395: Added os.path.commonpath(). Implemented in posixpath and ntpath. https://hg.python.org/cpython/rev/ec6c812fbc1f -- nosy: +python-dev

[issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING

2015-03-31 Thread STINNER Victor
STINNER Victor added the comment: A third kind of error: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/5992/steps/test/logs/stdio == ERROR: test_import (test.test_pickle.CompatPickleTests)

[issue10395] new os.path function to extract common prefix based on path components

2015-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch only adds a reference to commonpath() in commonprefix() documentation. The note about invalid paths already was here. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10395

[issue19100] Use backslashreplace in pprint

2015-03-31 Thread Walter Dörwald
Walter Dörwald added the comment: The linked code at https://github.com/vadmium/python-iview/commit/68b0559 seems strange to me: try: text.encode(encoding, textio.errors or strict) except UnicodeEncodeError: text = text.encode(encoding, errors).decode(encoding)

[issue23817] Consider FreeBSD like any other OS in SOVERSION

2015-03-31 Thread bapt
New submission from bapt: In the configuration script: https://hg.python.org/cpython/file/47b2d1ff9743/configure.ac#l963 There is a special treatment done for FreeBSD, which is not needed, FreeBSD is perfectly fine with multiple digit in soversion. -- components: Build messages:

Re: New to Programming - XML Processing

2015-03-31 Thread Ben Finney
catperson me@anonymous.invalid writes: I am new to programming, though not new to computers. I'm looking to teach myself Python 3 and am working my way through a tutorial. Congratulations! Python 3 is a fine language to be your first. Which tutorial are you following? It may be relevant. At

New to Programming - XML Processing

2015-03-31 Thread catperson
I am new to programming, though not new to computers. I'm looking to teach myself Python 3 and am working my way through a tutorial. At the point I'm at in the tutorial I am tasked with parsing out an XML file created with a Garmin Forerunner and am just having a terrible time getting my head

Re: OT Intuitionism+Platonism+Mysticism = CS (was Deep comparison of dicts...)

2015-03-31 Thread Rustom Mody
On Saturday, March 21, 2015 at 11:58:43 AM UTC+5:30, Marko Rauhamaa wrote: Rustom Mody : However I am talking some historical facts, viz: Because some nuts did the 20th century equivalent of: Break each others' heads about how many angels can dance on the head of a pin therefore much of

[issue12855] linebreak sequences should be better documented

2015-03-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6244a5dbaf84 by Benjamin Peterson in branch '3.4': document what exactly str.splitlines() splits on (closes #12855) https://hg.python.org/cpython/rev/6244a5dbaf84 New changeset 87af6deb5d26 by Benjamin Peterson in branch 'default': merge 3.4

[issue23484] SemLock acquire() keyword arg 'blocking' is invalid

2015-03-31 Thread Davin Potts
Davin Potts added the comment: @berker: I would have said this should not be marked an enhancement as the proposed solution (in the patch) is to correct the errors in the documentation to accurately describe the current implemented behavior. Does that make sense? Whatever label we give it,

Re: New to Programming - XML Processing

2015-03-31 Thread Andrew Farrell
You should follow Rustom's advice before just diving into the blog post I linked to. Otherwise you risk blindly following things and losing your bearings when you run into bugs. On Tue, Mar 31, 2015 at 11:17 PM, Rustom Mody rustompm...@gmail.com wrote: On Wednesday, April 1, 2015 at 8:57:15 AM

Re: New to Programming - XML Processing

2015-03-31 Thread Andrew Farrell
I am new to programming, though not new to computers. One quick tip: when starting a new project, it is sometimes is useful to see if others have done the same thing and use their approach to guide yours. In your case, googling Garmin Forerunner xml python results in this blog post which is

[issue12319] [http.client] HTTPConnection.putrequest not support chunked Transfer-Encodings to send data

2015-03-31 Thread Martin Panter
Martin Panter added the comment: Perhaps you should make a table of some potential body object types, and figure out what the behaviour should be for request() with and without relevant headers, and endheaders() and send() with and without encode_chunked=True: * Add/don’t add

Re: Automation of Windows app?

2015-03-31 Thread alex23
On 23/03/2015 1:43 PM, Michael Torrie wrote: As near as I can tell the standard go-to utility for this is a program called AutoIt. https://www.autoitscript.com/site/autoit/ Nothing to do with Python, and its scripting language is maybe not that appealing to many, but it does the job, and does

Re: New to Programming - XML Processing

2015-03-31 Thread Rustom Mody
On Wednesday, April 1, 2015 at 8:57:15 AM UTC+5:30, catperson wrote: I'm hoping with enough reading I can experiment and work my way through the problem and end up with a hopefully clear understanding of the ElementTree module and Dictionairies. Also: If you are not familiar with

[issue23835] configparser does not convert defaults to strings

2015-03-31 Thread James Tocknell
New submission from James Tocknell: ConfigParser(defaults={1:2.4}) and ConfigParser(defaults={a:5.2}) cause an exception when configparser tries to perform string operations on 1 and 5.2. I didn't see it documented that defaults must only contain strings, and using ConfigParser['DEFAULT'] =

Re: New to Programming - XML Processing

2015-03-31 Thread Rustom Mody
On Wednesday, April 1, 2015 at 8:57:15 AM UTC+5:30, catperson wrote: I am new to programming, though not new to computers. I'm looking to teach myself Python 3 and am working my way through a tutorial. At the point I'm at in the tutorial I am tasked with parsing out an XML file created with

[issue23824] in-place addition of a shadowed class field

2015-03-31 Thread Jethro
New submission from Jethro: Look at this simple code: class A: tot = 0 def __init__(self, a): self.tot += a x = A(3) print(x.tot, A.tot) Result from print: 3 0 What the interpreter did was that it first resolved self.tot to be the class

Lockfile hanling

2015-03-31 Thread Ervin Hegedüs
Hello, there is an app, written in Python, which stores few bytes of datas in a single file. The application uses threads. Every thread can modify the file, but only one at a time. I'm using a lock file to prevent the multiple access. Here is the lock method: while True: try:

Re: Lockfile hanling

2015-03-31 Thread Ervin Hegedüs
Hi Skip, thanks for the reply, On Tue, Mar 31, 2015 at 09:55:57AM -0500, Skip Montanaro wrote: On Tue, Mar 31, 2015 at 9:50 AM, Ervin Hegedüs airw...@gmail.com wrote: After few weeks the process reaches the number if max fd's. How can I prevent or avoid this issue? What's the correct

[issue23611] Pickle nested names with protocols 4

2015-03-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset f78b9f700d45 by Serhiy Storchaka in branch 'default': Issue #23611: Fixed enums pickling tests. Now all picklings work with all https://hg.python.org/cpython/rev/f78b9f700d45 -- ___ Python tracker

[issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING

2015-03-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5c5eb374e296 by Serhiy Storchaka in branch '3.4': Issue #18473: Fixed pickle compatibility tests for optional modules. https://hg.python.org/cpython/rev/5c5eb374e296 New changeset 29b2b2d8e36f by Serhiy Storchaka in branch 'default': Issue #18473:

[issue23793] Support __add__, __mul__, and __imul__ for deques.

2015-03-31 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23793 ___

[issue23820] test_importlib fails under -O

2015-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch. -- keywords: +patch nosy: +serhiy.storchaka stage: needs patch - patch review Added file: http://bugs.python.org/file38761/issue23820.patch ___ Python tracker rep...@bugs.python.org

[issue23793] Support __add__, __mul__, and __imul__ for deques.

2015-03-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset b75160d24b7b by Raymond Hettinger in branch 'default': Issue 23793: Add deque support for __add__(), __mul__(), and __imul__(). https://hg.python.org/cpython/rev/b75160d24b7b -- nosy: +python-dev ___

[issue23823] Generalization misused in deque docs

2015-03-31 Thread rschwieb
New submission from rschwieb: This sentence in the deque docs (https://docs.python.org/2/library/collections.html#collections.deque) is not accurate: Deques are a generalization of stacks and queues ... Deques are a _specialization_ of stacks and queues. Every deque is-a stack and is-a

[issue23822] test_py_compile fails under -O

2015-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch. -- keywords: +patch nosy: +serhiy.storchaka stage: needs patch - patch review Added file: http://bugs.python.org/file38760/issue23822.patch ___ Python tracker rep...@bugs.python.org

Logging Custom Levels?

2015-03-31 Thread Didymus
Hi, I've create a Python file called log.py and placed in the custom levels: # Performance Debug... logging.addLevelName(PDEBUG_NUM, PDEBUG) def pdebug(self, message, *args, **kws): Performance Debug Message Level self.log(PDEBUG_NUM, message, *args, **kws)

[issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING

2015-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Fixed import errors. A second kind of errors was related to issue23611. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18473 ___

[issue23825] test_idle fails under -OO

2015-03-31 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- components: IDLE nosy: brett.cannon priority: normal severity: normal stage: needs patch status: open title: test_idle fails under -OO versions: Python 3.5 ___ Python tracker rep...@bugs.python.org

[issue23823] Generalization misused in deque docs

2015-03-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry, I disagree. -- nosy: +rhettinger resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23823 ___

[issue23793] Support __add__, __mul__, and __imul__ for deques.

2015-03-31 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't see any technical reason not to proceed. Just because an unusual combination of parameters feels odd to you doesn't make it wrong. It is no different than (somelist * n)[-maxlen:]. -- ___ Python

[issue23824] in-place addition of a shadowed class field

2015-03-31 Thread R. David Murray
R. David Murray added the comment: Yep, this is the way it works. When a class attribute name is referenced on an instance object, you are referencing the object pointed to by the class name. What happens next depends on what kind of object you have, and what kind of operation you perform.

Re: generator/coroutine terminology

2015-03-31 Thread Albert van der Horst
In article mailman.372.1427809109.10327.python-l...@python.org, Dave Angel da...@davea.name wrote: On 03/31/2015 09:18 AM, Albert van der Horst wrote: In article 55062bda$0$12998$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: The biggest

[issue23825] test_idle fails under -OO

2015-03-31 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Here is a patch. -- keywords: +patch nosy: +serhiy.storchaka stage: needs patch - patch review Added file: http://bugs.python.org/file38762/issue23825.patch ___ Python tracker rep...@bugs.python.org

Re: How to handle file in Whoosh?

2015-03-31 Thread Peter Otten
subhabrata.bane...@gmail.com wrote: I am trying to build a search engine, I started with Whoosh. The tutorial and web based materials are fine. Web has sizable question and answers. The initial experiments seem going fine. But I want to handle files located in various parts of my machine. I

[issue23824] in-place addition of a shadowed class field

2015-03-31 Thread Jethro
Changes by Jethro y...@pku.edu.cn: -- resolution: not a bug - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23824 ___ ___

[issue23818] test_enum failing test_class_nested_enum_and_pickle_protocol_four

2015-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is related to issue23611 and fixed by f78b9f700d45. -- nosy: +serhiy.storchaka resolution: - out of date stage: needs patch - resolved status: open - closed ___ Python tracker rep...@bugs.python.org

[issue23824] in-place addition of a shadowed class field

2015-03-31 Thread R. David Murray
R. David Murray added the comment: Ah, now I understand your confusion. Class variables are special. The first time you reference a name on an instance that is not currently defined on that instance but is defined on the class, the interpreter gets the object pointer from the class

Re: Lockfile hanling

2015-03-31 Thread Skip Montanaro
On Tue, Mar 31, 2015 at 9:50 AM, Ervin Hegedüs airw...@gmail.com wrote: After few weeks the process reaches the number if max fd's. How can I prevent or avoid this issue? What's the correct way to handle the lockfile in Python? Ervin, You need to close the files you open. I don't see that

[issue12319] [http.client] HTTPConnection.putrequest not support chunked Transfer-Encodings to send data

2015-03-31 Thread Demian Brecht
Demian Brecht added the comment: Agreed. However, I'm wondering if that should belong in a new issue geared towards further clarifying behaviour of request body types. The patch introduces the behaviour this specific issue was looking, with the largest change being that iterators may now

Re: Lockfile hanling

2015-03-31 Thread Ervin Hegedüs
Hi Skip, On Tue, Mar 31, 2015 at 10:19:27AM -0500, Skip Montanaro wrote: sorry - at the end of the function there is a close() method to a file, after the thread passes the modifications: try: os.remove(self.lockfile) except: syslog.syslog(syslog.LOG_DEBUG,

[issue23826] test_enum fails under -OO

2015-03-31 Thread Brett Cannon
New submission from Brett Cannon: == FAIL: test_pydoc (__main__.TestStdLib) -- Traceback (most recent call last): File

[issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING

2015-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18473 ___

[issue23611] Pickle nested names with protocols 4

2015-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23611 ___

[issue23829] test_warnings fails under -Werror

2015-03-31 Thread Brett Cannon
New submission from Brett Cannon: == ERROR: test_warning_classes (__main__.CWarnTests) -- Traceback (most recent call last): File

[issue23821] test_pdb fails under -O

2015-03-31 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23821 ___ ___

[issue23821] test_pdb fails under -O

2015-03-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch. -- keywords: +patch Added file: http://bugs.python.org/file38763/issue23821.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23821 ___

[issue23360] Content-Type when sending data with urlopen()

2015-03-31 Thread Demian Brecht
Changes by Demian Brecht demianbre...@gmail.com: -- nosy: +demian.brecht ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23360 ___ ___

[issue23826] test_enum fails under -OO

2015-03-31 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +ethan.furman ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23826 ___ ___ Python-bugs-list

[issue23821] test_pdb fails under -O

2015-03-31 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Tests were added in issue16596. -- nosy: +asvetlov, gvanrossum, serhiy.storchaka, xdegaye ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23821 ___

[issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING

2015-03-31 Thread STINNER Victor
STINNER Victor added the comment: Le mardi 31 mars 2015, Roundup Robot rep...@bugs.python.org a écrit : Roundup Robot added the comment: New changeset 5c5eb374e296 by Serhiy Storchaka in branch '3.4': Issue #18473: Fixed pickle compatibility tests for optional modules.

Re: Lockfile hanling

2015-03-31 Thread Matthew Ruffalo
On 2015-03-31 10:50, Ervin Hegedüs wrote: there is an app, written in Python, which stores few bytes of datas in a single file. The application uses threads. Every thread can modify the file, but only one at a time. I'm using a lock file to prevent the multiple access. ... How can I

  1   2   >