Re: [Python-Dev] Expose the array interface in Python 2.5?

2006-03-24 Thread Chris Barker
On 3/17/06, Thomas Heller theller at python.net wrote: Accessing Python arrays (Numeric arrays, Numeric array, or Numpy array) as ctypes arrays, and vice versa, without copying any memory, would be a good thing. This does bring up a point. I was thinking that a really bare-bones nd-array

Re: [Python-Dev] PEP: Extending the buffer protocol to share array information.

2006-11-01 Thread Chris Barker
Martin v. Löwis martin at v.loewis.de writes: Can you please give examples for real-world applications of this interface, preferably examples involving multiple independently-developed libraries? OK -- here's one I haven't seen in this thread yet: wxPython has a lot code to translate between

[Python-Dev] unicode Exception messages in py2.7

2013-11-14 Thread Chris Barker
Folks, (note this is about 2.7 -- sorry, but a lot of us still use that! I can only assume that in 3.* this is a non-issue) I just discovered an issue that's been around a long time: If you create an Exception with a unicode object for the message, the message can be silently ignored if it can

Re: [Python-Dev] unicode Exception messages in py2.7

2013-11-14 Thread Chris Barker
On Thu, Nov 14, 2013 at 1:55 PM, Tres Seaver tsea...@palladion.com wrote: Fixing any bug is changing behavior; 2.7 is not frozen for bugfixes. Thank you. The real question is whether third-party code will break when the now-empty error messages appear with '?' littered through them? right

Re: [Python-Dev] unicode Exception messages in py2.7

2013-11-14 Thread Chris Barker
On Thu, Nov 14, 2013 at 1:20 PM, Victor Stinner If you create an Exception with a unicode object for the message, (...) In Python 2, there are too many similar corner cases. It is impossible to fix these bugs without taking the risk of introducing a regression. Yes, there are -- the

Re: [Python-Dev] unicode Exception messages in py2.7

2013-11-14 Thread Chris Barker
On Thu, Nov 14, 2013 at 3:58 PM, Steven D'Aprano st...@pearwood.info wrote: It's not a given that the current behaviour *is* a bug. I'll concede that it's not a bug unless someone said somewhere that unicode messages should work .. but that's kind of a semantic argument. I have to say it's a

Re: [Python-Dev] unicode Exception messages in py2.7

2013-11-15 Thread Chris Barker
On Fri, Nov 15, 2013 at 9:21 AM, Armin Rigo ar...@tunes.org wrote: I figured that even using the traceback.py module and getting Exception: \u1234\u1235\u5321 is rather useless if you tried to raise an exception with a message in Thai. yup. I believe this to also be a bug, so I opened

Re: [Python-Dev] unicode Exception messages in py2.7

2013-11-15 Thread Chris Barker
On Fri, Nov 15, 2013 at 5:24 AM, Martin v. Löwis mar...@v.loewis.de wrote: Procedurally, it's really easy. Ultimately it's up to the release manager to decide which changes go into a release and which don't, and Benjamin has already voiced an opinion. Very early in the conversation, though

Re: [Python-Dev] unicode Exception messages in py2.7

2013-11-18 Thread Chris Barker
Folks, It seems changing anything about how Exception messages are handles is off the table for 2.7, and a non-issue in 3.* Is it worth opening an issue on this, just so we can close it as won't fix? Or is this thread documentation enough? NOTE about py3: I'm assuming unicode messages are

Re: [Python-Dev] PEP 0404 and VS 2010

2013-11-20 Thread Chris Barker
On Wed, Nov 20, 2013 at 12:52 PM, Christian Tismer tis...@stackless.comwrote: according to pep 404, there will never be an official Python 2.8. The migration path is from 2.7 to 3.x. I agree with this strategy in almost all consequences but this one: Many customers are forced to stick with

Re: [Python-Dev] PEP 428 - pathlib - ready for approval

2013-11-20 Thread Chris Barker
On Wed, Nov 20, 2013 at 1:39 PM, Giampaolo Rodola' g.rod...@gmail.comwrote: Isn't this redundant? Path.cwd() PosixPath('/home/antoine/pathlib') Probably this is just personal taste but I'd prefer the more explicit: Path(os.getcwd()) PosixPath('/home/antoine/pathlib') I understand all

Re: [Python-Dev] PEP 0404 and VS 2010

2013-11-21 Thread Chris Barker
On Thu, Nov 21, 2013 at 1:32 PM, Christian Tismer tis...@stackless.comwrote: I am converted to an OS X developer since 2006, but never had ABI problems, because I use homebrew, Right, different story -- you are supposed to compile everything on the target system, so everything stays

Re: [Python-Dev] PEP 0404 and VS 2010

2013-11-21 Thread Chris Barker
On Thu, Nov 21, 2013 at 1:09 PM, Greg Ewing greg.ew...@canterbury.ac.nzwrote: Concerning the version number, I thought the intention of PEP 404 was simply to say that the PSF would not be releasing anything called Python 2.8, not to forbid anyone *else* from doing so. Or am I wrong about

Re: [Python-Dev] PEP 0404 and VS 2010

2013-11-21 Thread Chris Barker
On Thu, Nov 21, 2013 at 10:53 AM, Christian Tismer tis...@stackless.comwrote: I also think having a 2.8 out there that is exactly the same as 2.7, except that it was built with a different version of a compiler on one particular platform is a very very bad idea. This was not my proposal. I

Re: [Python-Dev] PEP 0404 and VS 2010

2013-11-21 Thread Chris Barker
On Thu, Nov 21, 2013 at 1:02 PM, Greg Ewing greg.ew...@canterbury.ac.nzwrote: mar...@v.loewis.de wrote: Package authors would have to create multiple binary releases of the same modules for Windows, and upload them to PyPI. pip would have to learn to download the right one, depending on what

Re: [Python-Dev] PEP 0404 and VS 2010

2013-11-21 Thread Chris Barker
On Thu, Nov 21, 2013 at 1:12 PM, Paul Moore p.f.mo...@gmail.com wrote: None of the currently available binary distribution formats distinguish Windows binaries by anything other than minor version. For wheels (and I think eggs), this is a showstopper as the name is essential metadata

Re: [Python-Dev] PEP 0404 and VS 2010

2013-11-21 Thread Chris Barker
On Thu, Nov 21, 2013 at 2:53 PM, Nick Coghlan ncogh...@gmail.com wrote: For 2.7.7, I think some combination of the two following ideas would be worth pursuing: - a C runtime independent API flag (set by default on Windows when building with a compiler other than VS2008). This would largely

Re: [Python-Dev] Fwd: Python 2.x and 3.x usage survey

2013-12-31 Thread Chris Barker
On Mon, Dec 30, 2013 at 11:16 PM, Lennart Regebro rege...@gmail.com wrote: Python-dev probably is a bit special. Indeed -- I expect it to be totally non-representative of the broader Python community. Everyone on python-dev is at least interested in the process of moving Python forward. And

Re: [Python-Dev] Python3 complexity

2014-01-09 Thread Chris Barker
This has all gotten a bit complicated because everyone has been thinking in terms of actual encodings and actual text files. But I think the use-case here is something different: A file with a bunch of bytes in it, _some_of which are ascii, and the rest are other bytes (maybe binary data, maybe

Re: [Python-Dev] Python3 complexity

2014-01-09 Thread Chris Barker
On Thu, Jan 9, 2014 at 1:45 PM, Antoine Pitrou solip...@pitrou.net wrote: latin-1 guaranteed to work with any binary data, and round-trip accurately? Yes, it is. and will surrogateescape work for arbitrary binary data? Yes, it will. Then maybe this is really a documentation issue,

Re: [Python-Dev] Python3 complexity

2014-01-09 Thread Chris Barker
On Thu, Jan 9, 2014 at 2:54 PM, Paul Moore For example: b'\x01\x00\xd1\x80\xd1\83\xd0\x80' If that were decoded using latin1 how would I then get the first two bytes to the integer 256 and the last six bytes to their Cyrillic meaning? (Apologies for not testing myself, short on time.)

Re: [Python-Dev] Python3 complexity

2014-01-09 Thread Chris Barker
On Thu, Jan 9, 2014 at 3:14 PM, Ethan Furman et...@stoneleaf.us wrote: Sorry, I was too short with my example. My use case is binary files, with ASCII metadata and binary metadata, as well as ASCII-encoded numeric values, binary-coded numeric values, ASCII-encoded boolean values, and

Re: [Python-Dev] RFC: PEP 460: Add bytes % args and bytes.format(args) to Python 3.5

2014-01-10 Thread Chris Barker
On Fri, Jan 10, 2014 at 9:17 AM, Juraj Sukop juraj.su...@gmail.com wrote: As you may know, PDF operates over bytes and an integer or floating-point number is written down as-is, for example 100 or 1.23. Just to be clear here -- is PDF specifically bytes+ascii? Or could there be

Re: [Python-Dev] Python3 complexity

2014-01-10 Thread Chris Barker
On Fri, Jan 10, 2014 at 6:05 AM, Paul Moore p.f.mo...@gmail.com wrote: Using the 'latin-1' to mean unknown encoding can easily result in Mojibake (unreadable text) entering your application with dangerous effects on your other text data. Agreed. The latin-1 suggestion is purely for people

Re: [Python-Dev] RFC: PEP 460: Add bytes % args and bytes.format(args) to Python 3.5

2014-01-10 Thread Chris Barker
On Fri, Jan 10, 2014 at 3:40 PM, Juraj Sukop juraj.su...@gmail.com wrote: What this all means is that the PDF objects are expressed in ASCII, stream objects like images and fonts may have a binary part and I never saw those UTF+16 strings. hmm -- I wonder if they are out there in the wild,

Re: [Python-Dev] Python3 complexity

2014-01-10 Thread Chris Barker
On Fri, Jan 10, 2014 at 3:22 PM, Mark Lawrence breamore...@yahoo.co.ukwrote: The correct way is to read the interface specification which tells you what should be in the data. Or do people not use interface specifications these days, preferring to guess what they've got instead? No one is

Re: [Python-Dev] PEP 460 reboot

2014-01-14 Thread Chris Barker
On Tue, Jan 14, 2014 at 9:29 AM, Yury Selivanov yselivanov...@gmail.comwrote: - Try str(), and do .encode(‘ascii’, ‘stcict’)” on the result. please no -- that's the source of a lot of pain in py2 now. having a failure as a result of the value, rather than the type, of an object just makes

Re: [Python-Dev] PEP 461 updates

2014-01-17 Thread Chris Barker
For the record, we've got a pretty good thread (not this good, though!) over on the numpy list about how to untangle the mess that has resulted from porting text-file-parsing code to py3 (and the underlying issue with the 'S' data type in numpy...) One note from the github issue: The use of

Re: [Python-Dev] PEP 461 updates

2014-01-17 Thread Chris Barker
I hope you didn't mean to take this off-list: On Fri, Jan 17, 2014 at 2:06 PM, Neil Schemenauer n...@arctrix.com wrote: In gmane.comp.python.devel, you wrote: For the record, we've got a pretty good thread (not this good, though!) over on the numpy list about how to untangle the mess that

Re: [Python-Dev] PEP 461 updates

2014-01-21 Thread Chris Barker
On Sun, Jan 19, 2014 at 7:21 AM, Oscar Benjamin oscar.j.benja...@gmail.comwrote: long as numpy.loadtxt is explicitly documented as only working with latin-1 encoded files (it currently isn't), there's no problem. Actually there is problem. If it explicitly specified the encoding as latin-1

Re: [Python-Dev] python 3 niggle: None 1 raises TypeError

2014-02-14 Thread Chris Barker
On Fri, Feb 14, 2014 at 1:29 AM, Nick Coghlan ncogh...@gmail.com wrote: On 14 February 2014 18:04, Chris Withers ch...@simplistix.co.uk wrote: Am I missing something? How can I get this method down to a sane size? The easiest way is usually to normalise the attributes to a sensible

Re: [Python-Dev] unicode_string future, str - basestring, fix or feature

2014-03-03 Thread Chris Barker
On Sun, Mar 2, 2014 at 6:44 PM, Guido van Rossum gu...@python.org wrote: AFACT, in that message Victor was only talking about allowing Unicode filenames. ... Finally, in most places Python 2.7 *does* handle Unicode filenames just fine. I'm a bit confused. In this example:

Re: [Python-Dev] Python 4: don't remove anything, don't break backward compatibility

2014-03-10 Thread Chris Barker
On Mon, Mar 10, 2014 at 8:04 AM, Steven D'Aprano st...@pearwood.infowrote: If Python 4 is a conservative release, I don't see any reason to bump the major version number until after Python 3.9. and why even then? Perhaps we need a long-term schedule? why not: 3.5: August 2015 3.6:

Re: [Python-Dev] Python 4: don't remove anything, don't break backward compatibility

2014-03-10 Thread Chris Barker
On Mon, Mar 10, 2014 at 12:42 PM, Serhiy Storchaka storch...@gmail.comwrote: This is just an euphemism for not in observable future. is ANY of the future observable? Oh right, The Time Machine! -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR

Re: [Python-Dev] Call for Python Developers for our humanoid Robot NAO

2014-03-18 Thread Chris Barker
On Tue, Mar 18, 2014 at 1:47 PM, Terry Reedy tjre...@udel.edu wrote: The wording is typical for slightly indirect sales pitches in English. yeah, it's spam. The same non-specific (no language mentioned) message was sent to python-list and, I presume, to tens or even hundreds of other

Re: [Python-Dev] Negative timedelta strings

2014-03-31 Thread Chris Barker
On Fri, Mar 28, 2014 at 2:52 PM, Fred Drake f...@fdrake.net wrote: On Fri, Mar 28, 2014 at 5:19 PM, Greg Ewing greg.ew...@canterbury.ac.nz wrote: ISO 8601 doesn't seem to define a representation for negative durations, though, so it wouldn't solve the original problem. Aside from the

Re: [Python-Dev] arguments policy: **kwargs.pop()

2014-04-11 Thread Chris Barker
On Thu, Apr 10, 2014 at 7:12 PM, Christian Tismer tis...@stackless.comwrote: Then I rather often see things like this: class someclass(object): # note that there is no comment about argument destruction... def __init__(self, **kwargs): first_arg = kwargs.pop('option_1',

Re: [Python-Dev] Python 2migr8

2014-04-14 Thread Chris Barker
On Mon, Apr 14, 2014 at 1:26 PM, Guido van Rossum gu...@python.org wrote: - I'd prefer a name that plays on 2 and 3, not 2 and 8. :-) How about mirg2**3 (pronounced migrate) ? ;-) -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR

Re: [Python-Dev] List vs Tuple / Homogeneous vs Heterogeneous / Mutable vs Immutable

2014-04-24 Thread Chris Barker
Ooops, Forgot reply all last time -- here it is again. On Wed, Apr 23, 2014 at 3:17 PM, Chris Barker chris.bar...@noaa.gov wrote: On Mon, Apr 21, 2014 at 11:39 PM, Raymond Hettinger raymond.hettin...@gmail.com wrote: In fact, the distinction is extrinsic to their implementations

Re: [Python-Dev] pep8 reasoning

2014-04-27 Thread Chris Barker
On Sun, Apr 27, 2014 at 9:40 AM, Barry Warsaw ba...@python.org wrote: On Apr 26, 2014, at 12:33 AM, Janzert wrote: So the one example under discussion is: foo = long_function_name( var_one, var_two, var_three, var_four) and comes from

Re: [Python-Dev] pep8 reasoning

2014-04-28 Thread Chris Barker
On Sun, Apr 27, 2014 at 1:40 PM, Barry Warsaw ba...@python.org wrote: On Apr 27, 2014, at 12:34 PM, Chris Barker wrote: foo = long_function_name(var_one, var_two, var_three

Re: [Python-Dev] pep8 reasoning

2014-04-28 Thread Chris Barker
On Sun, Apr 27, 2014 at 6:34 PM, Steven D'Aprano st...@pearwood.infowrote: I would agree with having at least one example done with one arg per line. Is it really necessary? I think that one-arg-per-line is an obvious variation of the existing example. not really -- a lot of folks learn

Re: [Python-Dev] pep8 reasoning

2014-04-28 Thread Chris Barker
On Mon, Apr 28, 2014 at 3:01 PM, Terry Reedy tjre...@udel.edu wrote: I don't think anyone should write code with variable width fonts, The problem is that fixed pitch does not work well for even a half-way complete unicode font and I don't know that there are any available. ... Given that

Re: [Python-Dev] Python 2.7.7. on Windows

2014-04-28 Thread Chris Barker
On Mon, Apr 28, 2014 at 1:56 PM, Mike Miller python-...@mgmiller.netwrote: * watch Dave Beazley's PyCon 2014 talk for a good story involving one of those manufacturer installed Pythons: https://www.youtube.com/watch?v=RZ4Sn-Y7AP8 Thanks, I'm trying to get thru all the talk will watch that

Re: [Python-Dev] Returning None from methods that mutate object state

2014-05-20 Thread Chris Barker
[].sort() is None True ABC.lower() is None False That's a deliberate design choice, and one that has been explained a few times on the list when folks ask why [].sort().reverse() doesn't work when 'ABC'.lower().replace('-', '_') does. Would it be worth adding such a note? Or

Re: [Python-Dev] Returning None from methods that mutate object state

2014-05-21 Thread Chris Barker
Thanks all, Now I need to try to sum this all up to present to my students. ;-) -Chris On Tue, May 20, 2014 at 4:56 PM, Terry Reedy tjre...@udel.edu wrote: On 5/20/2014 12:30 PM, Chris Barker wrote: [].sort() is None True ABC.lower() is None False

Re: [Python-Dev] Language Summit Follow-Up

2014-05-30 Thread Chris Barker
On Thu, May 29, 2014 at 4:43 AM, Nick Coghlan ncogh...@gmail.com wrote: For that last point, my interest is as much educational as it is in easing the transition from Python 2. The parentheses in print('Hello world!') mean introducing the idea of function calls early to explain how it works,

Re: [Python-Dev] Moving Python 3.5 on Windows to a new compiler

2014-06-06 Thread Chris Barker
Why not just define Python 2.8 as Python 2.7 except with a newer compiler? I cannot see why that would be massive undertaking, if changing compiler for 2.7 is neccesary anyway. A reminder that this was brought up a few months ago, as a proposal by the stackless team, as they wanted to use a

Re: [Python-Dev] Criticism of execfile() removal in Python3

2014-06-16 Thread Chris Barker
On Sat, Jun 14, 2014 at 1:11 PM, Paul Sokolovsky pmis...@gmail.com wrote: 1. It hampers interactive mode - instead of short and easy to type execfile(file.py) one needs to use exec(open(file.py).read()). If the amount of typing is the problem, that's easy to solve: # do this once

Re: [Python-Dev] Criticism of execfile() removal in Python3

2014-06-17 Thread Chris Barker
On Mon, Jun 16, 2014 at 3:39 PM, Nick Coghlan ncogh...@gmail.com wrote: FWIW, when I started using python (15?) years ago -- the first thing I looked for was a way to just run a file, at the interactive prompt, like I had in MATLAB. I found and used execfile(). Yes, if people are looking

Re: [Python-Dev] sum(...) limitation

2014-08-04 Thread Chris Barker
On Sat, Aug 2, 2014 at 1:35 PM, David Wilson dw+python-...@hmmz.org wrote: Repeated list and str concatenation both have quadratic O(N**2) performance, but people frequently build up strings with + join() isn't preferable in cases where it damages readability while simultaneously

Re: [Python-Dev] sum(...) limitation

2014-08-07 Thread Chris Barker
On Mon, Aug 4, 2014 at 11:10 AM, Steven D'Aprano st...@pearwood.info wrote: On Mon, Aug 04, 2014 at 09:25:12AM -0700, Chris Barker wrote: Good point -- I was trying to make the point about .join() vs + for strings in an intro python class last year, and made the mistake of having

Re: [Python-Dev] sum(...) limitation

2014-08-08 Thread Chris Barker
On Thu, Aug 7, 2014 at 4:01 PM, Ethan Furman et...@stoneleaf.us wrote: I don't remember where, but I believe that cPython has an optimization built in for repeated string concatenation, which is probably why you aren't seeing big differences between the + and the sum(). Indeed -- clearly so.

Re: [Python-Dev] sum(...) limitation

2014-08-12 Thread Chris Barker
On Mon, Aug 11, 2014 at 11:07 PM, Stephen J. Turnbull step...@xemacs.org wrote: I'm referring to removing the unnecessary information that there's a better way to do it, and simply raising an error (as in Python 3.2, say) which is all a RealProgrammer[tm] should ever need! I can't imagine

Re: [Python-Dev] sum(...) limitation

2014-08-13 Thread Chris Barker
encouraging form core devs, so I guess that's it. Thanks for the fun bike-shedding... -Chris Chris Barker writes: On Mon, Aug 11, 2014 at 11:07 PM, Stephen J. Turnbull step...@xemacs.org wrote: I'm referring to removing the unnecessary information that there's a better

Re: [Python-Dev] Fwd: PEP 467: Minor API improvements for bytes bytearray

2014-08-18 Thread Chris Barker
On Sun, Aug 17, 2014 at 2:41 PM, Barry Warsaw ba...@python.org wrote: I think the biggest API problem is that default iteration returns integers instead of bytes. That's a real pain. what is really needed for this NOT to be a pain is a byte scalar. numpy has a scalar type for every type it

Re: [Python-Dev] Fwd: PEP 467: Minor API improvements for bytes bytearray

2014-08-18 Thread Chris Barker
On Mon, Aug 18, 2014 at 1:06 PM, Terry Reedy tjre...@udel.edu wrote: The byte scalar is an int in range(256). Bytes is an array of such. then why the complaint about iterating over bytes producing ints? Ye,s a byte owuld be pretty much teh same as an int, but it would have restrictions -

Re: [Python-Dev] Bytes path support

2014-08-20 Thread Chris Barker
but disallowing them in higher level explicitly cross platform abstractions like pathlib. I think the trick here is that posix-using folks claim that filenames are just bytes, and indeed they can be passed around with a char*, so they seem to be. but you can't possible do anything other

Re: [Python-Dev] Bytes path support

2014-08-21 Thread Chris Barker
On Wed, Aug 20, 2014 at 9:52 PM, Cameron Simpson c...@zip.com.au wrote: On 20Aug2014 16:04, Chris Barker - NOAA Federal chris.bar...@noaa.gov wrote: So really, people treat them as bytes-in-some-arbitrary-encoding-where-at-least the-slash-character-(and maybe a couple others)-is-ascii

Re: [Python-Dev] Bytes path support

2014-08-22 Thread Chris Barker
On Fri, Aug 22, 2014 at 10:09 AM, Glenn Linderman v+pyt...@g.nevcal.com wrote: What encoding does have a text file (an HTML, to be precise) with text in utf-8, ads in cp1251 (ad blocks were included from different files) and comments in koi8-r? Well, I must admit the HTML was rather an

Re: [Python-Dev] Bytes path support

2014-08-22 Thread Chris Barker
On Thu, Aug 21, 2014 at 7:42 PM, Oleg Broytman p...@phdru.name wrote: On Thu, Aug 21, 2014 at 05:30:14PM -0700, Chris Barker - NOAA Federal chris.bar...@noaa.gov wrote: This brings up the other key problem. If file names are (almost) arbitrary bytes, how do you write one to/read one from

Re: [Python-Dev] PEP 477: selected ensurepip backports for Python 2.7

2014-09-03 Thread Chris Barker
On Sun, Aug 31, 2014 at 3:00 PM, Nick Coghlan ncogh...@gmail.com wrote: However, we still think we should start providing pip by default to Python 2.7 users as well, at least as part of the Windows and Mac OS X installers. serious +1 here. Just last night I was writing up notes for an intro

Re: [Python-Dev] Python 3.4.2rc1 Mac OS X

2014-09-24 Thread Chris Barker
On Tue, Sep 23, 2014 at 10:27 AM, Ned Deily n...@acm.org wrote: Thanks for the feedback, Carol. Let us know via bugs.python.org of any issues you see. BTW, the new installer format will be coming to Python 2.7.9 as well. Are the supported platforms going to be the same? i.e.: 10.3+ --

Re: [Python-Dev] 3.5 release schedule PEP

2014-09-25 Thread Chris Barker
On Thu, Sep 25, 2014 at 9:00 AM, Donald Stufft don...@stufft.io wrote: 1) Just always default to —user and add a —system or similar flag, this is super easy to change but is a backwards incompatible change and would need to go through a deprecation window. Maybe would have been the

Re: [Python-Dev] 3.5 release schedule PEP

2014-09-26 Thread Chris Barker
On Thu, Sep 25, 2014 at 5:38 PM, Donald Stufft don...@stufft.io wrote: 2) Switch to —user based on if the user has permission to write to the site-packages or not. ouch -- no. Why not a clear error message if pip can't write to site-packages -- something like: I fairly strongly

Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition

2014-12-15 Thread Chris Barker
OK, this seems weird to me: For what it’s worth, I almost exclusively write 2/3 compatible code (and that’s with the “easy” subset of 2.6+ and either 3.2+ or 3.3+) ouch. However the way it used to work is that the newest version, with all the new features, would quickly become the

Re: [Python-Dev] New Windows installer for Python 3.5

2015-01-12 Thread Chris Barker
On Sat, Jan 10, 2015 at 3:28 AM, Nick Coghlan ncogh...@gmail.com wrote: For the time being, things like PyInstaller, PyRun, Portable Python, etc are going to offer a better solution than anything we provide in the standard installers. See also Anaconda and Enthought Canopy. I think

Re: [Python-Dev] PEP 485 review (isclose())

2015-03-02 Thread Chris Barker
, 2015, Chris Barker chris.bar...@noaa.gov wrote: On Fri, Feb 27, 2015 at 12:07 PM, Chris Barker chris.bar...@noaa.gov wrote: I'll edit the text as you suggest, Done. and then work on a patch -- I'm sure I'll have questions for Python-dev when I actually do that, but I'll get started on my

Re: [Python-Dev] PEP 485 review (isclose())

2015-03-02 Thread Chris Barker
On Fri, Feb 27, 2015 at 12:07 PM, Chris Barker chris.bar...@noaa.gov wrote: I'll edit the text as you suggest, Done. and then work on a patch -- I'm sure I'll have questions for Python-dev when I actually do that, but I'll get started on my own and see how far I get. OK -- big

Re: [Python-Dev] PEP 485 review (isclose())

2015-02-27 Thread Chris Barker
Thank you Guido. It'll be nice to see this all come to something. Thanks to all who contributed to the discussion -- despite this being a pretty simple function, I learned a lot and far more fully appreciate the nuance of all of this. I'll edit the text as you suggest, and then work on a patch

Re: [Python-Dev] PEP 485 review (isclose())

2015-03-04 Thread Chris Barker
On Tue, Mar 3, 2015 at 8:43 AM, Ethan Furman et...@stoneleaf.us wrote: On 03/03/2015 01:17 AM, Victor Stinner wrote: Maybe it's time to rename the math module to _math and create a math.py module, like _decimal/decimal? math.py should end with from _math import *. +1 What do folks

Re: [Python-Dev] PEP 485 review (isclose())

2015-03-04 Thread Chris Barker
to do it. Back to look at KR ;-) -Chris On Wed, Mar 4, 2015 at 12:23 PM, Brett Cannon br...@python.org wrote: On Wed, Mar 4, 2015 at 3:14 PM Chris Barker chris.bar...@noaa.gov wrote: On Tue, Mar 3, 2015 at 8:43 AM, Ethan Furman et...@stoneleaf.us wrote: On 03/03/2015 01:17 AM, Victor

Re: [Python-Dev] Aware datetime from naive local time Was: Status on PEP-431 Timezones

2015-04-13 Thread Chris Barker
Sorry to be brain dead here, but I'm a bit lost: On Fri, Apr 10, 2015 at 4:32 PM, Alexander Belopolsky alexander.belopol...@gmail.com wrote: For any given geographical location, loc, and a moment in time t expressed as UTC time, one can tell what time was shown on a local clock-tower. This

Re: [Python-Dev] Aware datetime from naive local time Was: Status on PEP-431 Timezones

2015-04-13 Thread Chris Barker
On Mon, Apr 13, 2015 at 10:45 AM, Alexander Belopolsky alexander.belopol...@gmail.com wrote: Am I wrong, or is this a semantic question as to what wall time means? You are right about what wall() means, but I should have been more explicit about knowns and unknowns in the wall(loc, t) = lt

Re: [Python-Dev] Aware datetime from naive local time Was: Status on PEP-431 Timezones

2015-04-13 Thread Chris Barker
On Mon, Apr 13, 2015 at 12:14 PM, Alexander Belopolsky alexander.belopol...@gmail.com wrote: utc_time = f( location, utc_time ) These are two different problems, and one is much harder than the other! (though both are ugly!) You probably meant utc_time = f( location, wall_time) in the

Re: [Python-Dev] Type hints -- a mediocre programmer's reaction

2015-04-23 Thread Chris Barker
On Wed, Apr 22, 2015 at 5:45 PM, Guido van Rossum gu...@python.org wrote: Given that even if Difference existed, and even if we had a predefined type alias for Difference[Iterable[str], str], you' still have to remember to mark up all those functions with that annotation. It almost sounds

Re: [Python-Dev] Type hints -- a mediocre programmer's reaction

2015-04-21 Thread Chris Barker
On Tue, Apr 21, 2015 at 2:33 AM, Cory Benfield c...@lukasa.co.uk wrote: It seems like the only place the type annotations will get used is in relatively trivial cases where the types are obvious anyway. I don't deny that *some* bugs will be caught, but I suspect they'll overwhelmingly be

Re: [Python-Dev] Type hints -- a mediocre programmer's reaction

2015-04-21 Thread Chris Barker
On Tue, Apr 21, 2015 at 11:58 AM, Paul Sokolovsky pmis...@gmail.com wrote: It does, and hope people won't be caught in static typechecking loop and consider other usages too. Im confused -- from the bit I've been skimming the discussion, over on python-ideas, and now here, is that this is all

Re: [Python-Dev] Type hints -- a mediocre programmer's reaction

2015-04-21 Thread Chris Barker
Thank you Jack. Jack: I hate code and I want as little of it as possible in our product I love that quote -- and I ALWAYS use it when I teach newbies Python. It's kind of the point of Python -- you can get a lot done by writing very little code. I'm still confused about what all this type

Re: [Python-Dev] Type hints -- a mediocre programmer's reaction

2015-04-22 Thread Chris Barker
Oh wait, maybe it won't -- a string IS a sequence of strings. That's why this is an insidious bug in the first place. On Tue, Apr 21, 2015 at 11:32 PM, Terry Reedy tjre...@udel.edu wrote: I was just thinking today that for this, typing needs a subtraction (difference) operation in addition

[Python-Dev] PEP 485 isclose() implementation review requested

2015-05-17 Thread Chris Barker
Folks, After a huge delay, I finally found the time to implement the PEP 485 isclose() function, in C. I tihnk it's time for some review. I appologise for the fact that I have little experience with C, and haven't used the raw C API for years, but it's a pretty simple function, and there's lots

Re: [Python-Dev] PEP 485 isclose() implementation review requested

2015-05-18 Thread Chris Barker
the docsstrings better and some more/better tests. -Chris On Sun, May 17, 2015 at 4:16 PM, Christian Heimes christ...@python.org wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 2015-05-18 01:02, Chris Barker wrote: * Is there a better way to create a False or True than

Re: [Python-Dev] Gcode path

2015-05-18 Thread Chris Barker
Lisa, As noted, not the right list. But seeing this kind of stuff done in High Schools is GREAT! So one suggestion: If this is Windows, there are two versions of python for Windows: 32bit and 64bit -- if an installer for a third-party package is looking for one of those, and the other is

Re: [Python-Dev] Computed Goto dispatch for Python 2

2015-05-28 Thread Chris Barker
On Thu, May 28, 2015 at 12:25 PM, Sturla Molden sturla.mol...@gmail.com wrote: Many Unix tools need Python, so Mac OS X (like Linux distros and FreeBSD) will always need a system Python. Yes, it would be great if could be called spython or something else than python. But the main problem is

Re: [Python-Dev] Single-file Python executables (was: Computed Goto dispatch for Python 2)

2015-05-28 Thread Chris Barker
, 2015 11:23:57 AM CDT, Chris Barker chris.bar...@noaa.gov wrote: I'm confused: Doesn't py2exe (optionally) create a single file executable? And py2app on the Mac creates an application bundle, but that is more-or-less the equivalent on OS-X (you may not even be able to have a single file

Re: [Python-Dev] Single-file Python executables (was: Computed Goto dispatch for Python 2)

2015-05-28 Thread Chris Barker
implementations. And, of course, if cPython itself could be built in a way that makes step(c) easier/less kludgy great! -Chris On Thu, May 28, 2015 at 9:54 AM, Donald Stufft don...@stufft.io wrote: On May 28, 2015 at 12:24:42 PM, Chris Barker (chris.bar...@noaa.gov) wrote: I'm confused

Re: [Python-Dev] Single-file Python executables (was: Computed Goto dispatch for Python 2)

2015-05-28 Thread Chris Barker
Getting lost as to what thread this belongs in... But another tack to take toward a single executable is Cython's embedding option: https://github.com/cython/cython/wiki/EmbeddingCython This is a quick and dirty way to create a C executable that will then run the cythonized code, all linked to

Re: [Python-Dev] [Distutils] Single-file Python executables (including case of self-sufficient package manager)

2015-05-29 Thread Chris Barker
On Fri, May 29, 2015 at 7:23 AM, Paul Sokolovsky pmis...@gmail.com wrote: An example of a product that does this is Chef, they install their own Ruby and everything but libc into /opt/chef to completely isolate themselves from the host system. this sounds a bit like what conda does --

Re: [Python-Dev] Single-file Python executables (was: Computed Goto dispatch for Python 2)

2015-05-28 Thread Chris Barker
On Thu, May 28, 2015 at 9:23 AM, Chris Barker chris.bar...@noaa.gov wrote: Barry Warsaw wrote: I do think single-file executables are an important piece to Python's long-term competitiveness. Really? It seems to me that desktop development is dying. What are the critical use-cases

Re: [Python-Dev] Single-file Python executables (was: Computed Goto dispatch for Python 2)

2015-05-28 Thread Chris Barker
I'm confused: Doesn't py2exe (optionally) create a single file executable? And py2app on the Mac creates an application bundle, but that is more-or-less the equivalent on OS-X (you may not even be able to have a single file executable that can access the Window Manager, for instance) Depending

Re: [Python-Dev] [python-committers] Reminder: Python 3.5 beta 1 will be tagged tomorrow

2015-05-24 Thread Chris Barker
On Sun, May 24, 2015 at 4:40 AM, Tal Einat talei...@gmail.com wrote: I filed http://bugs.python.org/issue24270 to track this, but there's a fair bit of work to be done to integrate the changes into the existing math module's code, tests and documentation. Done. Patch attached to the

Re: [Python-Dev] [python-committers] Reminder: Python 3.5 beta 1 will be tagged tomorrow

2015-05-24 Thread Chris Barker
On Sun, May 24, 2015 at 10:00 AM, Tal Einat talei...@gmail.com wrote: On Sun, May 24, 2015 at 6:40 PM, Chris Barker chris.bar...@noaa.gov wrote: What do folks think about adding one to cmath as well, while we are at it? It should be pretty straightforward -- I could focus what time I have

[Python-Dev] PEP 485: math.isclose()

2015-05-24 Thread Chris Barker
I don't think I have permissions to comment on the issue,so I'm posting here. If there is a way for me to post to the issue, someone let me know... In the issue (http://bugs.python.org/issue24270) Tal wrote I have a question regarding complex values. The code (from Chris Barker) doesn't support

Re: [Python-Dev] PEP 485: math.isclose()

2015-05-25 Thread Chris Barker
. need a space between each and other But it all looks good otherwise -- thanks! -Chris On Sun, May 24, 2015 at 9:53 PM, Chris Barker chris.bar...@noaa.gov wrote: I don't think I have permissions to comment on the issue,so I'm posting here. If there is a way for me to post to the issue, someone

Re: [Python-Dev] Reminder: Python 3.5 beta 1 will be tagged tomorrow

2015-05-22 Thread Chris Barker
Is it too late to get the isclose() code (PEP 485) into 3.5? I posted the code here, and got a tiny bit of review, but have not yet merged it into the source tree -- and don't know the process for getting it committed to the official source. So -- too late, or should I try to get that merge done

Re: [Python-Dev] Reminder: Python 3.5 beta 1 will be tagged tomorrow

2015-05-22 Thread Chris Barker
On Fri, May 22, 2015 at 2:33 PM, Larry Hastings la...@hastings.org wrote: On 05/22/2015 02:29 PM, Chris Barker wrote: Is it too late to get the isclose() code (PEP 485) into 3.5? ... Hopefully you can find a core dev familiar enough with the issues involved that they can (quickly

Re: [Python-Dev] Status on PEP-431 Timezones

2015-07-27 Thread Chris Barker
On Mon, Jul 27, 2015 at 11:55 AM, Terry Reedy tjre...@udel.edu wrote: I think using the word 'naive' is both inaccurate and a mistake. snip 'Naive' means simple, primitive, or deficient in informed judgement. It is easy to take it as connoting 'wrong'. In this context naive means having no

Re: [Python-Dev] Status on PEP-431 Timezones

2015-07-27 Thread Chris Barker
On Mon, Jul 27, 2015 at 12:07 PM, Chris Angelico ros...@gmail.com wrote: - A minute is exactly 60 seconds. No leap second support, presumably. Also feature? Leap seconds come in when you convert to a Calendar representation -- a minute is 60 seconds, always -- even when passing over a leap

Re: [Python-Dev] Status on PEP-431 Timezones

2015-07-27 Thread Chris Barker
On Mon, Jul 27, 2015 at 12:47 PM, Ethan Furman et...@stoneleaf.us wrote: To me, Paul's example is a datetime operation: you start with a datetime (7am today), perform arithmetic on it by adding a period of time (one day), and get a datetime as the result (7am tomorrow). Well, OK, let's

Re: [Python-Dev] Status on PEP-431 Timezones

2015-07-27 Thread Chris Barker
The only other thing I found really weird about datetime is how Python 2 had no implementation of a UTC tzinfo class, despite this being utterly trivial - Huh? it is either so trivial that there is no point -- simiply say that your datetimes are UTC, and you are done. Or it's not the least

  1   2   3   4   >