Re: back with more issues

2013-08-13 Thread Steven D'Aprano
On Mon, 12 Aug 2013 20:13:31 -0700, Kris Mesenbrink wrote: the Classes and __init__ still don't make much sense actually. i have tried and tried again to make it generate numbers between 0 and 5 in a while statement but it just doesn't seem to be working. Hi Kris, You might also find that

Re: Calling Python macro from ctypes

2013-08-13 Thread Steven D'Aprano
On Mon, 12 Aug 2013 13:42:14 +0200, Peter Otten wrote: Steven D'Aprano wrote: Is it possible to call a Python macro from ctypes? For example, Python 3.3 introduces some new macros for querying the internal representation of strings: http://www.python.org/dev/peps/pep-0393/#new-api [...]

multithreading in python

2013-08-13 Thread samaneh . yahyapour
hi my program work by 4 thread but when i use more thread it terminates i use opencv in my image_process.so my code is : #!/usr/bin/python import sys import os import io import time import copy import threading import ctypes class MyClass(): def __init__(self): i = 0

Re: Calling Python macro from ctypes

2013-08-13 Thread Stefan Behnel
Steven D'Aprano, 13.08.2013 08:25: On Mon, 12 Aug 2013 13:42:14 +0200, Peter Otten wrote: Steven D'Aprano wrote: Is it possible to call a Python macro from ctypes? For example, Python 3.3 introduces some new macros for querying the internal representation of strings:

Re: Could you verify this, Oh Great Unicode Experts of the Python-List?

2013-08-13 Thread Chris Angelico
On Tue, Aug 13, 2013 at 4:32 AM, MRAB pyt...@mrabarnett.plus.com wrote: On 13/08/2013 04:20, Jason Friedman wrote: I've always wondered if the 160 character limit or whatever it is is a hard limit in their system, or if it's just a variable they could tweak if they felt like it. I thought

Re: Am I not seeing the Error?

2013-08-13 Thread Joshua Landau
On 12 August 2013 16:47, Roy Smith r...@panix.com wrote: I can't quite sort out the multiple quoting levels, but somebody said: Programming like that is called trolling. A programmer that uses trolling is called a troll. A troll can also refer to such a line of code itself. My scripts contain

Open-source vs. closed-source for centralised social-networks?

2013-08-13 Thread Alec Taylor
Fear open-sourcing fledgling social-networks; as centralisation is easily losable. Open-sourcing social-networks when large, seems to work (e.g.: Reddit). Without centralisation it becomes difficult to establish community. An example of a decentralised open-source social-network is: Disapora.

Re: multithreading in python

2013-08-13 Thread Steven D'Aprano
On Tue, 13 Aug 2013 01:06:01 -0700, samaneh.yahyapour wrote: hi my program work by 4 thread but when i use more thread it terminates Is that a problem? Isn't it supposed to terminate, when it has finished? If it raises an exception, or crashes, you should tell us. i use opencv in my

Re: Could you verify this, Oh Great Unicode Experts of the Python-List?

2013-08-13 Thread Joshua Landau
On 11 August 2013 12:14, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sun, 11 Aug 2013 10:44:40 +0100, Joshua Landau wrote: café will be in your Copy-Paste buffer, and you can paste it in to the tweet-box. It takes 5 characters. So much for testing ;). How do you know that

Re: Am I not seeing the Error?

2013-08-13 Thread Steven D'Aprano
On Tue, 13 Aug 2013 09:19:07 +0100, Joshua Landau wrote: On 12 August 2013 16:47, Roy Smith r...@panix.com wrote: I can't quite sort out the multiple quoting levels, but somebody said: Programming like that is called trolling. A programmer that uses trolling is called a troll. A troll can

Re: Calling Python macro from ctypes

2013-08-13 Thread Steven D'Aprano
On Tue, 13 Aug 2013 10:11:29 +0200, Stefan Behnel wrote: Steven D'Aprano, 13.08.2013 08:25: On Mon, 12 Aug 2013 13:42:14 +0200, Peter Otten wrote: Steven D'Aprano wrote: Is it possible to call a Python macro from ctypes? For example, Python 3.3 introduces some new macros for querying the

Re: Calling Python macro from ctypes

2013-08-13 Thread Peter Otten
Steven D'Aprano wrote: On Mon, 12 Aug 2013 13:42:14 +0200, Peter Otten wrote: Steven D'Aprano wrote: Is it possible to call a Python macro from ctypes? For example, Python 3.3 introduces some new macros for querying the internal representation of strings:

Re: Am I not seeing the Error?

2013-08-13 Thread Devyn Collier Johnson
On 08/13/2013 04:50 AM, Steven D'Aprano wrote: On Tue, 13 Aug 2013 09:19:07 +0100, Joshua Landau wrote: On 12 August 2013 16:47, Roy Smith r...@panix.com wrote: I can't quite sort out the multiple quoting levels, but somebody said: Programming like that is called trolling. A programmer

Re: multithreading in python

2013-08-13 Thread Dave Angel
samaneh.yahyap...@gmail.com wrote: hi my program work by 4 thread but when i use more thread it terminates I simplified your code so anybody could run it, and tested it inside Komodo IDE, on Python 2.7 #!/usr/bin/env python import sys import os import time import threading class

Re: multithreading in python

2013-08-13 Thread Dave Angel
samaneh.yahyap...@gmail.com wrote: hi my program work by 4 thread but when i use more thread it terminates snip how can i solve this problem I simplified the code so I could actually run it, and tested it in Python 2.7, both under Komodo IDE and in the terminal. The code:

Question about function failing with large number

2013-08-13 Thread Anthony Papillion
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 So I'm using the function below to test a large (617 digit) number for primality. For some reason, when I execute the code, I get an error telling me: OverflowError: long int too large to convert to float The error is being thrown on this line:

Re: Am I not seeing the Error?

2013-08-13 Thread Robert Kern
On 2013-08-13 11:31, Devyn Collier Johnson wrote: I now see why this programming style is called trolling. This programming style is not called trolling. It does not have a name. It's just your particular style. I think you misinterpreted someone who accused you of deliberately coding in

python and displaying on 10 bit monitors

2013-08-13 Thread rlkling
Are there any python libraries that read and display High Dynamic Range images like this matlab code? http://www.mathworks.com/matlabcentral/fileexchange/27115-hdr-image-viewer-for-deep-color-monitor Or, asking another way, are there any python libraries that display images to 10 bit monitors

Re: Question about function failing with large number

2013-08-13 Thread Chris Angelico
On Tue, Aug 13, 2013 at 1:12 PM, Anthony Papillion papill...@gmail.com wrote: So I'm using the function below to test a large (617 digit) number for primality. For some reason, when I execute the code, I get an error telling me: OverflowError: long int too large to convert to float The

Re: Question about function failing with large number

2013-08-13 Thread Dave Angel
Anthony Papillion wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 So I'm using the function below to test a large (617 digit) number for primality. For some reason, when I execute the code, I get an error telling me: OverflowError: long int too large to convert to float In

Re: Am I not seeing the Error?

2013-08-13 Thread Grant Edwards
On 2013-08-13, Joshua Landau jos...@landau.ws wrote: On 12 August 2013 16:47, Roy Smith r...@panix.com wrote: I can't quite sort out the multiple quoting levels, but somebody said: Programming like that is called trolling. A programmer that uses trolling is called a troll. A troll can also

Python-List

2013-08-13 Thread Williams, Elisabeth S
We have an immediate need for a Python Developer and Development Technical Lead (proficient in Python) in Charlotte, NC. Please reply with you r resume for consideration. Thanks, Beth Elisabeth Williams Technical Recruiter 704-227-3142 ewilli...@diversant.com

Re: Digging into multiprocessing

2013-08-13 Thread Chris Angelico
On Tue, Aug 13, 2013 at 12:17 AM, Demian Brecht demianbre...@gmail.com wrote: Hi all, Some work that I'm doing atm is in some serious need of parallelization. As such, I've been digging into the multiprocessing module more than I've had to before and I had a few questions come up as a

Re: Question about function failing with large number

2013-08-13 Thread MRAB
On 13/08/2013 13:42, Chris Angelico wrote: On Tue, Aug 13, 2013 at 1:12 PM, Anthony Papillion papill...@gmail.com wrote: So I'm using the function below to test a large (617 digit) number for primality. For some reason, when I execute the code, I get an error telling me: OverflowError: long

RE: Could you verify this, Oh Great Unicode Experts of the Python-List?

2013-08-13 Thread Prasad, Ramit
Michael Torrie wrote: On 08/11/2013 11:54 PM, Gregory Ewing wrote: Michael Torrie wrote: I've always wondered if the 160 character limit or whatever it is is a hard limit in their system, or if it's just a variable they could tweak if they felt like it. Isn't it for compatibility with

Re: multithreading in python

2013-08-13 Thread Terry Reedy
On 8/13/2013 4:06 AM, samaneh.yahyap...@gmail.com wrote: Aside from the other comments... def item_thread(self): imageAnalyzer=ctypes.CDLL(../so/image_process.so) imageAnalyzer.aref_img_score_init(/opt/amniran/etc/face.xml, /opt/amniran/etc/porn.xml) for

Re: Am I not seeing the Error?

2013-08-13 Thread Terry Reedy
On 8/13/2013 6:31 AM, Devyn Collier Johnson wrote: I now see why this programming style is called trolling. 'Trolling' is a posting style. Your initial post was legitimate. When the first three respondents missed the syntax error, ';' instead of ',' within function() calls, I reported it.

Re: python and displaying on 10 bit monitors

2013-08-13 Thread Terry Reedy
On 8/13/2013 8:25 AM, rlkl...@gmail.com wrote: Are there any python libraries that read and display High Dynamic Range images like this matlab code? http://www.mathworks.com/matlabcentral/fileexchange/27115-hdr-image-viewer-for-deep-color-monitor Or, asking another way, are there any python

Re: Question about function failing with large number

2013-08-13 Thread Chris Angelico
On Tue, Aug 13, 2013 at 4:33 PM, MRAB pyt...@mrabarnett.plus.com wrote: Here's a way to calculate the integer square root: Yes, but the actual value of the square root isn't needed. All that's needed is to stop the loop once the sqrt is reached. ChrisA --

Re: PEP 450 Adding a statistics module to Python

2013-08-13 Thread Wolfgang Keller
I am seeking comments on PEP 450, Adding a statistics module to Python's standard library: I don't think that you want to re-implement RPy. Sincerely, Wolfgang -- http://mail.python.org/mailman/listinfo/python-list

Re: python and displaying on 10 bit monitors

2013-08-13 Thread Ian Kelly
On Tue, Aug 13, 2013 at 6:25 AM, rlkl...@gmail.com wrote: Are there any python libraries that read and display High Dynamic Range images like this matlab code? http://www.mathworks.com/matlabcentral/fileexchange/27115-hdr-image-viewer-for-deep-color-monitor Or, asking another way, are

Re: PEP 450 Adding a statistics module to Python

2013-08-13 Thread Oscar Benjamin
On Aug 13, 2013 7:22 PM, Wolfgang Keller felip...@gmx.net wrote: I am seeking comments on PEP 450, Adding a statistics module to Python's standard library: I don't think that you want to re-implement RPy. You're right. He doesn't. Oscar --

Re: python and displaying on 10 bit monitors

2013-08-13 Thread rlkling
Yea, that is not quite what I am looking for. He uses Python Image Library and as far as I can tell it does not display the images as 10 bits on 10 bit displays. So far the only app that I can find that does this is photoshop. -- http://mail.python.org/mailman/listinfo/python-list

Re: Am I not seeing the Error?

2013-08-13 Thread Denis McMahon
On Sat, 10 Aug 2013 22:19:23 -0400, Devyn Collier Johnson wrote: I am checking my 1292-line script for syntax errors. I ran the following commands in a terminal to check for errors, but I do not see the error. JOB_WRITEURGFILES = multiprocessing.Process(write2file('./mem/ENGINE_PID',

Re: Am I not seeing the Error?

2013-08-13 Thread Dave Angel
Denis McMahon wrote: On Sat, 10 Aug 2013 22:19:23 -0400, Devyn Collier Johnson wrote: I am checking my 1292-line script for syntax errors. I ran the following commands in a terminal to check for errors, but I do not see the error. JOB_WRITEURGFILES =

Getting a value that follows string.find()

2013-08-13 Thread englishkevin110
I know the title doesn't make much sense, but I didnt know how to explain my problem. Anywho, I've opened a page's source in URLLIB starturlsource = starturlopen.read() string.find(starturlsource, 'a href=/profile.php?id=') And I used string.find to find a specific area in the page's source. I

Re: Getting a value that follows string.find()

2013-08-13 Thread Joel Goldstick
lookup urlparse for you answer On Tue, Aug 13, 2013 at 6:51 PM, englishkevin...@gmail.com wrote: I know the title doesn't make much sense, but I didnt know how to explain my problem. Anywho, I've opened a page's source in URLLIB starturlsource = starturlopen.read()

Re: Getting a value that follows string.find()

2013-08-13 Thread englishkevin110
On Tuesday, August 13, 2013 5:58:07 PM UTC-5, Joel Goldstick wrote: lookup urlparse for you answer On Tue, Aug 13, 2013 at 6:51 PM, wrote: I know the title doesn't make much sense, but I didnt know how to explain my problem. Anywho, I've opened a page's source in URLLIB

Writing a “social network” in Python (was: Open-source vs. closed-source for centralised social-networks?)

2013-08-13 Thread Ben Finney
Alec Taylor alec.tayl...@gmail.com writes: Fear open-sourcing fledgling social-networks; as centralisation is easily losable. Welcome! This forum is for discussing the practice of programming with Python. Your topic doesn't seem much to do with Python (and no, “I'm writing it in Python” isn't

Re: Python-List

2013-08-13 Thread Ben Finney
Williams, Elisabeth S ewilli...@diversant.com writes: We have an immediate need for a Python Developer and Development Technical Lead Please use the Python Job Board to recruit Python programmers URL:http://www.python.org/community/jobs/, not this forum. Thanks! -- \ “I call him

Re: Getting a value that follows string.find()

2013-08-13 Thread Joel Goldstick
On Tue, Aug 13, 2013 at 7:03 PM, englishkevin...@gmail.com wrote: On Tuesday, August 13, 2013 5:58:07 PM UTC-5, Joel Goldstick wrote: lookup urlparse for you answer On Tue, Aug 13, 2013 at 6:51 PM, wrote: I know the title doesn't make much sense, but I didnt know how to explain my

Pair of filenos read/write each other?

2013-08-13 Thread Jack Bates
Can anyone suggest a way to get a pair of file descriptor numbers such that data written to one can be read from the other and vice versa? Is there anything like os.pipe() where you can read/write both ends? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting a value that follows string.find()

2013-08-13 Thread Joel Goldstick
On Tue, Aug 13, 2013 at 7:18 PM, Joel Goldstick joel.goldst...@gmail.com wrote: On Tue, Aug 13, 2013 at 7:03 PM, englishkevin...@gmail.com wrote: On Tuesday, August 13, 2013 5:58:07 PM UTC-5, Joel Goldstick wrote: lookup urlparse for you answer On Tue, Aug 13, 2013 at 6:51 PM, wrote:

Re: Am I not seeing the Error?

2013-08-13 Thread MRAB
On 13/08/2013 21:28, Denis McMahon wrote: On Sat, 10 Aug 2013 22:19:23 -0400, Devyn Collier Johnson wrote: I am checking my 1292-line script for syntax errors. I ran the following commands in a terminal to check for errors, but I do not see the error. JOB_WRITEURGFILES =

Re: Am I not seeing the Error?

2013-08-13 Thread Ned Batchelder
On 8/13/13 5:16 PM, Dave Angel wrote: Denis McMahon wrote: On Sat, 10 Aug 2013 22:19:23 -0400, Devyn Collier Johnson wrote: I am checking my 1292-line script for syntax errors. I ran the following commands in a terminal to check for errors, but I do not see the error. JOB_WRITEURGFILES =

Re: Pair of filenos read/write each other?

2013-08-13 Thread Rhodri James
On Wed, 14 Aug 2013 00:10:41 +0100, Jack Bates tdh...@nottheoilrig.com wrote: Can anyone suggest a way to get a pair of file descriptor numbers such that data written to one can be read from the other and vice versa? Is there anything like os.pipe() where you can read/write both ends?

Re: Pair of filenos read/write each other?

2013-08-13 Thread Chris Angelico
On Wed, Aug 14, 2013 at 1:17 AM, Rhodri James rho...@wildebst.demon.co.uk wrote: On Wed, 14 Aug 2013 00:10:41 +0100, Jack Bates tdh...@nottheoilrig.com wrote: Can anyone suggest a way to get a pair of file descriptor numbers such that data written to one can be read from the other and vice

Re: Am I not seeing the Error?

2013-08-13 Thread Gregory Ewing
Ned Batchelder wrote: Everyone: this program seems to be a direct and misguided transliteration from a bash script. Not a particularly well-written bash script, either -- it's full of superfluous uses of 'cat'. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting a value that follows string.find()

2013-08-13 Thread Dave Angel
englishkevin...@gmail.com wrote: I know the title doesn't make much sense, but I didnt know how to explain my problem. Anywho, I've opened a page's source in URLLIB starturlsource = starturlopen.read() string.find(starturlsource, 'a href=/profile.php?id=') And I used string.find to find a

Re: Pair of filenos read/write each other?

2013-08-13 Thread Roy Smith
In article mailman.552.1376435986.1251.python-l...@python.org, Jack Bates tdh...@nottheoilrig.com wrote: Can anyone suggest a way to get a pair of file descriptor numbers such that data written to one can be read from the other and vice versa? Is there anything like os.pipe() where you can

Re: Am I not seeing the Error?

2013-08-13 Thread Michael Torrie
On 08/13/2013 04:31 AM, Devyn Collier Johnson wrote: For me, this style is easier to read. I have tried the typical style, but I find this one to be easier. One thing I do know is that your style makes it very hard to find errors, even when the parser flags them. And the fact that you posted

Subprocess embedded in curses window

2013-08-13 Thread Veritatem Ignotam
Hey All, I'm fairly new to python and even newer to curses. Does any one have a good solution for how to embed the output of a subprocess (ex. subprocess.Popen(htop, stdout=subprocess.PIPE)) into an ncurses window? So for example, the terminal window is broken up into quadrants and the top right

.split() Qeustion

2013-08-13 Thread eschneider92
How can I use the '.split()' method (am I right in calling it a method?) without instead of writing each comma between words in the pie list in the following code? Also, is there a way to use .split instead of typing the apostrophes? Thank you. import random pie=['keylime', 'peach', 'apple',

Re: .split() Qeustion

2013-08-13 Thread Gary Herron
On 08/13/2013 09:51 PM, eschneide...@comcast.net wrote: How can I use the '.split()' method (am I right in calling it a method?) without instead of writing each comma between words in the pie list in the following code? Also, is there a way to use .split instead of typing the apostrophes?

Re: .split() Qeustion

2013-08-13 Thread Dave Angel
eschneide...@comcast.net wrote: How can I use the '.split()' method (am I right in calling it a method?) without instead of writing each comma between words in the pie list in the following code? Also, is there a way to use .split instead of typing the apostrophes? Thank you. import

Re: .split() Qeustion

2013-08-13 Thread Krishnan Shankar
Hi, How can I use the '.split()' method (am I right in calling it a method?) The .split() is a method in Python which comes as in built method for String objects in Python. Any string defined in python will have the ability to call this function. var = 'Hello how r u?' dir(var) ['__add__',

Re: .split() Qeustion

2013-08-13 Thread eschneider92
It's obvious that the word 'without' in my first sentence was meant to be ommited, and it's a simple question. Thank Gary! -- http://mail.python.org/mailman/listinfo/python-list

[issue18723] shorten function of textwrap module is susceptible to non-normalized whitespaces

2013-08-13 Thread Vajrasky Kok
New submission from Vajrasky Kok: In shorten function of textwrap module, the placeholder becomes a hole where we can inject non-normalized whitespaces to the text. text = Hello there, how are you this fine day? I'm glad to hear it! from textwrap import shorten shorten(text, 40,

[issue18723] shorten function of textwrap module is susceptible to non-normalized whitespaces

2013-08-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm not convinced this is a bug. The whitespace right-stripping is more of an implementation detail. You can really put what you want inside the placeholder. -- ___ Python tracker rep...@bugs.python.org

[issue18723] shorten function of textwrap module is susceptible to non-normalized whitespaces

2013-08-13 Thread Vajrasky Kok
Vajrasky Kok added the comment: Okay, nevermind about non-normalized whitespaces in placeholder, but what about this case? text = Hello there, how are you this fine day? I'm glad to hear it! from textwrap import shorten shorten(text, 10, placeholder= ) 'Hello' shorten(text, 9,

[issue18704] IDLE: PEP8 Style Check Integration

2013-08-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: -1 on giving PEP 8 any more weight than it already has. Automated PEP 8 checker tools do away the human commen sense component (the foolish consistency quote is in PEP 8 for a reason). Another downside is that rigid adherence to PEP 8 tends to focus

[issue18704] IDLE: PEP8 Style Check Integration

2013-08-13 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- versions: -Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18704 ___

[issue18724] Typo in docs.python.org: smtplib python2.7

2013-08-13 Thread Susan Tan
New submission from Susan Tan: http://docs.python.org/2.7/library/smtplib.html#smtplib.SMTPException exception smtplib.SMTPException The base exception class for all the other excpetions provided by this module. The word exceptions is spelled incorrectly in the in other excpetions.

[issue18722] Remove uses of the register keyword

2013-08-13 Thread Mark Dickinson
Mark Dickinson added the comment: +1 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18722 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18724] Typo in docs.python.org: smtplib python2.7

2013-08-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset bd030e70cecb by Ned Deily in branch '2.7': Issue 18724: Fix typo noticed by Susan Tan. http://hg.python.org/cpython/rev/bd030e70cecb New changeset 76d71bc949b6 by Ned Deily in branch '3.3': Issue 18724: Fix typo noticed by Susan Tan.

[issue18724] Typo in docs.python.org: smtplib python2.7

2013-08-13 Thread Ned Deily
Ned Deily added the comment: Thanks for the report! -- nosy: +ned.deily resolution: - fixed stage: - committed/rejected status: open - closed type: enhancement - versions: +Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org

[issue18722] Remove uses of the register keyword

2013-08-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: have exactly the same size Binaries contain paddings. although their md5 hashes differ Timestamps. I'm interesting if someone builds CPython with more simple compilers (i.e. PCC [1]). [1] http://en.wikipedia.org/wiki/Portable_C_Compiler --

[issue18722] Remove uses of the register keyword

2013-08-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Serhiy Storchaka added the comment: have exactly the same size Binaries contain paddings. I used the size command, which gives you the exact size of the various sections (rather than the physical file size). --

[issue15849] PEP 3121, 384 Refactoring applied to xx module

2013-08-13 Thread Robin Schreiber
Robin Schreiber added the comment: Updated the patch, corrected multiple syntax errors and missing INCREFS. Also added the comments that include the members names. I am yet undecided regarding the NULL-check for FindModule. Apart from that I have tried to build some tests that prove that

[issue18709] SSL module fails to handle NULL bytes inside subjectAltNames general names (CVE-2013-4238)

2013-08-13 Thread Christian Heimes
Christian Heimes added the comment: Thanks! The title now references the new CVE #. -- title: SSL module fails to handle NULL bytes inside subjectAltNames general names (CVE-2013-4073) - SSL module fails to handle NULL bytes inside subjectAltNames general names (CVE-2013-4238)

[issue15849] PEP 3121, 384 Refactoring applied to xx module

2013-08-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: In the example Martin gave in his PEP 3121, the PyInit does not perform any INCREFs on the Variables that are referenced from inside the module state. He therefore left out m_free completely as there was nothing to DECREF within the module state. Back

[issue17997] ssl.match_hostname(): sub string wildcard should not match IDNA prefix

2013-08-13 Thread Christian Heimes
Christian Heimes added the comment: Affected versions: - Python 3.2 ( 3.2.5) - Python 3.3 ( 3.3.3) - Python 3.4a1 - requests 1.2.3 https://pypi.python.org/pypi/requests - backports.ssl_match_hostname (3.2a3) https://pypi.python.org/pypi/backports.ssl_match_hostname/ - urllib3 1.6

[issue18723] shorten function of textwrap module is susceptible to non-normalized whitespaces

2013-08-13 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18723 ___

[issue18723] shorten function of textwrap module is susceptible to non-normalized whitespaces

2013-08-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Isn't that weird? Agreed, this one is a bug. The stripping in shorten() should be smarter, i.e. it should not affect the placeholder's own spaces. Do you want to write a patch? -- ___ Python tracker

[issue18723] shorten function of textwrap module is susceptible to non-normalized whitespaces

2013-08-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Correcting myself: i.e. it should not affect the placeholder's own spaces. ... except for leading whitespace in case the placeholder ends up alone in the result. i.e. shorten(somethingtoolong) should return (...), not (...). --

[issue14019] Unify tests for str.format and string.Formatter

2013-08-13 Thread Ezio Melotti
Ezio Melotti added the comment: I left a review on rietveld. FWIW I think string_tests and related files should undergo a (major?) refactoring. I worked with them a few times and it's a bit of a mess with all those base classes and mixins. I also found some tests that weren't running

[issue18687] Lib/test/leakers/test_ctypes.py still mentions the need to update Misc/build.sh

2013-08-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 49edf4cbc453 by Ezio Melotti in branch '2.7': #18687: remove obsolete comment. Patch by Févry Thibault. http://hg.python.org/cpython/rev/49edf4cbc453 New changeset 49fa63610c7f by Ezio Melotti in branch '3.3': #18687: remove obsolete comment.

[issue18687] Lib/test/leakers/test_ctypes.py still mentions the need to update Misc/build.sh

2013-08-13 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the report and the patch! -- assignee: docs@python - ezio.melotti nosy: +ezio.melotti resolution: - fixed stage: - committed/rejected status: open - closed type: - enhancement versions: +Python 2.7, Python 3.3

[issue18712] Pure Python operator.index doesn't match the C version.

2013-08-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch. Now the code of operator.index() becomes even more complicated. Perhaps you want suggest other wording for documentation? Some code in stdlib (_pyio.py, bz2.py, connection.py) uses a.__index__() instead of type(a).__index__(a) (with

[issue18725] Multiline shortening

2013-08-13 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Functions in the textwrap module works with multiline text except a newly added (in issue18585) the shorten() function. Wrapping and shortening a multiline text using existing textwrap function is not a trivial job. I propose to add two new parameters to

[issue18725] Multiline shortening

2013-08-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Sounds like a reasonable enhancement to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18725 ___ ___

[issue18725] Multiline shortening

2013-08-13 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18725 ___ ___

[issue18723] shorten function of textwrap module is susceptible to non-normalized whitespaces

2013-08-13 Thread Vajrasky Kok
Vajrasky Kok added the comment: Do you want to write a patch? My pleasure. Attached the second version of the patch to accomodate Pitrou's request. -- Added file: http://bugs.python.org/file31274/fix_for_non_normalized_whitespaces_in_placeholder_v2.patch

[issue18694] getxattr on Linux ZFS native filesystem happily returns partial values

2013-08-13 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18694 ___

[issue18726] json functions have too many positional parameters

2013-08-13 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The json module functions have too many positional parameters: dump() -- 11 dumps() -- 10 load() -- 9 loads() -- 8 In most time only small part of these options is specified so users call these functions with keyword arguments for all parameters except

[issue18722] Remove uses of the register keyword

2013-08-13 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18722 ___

[issue18709] SSL module fails to handle NULL bytes inside subjectAltNames general names (CVE-2013-4238)

2013-08-13 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18709 ___

[issue18709] SSL module fails to handle NULL bytes inside subjectAltNames general names (CVE-2013-4238)

2013-08-13 Thread Christian Heimes
Christian Heimes added the comment: Python 3.1 is affected, too. 3.1 will recieve security fixes until June 2014. -- versions: +Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18709

[issue18726] json functions have too many positional parameters

2013-08-13 Thread R. David Murray
R. David Murray added the comment: This is not what we use keyword only arguments for. The standard practice in the stdlib is that arguments are arguments unless there is a good reason to make one keyword only. So I'm -1 on this proposal. -- nosy: +r.david.murray

[issue18726] json functions have too many positional parameters

2013-08-13 Thread Ezio Melotti
Ezio Melotti added the comment: Serhiy has a point though, I wouldn't want to see something like json.dumps(someobj, True, False, True, False). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18726

[issue18726] json functions have too many positional parameters

2013-08-13 Thread R. David Murray
R. David Murray added the comment: Ach. I didn't read carefully enough (not awake yet, I guess). Yes, boolean parameters are one of the things keyword only arguments are appropriate for. -- ___ Python tracker rep...@bugs.python.org

[issue18723] shorten function of textwrap module is susceptible to non-normalized whitespaces

2013-08-13 Thread Vajrasky Kok
Vajrasky Kok added the comment: Attached more refined patch. Removed unnecessary test. Added more robust test. Added shorten in __all__. -- Added file: http://bugs.python.org/file31275/fix_for_non_normalized_whitespaces_in_placeholder_v3.patch ___

[issue18723] shorten function of textwrap module is susceptible to non-normalized whitespaces

2013-08-13 Thread Vajrasky Kok
Changes by Vajrasky Kok sky@speaklikeaking.com: Removed file: http://bugs.python.org/file31275/fix_for_non_normalized_whitespaces_in_placeholder_v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18723

[issue18723] shorten function of textwrap module is susceptible to non-normalized whitespaces

2013-08-13 Thread Vajrasky Kok
Changes by Vajrasky Kok sky@speaklikeaking.com: Added file: http://bugs.python.org/file31276/fix_for_non_normalized_whitespaces_in_placeholder_v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18723

[issue18725] Multiline shortening

2013-08-13 Thread Vajrasky Kok
Vajrasky Kok added the comment: What about newline keyword argument? Are we forcing the newline to be '\n'? Alternate newlines will be useful for Windows platform ('\r\n') and HTML platform ('br /'). -- ___ Python tracker rep...@bugs.python.org

[issue18394] cgi.FieldStorage triggers ResourceWarning sometimes

2013-08-13 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18394 ___ ___ Python-bugs-list

[issue18725] Multiline shortening

2013-08-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: fill(...) is just '\n'.join(wrap(...)). Directly use wrap() if you need nonstandard newlines. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18725 ___

[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2013-08-13 Thread Gabi Davar
Changes by Gabi Davar grizzly@gmail.com: -- nosy: +Gabi.Davar ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14243 ___ ___ Python-bugs-list

[issue6875] add os.close() suggestion to mkstemp documentation

2013-08-13 Thread Gabi Davar
Changes by Gabi Davar grizzly@gmail.com: -- nosy: +Gabi.Davar ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6875 ___ ___ Python-bugs-list

[issue14012] Misc tarfile fixes

2013-08-13 Thread Éric Araujo
Éric Araujo added the comment: Thanks, LGTM. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14012 ___ ___ Python-bugs-list mailing list

  1   2   >