Re: getting fieldnames from Dictreader before reading lines

2015-05-09 Thread Mark Lawrence
On 09/05/2015 23:46, Vincent Davis wrote: I am reading a file with Dictreader and writing a new file. I want use the fieldnames in the Dictwriter from the reader. See below How should I be doing this? See how I am using reader.fieldnames in the the Dictwriter. I get an error (below) with

Re: getting fieldnames from Dictreader before reading lines

2015-05-09 Thread Vincent Davis
Not sure what I was doing wrong, it seems to work now. Vincent Davis 720-301-3003 On Sat, May 9, 2015 at 4:46 PM, Vincent Davis vinc...@vincentdavis.net wrote: I am reading a file with Dictreader and writing a new file. I want use the fieldnames in the Dictwriter from the reader. See below

[issue24134] assertRaises can behave differently

2015-05-09 Thread Tim Graham
Tim Graham added the comment: I noticed this is backwards incompatible for a small feature in Django. If you want to leave this feature in Python 2.7 and 3.4, it'll break things unless we push out a patch for Django; see https://github.com/django/django/pull/4637. -- nosy: +Tim.Graham

[issue24153] threading/multiprocessing tests fail on chromebook under crouton generated chroots

2015-05-09 Thread Ned Deily
Ned Deily added the comment: The failures seem pretty clear: OSError: [Errno 28] No space left on device Are you allocating enough disk space in the chrooted environments? The amount of free space needed to run all the tests varies by platform, by architecture, by test options selected,

Re: Jython from bathc file?

2015-05-09 Thread vjp2 . at
Tee from gnuutils?? - = - Vasos Panagiotopoulos, Columbia'81+, Reagan, Mozart, Pindus, BioStrategist http://www.panix.com/~vjp2/vasos.htm ---{Nothing herein constitutes advice. Everything fully disclaimed.}--- [Homeland Security

Re: functions, optional parameters

2015-05-09 Thread Chris Angelico
On Sun, May 10, 2015 at 12:45 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: This is the point where some people try to suggest some sort of complicated, fragile, DWIM heuristic where the compiler tries to guess whether the user actually wants the default to use early or late

[issue24017] Implemenation of the PEP 492 - Coroutines with async and await syntax

2015-05-09 Thread Nick Coghlan
Nick Coghlan added the comment: Review sent - very nice work on this Yury. Highlights: * I concur with Stefan that we should have a full PyCoroutineMethods struct at the C level, with a tp_as_coroutine pointer to that replacing the current tp_reserved slot * I also concur with Stefan about

[issue24155] Optimize heapify for better cache utililzation

2015-05-09 Thread Raymond Hettinger
New submission from Raymond Hettinger: Heapify() is implemented with a series of siftup() operations that aggregate small heaps into bigger heaps. The current algorithm builds all the smallest heaps first, then makes all of the next largest size, and so on. This is not cache friendly

Re: getting fieldnames from Dictreader before reading lines

2015-05-09 Thread Dave Angel
On 05/09/2015 07:01 PM, Vincent Davis wrote: Not sure what I was doing wrong, it seems to work now. I still see two significant things wrong: 1) you're top-posting, putting your response BEFORE the stuff you're responding to. 2) both messages are in html, which thoroughly messed up parts

Re: functions, optional parameters

2015-05-09 Thread Rustom Mody
On Sunday, May 10, 2015 at 8:16:07 AM UTC+5:30, Steven D'Aprano wrote: I predict that the majority of the time, late binding would just be a pointless waste of time: def process_string(thestr, start=0, end=None, slice=1, reverse=True): pass Why would you want 0, None, 1 and True to be

[issue24155] Optimize heapify for better cache utililzation

2015-05-09 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: Added file: http://bugs.python.org/file39332/wordy_explanation.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24155 ___

[issue24104] Use after free in xmlparser_setevents (2)

2015-05-09 Thread Alex Lord
Alex Lord added the comment: ../cpython/python.exe test_xmlparser_setevents.py __del__ 1 __del__ 3 Segmentation fault: 11 Confirmation on 3.5.0a4 Python 3.5.0a4+ -- nosy: +Alex.Lord ___ Python tracker rep...@bugs.python.org

[issue24151] test_pydoc fails

2015-05-09 Thread Ned Deily
Ned Deily added the comment: Thanks for the report. I'm not able to reproduce the failure myself. Can you give more information on what platform this was run on (OS version) and at what changeset the build was with (hg summary)? Perhaps you could try debugging the execution of that test

Re: Jython from bathc file?

2015-05-09 Thread Dave Angel
On 05/09/2015 05:04 PM, vjp2...@at.biostrategist.dot.dot.com wrote: Thanks.. I suspected it wasn't meant to be taken as in the file THe one thing I'm not sure if Jython is suppsosedto keep running after the initisl stuff is loaded in.. To put the question in purely DOS terms if you run a

Re: Jython from bathc file?

2015-05-09 Thread Rustom Mody
On Sunday, May 10, 2015 at 7:55:22 AM UTC+5:30, vjp...@at.biostrategist.dot.dot.com wrote: I have to try this and see if there is ome kind of init file in jython/python sorta like autoexec.bat. Ialso have no idea if the commands they provide are all it takes to run the app or I have to stay in

[issue22906] PEP 479: Change StopIteration handling inside generators

2015-05-09 Thread Nick Coghlan
Nick Coghlan added the comment: Since it took me a moment to figure out why the extra incref was needed: * both PyException_SetCause and PyException_SetContext steal a reference to their second argument * hence we need the second incref, rather than relying solely on the reference received

getting fieldnames from Dictreader before reading lines

2015-05-09 Thread Vincent Davis
I am reading a file with Dictreader and writing a new file. I want use the fieldnames in the Dictwriter from the reader. See below How should I be doing this? See how I am using reader.fieldnames in the the Dictwriter. I get an error (below) with open(readfile, 'r', encoding='utf-8',

Re: Jython from bathc file?

2015-05-09 Thread vjp2 . at
I have to try this and see if there is ome kind of init file in jython/python sorta like autoexec.bat. Ialso have no idea if the commands they provide are all it takes to run the app or I have to stay in jython.. sorry, I'm thinking at loud.. ok, thanks to all..

[issue24152] test_mailcap fails

2015-05-09 Thread ryan
New submission from ryan: UnicodeDecodeError -- components: Tests files: results hgrepos: 308 messages: 242840 nosy: petrosr2 priority: normal severity: normal status: open title: test_mailcap fails type: crash versions: Python 2.7 Added file: http://bugs.python.org/file39330/results

Re: getting fieldnames from Dictreader before reading lines

2015-05-09 Thread Vincent Davis
On Sat, May 9, 2015 at 5:55 PM, Dave Angel da...@davea.name wrote: 1) you're top-posting, putting your response BEFORE the stuff you're responding to. I responded to my own email, seemed ok to top post on myself saying it was resolved. 2) both messages are in html, which thoroughly messed

Re: functions, optional parameters

2015-05-09 Thread Steven D'Aprano
On Sat, 9 May 2015 01:50 am, Michael Welle wrote: [...] How about this definition: default = 23 def spam(eggs=default): pass del default print spam() Do you expect the function call to fail because `default` doesn't exist? If I reference an object, that

[issue24155] Optimize heapify for better cache utililzation

2015-05-09 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: Added file: http://bugs.python.org/file39333/better_heapify.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24155 ___

[issue24155] Optimize heapify for better cache utililzation

2015-05-09 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: Removed file: http://bugs.python.org/file39331/draft_heapq.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24155 ___

[issue24152] test_mailcap fails

2015-05-09 Thread ryan
ryan added the comment: running command over PuTTY on Ubuntu 3.13, python 2.7.6 $ ./python -m test test_mailcap [1/1] test_mailcap test test_mailcap failed -- Traceback (most recent call last): File /home/petrosr2/Documents/opensource/cpy/Lib/test/test_mailcap.py, line 126, in

[issue24152] test_mailcap fails if a mailcap file contains a non-decodable character

2015-05-09 Thread Ned Deily
Ned Deily added the comment: I can reproduce the failure by arbitrarily adding a non-ascii character to one of the mailcap files searched for by the mailcap module (https://docs.python.org/3/library/mailcap.html#mailcap.getcaps), like $HOME/.mailcap, and by setting the process to an

Re: Jython from bathc file?

2015-05-09 Thread Michael Torrie
On 05/09/2015 03:04 PM, vjp2...@at.biostrategist.dot.dot.com wrote: Thanks.. I suspected it wasn't meant to be taken as in the file THe one thing I'm not sure if Jython is suppsosedto keep running after the initisl stuff is loaded in.. To put the question in purely DOS terms if you run a

[issue24154] pathlib.Path.rename moves file to Path.cwd() when argument is a string

2015-05-09 Thread Yuri Teixeira
New submission from Yuri Teixeira: from pathlib import Path p = Path('/any/folder') f = p / 'oldname' f.rename('newname') The above will rename the file 'oldname' to 'newname' but will also move it to Path.cwd() I thought that pathlib.Path.rename() when fed with a string would change f.name

Re: Jython from bathc file?

2015-05-09 Thread vjp2 . at
Thanks.. I suspected it wasn't meant to be taken as in the file THe one thing I'm not sure if Jython is suppsosedto keep running after the initisl stuff is loaded in.. To put the question in purely DOS terms if you run a program can you pipe it some commands and then keep it running to take the

[issue24153] threading/multiprocessing tests fail on chromebook under crouton generated chroots

2015-05-09 Thread Ryan Shupe
New submission from Ryan Shupe: I set up my Asus chromebook c200 with crouton and installed two chroot environments under the trusty release. In one I built and ran the tests for Python 3.5.0a4+ See stacktrace of resulting error: [209/394/2] test_multiprocessing_fork [210/394/3]

Re: functions, optional parameters

2015-05-09 Thread Steven D'Aprano
On Sun, 10 May 2015 01:33 pm, Chris Angelico wrote: On Sun, May 10, 2015 at 12:45 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: This is the point where some people try to suggest some sort of complicated, fragile, DWIM heuristic where the compiler tries to guess whether the

Re: functions, optional parameters

2015-05-09 Thread Steven D'Aprano
On Sun, 10 May 2015 01:35 pm, Rustom Mody wrote: On Sunday, May 10, 2015 at 8:16:07 AM UTC+5:30, Steven D'Aprano wrote: I predict that the majority of the time, late binding would just be a pointless waste of time: def process_string(thestr, start=0, end=None, slice=1, reverse=True):

[issue23857] Make default HTTPS certificate verification setting configurable

2015-05-09 Thread Nick Coghlan
Nick Coghlan added the comment: First draft of a recommendations PEP: https://hg.python.org/peps/rev/85bc7f13b295 (PEP 493) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23857 ___

Re: calling base class method fetches no results

2015-05-09 Thread Dave Angel
On 05/09/2015 03:59 AM, david jhon wrote: Hi, I am sorry for sending in five attachments, I cloned the code from here https://bitbucket.org/msharif/hedera/src: Let me explain it here: Please don't top-post. Your earlier problem description, which I could make no sense of, is now located

Re: calling base class method fetches no results

2015-05-09 Thread david jhon
I am really sorry for any inconvenience caused, I was trying to fix this bug from last 2 days so I had to post it here. It now has been resolved. Thanks a lot for your time. I'll be careful again. Have a great weekend! On Sat, May 9, 2015 at 4:36 PM, Dave Angel da...@davea.name wrote: On

[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2015-05-09 Thread Berker Peksag
Berker Peksag added the comment: datetime.strptime is a classmethod, but the new date.strptime and time.strptime methods are staticmethods. I think we should make the new methods classmethods too. -- stage: needs patch - patch review ___ Python

Re: calling base class method fetches no results

2015-05-09 Thread Mark Lawrence
On 09/05/2015 07:41, david jhon wrote: Hello everyone, I am new to python and trying to run an example code from mininet tests. Basically, I am trying to call a method in Hcontroller.py from base class Routing defined in DCRouting.py which runs and fetches all the required results in

Re: Is this unpythonic?

2015-05-09 Thread Frank Millman
Gregory Ewing greg.ew...@canterbury.ac.nz wrote in message news:cr5sc6fgfm...@mid.individual.net... Frank Millman wrote: The absolutely clearest way to write it would probably be def f(things = None): things is a mapping of stuff to be operated on if things: for

Re: SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape

2015-05-09 Thread Dave Angel
On 05/09/2015 06:31 AM, zljubisic...@gmail.com wrote: title = title[:232] title = title.replace( , _).replace(/, _).replace(!, _).replace(?, _)\ .replace('', _).replace(':', _).replace(',', _).replace('#34;', '')\ .replace('\n', '_').replace('#39',

Re: Is this unpythonic?

2015-05-09 Thread Gregory Ewing
Frank Millman wrote: There are two operations I might perform on the dictionary - 1. iterate over the keys and retrieve the values 2: use 'in' to test if a given string exists as a key Both of these operations will work on a tuple and give the desired result, so it is a very valid

[issue24140] In pdb using until X doesn't seem to have effect in commands

2015-05-09 Thread Xavier de Gaye
Xavier de Gaye added the comment: test.py is missing. -- nosy: +xdegaye ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24140 ___ ___

Re: Useful module to be written by a newbie

2015-05-09 Thread Cecil Westerhof
Op Saturday 9 May 2015 08:10 CEST schreef Michael Welle: Cecil Westerhof ce...@decebal.nl writes: Op Wednesday 29 Apr 2015 21:03 CEST schreef Peter Otten: Realistically a Python coder with a little experience will have a glance at your code and run away. Oops, that is not nice to hear.

Seralization

2015-05-09 Thread Cecil Westerhof
To make serialization a bit easier I made a few functions to get, save and convert between the different types. As I see it pickle and json are probably used the most. I also have a get and save for marshal. But no conversion to marshal, because in principle you should not use it, so a conversion

[issue1100942] Add datetime.time.strptime and datetime.date.strptime

2015-05-09 Thread Maciej Szulik
Maciej Szulik added the comment: I've just double checked, this patch applies cleanly to latest tip. I wouldn't mind having this reviewed and merged. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1100942

[issue18551] child_exec() doesn't check return value of fcntl()

2015-05-09 Thread Mark Lawrence
Mark Lawrence added the comment: Calls to fcntl have been replaced by calls to _Py_set_inheritable so I'd assume that this can be closed as out of date. -- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.3 ___ Python tracker

Re: SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape

2015-05-09 Thread zljubisicmob
Steven, please do look at the code bellow: # C:\Users\zoran\PycharmProjects\mm_align\hrt3.cfg contents # [Dir] # ROOTDIR = C:\Users\zoran\hrt import os import shutil import configparser import requests import re Config = configparser.ConfigParser() Config.optionxform = str # preserve case in

[issue24147] doublequote are not well recognized with Dialect class

2015-05-09 Thread Skip Montanaro
Skip Montanaro added the comment: Can you attach your cab file so we don't need to reconstruct it (and possibly make a mistake) by reading your program's output? -- nosy: +skip.montanaro ___ Python tracker rep...@bugs.python.org

Re: Seralization

2015-05-09 Thread Cecil Westerhof
Op Saturday 9 May 2015 11:16 CEST schreef Chris Angelico: On Sat, May 9, 2015 at 6:37 PM, Cecil Westerhof ce...@decebal.nl wrote: The code: def get_json(json_file): with open(json_file, 'rb') as in_f: return json.load(in_f) def get_marshal(marshal_file): with open(marshal_file, 'rb') as

[issue18814] Add codecs.convert_surrogateescape to clean surrogate escaped strings

2015-05-09 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: Please do not add the rehandle functions to codecs. They do not change the (duck-typed) representation of data while maintaining the semantics, they change the semantics of data while retaining the representation. I suggest a validation submodule of the

Re: calling base class method fetches no results

2015-05-09 Thread Mark Lawrence
On 09/05/2015 08:59, david jhon wrote: Hi, I am sorry for sending in five attachments, I cloned the code from here https://bitbucket.org/msharif/hedera/src: Let me explain it here: [nearly 300 lines of code snipped] I am really sorry for any inconvenience caused. I, ve tried to make it a

[issue24145] Support |= for parameters in converters

2015-05-09 Thread Tal Einat
Tal Einat added the comment: Well, the main reasons I'm +1 on the |= feature (regardless of specific syntax) are: 1) the intent is much clearer: e.g. also accept None, nothing else special going on 2) much easier maintenance if the default set of accepted types ever changes Also, this is one

Re: Seralization

2015-05-09 Thread Chris Angelico
On Sat, May 9, 2015 at 6:37 PM, Cecil Westerhof ce...@decebal.nl wrote: The code: def get_json(json_file): with open(json_file, 'rb') as in_f: return json.load(in_f) def get_marshal(marshal_file): with open(marshal_file, 'rb') as in_f: return

[issue21162] code in multiprocessing.pool freeze if inside some code from scikit-learn (and probably liblinear) executed on ubuntu 12.04 64 Bit

2015-05-09 Thread Ivan K
Ivan K added the comment: Sorry, forget to answer. I think I know the reason. Issue I think placed inside ATLAS library. Issue not reproducable on Mac OS X because it's have a bit different thread model. The only single platform is Linux (not tested on Windows btw). So main guess right now

[issue18789] XML Vunerability Table Unclear

2015-05-09 Thread Mark Lawrence
Mark Lawrence added the comment: @Joe The latest documentation has an additional sentence above the table The following table gives an overview of the known attacks and whether the various modules are vulnerable to them. and the table has been changed to say Yes or No. Is this okay with you?

Re: functions, optional parameters

2015-05-09 Thread Gregory Ewing
Chris Angelico wrote: So no, it isn't proof - it's equally well explained by the code object being constant. I suppose, strictly speaking, that's true -- but then the code object *might as well* be created at compile time, since the semantics are identical. In any case, it's easy to see from

Re: calling base class method fetches no results

2015-05-09 Thread david jhon
Hi, I am sorry for sending in five attachments, I cloned the code from here https://bitbucket.org/msharif/hedera/src: Let me explain it here: Routing Base class defined in DCRouting.py: import logging from copy import copy class Routing(object): '''Base class for data center network

Re: Jython from bathc file?

2015-05-09 Thread Todd Vargo
On 5/8/2015 7:36 PM, vjp2...@at.biostrategist.dot.dot.com wrote: How do I do this in a .bat file? Do I include the Jython or pipe it? % CLASSPATH=$CLASSPATH:$RDBASE/Code/JavaWrappers/gmwrapper/org.RDKit.jar; jython -Djava.library.path=$RDBASE/Code/JavaWrappers/gmwrapper Jython 2.2.1 on

Re: Jython from bathc file?

2015-05-09 Thread Steven D'Aprano
On Sat, 9 May 2015 09:36 am, vjp2...@at.biostrategist.dot.dot.com wrote: How do I do this in a .bat file? Do I include the Jython or pipe it? % CLASSPATH=$CLASSPATH:$RDBASE/Code/JavaWrappers/gmwrapper/org.RDKit.jar; jython -Djava.library.path=$RDBASE/Code/JavaWrappers/gmwrapper Jython

[issue18751] A manager's server never joins its threads

2015-05-09 Thread Mark Lawrence
Mark Lawrence added the comment: I've checked the code and this doesn't appear to have been implemented. I looked into providing a patch myself, but all the returns from calls to util.Finalize that I could find were assigned to different attribute names, so I'm not confident enough to

[issue24127] Fatal error in launcher: Job information querying failed

2015-05-09 Thread eryksun
eryksun added the comment: 1. Bug in Windows 10, which should be reported to Microsoft. It appears to be a bug in the kernel. It's isn't updating the value of of the output parameter *lpReturnLength. C:\ver Microsoft Windows [Version 10.0.10074] C:\cdb -xi ld py Microsoft

[issue24140] In pdb using until X doesn't seem to have effect in commands

2015-05-09 Thread vyktor
vyktor added the comment: Adding test.py, but according to docs https://docs.python.org/3.2/library/pdb.html#pdbcommand-commands Specifying any command resuming execution (currently continue, step, next, return, jump, quit and their abbreviations) terminates the command list (as if that

[issue22906] PEP 479: Change StopIteration handling inside generators

2015-05-09 Thread Yury Selivanov
Yury Selivanov added the comment: Thanks Nick and Berker for the reviews! -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22906 ___

Re: numpy and cython

2015-05-09 Thread pauld11718
NO the compilation isn't working... The setup.py : from distutils.core import setup from Cython.Build import cythonize setup( ext_modules = cythonize(visco.pyx) ) -- https://mail.python.org/mailman/listinfo/python-list

[issue22906] PEP 479: Change StopIteration handling inside generators

2015-05-09 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: -- stage: commit review - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22906 ___ ___

Re: numpy and cython

2015-05-09 Thread pauld11718
An interesting observation : Any simple program with just : cimport numpy as np doesnot compile. -- https://mail.python.org/mailman/listinfo/python-list

[issue22906] PEP 479: Change StopIteration handling inside generators

2015-05-09 Thread Berker Peksag
Berker Peksag added the comment: Buildbots are not happy: [ 63/393] test_contextlib Fatal Python error: Objects/frameobject.c:429 object at 0x200041abc28 has negative ref count -2604246222170760230 Current thread 0x022c2500 (most recent call first): File

[issue22906] PEP 479: Change StopIteration handling inside generators

2015-05-09 Thread Chris Angelico
Chris Angelico added the comment: Weird. Tests ran fine on my machine too. Interestingly, that number is 0xdbdbdbdbdbdbdbda - does that mean anything? (It's negative 0x2424242424242426, for what that's worth.) -- ___ Python tracker

Re: numpy and cython

2015-05-09 Thread Mark Lawrence
On 09/05/2015 16:56, pauld11718 wrote: NO the compilation isn't working... The setup.py : from distutils.core import setup from Cython.Build import cythonize setup( ext_modules = cythonize(visco.pyx) ) If you cannot be bothered to supply any context so I've no idea what you're

Re: SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape

2015-05-09 Thread Chris Angelico
On Sun, May 10, 2015 at 1:13 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: FileNotFoundError means that the program did run, it tried to open a file, but the file doesn't exist. Normally it does, at least. Sometimes it means that a *directory* doesn't exist (for instance, you

[issue22906] PEP 479: Change StopIteration handling inside generators

2015-05-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 36a8d935c322 by Yury Selivanov in branch 'default': PEP 479: Change StopIteration handling inside generators. https://hg.python.org/cpython/rev/36a8d935c322 -- ___ Python tracker rep...@bugs.python.org

[issue24140] In pdb using until X doesn't seem to have effect in commands

2015-05-09 Thread vyktor
vyktor added the comment: In here: /home/vyktor/src/error/minimal.py(1)module() - print('1') (Pdb) break 2 Breakpoint 1 at /home/vyktor/src/error/minimal.py:2 (Pdb) commands 1 (com) print('Triggered bp 1') (com) until 4 (com) end (Pdb) cont 1 Triggered bp 1

[issue22906] PEP 479: Change StopIteration handling inside generators

2015-05-09 Thread Chris Angelico
Chris Angelico added the comment: Thanks everyone for all the help getting this to land! This is going to be a part of my active python3 binary from now on :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22906

[issue24147] doublequote are not well recognized with Dialect class

2015-05-09 Thread Mik
Mik added the comment: Hi, This is the file used for my test. Thank you, regard, Mik -- Added file: http://bugs.python.org/file39328/sans_headers.csv ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24147

[issue22906] PEP 479: Change StopIteration handling inside generators

2015-05-09 Thread Yury Selivanov
Yury Selivanov added the comment: Strange, the test suite was running just fine on my machine. I'll take a closer look later today. -- nosy: +Yury.Selivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22906

Re: functions, optional parameters

2015-05-09 Thread Ian Kelly
On Fri, May 8, 2015 at 9:50 AM, Michael Welle mwe012...@gmx.net wrote: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: If your language uses late binding, it is very inconvenient to get early binding when you want it. But if your language uses early binding, it is very simple to

[issue22906] PEP 479: Change StopIteration handling inside generators

2015-05-09 Thread Yury Selivanov
Yury Selivanov added the comment: I think it crashes in debug mode or something. Somewhere we did too many decrefs. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22906 ___

Re: numpy and cython

2015-05-09 Thread Mark Lawrence
On 09/05/2015 17:09, pauld11718 wrote: An interesting observation : Any simple program with just : cimport numpy as np doesnot compile. Fascinating. What has this got to do with the general election results from the UK? Or is there some other context that you're not prepared to let us

[issue24148] 'cum' not a valid sort key for pstats.Stats.sort_stats

2015-05-09 Thread ramiro
New submission from ramiro: On the documentation page The Python Profilers https://docs.python.org/3.4/library/profile.html#instant-user-s-manual the following example is given: p.sort_stats('time', 'cum').print_stats(.5, 'init') This raises a KeyError, because 'cum' is not available as a

[issue18814] Add codecs.convert_surrogateescape to clean surrogate escaped strings

2015-05-09 Thread Nick Coghlan
Nick Coghlan added the comment: surrogateescape and surrogateepass data *already* can't be inverted back to bytes reliably without knowing the original encoding - if you encode them as something else when they contain surrogates, you'll either get an exception (the default) or mojibake (if you

[issue24147] doublequote are not well recognized with Dialect class

2015-05-09 Thread Skip Montanaro
Skip Montanaro added the comment: Sorry, failed to override my phone's spell correction. cab should be csv. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24147 ___

Re: Seralization

2015-05-09 Thread Cecil Westerhof
Op Saturday 9 May 2015 10:37 CEST schreef Cecil Westerhof: To make serialization a bit easier I made a few functions to get, save and convert between the different types. As I see it pickle and json are probably used the most. I also have a get and save for marshal. But no conversion to

numpy and cython

2015-05-09 Thread pauld11718
Unable to compile : import numpy as np cimport numpy as np import math as m DTYPE = np.float ctypedef np.float_t DTYPE_t def visc1(float t, float dcal): cdef float h, tr, trinv, rhor cdef float eta0, sumi, i, sumj, im1, jm1, eta cdef np.ndarray vb = np.array([1.0, 0.940695,

Re: numpy and cython

2015-05-09 Thread Chris Angelico
On Sun, May 10, 2015 at 12:51 AM, pauld11718 pauld11...@gmail.com wrote: Unable to compile : /usr/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION [-Wcpp] #warning Using deprecated

Re: SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape

2015-05-09 Thread Steven D'Aprano
On Sat, 9 May 2015 08:31 pm, zljubisic...@gmail.com wrote: It works, but if you change title = title[:232] to title = title[:233], you will get FileNotFoundError: [Errno 2] No such file or directory. Which is a *completely different* error from SyntaxError: 'unicodeescape' codec can't

[issue22906] PEP 479: Change StopIteration handling inside generators

2015-05-09 Thread Yury Selivanov
Yury Selivanov added the comment: Berker, buildbots should be happy now. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22906 ___ ___

[issue22906] PEP 479: Change StopIteration handling inside generators

2015-05-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5d8bc813d270 by Yury Selivanov in branch 'default': Issue 22906: Increment refcount after PyException_SetContext https://hg.python.org/cpython/rev/5d8bc813d270 -- ___ Python tracker

[issue22906] PEP 479: Change StopIteration handling inside generators

2015-05-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset d15c26085591 by Yury Selivanov in branch 'default': Issue 22906: Add test file. https://hg.python.org/cpython/rev/d15c26085591 -- ___ Python tracker rep...@bugs.python.org

Moving to Python 3.x

2015-05-09 Thread Antranig Vartanian
Hay, I learned the basics of python using the book Think Python (http://www.greenteapress.com/thinkpython/) which was good (IMHO), and it teaches in Python 2.7. Now I'm trying to write my first python+gtk program. anyways, my question will be, is it so necessary to move to python3.x ASAP?

[issue24018] add a Generator ABC

2015-05-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset f7cc54086cd2 by Guido van Rossum in branch 'default': Fix news entry for issue 24018. https://hg.python.org/cpython/rev/f7cc54086cd2 -- ___ Python tracker rep...@bugs.python.org

[issue24018] add a Generator ABC

2015-05-09 Thread Guido van Rossum
Guido van Rossum added the comment: Fixed. On Fri, May 8, 2015 at 10:28 PM, Stefan Behnel rep...@bugs.python.org wrote: Stefan Behnel added the comment: Thanks! Minor grouch: it should say collections.*abc*.Generator in the NEWS entry. --

[issue22906] PEP 479: Change StopIteration handling inside generators

2015-05-09 Thread Berker Peksag
Berker Peksag added the comment: Thanks! -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22906 ___ ___ Python-bugs-list

[issue24149] Issue with unit tests

2015-05-09 Thread Becklin Haston
New submission from Becklin Haston: Hello. Having issue when running unit tests for Python v3.5. Encountering failure when doing test 75/393. File attached is relevant traceback. -- components: Tests files: traceback.txt messages: 242829 nosy: hastonb priority: normal severity: normal

[issue24149] Issue with unit tests

2015-05-09 Thread Ned Deily
Ned Deily added the comment: Thanks for the report. This problem was just introduced and just fixed an hour ago: see issue22906. Try updating to the very latest tip and try again. -- nosy: +ned.deily resolution: - out of date stage: - resolved status: open - closed

[issue21162] code in multiprocessing.pool freeze if inside some code from scikit-learn (and probably liblinear) executed on ubuntu 12.04 64 Bit

2015-05-09 Thread Davin Potts
Davin Potts added the comment: @Ivan.K: Can you be more specific about which linux platform you are using? To reproduce, should I use Ubuntu, Fedora, OpenSUSE, ... and which version of that linux distro? -- ___ Python tracker

[issue24150] text_contextlib fails on Mac OSX 10.10.3

2015-05-09 Thread rainier
New submission from rainier: Test 75 test_contextlib fails. Fatal Python error: Objects/frameobject.c:429 object at 0x10fa32178 has negative ref count -2604246222170760230 Exception: Child error on test_contextlib: Exit code -6 Thread hangs and must be force exited on Mac OSX 10.10.3 Problem

[issue24150] text_contextlib fails on Mac OSX 10.10.3

2015-05-09 Thread Ned Deily
Ned Deily added the comment: Thanks for the report. This problem has just been fixed. Please update and try again. -- nosy: +ned.deily resolution: - out of date stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org

[issue24150] text_contextlib fails on Mac OSX 10.10.3

2015-05-09 Thread Ned Deily
Ned Deily added the comment: (See Issue22906 for details.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24150 ___ ___ Python-bugs-list mailing

Re: Moving to Python 3.x

2015-05-09 Thread Jason C. McDonald
On 05/09/2015 11:30 AM, Antranig Vartanian wrote: Hay, I learned the basics of python using the book Think Python (http://www.greenteapress.com/thinkpython/) which was good (IMHO), and it teaches in Python 2.7. Now I'm trying to write my first python+gtk program. anyways, my question will be,

[issue24140] In pdb using until X doesn't seem to have effect in commands

2015-05-09 Thread Xavier de Gaye
Xavier de Gaye added the comment: The bug occurs also on the default branch: '3.5.0a4+ (default:8bac00eadfda, May 6 2015, 17:40:12) \n[GCC 4.9.2 20150304 (prerelease)]' The reason is that 'do_until' is missing from the Pdb.commands_resuming list, which causes the Pdb.bp_commands() method to

[issue24151] test_pydoc fails

2015-05-09 Thread Rebecca Hsieh
New submission from Rebecca Hsieh: While running this command: ./python -m test.test_pydoc -j3 the error underneath was produced. The AssertionError of 'walkpkg' was not found. Fails around the test_apropos_empty_doc (_main_.PydocImportTest). The following is the stack trace that was

Re: Moving to Python 3.x

2015-05-09 Thread Ian Kelly
On Sat, May 9, 2015 at 12:30 PM, Antranig Vartanian antra...@pingvinashen.am wrote: Hay, I learned the basics of python using the book Think Python (http://www.greenteapress.com/thinkpython/) which was good (IMHO), and it teaches in Python 2.7. Now I'm trying to write my first python+gtk

  1   2   >