ANN: rom 0.29.0 - Redis object mapper for Python

2014-10-08 Thread Josiah Carlson
Hey everyone, The rom package is a Redis object mapper for Python. It sports an interface similar to Django's ORM, SQLAlchemy with the declarative base, or Appengine's datastore. The changelog for recent releases can be seen below my signature. You can find the package at:

[RELEASE] Python 3.4.2 is now available

2014-10-08 Thread Larry Hastings
On behalf of the Python development community and the Python 3.4 release team, I'm pleased to announce the availability of Python 3.4.2. Python 3.4.2 has many bugfixes and other small improvements over 3.4.1. One new feature for Mac OS X users: the OS X installers are now distributed as

Re: operator module functions

2014-10-08 Thread Terry Reedy
On 10/7/2014 9:41 PM, Steven D'Aprano wrote: Every Python operator has a function version in the operator module: operator + has function operator.add; operator - has function operator.sub; operator * has function operator.mul; and so forth. Only, that's not quite right... according to the

Re: help with regex

2014-10-08 Thread Peter Otten
James Smith wrote: I want the last 1 I can't this to work: pattern=re.compile( (\d+)$ ) match=pattern.match( LINE: 235 : Primary Shelf Number (attempt 1): 1) print match.group() pattern = re.compile((\d+)$) match = pattern.search( LINE: 235 : Primary Shelf Number (attempt 1): 1)

Re: help with regex

2014-10-08 Thread Ben Finney
Peter Otten __pete...@web.de writes: pattern = re.compile((\d+)$) match = pattern.search( LINE: 235 : Primary Shelf Number (attempt 1): 1) match.group() '1' An alternative way to accomplish the above using the ‘match’ method:: import re pattern = re.compile(^.*:(? *)(\d+)$)

Re: How do I check if a string is a prefix of any possible other string that matches a given regex.

2014-10-08 Thread jonathan . slenders
Le mercredi 8 octobre 2014 01:40:11 UTC+2, MRAB a écrit : If you're not interested in generating an actual regex, but only in matching the prefix, then it sounds like you want partial matching. The regex module supports that: https://pypi.python.org/pypi/regex Wow, thanks a lot!

Re: operator module functions

2014-10-08 Thread marco . nawijn
For me it makes sense. operator.add should be used in a global context (I don't know how to express it otherwise). So you provide it with the two values that you want to add. The .__add__ variants are bound to a particular instance and you provide it with a single value that you want to add.

[RELEASE] Python 3.4.2 is now available

2014-10-08 Thread Larry Hastings
On behalf of the Python development community and the Python 3.4 release team, I'm pleased to announce the availability of Python 3.4.2. Python 3.4.2 has many bugfixes and other small improvements over 3.4.1. One new feature for Mac OS X users: the OS X installers are now distributed as

Re: operator module functions

2014-10-08 Thread Chris Angelico
(You didn't include any context in your post. Please quote as much text as would be helpful; it's the easiest way to show what you're talking about.) On Wed, Oct 8, 2014 at 7:46 PM, marco.naw...@colosso.nl wrote: For me it makes sense. operator.add should be used in a global context (I don't

Re: Python 3.4.1 on W2K?

2014-10-08 Thread Pal Acreide
random832 wrote on Tue Oct 7 22:33:23 CEST 2014 On Tue, Oct 7, 2014, at 16:27, Michael Torrie wrote: That's really interesting. I looked briefly at the page. How does your python extension work with xywrite? Does it manipulate xywrite documents or does it tie in at runtime with Xywrite

Re: Python 3.4.1 on W2K

2014-10-08 Thread Pal Acreide
Here's another quick one -- under 30 secs. -- and then I'll revert to lurker status. It's one of my favorites: Veritas wine liquor search. (Teetotalers, avert your eyes.) http://youtu.be/jDtm4z7kqyI Pal A. -- https://mail.python.org/mailman/listinfo/python-list

Re: ruby instance variable in python

2014-10-08 Thread flebber
The end result of a confusing sentence with no context is that I have no idea what you are trying to say. Could you try explaining again please? Steven No problem my reply from phone at work a little confusing. So trying to determine what this does. def ins_var @ins_var ||= nil

Re: Pythonic way to iterate through multidimensional space?

2014-10-08 Thread Gelonida N
On 10/7/2014 1:01 PM, Ned Batchelder wrote: On 10/7/14 2:10 AM, Gelonida N wrote: Disadvantage of itertools.product() is, that it makes a copy in memory. Reason ist, that itertools also makes products of generators (meaning of objects, that one can't iterate several times through) There are

how to add custom importer after the normal imports

2014-10-08 Thread Gelonida N
Hi, I just read about sys.meta_path, which allows to install custom importers *BEFORE* the default importers. However I have a use case where I would like to add a custom importer *AFTER* all other import methods have failed. Does anybody know how to do this. One way of implementing this

Re: operator module functions

2014-10-08 Thread Steven D'Aprano
marco.naw...@colosso.nl wrote: For me it makes sense. operator.add should be used in a global context (I don't know how to express it otherwise). So you provide it with the two values that you want to add. The .__add__ variants are bound to a particular instance and you provide it with a

Re: Another time question

2014-10-08 Thread Grant Edwards
On 2014-10-07, Seymore4Head Seymore4Head@Hotmail.invalid wrote: I never really cared enough to ask anyone, but something like my cable bill is 98$ a month. Do companies (in general) consider a month every 30 days or every time the 14th comes around? Either/both. My pre-pay T-Mobile account

Re: Practice question

2014-10-08 Thread Rustom Mody
On Tuesday, October 7, 2014 2:19:39 AM UTC+5:30, Steven D'Aprano wrote: I have fewer issues with your conclusion and analogy than I do with the basic premise that there is a connection between Seymore's problem here and the use, or non-use, of print in the interactive interpreter. I don't

Re: Practice question

2014-10-08 Thread Chris Angelico
On Thu, Oct 9, 2014 at 3:14 AM, Rustom Mody rustompm...@gmail.com wrote: The issue is not only that print is bad but that the interpreter is good for learning and trying out. Are these two really unconnected. Lets see... One can - use print without the interpreter - use the interpreter

Re: Practice question

2014-10-08 Thread Skip Montanaro
On Wed, Oct 8, 2014 at 11:14 AM, Rustom Mody rustompm...@gmail.com wrote: So pushing beginners away from print can push them up the learning curve more quickly Or more quickly discourage them. I still use print for all sorts of things. In my opinion, there is often no need for fancy loggers,

Re: Practice question

2014-10-08 Thread Rustom Mody
On Wednesday, October 8, 2014 9:58:11 PM UTC+5:30, Skip Montanaro wrote: On Wed, Oct 8, 2014 at 11:14 AM, Rustom Mody wrote: So pushing beginners away from print can push them up the learning curve more quickly Or more quickly discourage them. I still use print for all sorts of things. In

Re: High water Memory fragmentation still a thing?

2014-10-08 Thread bryanjugglercryptographer
Chris Angelico wrote: Sure, and that's all well and good. But what I just cited there *is* a shipping product. That's a live server that runs a game that I'm admin of. So it's possible to do without the resource safety net of periodic restarts. Nice that the non-Python server you administer

Re: operator module functions

2014-10-08 Thread Terry Reedy
On 10/8/2014 6:57 AM, Steven D'Aprano wrote: According to the documentation, operator.__add__ is the official function, and operator.add is just there for convenience. You are paraphrasing The function names are those used for special class methods; variants without leading and trailing __

strange numpy behaviour

2014-10-08 Thread George Trojan
This does not look right: dilbert@gtrojan python3.4 Python 3.4.1 (default, Jul 7 2014, 15:47:25) [GCC 4.8.3 20140624 (Red Hat 4.8.3-1)] on linux Type help, copyright, credits or license for more information. import numpy as np a=np.ma.array([0, 1], dtype=np.int8, mask=[1, 0]) a

Re: strange numpy behaviour

2014-10-08 Thread Ian Kelly
On Wed, Oct 8, 2014 at 10:29 AM, George Trojan george.tro...@noaa.gov wrote: This does not look right: dilbert@gtrojan python3.4 Python 3.4.1 (default, Jul 7 2014, 15:47:25) [GCC 4.8.3 20140624 (Red Hat 4.8.3-1)] on linux Type help, copyright, credits or license for more information.

Re: operator module functions

2014-10-08 Thread Ethan Furman
On 10/08/2014 12:09 PM, Terry Reedy wrote: On 10/8/2014 6:57 AM, Steven D'Aprano wrote: According to the documentation, operator.__add__ is the official function, and operator.add is just there for convenience. You are paraphrasing The function names are those used for special class

Re: operator module functions

2014-10-08 Thread random832
On Wed, Oct 8, 2014, at 15:38, Ethan Furman wrote: LOL, no kidding! The main reason I bother using the operator module is for the readability of not seeing the dunders, and the writability of not having to type them. I'm not sure what situation you would have to type them (as opposed to

Re: operator module functions

2014-10-08 Thread Gelonida N
On 10/8/2014 9:09 PM, Terry Reedy wrote: On 10/8/2014 6:57 AM, Steven D'Aprano wrote: According to the documentation, operator.__add__ is the official function, and operator.add is just there for convenience. You are paraphrasing The function names are those used for special class methods;

Re: operator module functions

2014-10-08 Thread Ian Kelly
On Wed, Oct 8, 2014 at 3:05 PM, Gelonida N gelon...@gmail.com wrote: On 10/8/2014 9:09 PM, Terry Reedy wrote: On 10/8/2014 6:57 AM, Steven D'Aprano wrote: According to the documentation, operator.__add__ is the official function, and operator.add is just there for convenience. You are

Re: How do I check if a string is a prefix of any possible other string that matches a given regex.

2014-10-08 Thread Gregory Ewing
jonathan.slend...@gmail.com wrote: For each non-accepting state, determine whether it has any transitions that lead in one or more steps to an accepting state. Modify the FSM so that each such state is also an accepting state. Thanks, I'll make every state of the FSM an accepting state.

Re: operator module functions

2014-10-08 Thread Gregory Ewing
Chris Angelico wrote: operator.add is operator.__add__ True That doesn't always seem to have been the case, however. In Python 2.7 and 3.3, I get operator.add is operator.__add__ False -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: operator module functions

2014-10-08 Thread Ethan Furman
[redirecting back to the list] On 10/08/2014 02:23 PM, random...@fastmail.us wrote: On Wed, Oct 8, 2014, at 15:53, Ethan Furman wrote: On 10/08/2014 12:49 PM, random...@fastmail.us wrote: On Wed, Oct 8, 2014, at 15:38, Ethan Furman wrote: LOL, no kidding! The main reason I bother using the

Re: operator module functions

2014-10-08 Thread Chris Kaynor
On Wed, Oct 8, 2014 at 2:05 PM, Gelonida N gelon...@gmail.com wrote: On 10/8/2014 9:09 PM, Terry Reedy wrote: On 10/8/2014 6:57 AM, Steven D'Aprano wrote: According to the documentation, operator.__add__ is the official function, and operator.add is just there for convenience. You are

Re: operator module functions

2014-10-08 Thread Ben Finney
random...@fastmail.us writes: On Wed, Oct 8, 2014, at 15:38, Ethan Furman wrote: The main reason I bother using the operator module is for the readability of not seeing the dunders, and the writability of not having to type them. I'm not sure what situation you would have to type them

virtualenv question: include just a few site packages

2014-10-08 Thread Gelonida N
virtualenv has the switch --system-site-packages (including all system site pacgaes) and the switch --no-site-packages (to expclude all site packages) Does anyone know an easy way to include just a few site-packages? for example (PySide, but not PyQt) The reason I'm asking is following. Some

Re: operator module functions

2014-10-08 Thread Chris Angelico
On Thu, Oct 9, 2014 at 8:37 AM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Chris Angelico wrote: operator.add is operator.__add__ True That doesn't always seem to have been the case, however. In Python 2.7 and 3.3, I get operator.add is operator.__add__ False Huh. So it is.

Re: operator module functions

2014-10-08 Thread Chris Kaynor
On Wed, Oct 8, 2014 at 3:30 PM, Chris Angelico ros...@gmail.com wrote: That doesn't always seem to have been the case, however. In Python 2.7 and 3.3, I get operator.add is operator.__add__ False Huh. So it is. rosuav@sikorsky:~$ python3 Python 3.5.0a0 (default:301b9a58021c,

Re: how to add custom importer after the normal imports

2014-10-08 Thread Ian Kelly
On Wed, Oct 8, 2014 at 4:53 AM, Gelonida N gelon...@gmail.com wrote: Hi, I just read about sys.meta_path, which allows to install custom importers *BEFORE* the default importers. However I have a use case where I would like to add a custom importer *AFTER* all other import methods have

Re: operator module functions

2014-10-08 Thread Terry Reedy
On 10/8/2014 5:49 PM, Ethan Furman wrote: [redirecting back to the list] I'm not sure what situation you would have to type them (as opposed to simply a + b) that the operator module would help with. unittest springs to mind: self.assertRaises(TypeError, op.add, obj1, obj2) Er, my

Re: operator module functions

2014-10-08 Thread Ethan Furman
On 10/08/2014 03:46 PM, Terry Reedy wrote: On 10/8/2014 5:49 PM, Ethan Furman wrote: [redirecting back to the list] I'm not sure what situation you would have to type them (as opposed to simply a + b) that the operator module would help with. unittest springs to mind:

Toggle

2014-10-08 Thread Seymore4Head
I want to toggle between color=Red and color=Blue Here is one: if color == Red: color = Blue else: color = Red Here is two: if x = True color = Red else: color=Blue x= not x Others? -- https://mail.python.org/mailman/listinfo/python-list

Re:Toggle

2014-10-08 Thread Dave Angel
Seymore4Head Seymore4Head@Hotmail.invalid Wrote in message: I want to toggle between color=Red and color=Blue Here is one: if color == Red: color = Blue else: color = Red Here is two: if x = True color = Red else: color=Blue x= not x Others? One looks like

Re: Toggle

2014-10-08 Thread Mark Lawrence
On 09/10/2014 01:11, Seymore4Head wrote: I want to toggle between color=Red and color=Blue Here is one: if color == Red: color = Blue else: color = Red Here is two: if x = True color = Red else: color=Blue x= not x Others? Here

Re: Toggle

2014-10-08 Thread Steven D'Aprano
Seymore4Head wrote: I want to toggle between color=Red and color=Blue Here is one: if color == Red: color = Blue else: color = Red Apart from the horrible spelling of colour :-) that seems fine to me. You might wish to include a comment: # Assumes that color can

Re: operator module functions

2014-10-08 Thread Ned Batchelder
On 10/8/14 5:49 PM, Ethan Furman wrote: [redirecting back to the list] On 10/08/2014 02:23 PM, random...@fastmail.us wrote: On Wed, Oct 8, 2014, at 15:53, Ethan Furman wrote: On 10/08/2014 12:49 PM, random...@fastmail.us wrote: On Wed, Oct 8, 2014, at 15:38, Ethan Furman wrote: LOL, no

Re: Toggle

2014-10-08 Thread Ben Finney
Seymore4Head Seymore4Head@Hotmail.invalid writes: I want to toggle between color=Red and color=Blue It's good to cultivate ongoing familiarity with the standard library URL:https://docs.python.org/3/library/itertools.html#itertools.cycle so that you can make use of wheels already invented and

Re: Toggle

2014-10-08 Thread Rustom Mody
On Thursday, October 9, 2014 7:12:41 AM UTC+5:30, Ben Finney wrote: Seymore4Head writes: I want to toggle between color=Red and color=Blue It's good to cultivate ongoing familiarity with the standard library And language. In recent python3: class Color(Enum): ... Red = 0 ... Blue = 1

Re: Toggle

2014-10-08 Thread Mark Lawrence
On 09/10/2014 02:25, Mark Lawrence wrote: On 09/10/2014 01:11, Seymore4Head wrote: I want to toggle between color=Red and color=Blue Here is one: if color == Red: color = Blue else: color = Red Here is two: if x = True color = Red else: color=Blue x= not x Others?

Re: Toggle

2014-10-08 Thread random832
On Wed, Oct 8, 2014, at 23:02, Mark Lawrence wrote: When I first read this I was extremely jealous of the originator but having used it umpteen times I'm still extremely jealous of the originator!!! Why doesn't my mind work like his? :) You could also keep the ints in two variables and do a

Re: Toggle

2014-10-08 Thread Chris Angelico
On Thu, Oct 9, 2014 at 2:54 PM, random...@fastmail.us wrote: On Wed, Oct 8, 2014, at 23:02, Mark Lawrence wrote: When I first read this I was extremely jealous of the originator but having used it umpteen times I'm still extremely jealous of the originator!!! Why doesn't my mind work like

Re: Toggle

2014-10-08 Thread Steven D'Aprano
On Wed, 08 Oct 2014 19:34:30 -0700, Rustom Mody wrote: Color.Red Color.Red: 0 print (Color.Red) Color.Red # Not sure what to make of that distinction... That's because the interactive interpreter displays the repr() of objects (except for None, which it suppresses), while print outputs

Re: Toggle

2014-10-08 Thread Gregory Ewing
Seymore4Head wrote: I want to toggle between color=Red and color=Blue toggle = {Red: Blue, Blue: Red} color = toggle[color] -- https://mail.python.org/mailman/listinfo/python-list

Re: Toggle

2014-10-08 Thread Travis Griggs
On Oct 8, 2014, at 9:57 PM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Seymore4Head wrote: I want to toggle between color=Red and color=Blue Don’t forget polymorphic dispatch… class Red(object): def toggle(self): return Blue() class Blue(object): def toggle(self):

Re: Toggle

2014-10-08 Thread Rustom Mody
On Thursday, October 9, 2014 10:26:41 AM UTC+5:30, Steven D'Aprano wrote: On Wed, 08 Oct 2014 19:34:30 -0700, Rustom Mody wrote: Color.Red print (Color.Red) Color.Red # Not sure what to make of that distinction... That's because the interactive interpreter displays the repr() of

Re: Toggle

2014-10-08 Thread Chris Angelico
On Thu, Oct 9, 2014 at 4:39 PM, Rustom Mody rustompm...@gmail.com wrote: On Thursday, October 9, 2014 10:26:41 AM UTC+5:30, Steven D'Aprano wrote: On Wed, 08 Oct 2014 19:34:30 -0700, Rustom Mody wrote: Color.Red print (Color.Red) Color.Red # Not sure what to make of that distinction...

[issue22477] GCD in Fractions

2014-10-08 Thread gladman
gladman added the comment: You might be right that it is not worth adding the ability to handle a variable number of parameters in the new gcd. But this depends on whether you are right that this would add a significant burden to the implementation. I am not sure that it would. But for

[issue22524] PEP 471 implementation: os.scandir() directory scanning function

2014-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: I agree that having a high-level wrapper around a low-level C primitive would be cool, but someone has to experiment on that to find out how much performance it would cost. You may want to have the C primitive return results in batches (of e.g. 10 or 100

[issue22576] ftplib documentation gives a wrong argument name for storbinary

2014-10-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4cc584d47c7d by Berker Peksag in branch '3.4': Issue #22576: Fix signatures of FTP.storbinary() and FTP.storlines() methods. https://hg.python.org/cpython/rev/4cc584d47c7d New changeset f21f0de30544 by Berker Peksag in branch 'default': Issue

[issue22576] ftplib documentation gives a wrong argument name for storbinary

2014-10-08 Thread Berker Peksag
Berker Peksag added the comment: Fixed. Thanks for the report, Derek. -- assignee: docs@python - berker.peksag nosy: +berker.peksag resolution: - fixed stage: - resolved status: open - closed versions: +Python 3.4, Python 3.5 -Python 3.3 ___ Python

[issue22577] local variable changes lost after pdb jump command

2014-10-08 Thread Xavier de Gaye
New submission from Xavier de Gaye: With the following pdb_jump.py script: def foo(x): import pdb; pdb.set_trace() lineno = 3 lineno = 4 foo(1) The change made to 'x' is lost after a jump to line 4: $ ./python ~/tmp/test/pdb_jump.py ~/tmp/test/pdb_jump.py(3)foo() - lineno = 3

[issue22524] PEP 471 implementation: os.scandir() directory scanning function

2014-10-08 Thread STINNER Victor
STINNER Victor added the comment: You may want to have the C primitive return results in batches (of e.g. 10 or 100 entries) to limit the overhead, btw. Ah yes, good idea. I read that internally readdir() also fetchs many entries in a single syscall (prefetch / readahead, I don't know how to

[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall

2014-10-08 Thread Christian Heimes
Christian Heimes added the comment: Let's not be early adopters here. I suggest we wait until glibc has a proper interface. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22181 ___

[issue22524] PEP 471 implementation: os.scandir() directory scanning function

2014-10-08 Thread Ben Hoyt
Ben Hoyt added the comment: Thanks for the initial response and code review, Victor. I'll take a look and respond further in the next few days. In the meantime, however, I'm definitely open to splitting scandir out into its own C file. This will mean a little refactoring (making some

[issue22578] Add addition attributes to re.error

2014-10-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch adds additional attributes to the re.error exception: msg, pattern, pos, colno, lineno. It also adds helpful information to error message. Examples: re.compile(rabc\u123) Traceback (most recent call last): File stdin, line 1, in module

[issue22578] Add addition attributes to re.error

2014-10-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Regular Expressions nosy: +ezio.melotti, mrabarnett, pitrou stage: - patch review type: - enhancement versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org

[issue22578] Add additional attributes to re.error

2014-10-08 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- title: Add addition attributes to re.error - Add additional attributes to re.error ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22578 ___

[issue22578] Add additional attributes to re.error

2014-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Sounds ok, but it would be nice to add some tests. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22578 ___

[issue22579] Posix module init function name should not be compiler-dependent

2014-10-08 Thread Jeffrey Armstrong
New submission from Jeffrey Armstrong: The determination of the name of the posix module's initialization function (at Modules/posixmodule.c:12055) is currently dependent on the compiler being used. For MSVC, Watcom, or Borland, the name is defined as PyInit_nt. However, both Open Watcom

[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall

2014-10-08 Thread 700eb415
700eb415 added the comment: OpenBSD already provides high quality pseudorandom numbers from arc4random(). I don't think this would make us early adopters since it has been around for some time on this platform. It's also worth mentioning that getentropy() is not recommended in use for normal

[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall

2014-10-08 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/issue22181 ___

[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall

2014-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: This issue is about Linux support. Does the glibc have arc4random? I can't find it on my Ubuntu 13.10 system. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22181

[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall

2014-10-08 Thread Alex Gaynor
Alex Gaynor added the comment: As I said on the other ticket, using arc4random() indiscriminately would be a very poor idea, on some platforms (such as OS X) arc4random() really does use ARC4, which means there are serious security concerns with it. --

[issue22578] Add additional attributes to re.error

2014-10-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sounds ok, but it would be nice to add some tests. Thank you. Here is a patch with added test. -- Added file: http://bugs.python.org/file36836/re_error_attrs2.patch ___ Python tracker rep...@bugs.python.org

[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall

2014-10-08 Thread 700eb415
700eb415 added the comment: While I agree it may not be wise to use arc4random() globally, OpenBSD is unlikely to create a duplicate interface since it's already available. Python is currently unusable in chroots on that platform without reducing the security of the host partition by removing

[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall

2014-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Since this is a Linux-specific issue (see the title), you should create a separate issue for OpenBSD support. Bonus points if you want to submit a patch as well :-) -- ___ Python tracker rep...@bugs.python.org

[issue7830] Flatten nested functools.partial

2014-10-08 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I've updated the patch. -- keywords: +patch Added file: http://bugs.python.org/file36837/issue7830-2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7830

[issue22580] PyUnicode_Tailmatch documentation does not match signature

2014-10-08 Thread Josh Ayers
New submission from Josh Ayers: The documentation for PyUnicode_Tailmatch says it returns an int: https://docs.python.org/3/c-api/unicode.html?highlight=pyunicode_tailmatch#c.PyUnicode_Tailmatch However, the include file shows it returns Py_ssize_t:

[issue11664] Add patch method to unittest.TestCase

2014-10-08 Thread Julien Pagès
Julien Pagès added the comment: Hi all, I would like to contribute to Python and I'm interested in working on this. I have few questions (I hope you don't mind that I ask here): - is this issue still open and needed ? - if yes, do I have to work from 3.3 branch, as stated in the issue

[issue22581] Other mentions of the buffer protocol

2014-10-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: In addition to issue16518. There are other non-fixed messages (may be introduced after 3.3): b''.join(['']) Traceback (most recent call last): File stdin, line 1, in module TypeError: sequence item 0: expected bytes, bytearray, or an object with the

[issue22327] test_gdb failures on Ubuntu 14.10

2014-10-08 Thread Matěj Stuchlík
Matěj Stuchlík added the comment: FYI I'm seeing the error with the new 3.4.2 release as well. https://kojipkgs.fedoraproject.org//work/tasks/599/7800599/build.log -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22327

[issue11664] Add patch method to unittest.TestCase

2014-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hi Julien and welcome, - is this issue still open and needed ? Yes and perhaps. I have no opinion on whether it is necessary, but other people seem to think it's useful. - if yes, do I have to work from 3.3 branch, as stated in the issue Versions field,

[issue11664] Add patch method to unittest.TestCase

2014-10-08 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- assignee: michael.foord - versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11664 ___

[issue22462] Modules/pyexpat.c violates PEP 384

2014-10-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5433ef907e4f by Antoine Pitrou in branch '3.4': Issue #22462: Fix pyexpat's creation of a dummy frame to make it appear in exception tracebacks. https://hg.python.org/cpython/rev/5433ef907e4f New changeset f2f13aeb590a by Antoine Pitrou in branch

[issue22542] Use syscall (eg. arc4random or getentropy) rather than /dev/urandom when possible

2014-10-08 Thread 700eb415
700eb415 added the comment: I'm reopening this for now as advised from the Linux getrandom() thread. I agree we should not be using arc4random() blindly. However, in the long run it is a necessary change at least on OpenBSD. OpenBSD is not likely to create another syscall to avoid portability

[issue22542] Use syscall (eg. arc4random or getentropy) rather than /dev/urandom when possible

2014-10-08 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- components: +Interpreter Core -Build resolution: duplicate - stage: - needs patch type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22542

[issue22542] Use arc4random under OpenBSD for os.urandom()

2014-10-08 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- title: Use syscall (eg. arc4random or getentropy) rather than /dev/urandom when possible - Use arc4random under OpenBSD for os.urandom() ___ Python tracker rep...@bugs.python.org

[issue22526] file iteration SystemError for huge lines (2GiB+)

2014-10-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could anyone please test it on Windows? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22526 ___ ___

[issue22462] Modules/pyexpat.c violates PEP 384

2014-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch pushed. I've kept the changes together :) Hopefully there won't be any ctypes regression. -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org

[issue11664] Add patch method to unittest.TestCase

2014-10-08 Thread Julien Pagès
Julien Pagès added the comment: Thanks Antoine for the link, and the quick answer; It seems that it is a sensible subject, adding or not this method, and what it should do. I wrote the patch anyway, but I must confess that somewhere it feels strange to me to add such a method in TestCase

[issue22550] issubclass can fail after module reloading

2014-10-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - wont fix stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22550 ___

[issue22582] Segmentation fault with string concatenation

2014-10-08 Thread Kevin Dyer
Kevin Dyer added the comment: The following can be used to generate a file called ```mega_concat.py```: ```python N = 2**17 my_array = [] for i in range(N): my_array.append(\\) print '+'.join(my_array) ``` Then: ```console $ python mega_concat.py Segmentation fault (core dumped) $ python3

[issue22582] Segmentation fault with string concatenation

2014-10-08 Thread Kevin Dyer
New submission from Kevin Dyer: The following can be used to generate a file called ```mega_concat.py```: ```python N = 2**17 my_array = [] for i in range(N): my_array.append(\\) print '+'.join(my_array) ``` Then: ```console $ python mega_concat.py Segmentation fault (core dumped) $ python3

[issue22583] Segmentation fault with string concatenation

2014-10-08 Thread Kevin Dyer
New submission from Kevin Dyer: The following can be used to generate a file called mega_concat.py: N = 2**17 my_array = [] for i in range(N): my_array.append(\\) print '+'.join(my_array) Then, on Ubuntu 14.04, 32-bit: $ python mega_concat.py Segmentation fault (core dumped) $ python3

[issue11693] memory leak in email.generator.Generator().flatten() method

2014-10-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: From Anaury's report, this is fixed in 2.7. Email in current 3.x has been re-written. -- nosy: +terry.reedy resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org

[issue22582] RuntimeError with string concatenation

2014-10-08 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- stage: - resolved title: Segmentation fault with string concatenation - RuntimeError with string concatenation ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22582

[issue8065] Memory leak in readline.get_current_history_length

2014-10-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: The leak had been fixed in #9450. There are still the remaining issues of: - better testing for the readline module, and - attempting to work around libedit bugs. Perhaps those should become separate issues, though? If those are current issues and anyone

[issue16254] Make PyUnicode_AsWideCharString() increase temporary

2014-10-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: I tried to re-title to describe the enhancement proposal. There are multiple API proposals in the two messages above. -- nosy: +terry.reedy stage: - needs patch title: PyUnicode_AsWideCharString() increases string size - Make

[issue21715] Chaining exceptions at C level

2014-10-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9af21752ea2a by Serhiy Storchaka in branch '3.4': Issue #21715: Extracted shared complicated code in the _io module to new https://hg.python.org/cpython/rev/9af21752ea2a New changeset 8b1ac1a3d007 by Serhiy Storchaka in branch 'default': Issue

[issue17381] IGNORECASE breaks unicode literal range matching

2014-10-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Actually 3.5 patch can be simpler. -- Added file: http://bugs.python.org/file36839/re_ignore_case_range-3.5_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17381

[issue21715] Chaining exceptions at C level

2014-10-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for the review Antoine. -- assignee: - serhiy.storchaka resolution: - fixed stage: patch review - resolved status: open - closed versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org

[issue1519638] Unmatched Group issue - workaround

2014-10-08 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- assignee: effbot - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1519638 ___ ___ Python-bugs-list

  1   2   >