Re: Why Python is not both an interpreter and a compiler?

2015-09-02 Thread Jussi Piitulainen
Steven D'Aprano writes: > On Wed, 2 Sep 2015 02:20 am, Marko Rauhamaa wrote: >> Steven D'Aprano: >> >>> I believe that Marko is wrong. It is not so easy to compile Python >>> to machine language for real machines. That's why the compiler >>> targets a virtual machine instead. >> >> Somehow Guile

Re: Why Python is not both an interpreter and a compiler?

2015-09-02 Thread Laura Creighton
In a message of Wed, 02 Sep 2015 10:50:15 +1000, Chris Angelico writes: >And compiled C programs are notoriously hard to distribute. Can you >pick up a Guile binary and carry it to another computer? Do you have >to absolutely perfectly match the libguile version, architecture, >build settings,

[issue22758] Regression in Python 3.2 cookie parsing

2015-09-02 Thread Berker Peksag
Changes by Berker Peksag : -- stage: -> commit review ___ Python tracker ___ ___

[issue24900] Raising an exception that cannot be unpickled causes hang in ProcessPoolExecutor

2015-09-02 Thread Benedikt Reinartz
Changes by Benedikt Reinartz : -- versions: +Python 2.7, Python 3.2, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker ___

[issue7175] Define a standard location and API for configuration files

2015-09-02 Thread flying sheep
flying sheep added the comment: of course if there is a chance that some specific config file exists at a known location, it’s the only sane choice to try and look for it there iff it isn’t in its preferred location. e.g. fontconfig made that switch some time ago: it used to be ~/.fonts.conf,

[issue24979] Allow timezone offsets greater than 24 hours

2015-09-02 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +belopolsky ___ Python tracker ___ ___

[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-02 Thread STINNER Victor
STINNER Victor added the comment: Larry Hasting wrote: >> too late for 3.5.0 > How's that? Well, for example... my change broke all buildbots. I don't think that it's good idea to rush to fix Python 3.5 :-) This part of Python (handling timestamps, especially the rounding mode) is complex, I

[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 30454ef98e81 by Victor Stinner in branch 'default': Backed out changeset b690bf218702 https://hg.python.org/cpython/rev/30454ef98e81 New changeset 700303850cd7 by Victor Stinner in branch 'default': Issue #23517: Fix _PyTime_ObjectToDenominator()

[issue12006] strptime should implement %G, %V and %u directives

2015-09-02 Thread Erik Cederstrand
Erik Cederstrand added the comment: The going's a bit tough here. I've spent at least 10 times as long on this bug than it took me to work around the fact that Python doesn't support ISO week number round-trip. Python puts a smile on my face every day and I enjoy giving back where I can. But

Getting the logging level from text representation

2015-09-02 Thread Antoon Pardon
I am writing an application that will do the necessary logging. However I want the level of logging to be deciced by a value in a config file. Like the following: loglevel = WARNING But I can't find a function that does this. The reverse is possible with logging.getLevelName. The documentation

azure 1.0.0 released

2015-09-02 Thread Hugues Valois
I am glad to announce the release of the Azure SDK for Python v1.0.0. This package is available on the Python package index at http://pypi.python.org/pypi/azure. Some of the things you can do with the Microsoft Azure SDK are: - Create and deploy Linux or Windows VMs - Manage various Azure

Re: Low level file descriptors and high-level Python files

2015-09-02 Thread Laura Creighton
In a message of Tue, 01 Sep 2015 22:19:15 -, Grant Edwards writes: >On 2015-09-01, Laura Creighton wrote: > >> Don't go around closing things you don't know are open. They >> could be some other processes' thing. > >I don't understand. Closing a file descriptor that isn't

ANN Python jQuery Plugin Boilerplate generator

2015-09-02 Thread Andrea Stagi
Hi, I've finally released the jQuery Plugin Boilerplate generator used internally at Nephila, a python script to generate boilerplate code to crete a jQuery plugin. You can find the source code on Github https://github.com/nephila/jquerypluginbp To install it just type pip install

Re: execute commands as su on remote server

2015-09-02 Thread Antoon Pardon
Op 18-08-15 om 04:57 schreef harirammanohar...@gmail.com: > execute commands as su on remote server > > Postby hariram » Mon Aug 17, 2015 4:02 am > Needed: > I need to execute commands after doing su to other user on remote server(not > sudo which doesn't require password) how i can achieve this

Re: packing unpacking depends on order.

2015-09-02 Thread Terry Reedy
On 9/2/2015 6:01 AM, Antoon Pardon wrote: a = [1, 2, 3, 4, 5] b = 1 b, a[b] = a[b], b a [1, 2, 1, 4, 5] a = [1, 2, 3, 4, 5] b = 1 a[b], b = b, a[b] a [1, 1, 3, 4, 5] I think I understand how it gets these results but I'm not really happy with them. I think python should give the second

[issue24977] shutil copy to non-existant directory

2015-09-02 Thread eryksun
eryksun added the comment: Do you mean the dst path has a trailing slash, but the directory doesn't exist? shutil.copy doesn't check for a trailing slash, so it attempts to open dst as a regular file. On Linux, and probably most POSIX systems, this results in an EISDIR (is a directory) error.

[issue24979] Allow timezone offsets greater than 24 hours

2015-09-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: BTW, the specific issue that OP complains about is not a datetime issue: apparently pytz has an even tighter restriction on timezone offsets. I am going to close this as a third party issues, but those who support relaxing datetime.timezone restriction

Re: packing unpacking depends on order.

2015-09-02 Thread Mark Lawrence
On 02/09/2015 11:01, Antoon Pardon wrote: a = [1, 2, 3, 4, 5] b = 1 b, a[b] = a[b], b a [1, 2, 1, 4, 5] a = [1, 2, 3, 4, 5] b = 1 a[b], b = b, a[b] a [1, 1, 3, 4, 5] I think I understand how it gets these results but I'm not really happy with them. I think python should give the second

Re: packing unpacking depends on order.

2015-09-02 Thread Sven R. Kunze
I agree as well. First evaluate the right side, then assign it to the left side at once. On 02.09.2015 12:22, Nick Sarbicki wrote: That's interesting. I agree with you, I'd prefer the second result in both cases. But makes sense as it evaluates left to right and seems to break up the

[issue24984] document AF_BLUETOOTH socket address formats

2015-09-02 Thread Tim Tisdall
New submission from Tim Tisdall: Currently https://docs.python.org/3.6/library/socket.html#socket-families only says "Certain other address families (AF_BLUETOOTH, AF_PACKET, AF_CAN) support specific representations." and there's a comment in the docs saying "document them!"... So, I'm

Re: Using enumerate to get line-numbers with itertools grouper?

2015-09-02 Thread Mark Lawrence
On 02/09/2015 13:03, Victor Hooi wrote: How many times do people have to be asked before they stop top posting? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

[issue2786] Names in function call exception should have class names, if they're methods

2015-09-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue4322. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

Re: packing unpacking depends on order.

2015-09-02 Thread Terry Reedy
On 9/2/2015 8:26 AM, Steven D'Aprano wrote: On Wed, 2 Sep 2015 08:01 pm, Antoon Pardon wrote: a = [1, 2, 3, 4, 5] b = 1 b, a[b] = a[b], b a [1, 2, 1, 4, 5] Equivalent to: temp1 = a[b] # a[1] == 2 temp2 = b # 1 b = temp1 # b = 2 a[b] = temp2 # a[2] = 1 Or using a queue (FIFO) rather

Re: for loop over function that returns a tuple?

2015-09-02 Thread Jussi Piitulainen
Steven D'Aprano writes: > On Wed, 2 Sep 2015 09:49 pm, Victor Hooi wrote: > >> I have a function which is meant to return a tuple: >> >> def get_metrics(server_status_json, metrics_to_extract, line_number): >> >> return ((timestamp, "serverstatus", values, tags)) [- -] >>

[issue23630] support multiple hosts in create_server/start_server

2015-09-02 Thread Yury Selivanov
Yury Selivanov added the comment: Yann, I'll commit this as soon as 3.5.0 and 3.4.4 are out. -- ___ Python tracker ___

[issue24979] Allow timezone offsets greater than 24 hours

2015-09-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The timezone offset range restriction is not arbitrary. It was discussed in issue 5094 (see msg107059 and responses to it.) Nevertheless, there is an open proposal to remove all restrictions on offset values and allow it to be an arbitrary timedelta.

Re: for loop over function that returns a tuple?

2015-09-02 Thread Steven D'Aprano
On Wed, 2 Sep 2015 09:49 pm, Victor Hooi wrote: > I have a function which is meant to return a tuple: > > def get_metrics(server_status_json, metrics_to_extract, line_number): > > return ((timestamp, "serverstatus", values, tags)) > > I also have: > > def

Raymond Hettinger is now featured on ActiveState

2015-09-02 Thread Steven D'Aprano
I'm not sure how long this has been the case, but Raymond Hettinger is now featured on the ActiveState page with a link direct to his recipes. https://code.activestate.com/ Raymond has long been one of the most productive and popular recipe writers on ActiveState, with many of his recipes being

Re: Using enumerate to get line-numbers with itertools grouper?

2015-09-02 Thread Terry Reedy
On 9/2/2015 6:04 AM, Victor Hooi wrote: I'm using grouper() to iterate over a textfile in groups of lines: def grouper(iterable, n, fillvalue=None): "Collect data into fixed-length chunks or blocks" # grouper('ABCDEFG', 3, 'x') --> ABC DEF Gxx args = [iter(iterable)] * n

[issue21590] Systemtap and DTrace support

2015-09-02 Thread cburroughs
Changes by cburroughs : -- nosy: +cburroughs ___ Python tracker ___ ___

[issue13405] Add DTrace probes

2015-09-02 Thread cburroughs
Changes by cburroughs : -- nosy: +cburroughs ___ Python tracker ___ ___

[issue22241] strftime/strptime round trip fails even for UTC datetime object

2015-09-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- stage: patch review -> commit review ___ Python tracker ___

Re: Python handles globals badly.

2015-09-02 Thread Ian Kelly
On Wed, Sep 2, 2015 at 12:47 PM, wrote: > Using the keyword global inside each(!) function only > to mark the global var writeable in each of the functions > is really an over-regulation and very annoying from my point of view. To me, marking a variable as global in a large

Re: Python handles globals badly.

2015-09-02 Thread MRAB
On 2015-09-02 21:08, Sven R. Kunze wrote: On 02.09.2015 20:47, t...@freenet.de wrote: I agree with Skybuck Flying. I am aware if a var is a module function var or a module global var. If I want read or write a global var. Using the keyword global inside each(!) function only to mark the global

[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0eb8c182131e by Victor Stinner in branch 'default': Issue #23517: datetime.timedelta constructor now rounds microseconds to nearest https://hg.python.org/cpython/rev/0eb8c182131e -- ___ Python tracker

Re: packing unpacking depends on order.

2015-09-02 Thread Vladimir Ignatov
b, a[b] = a[b], b Nice. If I ever notice that kind of code in our codebase I'll 1) check file history to find out the "author" 2) ask that guy to remove it immediately :-) Vladimir http://itunes.apple.com/us/app/python-code-samples/id1025613117 --

Re: Python handles globals badly.

2015-09-02 Thread Mark Lawrence
On 02/09/2015 19:47, t...@freenet.de wrote: Even Java (type-safe language) need not such things for its static or member vars. By this comment are you stating that Python is not type safe? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our

[issue14350] Strange Exception from copying an iterator

2015-09-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Actually the tp_new field of list iterator class is NULL. Unpickler raises other error in such case (see issue24900 for example). UnpicklingError: NEWOBJ class argument has NULL tp_new Backported to 2.7 the part of the patch for issue22995 fixes this

[issue24983] Wrong AttributeError propagation

2015-09-02 Thread David Unric
David Unric added the comment: Oops, this was the strict version. The lazy method call version behaves exactly like property getter. So there is probably no implementation bug, but not too well thought out decision design, making debugging AttributeError exceptions in properties difficult

[issue24989] scan_eol() Buffer Over-read

2015-09-02 Thread John Leitch
Changes by John Leitch : Added file: http://bugs.python.org/file40327/scan_eol_Buffer_Over-read.py ___ Python tracker ___

[issue24989] scan_eol() Buffer Over-read

2015-09-02 Thread John Leitch
New submission from John Leitch: Python 3.5 suffers from a vulnerability caused by the behavior of the scan_eol() function. When called, the function gets a line from the buffer of a BytesIO object by searching for a newline character starting at the position in the buffer. However, if the

[issue24707] Assertion failed in pymonotonic_new

2015-09-02 Thread STINNER Victor
STINNER Victor added the comment: I removed the assertion. Thanks for your report! -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue24990] Foreign language support in turtle module

2015-09-02 Thread Al Sweigart
Al Sweigart added the comment: I volunteer to produce the patch. I know Bryson's "Teach Your Kids to Code" book (which features Python's turtle module) hasn't been translated to other languages yet. It would be nice to get this committed sooner rather than later. I'm open to ideas for

Re: Python handles globals badly.

2015-09-02 Thread Vladimir Ignatov
Hi, my 0.02 I don't personally use globals. And don't like "object oriented" code (my code more inclined toward "functional" style). But sometimes I feel like passing various minor values (like settings) all around app via regular parameters is just too much work. So I use "pseudo-global"

Re: Python handles globals badly.

2015-09-02 Thread Mark Lawrence
On 03/09/2015 01:16, Vladimir Ignatov wrote: Hi, my 0.02 I don't personally use globals. And don't like "object oriented" code (my code more inclined toward "functional" style). But sometimes I feel like passing various minor values (like settings) all around app via regular parameters is just

Re: packing unpacking depends on order.

2015-09-02 Thread random832
On Wed, Sep 2, 2015, at 13:26, Sven R. Kunze wrote: > I agree as well. First evaluate the right side, then assign it to the > left side at once. The behavior, if it's *not* "first evaluating the right side", is indistinguishable from it by this test. Assigning the RHS of each case to a separate

Re: KB 2670838 - The EVIL UPDATE

2015-09-02 Thread astroshed
On Saturday, 14 March 2015 02:36:01 UTC+10, David H. Lipman wrote: > > > > KB 2670838 - The EVIL UPDATE > > > < snip > > > > > GOODBYE, > > FAILURE TO DO SO PUTS YOUR SYSTEMS AT RISK ! > > > > > > Bye, > > Skybuck. > > I hope you like the taste of shoe leather. > > KB2670838 ==>

[issue18383] test_warnings modifies warnings.filters when running with "-W default"

2015-09-02 Thread STINNER Victor
STINNER Victor added the comment: > Revision c1396d28c440 looks like it may help. Possibly with the 3.5+ > assertWarns() half of the problem; I’ll have to have a closer look later. Oh, I wasn't aware of this issue. Good to know that I contributed to it :-) -- nosy: +haypo

Re: packing unpacking depends on order.

2015-09-02 Thread Steven D'Aprano
On Thu, 3 Sep 2015 04:06 am, Ian Kelly wrote: > On Wed, Sep 2, 2015 at 11:42 AM, Terry Reedy wrote: >> On 9/2/2015 6:01 AM, Antoon Pardon wrote: >>> >>> >> a = [1, 2, 3, 4, 5] >> b = 1 >> b, a[b] = a[b], b >> a >>> >>> [1, 2, 1, 4, 5] [...] > I do. I think the

Re: Python handles globals badly.

2015-09-02 Thread Steven D'Aprano
On Thu, 3 Sep 2015 04:47 am, t...@freenet.de wrote: > I agree with Skybuck Flying. > I am aware if a var is a module function var or a module global var. Congratulations! But you're not the Python compiler, which doesn't have your superior insight and intuition. Inside a function, how is the

[issue24989] scan_eol() Buffer Over-read

2015-09-02 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo, serhiy.storchaka ___ Python tracker ___

[issue24990] Foreign language support in turtle module

2015-09-02 Thread Al Sweigart
New submission from Al Sweigart: I'd like to propose adding foreign language names for the names in the turtle module. This would effectively take this code: import turtle t = turtle.Pen() t.pencolor('green') t.forward(100) ...and have this code in French be completely

Re: Python handles globals badly.

2015-09-02 Thread Mark Lawrence
On 02/09/2015 23:25, t...@freenet.de wrote: Therefore still hoping a new PEP will arise. @Mark Lawrence This response I have not checked. Can you provide arguments or clarify your statement? The over use of globals is never to be encouraged, which is precisely what this would do. You

[issue24872] Add /NODEFAULTLIB:MSVCRT to _msvccompiler

2015-09-02 Thread Christoph Gohlke
Christoph Gohlke added the comment: > Do you know where that time is being spent? The incremental linker. > I'd guess it's probably O(N**2) with the number of obj file Doesn't seem so. For example the pyrxp 2.1 package contains only 23 C files and takes minutes to link. Most packages compile

[issue24872] Add /NODEFAULTLIB:MSVCRT to _msvccompiler

2015-09-02 Thread Steve Dower
Steve Dower added the comment: It may be possible to dynamically link the Fortran library in a similar fashion, though it depends on what code the compiler generates. For Python's purposes, statically linking it probably isn't a bad idea. I'll have to check out whether the FLS limitation

.py to .html generation

2015-09-02 Thread uday3prakash
Hi friends! Can some one help me with the best module and/or its tutorial, to generate html reports for python scripts? I tried pyreport and sphc; but, i am getting errors. -- https://mail.python.org/mailman/listinfo/python-list

ANN: WordSegment 0.5.2 Released

2015-09-02 Thread Grant Jenks
Announcing the Release of WordSegment Version 0.5.2 What is WordSegment? - WordSegment is an Apache2 licensed module for English word segmentation, written in pure-Python, and based on a trillion-word corpus. Based on code from the chapter “Natural Language Corpus Data”

[issue17849] Missing size argument in readline() method for httplib's class LineAndFileWrapper

2015-09-02 Thread Cory Benfield
Cory Benfield added the comment: Martin: as noted in the comments on this issue, I believed the specific test case did not match any of the problems people were encountering: it was just the least bad way to trigger the specific flow that was being encountered. In practice for these issues

[issue24989] scan_eol() Buffer Over-read

2015-09-02 Thread Martin Panter
Martin Panter added the comment: Simpler test case, which might find a place somewhere like /Lib/test/test_memoryio.py: >>> from io import BytesIO >>> b = BytesIO() >>> b.seek(1) 1 >>> b.readlines() # Should return an empty list Segmentation fault (core dumped) [Exit 139] The patch looks

[issue24989] scan_eol() Buffer Over-read

2015-09-02 Thread John Leitch
John Leitch added the comment: We based our fix on the check in write_bytes: if (endpos > (size_t)PyBytes_GET_SIZE(self->buf)) { if (resize_buffer(self, endpos) < 0) return -1; } I see now that our casting was extraneous. As for the macro, it was suspected that

[issue24989] scan_eol() Buffer Over-read

2015-09-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka priority: normal -> high versions: +Python 3.6 ___ Python tracker

[issue17849] Missing size argument in readline() method for httplib's class LineAndFileWrapper

2015-09-02 Thread Cory Benfield
Cory Benfield added the comment: Ok, new patch now attached. -- Added file: http://bugs.python.org/file40328/readline_2.patch ___ Python tracker ___

[issue18383] test_warnings modifies warnings.filters when running with "-W default"

2015-09-02 Thread Martin Panter
Martin Panter added the comment: Okay so I take back my first proposal of restoring the filters in the test suite, which would bring us back to . Also, my second proposal of setting a flag doesn’t look so easy either. The “_warnings” C module

Hello

2015-09-02 Thread Phuong Phan
Hi Python community, I am new to Python and currently taking one online course of computer science and programming using Python. I really like Python because it is simple and clarity but powerful to me. I just joint Python mailing list and i hope to enjoy Python programming discussion with you

[issue24872] Add /NODEFAULTLIB:MSVCRT to _msvccompiler

2015-09-02 Thread Christoph Gohlke
Christoph Gohlke added the comment: I have now recompiled hundreds of Python packages and C/C++/Fortran libraries with the `/MT /GL /LTCG /NODEFAULTLIB:libucrt.lib ucrt.lib` flags. Many packages test OK, only few crashes. Some more findings: The /MT flag forces to also statically link the

[issue24988] IDLE: debugger context menus not working on Mac

2015-09-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Ned, can you check this Idle-Mac patch? I presume the same code is used elsewhere. It might be nice to encapsulate it sometime, though I am not sure where to put a context-bind function. -- nosy: +ned.deily stage: -> patch review

Re: packing unpacking depends on order.

2015-09-02 Thread Ian Kelly
On Sep 2, 2015 7:51 PM, "Steven D'Aprano" wrote: > > What's the alternative? I asked this question earlier, and got no answer -- > apparently at least three people prefer behaviour that they cannot explain > how to get the results they want :-) > > As far as I am concerned,

[issue21192] Idle: Print filename when running a file from editor

2015-09-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Larry, please pull @restart.diff into 3.5.0. I have already applied it to 2.7, 3.4, 3.5.1, and 3.6, so I will null merge from 3.5.0 into 3.5.1 and 3.6. Reason. Aside from Raymond's request above, I was reminded about a week ago that a) when Idle runs in one

[issue24913] deque.index() overruns deque boundary

2015-09-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks Brett :-) -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue24988] IDLE: debugger context menus not working on Mac

2015-09-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: 'Goto source line' works on Win7. Show stackframe does not do anything that I can see, and seems perhaps redundant. -- ___ Python tracker

[issue24872] Add /NODEFAULTLIB:MSVCRT to _msvccompiler

2015-09-02 Thread Steve Dower
Steve Dower added the comment: The FLS limit is definitely still there, and it still seems to be 127, which would explain the issues. Best fix I have for this is to build with /MD and force vcruntimeXXX.dll to always be copied alongside builds. That will solve the installation issue and the

[issue24974] ICC on Windows 8.1: _decimal fails to compile with default fp model

2015-09-02 Thread Zachary Ware
Zachary Ware added the comment: As far as I can tell, this patch fixes the issue and doesn't break anything. Independent verification of that assertion would be lovely :) For the record, I was able to reproduce the issue on one of the Windows Server 2012 R2 machines after installing ICC

[issue17849] Missing size argument in readline() method for httplib's class LineAndFileWrapper

2015-09-02 Thread Martin Panter
Martin Panter added the comment: I still don’t think the test case is a reasonable example. According to , HTTP 0.9 only supported GET, not CONNECT, and doesn’t include any header fields in the protocol (such as your X-Foo: bar). It would

[issue21192] Idle: Print filename when running a file from editor

2015-09-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 69ea73015132 by Terry Jan Reedy in branch '2.7': Issue #21192: Change 'RUN' back to 'RESTART' when running editor file. https://hg.python.org/cpython/rev/69ea73015132 New changeset 130a3edcac1d by Terry Jan Reedy in branch '3.4': Issue #21192:

ANN: psutil 3.2.0 released

2015-09-02 Thread Giampaolo Rodola'
Hello all, I'm glad to announce the release of psutil 3.2.0: https://github.com/giampaolo/psutil/ About = psutil (python system and process utilities) is a cross-platform library for retrieving information on running processes and system utilization (CPU, memory, disks, network) in Python.

[issue24912] The type of cached objects is mutable

2015-09-02 Thread Nick Coghlan
Nick Coghlan added the comment: I've reviewed the patch, and it looks good to me. Key additions: * truly immutable types (instances of which may be cached) are now explicitly checked in the test suite to ensure they don't support __class__ assignment, even to a subclass * the check for

Re: packing unpacking depends on order.

2015-09-02 Thread Ian Kelly
On Wed, Sep 2, 2015 at 11:42 AM, Terry Reedy wrote: > On 9/2/2015 6:01 AM, Antoon Pardon wrote: >> >> > a = [1, 2, 3, 4, 5] > b = 1 > b, a[b] = a[b], b > a >> >> [1, 2, 1, 4, 5] > > a = [1, 2, 3, 4, 5] > b = 1 > a[b], b = b, a[b] > a >> >> [1,

[issue24983] Wrong AttributeError propagation

2015-09-02 Thread David Unric
David Unric added the comment: This looks a bit inconsistent. See following version with "manual" getter definition: class MyClass(object): def __init__(self, *args, **kwargs): # setting access to getter by attribute # without use of property decorator

Re: error

2015-09-02 Thread Laura Creighton
>import numpy as np > >import netCDF4 > >f = netCDF4.Dataset('uwnd.mon.ltm.nc','r') > > >f.variables > > >and I had the message: > > >netcdf4.py >Traceback (most recent call last): >File "", line 1, in >NameError: name 'netcdf4' is not defined You have a file called netcdf4.py It contains

Re: error

2015-09-02 Thread Nick Sarbicki
Where are you running the code from? The interactive prompt? (E.g. idle, or after you type "python" at the terminal) or from the terminal? (as in by typing "python p2.py" at the terminal). It looks like you're trying to load a file while in the interactive prompt which won't work that way (it

[issue24975] Python 3.5 can't compile AST involving PEP 448 unpacking

2015-09-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset e9df8543d7bc by Yury Selivanov in branch '3.5': Issue #24975: Fix AST compilation for PEP 448 syntax. https://hg.python.org/cpython/rev/e9df8543d7bc New changeset ea79be5b201e by Yury Selivanov in branch '3.5': Merge 3.5 heads (issue #24975)

[issue24985] Python install test fails - OpenSSL - "dh key too small"

2015-09-02 Thread John Nagle
New submission from John Nagle: Installing Python 3.4.3 on a new CentOS Linux release 7.1.1503 server. Started with source tarball, did usual ./configure; make; make test SSL test fails with "dh key too small". See below. OpenSSL has recently been modified to reject short keys, due to a

[issue23639] Not documented special names

2015-09-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Clarify documentation of __getinitargs__, __self__ on built-in functions is not as documented ___ Python tracker

Re: Python handles globals badly.

2015-09-02 Thread tdev
I agree with Skybuck Flying. I am aware if a var is a module function var or a module global var. If I want read or write a global var. Using the keyword global inside each(!) function only to mark the global var writeable in each of the functions is really an over-regulation and very annoying

[issue14776] Add SystemTap static markers

2015-09-02 Thread cburroughs
Changes by cburroughs : -- nosy: +cburroughs ___ Python tracker ___ ___

[issue4111] Add Systemtap/DTrace probes

2015-09-02 Thread cburroughs
Changes by cburroughs : -- nosy: +cburroughs ___ Python tracker ___ ___

[issue24975] Python 3.5 can't compile AST involving PEP 448 unpacking

2015-09-02 Thread Larry Hastings
Larry Hastings added the comment: Merged. Please forward-merge to 3.5.1 and 3.6, thanks! -- ___ Python tracker ___

[issue24986] It should be possible to build successfully without external libraries

2015-09-02 Thread Zachary Ware
Zachary Ware added the comment: This also changes the behavior of the '-e' flag on build.bat a bit, leaving off '-e' means there will be no attempt to build the modules that require external sources even if the sources are already there. Adding '-e' means building those modules will be

[issue23406] interning and list comprehension leads to unexpected behavior

2015-09-02 Thread Matheus Vieira Portela
Matheus Vieira Portela added the comment: I'm attaching a patch to update the stdtypes.rst documentation according to our discussion. I've replaced the table explanation to "equivalent to adding s to itself n times" and added a link to the FAQ entry. I'm not sure, however, where to put the

[issue22699] cross-compilation of Python3.4

2015-09-02 Thread William Scullin
Changes by William Scullin : -- type: resource usage -> compile error ___ Python tracker ___

[issue24975] Python 3.5 can't compile AST involving PEP 448 unpacking

2015-09-02 Thread Yury Selivanov
Yury Selivanov added the comment: Thanks Nick and Larry for code reviews and merge! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

dxfwrite spline problem

2015-09-02 Thread amka1791
Hi everyone, I need to do splines in a dxf file with a script, so I use python dxfwrite : It seems that it is the best thing that exists... But impossible to be sure. But I have a problem with : when I run this sample script : --- #!/usr/bin/python from dxfwrite

[issue24913] deque.index() overruns deque boundary

2015-09-02 Thread Larry Hastings
Larry Hastings added the comment: Assigning to Brett, who has agreed to do the merge to 3.5.0 that Raymond has declined to do. -- assignee: larry -> brett.cannon nosy: +brett.cannon ___ Python tracker

Atomic file save -- code review and comments requested

2015-09-02 Thread Steven D'Aprano
Howdy, I have a utility function for performing atomic file saves, and I'd like to ask for a code review and comments. I have published this on ActiveState: https://code.activestate.com/recipes/579097-safely-and-atomically-write-to-a-file/ under an MIT licence. You should read the version

Re: Python handles globals badly.

2015-09-02 Thread Emile van Sebille
On 9/2/2015 11:47 AM, t...@freenet.de wrote: I therefore would like to see a PEP which allows also writing global module vars inside module functions without the need for explicit setting the keyword "global" in more or less each(!) module function as the first line of code. If you're feeling

Re: Python handles globals badly.

2015-09-02 Thread tdev
And to clarify: I have not spoken about sharing constants global (spanning over modules), where the solution provided here using imports is the solution. I have spoken from module vars which are named or are "globals" and its read/write access constraints inside module functions. So even the

Re: packing unpacking depends on order.

2015-09-02 Thread Sven R. Kunze
On 02.09.2015 19:42, Terry Reedy wrote: On 9/2/2015 6:01 AM, Antoon Pardon wrote: a = [1, 2, 3, 4, 5] b = 1 b, a[b] = a[b], b a [1, 2, 1, 4, 5] a = [1, 2, 3, 4, 5] b = 1 a[b], b = b, a[b] a [1, 1, 3, 4, 5] I think I understand how it gets these results but I'm not really happy with them.

[issue23965] test_ssl failure on Fedora 22

2015-09-02 Thread STINNER Victor
STINNER Victor added the comment: test_ssl is still failing on Fedora 22. I updated Nick's patch (I worked on the default branch). With the patch, test_ssl pass. I didn't try it on other platforms. -- nosy: +haypo Added file:

[issue23965] test_ssl failure on Fedora 22

2015-09-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: As I already said, patch looks fine assuming you've checked it doesn't break mainstream platforms :) -- ___ Python tracker

error

2015-09-02 Thread jorge . conrado
Hi, I have a Python version: Python 2.7.8 I'm runing it on: Fedora release 21 Yesterday I a sent a question: I'm starting in the Python scripts. I run this script: import numpy as np import netCDF4 f = netCDF4.Dataset('uwnd.mon.ltm.nc','r') f.variables and I had the message:

  1   2   >