[issue46954] Awaiting multiple times on same task increases memory usage unboundedly

2022-03-08 Thread David M.
New submission from David M. : Awaiting multiple times on a single task that failed with an exception results in an unbounded increase in memory usage. Enough repeated "await"s of the task can result in an OOM. The same pattern on a task that didn't raise an exception behaves a

[issue21830] ssl.wrap_socket fails on Windows 7 when specifying ca_certs

2014-06-24 Thread David M Noriega
David M Noriega added the comment: Oops, thats what I get for running with scissors. Yes, the cert file is in pem format. Its the same file in use on my ldap server and all my servers and workstations that authenticate against it. I have an existing python 2.x script using the python-ldap

[issue21830] ssl.wrap_socket fails on Windows 7 when specifying ca_certs

2014-06-23 Thread David M Noriega
New submission from David M Noriega: When trying to use python3-ldap package on Windows 7, found I could not get a TLS connection to work and traced it to its use of ssl.wrap_socket. Trying out the following simple socket test fails import socket import ssl sock = socket.socket() sock.connect

Re: can't find win32api from embedded pyrun call

2013-09-06 Thread David M. Cotter
the problem was: ActivePython does not install debug libraries, so you must link with release libraries in your project. but if you run the debug version, you're linking against debug libraries which conflict with the ones linked to by python. fixed by running the release version.

Re: can't find win32api from embedded pyrun call

2013-09-03 Thread David M. Cotter
I find i'm having this problem, but the solution you found isn't quite specific enough for me to be able to follow it. I'm embedding Python27 in my app. I have users install ActivePython27 in order to take advantage of python in my app, so the python installation can't be touched as it's on

Re: can't find win32api from embedded pyrun call

2013-09-03 Thread David M. Cotter
note that when the script is called, i DO see this in the output window: 'kJams 2 Debug.exe': Loaded 'C:\Python27\Lib\site-packages\win32\win32api.pyd' 'kJams 2 Debug.exe': Loaded 'C:\Windows\SysWOW64\pywintypes27.dll' 'kJams 2 Debug.exe': Unloaded

Re: can't get utf8 / unicode strings from embedded python

2013-08-28 Thread David M. Cotter
I am very sorry that I have offended you to such a degree you feel it necessary to publicly eviscerate me. Perhaps I could have worded it like this: So far I have not seen any troubles including unicode characters in my strings, they *seem* to be fine for my use-case. What kind of trouble

Re: can't get utf8 / unicode strings from embedded python

2013-08-28 Thread David M. Cotter
Thank you for your thoughtful and thorough response. I now understand much better what you (and apparently the others) were warning me against and I will certainly consider that moving forward. I very much appreciate your help as I learn about python and embedding and all these crazy encoding

Re: can't get utf8 / unicode strings from embedded python

2013-08-27 Thread David M. Cotter
i am already doing (3), and all is working perfectly. bytestring literals are fine, i'm not sure what this trouble is that you speak of. note that i'm not using PyRun_AnyFile(), i'm loading the script myself, assumed as utf8 (which was my original problem, i had assumed it was macRoman), then

Re: can't get utf8 / unicode strings from embedded python

2013-08-25 Thread David M. Cotter
i'm sorry this is so confusing, let me try to re-state the problem in as clear a way as i can. I have a C++ program, with very well tested unicode support. All logging is done in utf8. I have conversion routines that work flawlessly, so i can assure you there is nothing wrong with logging

Re: can't get utf8 / unicode strings from embedded python

2013-08-25 Thread David M. Cotter
fair enough. I can provide further proof of strangeness. here is my latest script: this is saved on disk as a UTF8 encoded file, and when viewing as UTF8, it shows the correct characters. == # -*- coding: utf-8 -*- import time, kjams, kjams_lib def log_success(msg, successB,

Re: can't get utf8 / unicode strings from embedded python

2013-08-25 Thread David M. Cotter
i got it!! OMG! so sorry for the confusion, but i learned a lot, and i can share the result: the CORRECT code *was* what i had assumed. the Python side has always been correct (no need to put u in front of strings, it is known that the bytes are utf8 bytes) it was my run script function

Re: can't get utf8 / unicode strings from embedded python

2013-08-24 Thread David M. Cotter
I see you are using Python 2 correct Firstly, in Python 2, the compiler assumes that the source code is encoded in ASCII gar, i must have been looking at doc for v3, as i thought it was all assumed to be utf8 # -*- coding: utf-8 -*- okay, did that, still no change you need to use u ...

Re: can't get utf8 / unicode strings from embedded python

2013-08-24 Thread David M. Cotter
What _are_ you using? i have scripts in a file, that i am invoking into my embedded python within a C++ program. there is no terminal involved. the print statement has been redirected (via sys.stdout) to my custom print class, which does not specify encoding, so i tried the suggestion above

can't get utf8 / unicode strings from embedded python

2013-08-23 Thread David M. Cotter
note everything works great if i use Ascii, but: in my utf8-encoded script i have this: print frøânçïé in my embedded C++ i have this: PyObject* CPython_Script::print(PyObject *args) { PyObject*resultObjP = NULL; const char

Re: Raw_input with readline in a daemon thread makes terminal text disappear

2013-08-21 Thread David M. Welch
Hi all, This is an old thread, but I'm having the same behavior in my terminal when I run some code but kill the process in the terminal (Ctrl-C). The code has two prime suspects (from a simple google search): 1. Creates ssh port forward via the subprocess module

Re: PyArg_ParseTuple() when the type could be anything?

2013-08-05 Thread David M. Cotter
i was able to get what i wanted by simply iterating over the tupile instead of using ParseTupile, then just query the type, then convert the type to C and move on to the next. totally great, now i can pass N different argument types to a single function, and have the C side deal gracefully

PyArg_ParseTuple() when the type could be anything?

2013-08-02 Thread David M. Cotter
I'd like to be able to use PyArg_ParseTuple() in a generic way. for example, i'd like to have all commands start with 1 integer parameter, and this commandID will inform me of what parameters come next (via LUT). knowing that i can then call ParseTuple again with the proper parameters. like

Re: how to package embedded python?

2013-07-31 Thread David M. Cotter
okay, well that might turn out to be useful, except i don't quite know how to use it, and there are no from scratch instructions. i managed to download py2exe-0.6.9.zip and unzip it, but how does one install this package? (yes, still a newb at that) then, once installed, how do i say include

Re: embedding: how to create an idle handler to allow user to kill scripts?

2013-07-30 Thread David M. Cotter
Okay, i'm really surprised nobody knows how to do this. and frankly i'm amazed at the utter lack of documentation. but i've figured it out, and it's all working beautifully. if you want the code, go here: http://karaoke.kjams.com/wiki/Python --

Re: how to package embedded python?

2013-07-30 Thread David M. Cotter
yes, i've looked there, and all over google. i'm quite expert at embedding at this point. however nowhere i have looked has had instructions for this this is how you package up your .exe with all the necessary python modules necessary to actually run on a user's system that does not have

Re: how to package embedded python?

2013-07-29 Thread David M. Cotter
nooobody knw the trouble a s... -- http://mail.python.org/mailman/listinfo/python-list

embedding: how to create an idle handler to allow user to kill scripts?

2013-07-28 Thread David M. Cotter
in my C++ app, on the main thread i init python, init threads, then call PyEval_SaveThread(), since i'm not going to do any more python on the main thread. then when the user invokes a script, i launch a preemptive thread (boost::threads), and from there, i have this: static int

embedded python and threading

2013-07-26 Thread David M. Cotter
in my app i initialize python on the main thread, then immediately call PyEval_SaveThread() because i do no further python stuff on the main thread. then, for each script i want to run, i use boost::threads to create a new thread, then on that thread i ensure the GIL, do my stuff, then release

Re: how to package embedded python?

2013-07-26 Thread David M. Cotter
does nobody know how to do this? does nobody know where proper documentation on this is? -- http://mail.python.org/mailman/listinfo/python-list

Re: embedded python and threading

2013-07-26 Thread David M. Cotter
okay, i have simplified it: here is the code == import time def main(): while True: print i'm alive time.sleep(0.25) #- if __name__ == __main__: main()

Re: embedded python and threading

2013-07-26 Thread David M. Cotter
no, there is no time.py anywhere (except perhaps as the actual python library originally imported) did you understand that the function works perfectly, looping as it should, up until the time i run a second script on a separate thread? -- http://mail.python.org/mailman/listinfo/python-list

Re: embedded python and threading

2013-07-26 Thread David M. Cotter
DOH! as my second thread, i had been using a sample script that i had copy-pasted without much looking at it. guess what? it prints the time. and yes, it did from time import time, which explains it all. thanks for the hints here, that helped me figure it out! --

Re: how: embed + extend to control my running app?

2013-07-25 Thread David M. Cotter
Okay the link problem was solved: i had installed a 64bit python and my app is 32bit. i'm using ActivePython installer from here: http://www.activestate.com/activepython/downloads it seems that now the problem is that this does not install the _d versions of the .lib. :( does anyone know

how to package embedded python?

2013-07-25 Thread David M. Cotter
what must i include in my app package if i'm embedding python? i tried including *everything* in the DLLs directory, but my app still crashes as soon as i attempt to initialize python. this is on a system that does not have python installed, as most of my users won't have it. is it actually a

Re: how: embed + extend to control my running app?

2013-07-24 Thread David M. Cotter
well, umm, gosh, now i feel quite silly. that was easy. okay that's done. next: i'd like to redirect the output of any print statements to my C function: voidLog(const unsigned char *utf8_cstrP); on the mac, python output sys.stdout goes into the debug console if you're in the

Re: how: embed + extend to control my running app?

2013-07-24 Thread David M. Cotter
i don't use stdout in my own code, my code goes to my own log file. i want the output from any python code to go to my existing log file, so log statements from my app and any python code are intermingled in that one file. my updated code is here, which now bridges my python print function to

Re: how: embed + extend to control my running app?

2013-07-24 Thread David M. Cotter
http://karaoke.kjams.com/wiki/Python nevermind, i got it, it's working now (see link for code) -- http://mail.python.org/mailman/listinfo/python-list

Re: how: embed + extend to control my running app?

2013-07-24 Thread David M. Cotter
Now for Windows: same thing, i think i must create a .dll, right? you should already have a python.dll in your installation i can find python27.lib in the libs folder, but there is no python27_d.lib, and there is no python27.dll in the DLLs folder? are there instructions for creating (or

Re: how: embed + extend to control my running app?

2013-07-24 Thread David M. Cotter
update: okay so the python27.dll is in /windows/system32 so ignore that i've set my include directory correct, so i can compile i've set my additional libraries directory to the libs directory (where the .lib files are. (note: NOT including Lib directory, cuz that's full of .py files and

Re: how: embed + extend to control my running app?

2013-07-23 Thread David M. Cotter
i'm targeting Mac and Windows. Let's skip the thing about it should work when my app isn't running, just assume it's going to be embedded, no pipes or sockets necessary. For Mac, I understand i need to create (?) a python.dylib, but i find no directions for that at the expected location:

how: embed + extend to control my running app?

2013-07-19 Thread David M. Cotter
i'd like my app to be available to python while it's running. for example, say my app is FooBar.app. when my FooBar.app is running, now there is a python interface available to python, and the user can write python scripts to make use of it. with their scripts, they can control my running

Re: Understanding other people's code

2013-07-16 Thread David M Chess
Literally any idea will help, pen and paper, printing off all the code and doing some sort of highlighting session - anything! I keep reading bits of code and thinking well where the hell has that been defined and what does it mean to find it was inherited from 3 modules up the chain. I

Re: Functional vs. Object oriented API

2013-04-12 Thread David M Chess
Roy Smith r...@panix.com As part of our initial interview screen, we give applicants some small coding problems to do. One of the things we see a lot is what you could call Java code smell. This is our clue that the person is really a Java hacker at heart who just dabbles in Python

Re: Cannot run a single MySQLdb execute....

2013-03-28 Thread David M Chess
Νίκος Γκρ33κ nikos.gr...@gmail.com : What paramstyle are you using? Yes it is Chris, but i'am not sure what exactly are you asking me. Please if you cna pout it even simper for me, thank you. For instance: import MySQLdb MySQLdb.paramstyle 'format' FWIW and HTH, DC --

[issue16856] Segfault from calling repr() on a dict with a key whose repr raise an exception

2013-01-03 Thread David M. Cooke
New submission from David M. Cooke: The following segfaults: class A(int): def __repr__(self): raise Exception() a = A() d = {a : 1} repr(d) This is with Python 3.3.0, running on Mac OS 10.7.5, from MacPorts: Python 3.3.0 (default, Sep 29 2012, 08:16:08) [GCC 4.2.1 Compatible

Re: Getting a TimedRotatingFileHandler not to put two dates in the same file?

2012-10-24 Thread David M Chess
d...@davea.name On 10/23/2012 11:23 AM, David M Chess wrote: We have a TimedRotatingFileHandler with when='midnight' You give us no clue what's in this class, or how it comes up with the filenames used. Sorry if I was unclear. This isn't my own subclass of TimedRotatingFileHandler

Re: Getting a TimedRotatingFileHandler not to put two dates in the same file?

2012-10-24 Thread David M Chess
w...@mac.com Something like: Does a log file exist? - No - First run; create log file continue | Yes | Read backwards looking for date change, copy lines after change to new file, delete from old file. Yep, I'm concluding that also. It just wasn't clear

A lock that prioritizes acquire()s?

2012-10-24 Thread David M Chess
Okay, next silly question. :) We have a very simple multi-threaded system where a request comes in, starts running in a thread, and then (zero, one, or two times per request) gets to a serialization point, where the code does: with lock: do_critical_section_stuff_that_might_take_awhile()

Re: A lock that prioritizes acquire()s?

2012-10-24 Thread David M Chess
Lovely, thanks for the ideas! I remember considering having release() pick the next thread to notify, where all the waiters were sitting on separate Conditions or whatever; not sure why I didn't pursue it to the end. Probably distracted by something shiny; or insufficient brainpower. :)

Getting a TimedRotatingFileHandler not to put two dates in the same file?

2012-10-23 Thread David M Chess
We have a TimedRotatingFileHandler with when='midnight'. This works great, splitting the log information across files by date, as long as the process is actually up at midnight. But now the users have noticed that if the process isn't up at midnight, they can end up with lines from two (or I

Re: problem with ThreadingTCPServer Handler

2012-10-23 Thread David M Chess
jorge jaoro...@estudiantes.uci.cu I'm programming a server that most send a message to each client connected to it and nothing else. this is obviously a base of what i want to do. the thing is, I made a class wich contains the Handler class for the ThreadingTCPServer and starts the

Re: Py3.3 unicode literal and input()

2012-06-18 Thread David M Chess
If you (the programmer) want a function that asks the user to enter a literal at the input prompt, you'll have to write a post-processing for it, which looks for prefixes, for quotes, for backslashes, etc., and encodes the result. There very well may be such a decoder in the Python library,

bus errors when the network interface is reset?

2012-05-01 Thread David M Chess
greatly appreciated. DC David M. Chess IBM Watson Research Center -- http://mail.python.org/mailman/listinfo/python-list

[issue14704] NameError Issue in Multiprocessing

2012-05-01 Thread David M. Rogers
New submission from David M. Rogers dmr...@sandia.gov: Python Devs, There is an issue relating to variable lookup using exec from within multiprocessing's fork()-ed process. I'm attempting to use the forked process as a generic remote python shell, but exec is unable to reach variables

Re: Windows 7 : any problems installing or running Python ?

2010-01-02 Thread David M Covey Sr.
that might help me out here? I would really appreciate your input. Thank you, David M Covey Sr. ad...@daffitt.com -- http://mail.python.org/mailman/listinfo/python-list

[issue4758] Python 3.x internet documentation needs work

2009-12-28 Thread David M. Beazley
David M. Beazley beaz...@users.sourceforge.net added the comment: An apology on the delay. Things have been rather hectic. Regarding a patch, I don't really have a patch so much as a suggested procedure. Basically, I'm suggesting that the maintainers of the library documentation simply do

[issue7322] Socket timeout can cause file-like readline() method to lose data

2009-11-14 Thread David M. Beazley
New submission from David M. Beazley beaz...@users.sourceforge.net: Consider a socket that has had a file-like wrapper placed around it using makefile() # s is a socket created previously f = s.makefile() Now, suppose that this socket has had a timeout placed on it. s.settimeout(15) If you

Re: Compiler malware rebutted

2009-11-13 Thread David M. Besonen
On 11/13/2009 3:26 PM, Aahz wrote: Ken Thompson's classic paper on bootstrapped malware finally gets a rebuttal: http://lwn.net/Articles/360040/ thanks for pointing this out. -- david -- http://mail.python.org/mailman/listinfo/python-list

Re: (OT) Recommend FTP Client

2009-11-12 Thread David M. Besonen
On 11/12/2009 11:26 AM, Dave Angel wrote: Try http://fireftp.mozdev.org/ in the past i found this to be buggy. i'd recommend something different. what is your OS? -- david -- http://mail.python.org/mailman/listinfo/python-list

Re: Code that ought to run fast, but can't due to Python limitations.

2009-07-06 Thread David M . Cooke
html5lib has several implementations for several languages, it may actually be worth it to generate lexers for each language from one specification file. Take care, David M. Cooke david.m.co...@gmail.com -- http://mail.python.org/mailman/listinfo/python-list

Re: itertools.intersect?

2009-06-10 Thread David M. Wilson
On Jun 11, 3:05 am, Chris Rebert c...@rebertia.com wrote: On Wed, Jun 10, 2009 at 5:53 PM, Mensanatormensana...@aol.com wrote: On Jun 10, 5:24 pm, David Wilson d...@botanicus.net wrote: Hi, During a fun coding session yesterday, I came across a problem that I thought was already solved

Re: itertools.intersect?

2009-06-10 Thread David M. Wilson
On Jun 11, 12:59 am, Jack Diederich jackd...@gmail.com wrote: On Wed, Jun 10, 2009 at 6:24 PM, David Wilsond...@botanicus.net wrote: During a fun coding session yesterday, I came across a problem that I thought was already solved by itertools, but on investigation it seems it isn't. The

Re: itertools.intersect?

2009-06-10 Thread David M. Wilson
On Jun 10, 11:24 pm, David Wilson d...@botanicus.net wrote: Hi, During a fun coding session yesterday, I came across a problem that I thought was already solved by itertools, but on investigation it seems it isn't. The problem is simple: given one or more ordered sequences, return only the

Re: Concurrency Email List

2009-05-17 Thread David M. Besonen
On 5/16/2009 5:26 PM, Aahz wrote: On Sat, May 16, 2009, Pete wrote: python-concurre...@googlegroups.com is a new email list for discussion of concurrency issues in python. Is there some reason you chose not to create a list on python.org? I'm not joining the list because Google requires

[issue4903] binascii.crc32()

2009-01-10 Thread David M. Beazley
David M. Beazley beaz...@users.sourceforge.net added the comment: Placing a note in the standard library documentation would be a start. Just say in Python 3.0 it always returns the result as an unsigned integer whereas in Python 2.6 a 32-bit signed integer is returned. Although

[issue4903] binascii.crc32()

2009-01-09 Thread David M. Beazley
New submission from David M. Beazley beaz...@users.sourceforge.net: The result of binascii.crc32() is different on the same input in Python 2.6/3.0. For example: Python 2.6: binascii.crc32('Hello') -137262718 Python 3.0: binascii.crc32(b'Hello') 4157704578 -- components: Library

[issue4903] binascii.crc32()

2009-01-09 Thread David M. Beazley
David M. Beazley beaz...@users.sourceforge.net added the comment: Can someone PLEASE make sure this gets documented someplace. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4903

[issue4831] exec() behavior - revisited

2009-01-04 Thread David M. Beazley
David M. Beazley beaz...@users.sourceforge.net added the comment: One further followup just to make sure I'm clear. Is it always safe to pass the result of locals() into exec and extract the result as shown in my example? Since I'm writing about this in a book, I just want to make

[issue4831] exec() behavior - revisited

2009-01-04 Thread David M. Beazley
New submission from David M. Beazley beaz...@users.sourceforge.net: Please forgive me, but I'm really trying to wrap my brain around the behavior of exec() in Python 3. Here's a quote from the documentation: In all cases, if the optional parts are omitted, the code is executed

[issue4820] ctypes.util.find_library incorrectly documented

2009-01-03 Thread David M. Beazley
New submission from David M. Beazley beaz...@users.sourceforge.net: In the ctypes reference / Finding shared libraries section of the ctypes documentation, the find_library() function is described as being located in ctypes.util. However, it's formal description right below that lists

[issue4782] json documentation missing load(), loads()

2008-12-30 Thread David M. Beazley
New submission from David M. Beazley beaz...@users.sourceforge.net: Documentation for the json module in Python 2.6 and Python 3.0 doesn't have any description for load() or loads() even though both functions are used in the examples. -- assignee: georg.brandl components

[issue4783] json documentation needs a BAWM (Big A** Warning Message)

2008-12-30 Thread David M. Beazley
New submission from David M. Beazley beaz...@users.sourceforge.net: The json module is described as having an interface similar to pickle: json.dump() json.dumps() json.load() json.loads() I think it would be a WISE idea to add a huge warning message to the documentation

[issue4785] json.JSONDecoder() strict argument undocumented and potentially confusing

2008-12-30 Thread David M. Beazley
New submission from David M. Beazley beaz...@users.sourceforge.net: The strict parameter to JSONDecoder() is undocumented and is confusing because someone might assume it has something to do with the encoding parameter or the general handling of parsing errors (which it doesn't). As far as I

[issue4783] json documentation needs a BAWM (Big A** Warning Message)

2008-12-30 Thread David M. Beazley
David M. Beazley beaz...@users.sourceforge.net added the comment: Just consider me to be an impartial outside reviewer. Hypothetically, let's say I'm a Python programmer who knows a thing or two about standard library modules (like pickle), but I'm new to JSON so I come looking at the json

[issue4783] json documentation needs a BAWM (Big A** Warning Message)

2008-12-30 Thread David M. Beazley
David M. Beazley beaz...@users.sourceforge.net added the comment: Thanks! Hopefully I'm not giving you too much work to do :-). Cheers, Dave ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4783

[issue4786] xml.etree.ElementTree module name in Python 3

2008-12-30 Thread David M. Beazley
New submission from David M. Beazley beaz...@users.sourceforge.net: Not a bug, but a question to developers: Is xml.etree.ElementTree going to be the only standard library module in Python 3.0 that doesn't follow the standard Python 3.0 module naming conventions? (e.g., socketserver

[issue4766] email documentation needs to be precise about strings/bytes

2008-12-29 Thread David M. Beazley
New submission from David M. Beazley beaz...@users.sourceforge.net: Documentation for the email package needs to be more clear about the usage of strings and bytes. In particular: 1. All operations that parse email messages such as message_from_file() or message_from_string() operate

[issue4767] email.mime incorrectly documented (or implemented)

2008-12-29 Thread David M. Beazley
New submission from David M. Beazley beaz...@users.sourceforge.net: The documentation describes classes such as email.mime.MIMEText() email.mime.MIMEMultipart() email.mime.MIMEApplication() etc... However, it's confusing because none of these classes are actually found in email.mime. Suggest

[issue4768] email.generator.Generator object bytes/str crash - b64encode() bug?

2008-12-29 Thread David M. Beazley
New submission from David M. Beazley beaz...@users.sourceforge.net: The email.generator.Generator class does not work correctly message objects created with binary data (MIMEImage, MIMEAudio, MIMEApplication, etc.). For example: from email.mime.image import MIMEImage data = open(IMG.jpg,rb

[issue4769] b64decode should accept strings or bytes

2008-12-29 Thread David M. Beazley
New submission from David M. Beazley beaz...@users.sourceforge.net: The whole point of base64 encoding is to safely encode binary data into text characters. Thus, the base64.b64decode() function should equally accept text strings or binary strings as input. For example, there is a reasonable

[issue4769] b64decode should accept strings or bytes

2008-12-29 Thread David M. Beazley
David M. Beazley beaz...@users.sourceforge.net added the comment: Note: This problem applies to all of the other decoders/encoders in the base64 too (b16, b32, etc.) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4769

[issue4770] binascii module, crazy error messages, unexpected behavior

2008-12-29 Thread David M. Beazley
New submission from David M. Beazley beaz...@users.sourceforge.net: See Issue 4869 for a related bug. Most of the functions in binascii are meant to go from binary data to textual representations (hex digits, base64, binhex, etc.). There are numerous problems: 1. Misleading error messages

[issue4770] binascii module, crazy error messages, unexpected behavior

2008-12-29 Thread David M. Beazley
David M. Beazley beaz...@users.sourceforge.net added the comment: Given the low-level nature of this module, I can understand the motivation to make it all bytes. However, I'm going to respectfully disagree with that and claim that making binascii all bytes really goes against the whole

[issue4771] Bad examples in hashlib documentation

2008-12-29 Thread David M. Beazley
New submission from David M. Beazley beaz...@users.sourceforge.net: The hashlib documentation has incorrect examples showing the use of the hexdigest() method: hashlib.sha224(bNobody inspects the spammish repetition).hexdigest() b'a4337bc45a8fc544c03f52dc550cd6e1e87021bc896588bd79e901e2

[issue4771] Bad examples in hashlib documentation

2008-12-29 Thread David M. Beazley
David M. Beazley beaz...@users.sourceforge.net added the comment: The digest() method of hashes does produce bytes (correct). The hexdigest() method produces a string, but it is also shown as producing bytes in the examples. ___ Python tracker rep

[issue4773] HTTPMessage not documented and has inconsistent API across 2.6/3.0

2008-12-29 Thread David M. Beazley
New submission from David M. Beazley beaz...@users.sourceforge.net: A file-like object u returned by the urlopen() function in both Python 2.6/3.0 has a method info() that returns a 'HTTPMessage' object. For example: ::: Python 2.6 from urllib2 import urlopen u = urlopen(http

[issue4773] HTTPMessage not documented and has inconsistent API across 2.6/3.0

2008-12-29 Thread David M. Beazley
David M. Beazley beaz...@users.sourceforge.net added the comment: Verified that 2to3 does not fix this. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4773

[issue1194378] sendmsg() and recvmsg() for C socket module

2008-12-27 Thread David M. Beazley
David M. Beazley beaz...@users.sourceforge.net added the comment: Just a followup comment to note that adding support for sendmsg()/recvmsg() is what you need to do file descriptor passing between processes on Unix---another technique for writing network servers

[issue4758] Python 3.0 internet documentation needs work

2008-12-27 Thread David M. Beazley
New submission from David M. Beazley beaz...@users.sourceforge.net: I have recently completed a pretty thorough survey of library documentation for Python 3.0 in conjunction with an update I'm making to my book. This issue is not so much a bug as a documentation request. For all

[issue1194378] sendmsg() and recvmsg() for C socket module

2008-12-24 Thread David M. Beazley
David M. Beazley beaz...@users.sourceforge.net added the comment: Bump. This functionality seems to be needed if anyone is going to be messing around with advanced features of IPv6. As it stands, the socket module in Python 2.6/3.0 is incomplete without this. -- nosy: +beazley

[issue4744] asynchat documentation needs to be more precise

2008-12-24 Thread David M. Beazley
New submission from David M. Beazley beaz...@users.sourceforge.net: The documentation for asynchat needs to be more precise in its use of strings vs. bytes. Unless the undocumented use_encoding attribute is set, it seems that all data should be bytes throughout (e.g., the terminator, inputs

[issue4694] _call_method() in multiprocessing documentation

2008-12-18 Thread David M. Beazley
New submission from David M. Beazley beaz...@users.sourceforge.net: The documentation for Proxy Objects in the multiprocessing module describes a method _call_method and gives various examples. The only problem is that the method is actually called _callmethod (i.e., no underscore between

[issue4694] _call_method() in multiprocessing documentation

2008-12-18 Thread David M. Beazley
David M. Beazley beaz...@users.sourceforge.net added the comment: The _get_value() method is also in error. It's called _getvalue() in the source code. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4694

[issue4695] Bad AF_PIPE address in multiprocessing documentation

2008-12-18 Thread David M. Beazley
New submission from David M. Beazley beaz...@users.sourceforge.net: In the Address Formats part of the Listeners and Clients section of the documentation for the multiprocessing module, AF_PIPE addresses are described as having this format: r'ServerName\\pipe\\PipeName' However

[issue4686] Exceptions in ConfigParser don't set .args

2008-12-17 Thread David M. Beazley
New submission from David M. Beazley beaz...@users.sourceforge.net: The ConfigParser module defines a variety of custom exceptions, many of which take more than one argument (e.g., InterpolationError, NoOptionError, etc.). However, none of these exceptions properly set the .args attribute

[issue4561] Optimize new io library

2008-12-16 Thread David M. Beazley
David M. Beazley beaz...@users.sourceforge.net added the comment: I wish I shared your optimism about this, but I don't. Here's a short explanation why. The problem of I/O and the associated interface between hardware, the operating system kernel, and user applications is one of the most

[issue4561] Optimize new io library

2008-12-16 Thread David M. Beazley
David M. Beazley beaz...@users.sourceforge.net added the comment: Good luck with that. Most people who get bright ideas such as gee, maybe I'll write my own version of X where X is some part of the standard C library pertaining to I/O, end up fighting a losing battle. Of course, I'd love

[issue4561] Optimize new io library

2008-12-16 Thread David M. Beazley
David M. Beazley beaz...@users.sourceforge.net added the comment: I agree with Raymond. For binary reads, I'll go farther and say that even a 10% slowdown in performance would be surprising if not unacceptable to some people. I know that as hard as it might be for everyone to believe

[issue4593] Documentation for multiprocessing - Pool.apply()

2008-12-08 Thread David M. Beazley
New submission from David M. Beazley [EMAIL PROTECTED]: The documentation for the apply() and apply_async() methods of a Pool object might emphasize that these operations execute func(*args,**kwargs) in only one of the pool workers and that func() is not being executed in parallel on all

[issue4593] Documentation for multiprocessing - Pool.apply()

2008-12-08 Thread David M. Beazley
David M. Beazley [EMAIL PROTECTED] added the comment: Actually, you shouldn't discount the potential usefulness of running apply() in all of the worker nodes. A lot of people coming from parallel programming know about things like global broadcasts, reductions, and so forth. For example

[issue4561] Optimize new io library

2008-12-06 Thread David M. Beazley
David M. Beazley [EMAIL PROTECTED] added the comment: I've done some profiling and the performance of reading line-by-line is considerably worse in Python 3 than in Python 2. For example, this code: for line in open(somefile.txt): pass Ran 35 times slower in Python 3.0 than Python 2.6

[issue4561] Optimize new io library

2008-12-06 Thread David M. Beazley
David M. Beazley [EMAIL PROTECTED] added the comment: Tried this using projects/python/branches/release30-maint and using the patch that was just attached. With a 66MB input file, here are the results of this code fragment: for line in open(BIGFILE): pass Python 2.6: 0.67s Python 3.0

[issue4561] Optimize new io library

2008-12-06 Thread David M. Beazley
David M. Beazley [EMAIL PROTECTED] added the comment: Just as one other followup, if you change the code in the last example to use binary mode like this: for line in open(BIG,rb): pass You get the following results: Python 2.6: 0.64s Python 3.0: 42.26s (66 times slower

[issue4561] Optimize new io library

2008-12-06 Thread David M. Beazley
David M. Beazley [EMAIL PROTECTED] added the comment: Just checked it with branches/py3k and the performance is the same. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4561

  1   2   >