On Fri, 26 Jun 2015 02:34 pm, Tommy C wrote:
Hi there, I have a number of questions related to the Pandas exercises
found from the book, Python for Data Analysis by Wes McKinney.
Particularly, these exercises are from Chapter 6 of the book. It'd be much
appreciated if you could answer the
Wheelhouse is a utility to help maintain a wheelhouse.
The code for this project is rather basic, but it's the concept that
counts. Putting the
concept of a wheelhouse into practice has made managing dependencies for
our projects across dev,
testing and production environments much, much
On 06/25/2015 06:07 PM, fl wrote:
Hi,
I read Ned's tutorial on Python. It is very interesting. On its last
example, I cannot understand the '_' in:
board=[[0]*8 for _ in range(8)]
I know '_' is the precious answer, but it is still unclear what it is
in the above line. Can you explain it
On Thu, Jun 25, 2015 at 06:07:30PM -0700, fl wrote:
Hi,
I read Ned's tutorial on Python. It is very interesting. On its last
example, I cannot understand the '_' in:
board=[[0]*8 for _ in range(8)]
I know '_' is the precious answer, but it is still unclear what it is
in the above line.
Nick Coghlan added the comment:
+1 for deferring to 3.6 (version field adjusted accordingly)
One nice aspect of marking private APIs by convention rather than having them
enforced by the compiler is that the folks that *really* need them can ignore
our recommendation and accept the fact they
On Thu, 25 Jun 2015 11:39:53 -0700, kbtyo wrote:
My question can be found here:
http://stackoverflow.com/questions/31058100/enumerate-column-headers-in-
csv-that-belong-to-the-same-tag-key-in-python
I suggest you look on stack overflow for the answer.
You appear to have failed to comprehend
Nick Coghlan added the comment:
As per the discussion on issue 24510, we can wait until 3.6 to decide the
details of a public C level API for the PEP 492 machinery.
--
versions: -Python 3.5
___
Python tracker rep...@bugs.python.org
Changes by testbpo g5881...@trbvm.com:
Added file: http://bugs.python.org/file39819/issue18958-2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2771
___
On Fri, Jun 26, 2015 at 9:16 PM, Chris Warrick kwpol...@gmail.com wrote:
Project website: http://pyswitch.sf.net
Download Page: http://pyswitch.sourceforge.net/pages/download.html
You are not going to get a lot of downloads with that. SourceForge
spreads malware, and lots of people avoid them
Stefan Krah added the comment:
I'm saying that decimal has already been tested against the
most recent test cases. For (non-technical) reasons that I
don't want to go into right now, I'd prefer to postpone the
update though.
--
resolution: - later
status: open - closed
Rusi added the comment:
On Fri, Jun 26, 2015 at 4:29 PM, Stefan Krah rep...@bugs.python.org wrote:
Stefan Krah added the comment:
For libmpdec (and thus _decimal) I've always used the latest version
of dectest.zip. Upgrading decimaltestdata/* will not make any difference.
Not sure Stefan
Dingyuan Wang added the comment:
I mean the patch only restores tabs in indentation. The reports above should be
corrected.
Tabs between tokens and other race conditions can't be restored exactly
providing the token stream. This won't affect the syntax. I wonder if it's also
a bug or a
Changes by testbpo g5881...@trbvm.com:
Added file: http://bugs.python.org/file39817/testtestpatch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2771
___
On Fri, Jun 26, 2015 at 9:38 PM, Steven D'Aprano st...@pearwood.info wrote:
With respect Randall, you contradict yourself. Is there any wonder that some
of us (well, me at least) is suspicious and confused, when your story
changes as often as the weather?
Sometimes you say that the client
On 2015-06-26 18:12, georgeryo...@gmail.com wrote:
[python 2.7, linux]
I have a python app. I cannot modify the file. But I can import it and mess
with it. I need to perform brief tasks before and after some of the member
functions.
I'd like to do this in as clear and maintainable way as
Changes by Serhiy Storchaka storch...@gmail.com:
--
versions: +Python 2.7, Python 3.4, Python 3.6
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19176
___
On Thu, 25 Jun 2015 14:37:55 +0100, Tim Golden wrote:
On 25/06/2015 14:35, Michael Torrie wrote:
On 06/25/2015 06:34 AM, Tim Golden wrote:
On 25/06/2015 13:04, Joonas Liik wrote:
It sounds to me more like it is possible to use long file names on
windows but it is a pain and in python, on
Serhiy Storchaka added the comment:
Updated patch addresses Martin's comments.
--
versions: +Python 3.6
Added file:
http://bugs.python.org/file39821/UserDict_self_and_dict_keywords_3.patch
___
Python tracker rep...@bugs.python.org
[python 2.7, linux]
I have a python app. I cannot modify the file. But I can import it and mess
with it. I need to perform brief tasks before and after some of the member
functions.
I'd like to do this in as clear and maintainable way as possible (no third
party imports). Here's what I
snip
import os import shutil import sys
# create an insanely long directory tree p = os.getenv(TEMP)
#p = ur\\server\share\blah\temp
tmpdir = p os.chdir(tmpdir)
for i in xrange(1000):
tmpdir = os.path.join(tmpdir, sub) os.mkdir(?\\ + tmpdir)
#os.mkdir(u?\\UNC +
On Fri, 26 Jun 2015 11:01 am, Ian Kelly wrote:
You're making the same mistake that Steven did in misunderstanding the
threat model.
I don't think I'm misunderstanding the threat, I think I'm pointing out a
threat which the OP is hoping to just ignore.
In an earlier post, I suggested that the
On 06/23/2015 10:53 AM, Laurent Pointal wrote:
Mark Lawrence wrote:
Another beasty I've just stumbled across which you may find interesting
http://www.sciencedirect.com/science/article/pii/S2213133714000687
Why use a JIT complation when you could use some C++ generation then
compilation
georgeryo...@gmail.com wrote:
[python 2.7, linux]
I have a python app. I cannot modify the file. But I can import it and
mess with it. I need to perform brief tasks before and after some of the
member functions.
I'd like to do this in as clear and maintainable way as possible (no third
Serhiy Storchaka added the comment:
Here is a patch that also fixes other issues with doctype.
1) Direct call of doctype() issues a warning.
2) Parser's doctype() is not called if target's doctype() is called.
--
Added file: http://bugs.python.org/file39820/inherit-doctype.v3.patch
Terry J. Reedy added the comment:
The test suite must lack, and therefore needs, a simple testcase as in test.py.
In 3.4 and 3.5, getsource() joins the list of lines returned by
getsourcelines(). In both versions, getsourcelines uses findsource(), which
seems to be unchanged. In 3.5, the
Terry J. Reedy added the comment:
I strongly suspect that ac86e5b2d45b is the cause of the regression reported in
#24485.
def outer():
def inner():
inner1
from inspect import getsource
print(getsource(outer))
omits the body of inner. Ditto if outer is a method. All is okay if
Terry J. Reedy added the comment:
I agree that the tuple explanation if ok. But Return whether an object is an
instance of a class or of a subclass thereof. (3.5) seems wrong. I believe
'subclass' should be 'superclass'.
class C: pass
class Csub(C): pass
isinstance(C(), Csub)
False
On 2015-06-26, Johannes Bauer dfnsonfsdu...@gmx.de wrote:
On 26.06.2015 22:09, Randall Smith wrote:
You've gone on a rampage about nothing. My original description said
the client was supposed to encrypt the data, but you want to assume the
opposite for some unknown reason.
While you seem
On 06/26/2015 12:06 PM, Steven D'Aprano wrote:
On Fri, 26 Jun 2015 11:01 am, Ian Kelly wrote:
You're making the same mistake that Steven did in misunderstanding the
threat model.
I don't think I'm misunderstanding the threat, I think I'm pointing out a
threat which the OP is hoping to just
Terry J. Reedy added the comment:
I view having a string __name__ attribute as part of quacking like a module (or
class or function). Hence pseudonames like 'lambda' (lambda expression) or
pyshell#n (the module name for interactive input, where n is the line
number). Is there a good reason
Changes by Terry J. Reedy tjre...@udel.edu:
--
components: +Demos and Tools
stage: - needs patch
title: Shoudl ptags and eptags be removed from repo? - Should ptags and eptags
be removed from repo?
type: - enhancement
versions: +Python 3.6
___
Changes by Terry J. Reedy tjre...@udel.edu:
--
stage: - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24492
___
___
Python-bugs-list
On 26.06.2015 22:09, Randall Smith wrote:
You've gone on a rampage about nothing. My original description said
the client was supposed to encrypt the data, but you want to assume the
opposite for some unknown reason.
While you seem to think that Steven is rampaging about nothing, he does
On 26.06.2015 22:09, Randall Smith wrote:
And that's why we're having this discussion. Do you know of an attack
in which you can control the output (say at least 100 consecutive bytes)
for data which goes through a 256 byte translation table, chosen
randomly from 256! permutations after the
R. David Murray added the comment:
Because there's a different issue for making strftime system independent, issue
3173.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20281
___
Terry J. Reedy added the comment:
I verified (Win7, but should be irrelevant) that test.py works on 2.7.10 and
3.4.3. The failure in 3.5.0b2 is omitting the body of inner. Add another line
to inner and both are omitted, so 'body' seems correct Add another line to
outer, and nothing is
R. David Murray added the comment:
Yes, but the Microsoft C runtime doesn't use that interface, and it is
currently the C runtime that we use to implement strftime. This could change,
but that's an enhancement. See issue 3173 for example.
--
___
New submission from dendory:
Using `%z` gives the same result as using `%Z` in `time.strftime()`:
Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32
bit (Intel)] on win32
Type help, copyright, credits or license for more information.
import time
R. David Murray added the comment:
That's a platform peculiarity. See issue 20281.
--
nosy: +r.david.murray
resolution: - duplicate
stage: - resolved
status: open - closed
superseder: - time.strftime %z format specifier is the same as %Z
___
dendory added the comment:
Uh? But that's completely besides the point. Windows provides timezone offset
information in a different way than Linux does (through the Registry) but it's
still available. It's trivial to do in .NET for example:
dendory added the comment:
Why is the focus on documentation entries when the real work should be on
trying to make this function to work on all platforms?
I understand that Windows's implementation of strftime() defines %z and %Z to
return the same thing, but timezone information is still
New submission from Luc Saffre:
The docstring of built-in function 'isinstance' should explain that if the
classinfo is a tuple, the object must be instance of *any* (not *all*) of the
class objects.
--
assignee: docs@python
components: Documentation
messages: 245841
nosy: Luc Saffre,
Zahari Dim added the comment:
Well, the simple minded example I posted has so many bugs (many of which I
don't understand, for example why it destroys the stdout of an interpreter
permanently) that I really think this feature is necessary.
--
___
Steven D'Aprano added the comment:
It already does:
The form using a tuple, isinstance(x, (A, B, ...)), is a shortcut
for isinstance(x, A) or isinstance(x, B) or ... (etc.).
If it were all, it would use and, not or.
I don't think any change is needed. Do you have a suggestion for new wording?
Lars Gustäbel added the comment:
The problem is that the tar archive has empty uid and gid fields, i.e. 7 spaces
terminated with a null-byte.
I attached a patch that solves the problem.
--
keywords: +patch
Added file: http://bugs.python.org/file39815/issue24514.diff
Philippe added the comment:
lars: you are my hero! you rock. I picture you being able to read through tar
binary headers while you sleep. I am in awe.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24514
Lars Gustäbel added the comment:
You're welcome :-D
--
assignee: - lars.gustaebel
priority: normal - low
stage: - patch review
type: - behavior
versions: +Python 3.5, Python 3.6
___
Python tracker rep...@bugs.python.org
Philippe added the comment:
I verified that the patch issue24514.diff (adding .rstrip() ) works also on
Python 2.7. I verified it also works on Python 3.4
I ran it on 2.7 against a fairly large test suite of tar files without problems.
This is a +1 for me.
Lars: Do you think you could apply
On 06/26/2015 05:42 PM, Johannes Bauer wrote:
On 26.06.2015 23:29, Jon Ribbens wrote:
While you seem to think that Steven is rampaging about nothing, he does
have a fair point: You consistently were vague about wheter you want to
have encryption, authentication or obfuscation of data. This
Changes by Martin Panter vadmium...@gmail.com:
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24516
___
___
Python-bugs-list
On Sat, Jun 27, 2015 at 6:09 AM, Randall Smith rand...@tnr.cc wrote:
Give me one plausible scenario where an attacker can cause malware to hit
the disk after bytearray.translate with a 256 byte translation table and
I'll be thankful to you.
The entire 256-byte translation table is significant
Meador Inge added the comment:
I think that the only way we can solve this is to revert the patch for this
issue.
I agree with this. It seems like doing this analysis at the bytecode level is
the
wrong approach. Perhaps the syntactical analysis being used before should be
beefed
up to
Terry J. Reedy added the comment:
Right. Close this unless something else is offered.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24515
___
On 06/26/2015 04:55 PM, Mark Lawrence wrote:
To be perfectly blunt I gave up days ago trying to follow what was being
said, just too many words from all angles and too few diagrams for me to
follow. I sincerely hope it doesn't end in tears.
Mark.
There's not much to follow. The solution
On 06/26/2015 04:07 PM, Johannes Bauer wrote:
You consistently were vague about wheter you want to
have encryption, authentication or obfuscation of data.
I knew (possibly extra) encryption wasn't necessary at this stage, but I
also knew that encryption would provide good obfuscation.
On 2015-06-26, Johannes Bauer dfnsonfsdu...@gmx.de wrote:
On 26.06.2015 23:29, Jon Ribbens wrote:
While you seem to think that Steven is rampaging about nothing, he does
have a fair point: You consistently were vague about wheter you want to
have encryption, authentication or obfuscation of
Steven D'Aprano added the comment:
On Fri, Jun 26, 2015 at 09:20:18PM +, Terry J. Reedy wrote:
I agree that the tuple explanation if ok. But Return whether an
object is an instance of a class or of a subclass thereof. (3.5)
seems wrong. I believe 'subclass' should be 'superclass'.
Yury Selivanov added the comment:
Here's an update on #24485 regression.
Looks like getsource() is now using code objects instead of tokenizer to
determine blocks first/last lines.
The problem with this particular case is that inner function's code object is
completely independent from
Yury Selivanov added the comment:
Thanks, Terry. I posted some findings to #21217.
--
nosy: +ncoghlan, pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24485
___
On 26.06.2015 23:29, Jon Ribbens wrote:
While you seem to think that Steven is rampaging about nothing, he does
have a fair point: You consistently were vague about wheter you want to
have encryption, authentication or obfuscation of data. This suggests
that you may not be so sure yourself
On 26/06/2015 22:29, Jon Ribbens wrote:
On 2015-06-26, Johannes Bauer dfnsonfsdu...@gmx.de wrote:
On 26.06.2015 22:09, Randall Smith wrote:
You've gone on a rampage about nothing. My original description said
the client was supposed to encrypt the data, but you want to assume the
opposite for
On Fri, Jun 26, 2015 at 3:07 PM, Johannes Bauer dfnsonfsdu...@gmx.de wrote:
That people in 2015 actually defend inventing a substitution-cipher
cryptosystem sends literally shivers down my spine.
I think that the people defending this have been reasonably consistent
about using the word
Greetings!
You been Invited as a Beta User for TheGongzuo.com ( Absolutely Extended Trial).
We bring to you TheGongzuo.com, Top notch highly talented IT (Information
Technology / Software Industry) skilled Professional Candidates, where you can
find more than a resume.
New submission from Catherine Devlin:
Right now, json.dumps can be called with True or False, but it would be easy to
also support accepting a key function, which then could be used to control the
order of keys arbitrarily in the serialized JSON output.
--
components: Library (Lib)
Johannes, I agree with a lot of what you say, but can you please have
less of a mean attitude?
-- Devin
On Fri, Jun 26, 2015 at 3:42 PM, Johannes Bauer dfnsonfsdu...@gmx.de wrote:
On 26.06.2015 23:29, Jon Ribbens wrote:
While you seem to think that Steven is rampaging about nothing, he does
Philippe added the comment:
Note: the traceback above are from calling taropen on the gunzipped tar.gz
The error are similar but a tar less informative when using the tgz and open.
--
___
Python tracker rep...@bugs.python.org
Changes by Serhiy Storchaka storch...@gmail.com:
--
stage: - needs patch
versions: +Python 3.4, Python 3.5, Python 3.6
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24456
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
stage: - needs patch
versions: +Python 3.4, Python 3.5, Python 3.6
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24457
___
New submission from Philippe:
The extraction fails when calling tarfile.open using this archive:
http://archive.apache.org/dist/commons/logging/source/commons-logging-1.1.2-src.tar.gz
After some investigation, the file can be extracted with gnu tar and bsdtar and
the gzip compression is not
Yury Selivanov added the comment:
Left some feedback in the code review.
--
nosy: +yselivanov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22609
___
On Sat, 27 Jun 2015 06:09 am, Randall Smith wrote:
On 06/26/2015 12:06 PM, Steven D'Aprano wrote:
On Fri, 26 Jun 2015 11:01 am, Ian Kelly wrote:
You're making the same mistake that Steven did in misunderstanding the
threat model.
I don't think I'm misunderstanding the threat, I think I'm
On Fri, Jun 26, 2015 at 8:38 PM, Steven D'Aprano st...@pearwood.info wrote:
Now you say that the application encrypts the data, except that the user can
turn that option off.
Just make the AES encryption mandatory, not optional. Then the user cannot
upload unencrypted malicious data, and the
On Friday, June 26, 2015 at 9:30:38 AM UTC+5:30, Chris Angelico wrote:
Incidentally, I would suggest not having the try/except at all, since
all it does is print an error and terminate (which is the same result
you'd get if that error bubbled all the way to top level). But if you
are going to
Changes by Martin Panter vadmium...@gmail.com:
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24449
___
___
Python-bugs-list
On Sat, Jun 27, 2015 at 2:11 PM, Rustom Mody rustompm...@gmail.com wrote:
On Friday, June 26, 2015 at 9:30:38 AM UTC+5:30, Chris Angelico wrote:
Incidentally, I would suggest not having the try/except at all, since
all it does is print an error and terminate (which is the same result
you'd get
On 27.06.2015 02:55, Randall Smith wrote:
No the attacker does not have access to the ciphertext. What would lead
you to think they did?
Years of practical experience in the field of applied cryptography.
Knowledge of how side channels work and how easily they can be
constructed for bad
New submission from Petr Messner:
Please, is it possible to put more information about the purpose parameter to
the documentation of ssl.create_default_context()? It's not obvious that
SERVER_AUTH should be used for client sockets and not server sockets. It took
me a while to discover this,
Stefan Krah added the comment:
For libmpdec (and thus _decimal) I've always used the latest version
of dectest.zip. Upgrading decimaltestdata/* will not make any difference.
--
nosy: +skrah
___
Python tracker rep...@bugs.python.org
Christian Heimes added the comment:
Python uses serverAuth and clientAuth in the exact same meaning as EKU
(extended key usage). In order to create X.509 cert for a web server, it should
have EKU SSL/TLS Web Server Authentication. On the other hand a client must
validate the cert for a
On 2015-06-26, Chris Angelico ros...@gmail.com wrote:
On Fri, Jun 26, 2015 at 1:26 AM, Jon Ribbens
jon+use...@unequivocal.co.uk wrote:
Well, it means you need to send 256 times as much data, which is a
start. If you're instead using a 256-byte translation table then
an attack becomes utterly
Lars Gustäbel added the comment:
Yes, Python 2.7 still gets bugfixes.
However, there's still some work to do on the patch (maybe clean the code,
write a test, add a NEWS entry).
--
___
Python tracker rep...@bugs.python.org
On 26 June 2015 at 04:42, Godson Gera godso...@gmail.com wrote:
=
pyswitch 0.2
=
PySWITCH 0.2 is released
Please, note that PySWITCH 0.2 is not available on PyPI because of name
conflict
This is not a good idea. You should just change your name, or upload
under a
Serhiy Storchaka added the comment:
Here is a patch that checks the state and raises ValueError if integer values
out of range.
--
keywords: +patch
Added file: http://bugs.python.org/file39816/audioop_adpcm_range_check.patch
___
Python tracker
Serhiy Storchaka added the comment:
The patch for issue24456 fixes this issue.
--
resolution: - duplicate
stage: needs patch - resolved
status: open - closed
superseder: - audioop.adpcm2lin Buffer Over-read
___
Python tracker rep...@bugs.python.org
84 matches
Mail list logo