The close method is defined and flushing and closing a file, so
it should not return until that's done.
What command are you using to create the temp file?
re command to write the file:
f=open(fn,'w')
... then create HTML text in a string
f.write(html)
f.close
--
I would consider the chance that the disk may be faulty, or the file
system is corrupt. Does the problem go away if you write to a different
file system or a different disk?
It's a relatively new MacBook Pro with a solid state disk. I've not noticed
any other disk problems. I did a
Or that the filesystem may be full? Of course, that's usually obvious
more widely when it happens...
Question: is the size of the incomplete file a round number? (Like
a multiple of a decent sized power of 2)
Also on what OS X file system type does the file being
The file system is Mac OS Extended Journaled (default as out of the box).
I ran a repair disk .. .while it found and fixed what it called minor
problems, it did something. However, the repair did not fix the problem. I
just ran the program again and the source is 47,970 bytes and target
On Fri, Apr 12, 2013 at 11:57 AM, Mark Janssen
dreamingforw...@gmail.com wrote:
Further, I will admit that I am not deeply
experienced in application or Internet programming
Would you listen to someone who is, by his own admission, not
experienced as a surgeon, and tries to tell you that your
On Thu, Apr 11, 2013 at 9:23 AM, Ethan Furman et...@stoneleaf.us wrote:
On 04/11/2013 04:13 AM, Sven wrote:
Yes, I had the idea to add bluetooth too, removes the whole plugging and
unplugging spiel. I might start work on that,
and if anyone else wants to dive in and help, feel free. I will
On Fri, Apr 12, 2013 at 4:25 PM, Rob Schneider rmsc...@gmail.com wrote:
The close method is defined and flushing and closing a file, so
it should not return until that's done.
What command are you using to create the temp file?
re command to write the file:
f=open(fn,'w')
... then
In article 6eeabeb2-e6dd-49fc-bd64-8de539651...@googlegroups.com,
Rob Schneider rmsc...@gmail.com wrote:
The file system is Mac OS Extended Journaled (default as out of the box).
It shows file size 45,056 on both source and target, which is the file size
of the flawed target, and is not what
Am 11.04.2013 10:19, schrieb Steven D'Aprano:
if sys.version = '3':
Use sys.version_info = (3,), otherwise your code breaks when upgrading
to Python 10 and greater. ;^)
The second question that came up was if there is a way to keep a
metaclass defined inside the class or if the only way
On 11Apr2013 23:32, Rob Schneider rmsc...@gmail.com wrote:
| Question: is the size of the incomplete file a round number? (Like
| a multiple of a decent sized power of 2)
[...]
| Source (correct one) is 47,970 bytes. Target after copy of 45,056
| bytes. I've tried changing what gets written
On Friday, 12 April 2013 09:26:21 UTC+1, Cameron Simpson wrote:
| Question: is the size of the incomplete file a round number? (Like
| a multiple of a decent sized power of 2)
[...]
| Source (correct one) is 47,970 bytes. Target after copy of 45,056
| bytes. I've tried
On Fri, Apr 12, 2013 at 7:18 PM, Rob Schneider rmsc...@gmail.com wrote:
f.close
Yep, there's the problem! See my previous post for details. Change this to:
f.close()
and you should be sorted.
ChrisA
--
http://mail.python.org/mailman/listinfo/python-list
On 12/04/2013 02:57, Mark Janssen wrote:
[dross snipped]
A summary here http://pinterest.com/pin/464293042804330899/
--
If you're using GoogleCrap™ please read this
http://wiki.python.org/moin/GoogleGroupsPython.
Mark Lawrence
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, Apr 12, 2013 at 6:16 AM, Ian Kelly ian.g.ke...@gmail.com wrote:
On Thu, Apr 11, 2013 at 9:23 AM, Ethan Furman et...@stoneleaf.us wrote:
On 04/11/2013 04:13 AM, Sven wrote:
Yes, I had the idea to add bluetooth too, removes the whole plugging and
unplugging spiel. I might start
On 4/11/2013 9:57 PM, Mark Janssen wrote:
Okay peeps, I'm re-opening this thread, because despite being hijacked
by naysayers, the merit of the underlying idea I think still has not
been communicated or perceived adequately.
Mark, this proposal is out of place on a Python list, because it
On Friday, 12 April 2013 10:22:21 UTC+1, Chris Angelico wrote:
On Fri, Apr 12, 2013 at 7:18 PM, Rob Schneider rmsc...@gmail.com wrote:
f.close
Yep, there's the problem! See my previous post for details. Change this to:
f.close()
and you should be sorted.
ChrisA
On 12/04/2013 13:07, Rob Schneider wrote:
On Friday, 12 April 2013 10:22:21 UTC+1, Chris Angelico wrote:
On Fri, Apr 12, 2013 at 7:18 PM, Rob Schneider rmsc...@gmail.com wrote:
f.close
Yep, there's the problem! See my previous post for details. Change this to:
f.close()
and you should
Someone HEELP ME!!
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, Apr 12, 2013 at 10:50 PM, nagia.rets...@gmail.com wrote:
Someone HEELP ME!!
http://youtu.be/VxMYwjp8t0o
ChrisA
--
http://mail.python.org/mailman/listinfo/python-list
Τη Παρασκευή, 12 Απριλίου 2013 4:14:39 μ.μ. UTC+3, ο χρήστης Chris Angelico
έγραψε:
On Fri, Apr 12, 2013 at 10:50 PM, nagia.rets...@gmail.com wrote:
Someone HEELP ME!!
http://youtu.be/VxMYwjp8t0o
ChrisA
Well, instead of being a smartass it would be nice if
On Fri, Apr 12, 2013 at 11:18 PM, nagia.rets...@gmail.com wrote:
Τη Παρασκευή, 12 Απριλίου 2013 4:14:39 μ.μ. UTC+3, ο χρήστης Chris Angelico
έγραψε:
On Fri, Apr 12, 2013 at 10:50 PM, nagia.rets...@gmail.com wrote:
Someone HEELP ME!!
http://youtu.be/VxMYwjp8t0o
ChrisA
On Apr 12, 6:18 pm, nagia.rets...@gmail.com wrote:
Τη Παρασκευή, 12 Απριλίου 2013 4:14:39 μ.μ. UTC+3, ο χρήστης Chris Angelico
έγραψε:
On Fri, Apr 12, 2013 at 10:50 PM, nagia.rets...@gmail.com wrote:
Someone HEELP ME!!
http://youtu.be/VxMYwjp8t0o
ChrisA
Well,
On 11.04.2013 22:16, Ian Kelly wrote:
On Thu, Apr 11, 2013 at 9:23 AM, Ethan Furman et...@stoneleaf.us wrote:
On 04/11/2013 04:13 AM, Sven wrote:
Yes, I had the idea to add bluetooth too, removes the whole plugging and
unplugging spiel. I might start work on that,
and if anyone else wants to
On 2013-04-11 19:58, Cousin Stanley wrote:
someone wrote:
I want to put this table into an appropriate container
such that afterwards I want to:
1) Put the data into a mySql-table
You might consider using sqlite3 as a database manager
since it is batteries included with
In article 51678b94$0$29977$c3e8da3$54964...@news.astraweb.com,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
- If you have a complicated interface, or data with complicated internal
state, the best solution is to use a custom object with methods.
- But if your interface is
On 2013-04-11 20:44, Cousin Stanley wrote:
Cousin Stanley wrote:
The stand-alone sqlite interpreter can first be used
to create an empty database named some.sql3
and create a table named xdata in that data base
sqlite3 some.sql3 '.read xdata_create.sql'
This step can
Hello!
I have a CSV file with 20 rows and 12 columns and I need to store it as a
matrix. I already created an array with zeros, but I don't know how to fill it
with the data from the csv file. I have this script:
import numpy
from numpy import array
from array import *
import csv
input =
On 04/12/2013 10:19 AM, Roy Smith wrote:
As part of our initial interview screen, we give applicants some small
coding problems to do. One of the things we see a lot is what you could
call Java code smell. This is our clue that the person is really a
Java hacker at heart who just dabbles in
Τη Παρασκευή, 12 Απριλίου 2013 4:29:51 μ.μ. UTC+3, ο χρήστης rusi έγραψε:
On Apr 12, 6:18 pm, nagia.rets...@gmail.com wrote:
Τη Παρασκευή, 12 Απριλίου 2013 4:14:39 μ.μ. UTC+3, ο χρήστης Chris Angelico
έγραψε:
On Fri, Apr 12, 2013 at 10:50 PM, nagia.rets...@gmail.com wrote:
In article mailman.506.1365751267.3114.python-l...@python.org,
Rob Schneider rmsc...@gmail.com wrote:
Source (correct one) is 47,970 bytes. Target after copy of 45,056 bytes.
I've tried changing what gets written to change the file size. It is usually
this sort of difference.
The file
On 4/12/2013 3:32 AM, Chris Angelico wrote:
On Fri, Apr 12, 2013 at 4:25 PM, Rob Schneider rmsc...@gmail.com wrote:
The close method is defined and flushing and closing a file, so
it should not return until that's done.
What command are you using to create the temp file?
re command to
In article mailman.510.1365755188.3114.python-l...@python.org,
Cameron Simpson c...@zip.com.au wrote:
45046 is exactly 11 * 4096. I'd say your I/O is using 4KB blocks,
and the last partial block (to make it up to 47970) didn't get
written (at the OS level).
Yeah, this sounds like a good
In article 51674ffc$0$29977$c3e8da3$54964...@news.astraweb.com,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
On Thu, 11 Apr 2013 19:55:53 +, Neil Cerutti wrote:
On 2013-04-11, Rob Schneider rmsc...@gmail.com wrote:
Thanks. Yes, there is a close function call before the
On 4/12/2013 3:17 AM, Ulrich Eckhardt wrote:
Am 11.04.2013 10:19, schrieb Steven D'Aprano:
if sys.version = '3':
Use sys.version_info = (3,), otherwise your code breaks when upgrading
to Python 10 and greater. ;^)
The second question that came up was if there is a way to keep a
metaclass
Hi there folks,
I'm pleased to announce the 0.7.0 release of psutil:
http://code.google.com/p/psutil/
This is mainly a bugfix release addressing a couple of high priority
issues on Linux and FreeBSD.
Complete list of bugfixes and enhancements is here:
https://psutil.googlecode.com/hg/HISTORY
===
In article mailman.511.1365758300.3114.python-l...@python.org,
Rob Schneider rmsc...@gmail.com wrote:
f.close
Well, there's your problem. You're not calling close. You forgot the
()'s after the function name!
--
http://mail.python.org/mailman/listinfo/python-list
On 12/04/2013 15:22, Ana Dionísio wrote:
Hello!
I have a CSV file with 20 rows and 12 columns and I need to store it as a
matrix. I already created an array with zeros, but I don't know how to fill it
with the data from the csv file. I have this script:
import numpy
from numpy import array
In article mailman.525.1365778885.3114.python-l...@python.org,
Giampaolo Rodolà g.rod...@gmail.com wrote:
Hi there folks,
I'm pleased to announce the 0.7.0 release of psutil:
http://code.google.com/p/psutil/
I see a lot of these types of announcements. May I suggest that people
add a short
Roy Smith r...@panix.com
As part of our initial interview screen, we give applicants some small
coding problems to do. One of the things we see a lot is what you could
call Java code smell. This is our clue that the person is really a
Java hacker at heart who just dabbles in Python
Steven D'Aprano於 2013年4月12日星期五UTC+8上午8時06分21秒寫道:
On Thu, 11 Apr 2013 19:55:53 +, Neil Cerutti wrote:
On 2013-04-11, Rob Schneider rmsc...@gmail.com wrote:
Thanks. Yes, there is a close function call before the copy is
launched. No other writes. Does Python wait for file close
Roy Smith, 12.04.2013 17:33:
Giampaolo Rodol� wrote:
Hi there folks,
I'm pleased to announce the 0.7.0 release of psutil:
http://code.google.com/p/psutil/
I see a lot of these types of announcements. May I suggest that people
add a short description of what that package is. From the
someone wrote:
As you can see, on my system I
had to use:
print row[0] , row[1]
instead of:
print row[ 'xtime' ] , row[ 'col4' ]
I'm not sure exactly why
The magic there is setting up the row_factory
after the database connection
dbc = DBM.connect( 'some.sql3' )
Hi, thanks for yor answer! ;)
Anyone has more suggestions?
--
http://mail.python.org/mailman/listinfo/python-list
- Original Message -
Hello!
I have a CSV file with 20 rows and 12 columns and I need to store it
as a matrix. I already created an array with zeros, but I don't know
how to fill it with the data from the csv file. I have this script:
import numpy
from numpy import array
from
That only puts the data in one column, I wanted to separate it.
For example:
data in csv file:
1 2 3 4 5
7 8 9 10 11
a b c d e
I wanted an array where I could pick an element in each position. In the case
above if I did print array[0][3] it would pick 4
--
On Apr 12, 10:12 pm, Ana Dionísio anadionisio...@gmail.com wrote:
Hi, thanks for yor answer! ;)
Anyone has more suggestions?
My suggestions:
1. Tell us what was lacking in Mark's suggestion (to use loadtxt)
2. Read his postscript (for googlegroup posters).
[In case you did not notice your
On 04/12/2013 01:29 PM, Ana Dionísio wrote:
That only puts the data in one column, I wanted to separate it.
For example:
data in csv file:
1 2 3 4 5
7 8 9 10 11
a b c d e
I wanted an array where I could pick an element in each position. In the case
above if I did print array[0][3] it would
On Fri, Apr 12, 2013 at 8:36 AM, nagia.rets...@gmail.com wrote:
Τη Παρασκευή, 12 Απριλίου 2013 4:29:51 μ.μ. UTC+3, ο χρήστης rusi έγραψε:
On Apr 12, 6:18 pm, nagia.rets...@gmail.com wrote:
Well, instead of being a smartass it would be nice if you could actually
help for once.
In article mailman.533.1365792239.3114.python-l...@python.org,
Ian Kelly ian.g.ke...@gmail.com wrote:
I would also recommend that in the future you should stop deploying
untested code to your production website. Set up a development
environment for yourself, make the changes there, and only
On Fri, Apr 12, 2013 at 12:46 PM, Prasad, Ramit
ramit.pra...@jpmorgan.com wrote:
Mark Janssen wrote:
But you see, there's the critical difference. First of all you're
making two errors in your comparison. Firstly, a *person* is saying
that she's going to *do something for you*. She's making
On 2013-04-12, Mark Janssen dreamingforw...@gmail.com wrote:
Possibily, but don't accept this view of the legal system.
Judges can be quite reasonable. They don't want more time
taken for bullshit cases and would much prefer for things to be
settled (that is what their duty is -- to settle
Mark Janssen wrote:
It doesn't have to say so, if it's not charging any money -- there's no
expectation that you're getting anything at all!
Of course there is. If Oprah Winfrey stands up and publicly says that
she's giving you a car, FOR FREE, no strings attached, and then gives you
a
Τη Παρασκευή, 12 Απριλίου 2013 9:37:29 μ.μ. UTC+3, ο χρήστης Ian έγραψε:
On Fri, Apr 12, 2013 at 8:36 AM, nagia.rets...@gmail.com wrote:
Τη Παρασκευή, 12 Απριλίου 2013 4:29:51 μ.μ. UTC+3, ο χρήστης rusi έγραψε:
On Apr 12, 6:18 pm, nagia.rets...@gmail.com wrote:
Well, instead of
Hi!
I'd like to bring your attention to the question titled Use HTTP/1.1 with
SimpleHTTPRequestHandler at http://stackoverflow.com/q/15839718/95735 which
reads; When I use HTTP/1.1 with SimpleHTTPRequestHandler, loading a page that
pulls in other resources will hang after the second resource.
On 04/12/2013 06:58 PM, Cousin Stanley wrote:
someone wrote:
As you can see, on my system I
had to use:
print row[0] , row[1]
instead of:
print row[ 'xtime' ] , row[ 'col4' ]
I'm not sure exactly why
The magic there is setting up the row_factory
after the database connection
Steven D'Aprano wrote:
try:
main()
except Exception as err:
log(err)
print(Sorry, an unexpected error has occurred.)
print(Please contact support for assistance.)
sys.exit(-1)
I like the traceback[0] module for logging last exception thrown.
See
Jabba Laci
Hi,
I wonder if there is a nice way to extract a whole HTML table and have the
result in a nice structured
format. What I want is to have the lifetime table at the bottom of this page:
http://en.wikipedia.org/wiki/List_of_Ubuntu_releases (then figure out with a
script until
Neil Cerutti wrote:
On 2013-04-12, Mark Janssen dreamingforw...@gmail.com wrote:
Possibily, but don't accept this view of the legal system.
Judges can be quite reasonable. They don't want more time
taken for bullshit cases and would much prefer for things to be
settled (that is what
On 4/12/2013 4:46 PM, Piotr Dobrogost wrote:
Hi!
I'd like to bring your attention to the question titled Use HTTP/1.1
with SimpleHTTPRequestHandler at
http://stackoverflow.com/q/15839718/95735 which reads; When I use
I find the doc slightly confusing. The SO code uses BaseHTTPServer. The
doc
Keep the flattened data array others suggested, and then just split it like
this: *(replace `example_data`, `_array`, and `columns`)*
example_data = range(15)
split_array = lambda _array, colums: \
. . .[_array[i:i + colums] for i in \
. . .xrange(0, len(_array),
I have a CSV file with 20 rows and 12 columns and I need to store it as a
matrix.
If you can use pandas, the pandas.read_csv is what you want.
--
http://mail.python.org/mailman/listinfo/python-list
someone wrote:
So SQLite is very good for practicing
Yes it is but it is also very good
for much more than just practice
Check the wikipedia info
http://en.wikipedia.org/wiki/Sqlite
It is arguably the most widely deployed database engine,
as it is
On 04/13/2013 01:26 AM, Cousin Stanley wrote:
someone wrote:
So SQLite is very good for practicing
Yes it is but it is also very good
for much more than just practice
Check the wikipedia info
http://en.wikipedia.org/wiki/Sqlite
Very interesting...
On 11Apr2013 09:55, Nikos nagia.rets...@gmail.com wrote:
| Τη Πέμπτη, 11 Απριλίου 2013 1:45:22 μ.μ. UTC+3, ο χρήστης Cameron Simpson
έγραψε:
| On 10Apr2013 21:50, nagia.rets...@gmail.com nagia.rets...@gmail.com wrote:
| | the doctype is coming form the attempt of script metrites.py to open and
On Fri, 12 Apr 2013 23:26:05 +, Cousin Stanley wrote:
The firefox browser keeps different sqlite database files for various
uses
Yes, and I *really* wish they wouldn't. It's my number 1 cause of major
problems with Firefox. E.g.
On Fri, 12 Apr 2013 00:06:21 +, Steven D'Aprano wrote:
The close method is defined and flushing and closing a file, so it
should not return until that's done.
But note that done in this case means the file system thinks it is
done, not *actually* done. Hard drives, especially the
On Sat, Apr 13, 2013 at 12:33 PM, Nobody nob...@nowhere.com wrote:
But most of the time, there's no point. If you actually care about what
happens in the event of an unclean shutdown, you typically also need to
sync the directory, otherwise the file's contents will get sync'd but the
file's
On Sat, 13 Apr 2013 03:33:29 +0100, Nobody wrote:
On Fri, 12 Apr 2013 00:06:21 +, Steven D'Aprano wrote:
The close method is defined and flushing and closing a file, so it
should not return until that's done.
But note that done in this case means the file system thinks it is
done,
On Sat, Apr 13, 2013 at 1:17 PM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
On Sat, 13 Apr 2013 03:33:29 +0100, Nobody wrote:
If you want to wait for the data written to be written to the physical
disk (in order to obtain specific behaviour with respect to an unclean
Τη Σάββατο, 13 Απριλίου 2013 4:41:57 π.μ. UTC+3, ο χρήστης Cameron Simpson
έγραψε:
On 11Apr2013 09:55, Nikos nagia.rets...@gmail.com wrote:
| Τη Πέμπτη, 11 Απριλίου 2013 1:45:22 μ.μ. UTC+3, ο χρήστης Cameron Simpson
έγραψε:
| On 10Apr2013 21:50, nagia.rets...@gmail.com
David M Chess於 2013年4月12日星期五UTC+8下午11時37分28秒寫道:
Roy Smith r...@panix.com
As part of our initial interview screen, we give
applicants some small
coding problems to do. One of the things we see a lot is what
you could
call Java code smell. This is our clue that the
person
Roger Serwy added the comment:
Attached is an updated version of the patch against the latest 2.7 code.
--
nosy: +roger.serwy
Added file: http://bugs.python.org/file29787/issue4630_refreshed.patch
___
Python tracker rep...@bugs.python.org
R. David Murray added the comment:
Well, it is not that it is converting it in the exception, it is that it is
converting it in order to do the lookup. It is an interesting question whether
or not its value in the exception should be considered a bug.
--
nosy: +r.david.murray
Changes by Tadas Barzdžius ret...@gmail.com:
--
nosy: +Tadas.Barzdžius
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13405
___
___
STINNER Victor added the comment:
It is an interesting question whether or not its value in the exception should
be considered a bug.
I consider it as a bug because it is very surprising to have a different key on
the error. Attached patch fixes the issue.
--
keywords: +patch
Federico Schwindt added the comment:
Here's a slightly modified version of the patch that should work with python 2
and 3.
--
Added file: http://bugs.python.org/file29789/openbsd-kqueue-001.patch
___
Python tracker rep...@bugs.python.org
Bohuslav Slavek Kabrda added the comment:
I'm strongly +1 on this one. I package Python RPMs for Fedora and I know what
mess can come out of installing through both RPM and easy_install/pip.
In Fedora, both Perl and Ruby use vendor specific dirs for installing RPM
packaged modules and site
Andrew Svetlov added the comment:
Agree with Sentil
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue900112
___
___
Python-bugs-list mailing list
Charles-François Natali added the comment:
If this goes inside the select module, it could probably help issue #17552
(add socket.sendfile()) a bit.
Yes, that's exactly the idea. See also the attached patches for
telnetlib and multiprocessing (there would probably be other
candidates like
Roundup Robot added the comment:
New changeset 71c4234eb39f by Ezio Melotti in branch '3.3':
#17692: test_sqlite now works with unittest test discovery. Patch by Zachary
Ware.
http://hg.python.org/cpython/rev/71c4234eb39f
New changeset 4c73d4785829 by Ezio Melotti in branch 'default':
#17692:
Ezio Melotti added the comment:
Fixed, thanks for the patch!
--
assignee: - ezio.melotti
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17692
R. David Murray added the comment:
Sounds fine to me.
Is there a reason you are not using 'with assertRaises' in the test?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17702
___
Roundup Robot added the comment:
New changeset a263d40d1724 by Andrew Svetlov in branch '3.3':
#17688: fix declaration for richcmp example in the docs.
http://hg.python.org/cpython/rev/a263d40d1724
New changeset 4c996682d086 by Andrew Svetlov in branch 'default':
#17688: fix declaration for
Andrew Svetlov added the comment:
Fixed. Thanks.
--
nosy: +asvetlov
resolution: - fixed
stage: - committed/rejected
status: open - closed
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17688
Roundup Robot added the comment:
New changeset cd785c9d26c2 by Ezio Melotti in branch '3.3':
#6696: add documentation for the Profile objects, and improve profile/cProfile
docs. Patch by Tom Pinckney.
http://hg.python.org/cpython/rev/cd785c9d26c2
New changeset 81dabc1feb52 by Ezio Melotti in
Ezio Melotti added the comment:
Fixed, thanks for the patch!
--
assignee: eric.araujo - ezio.melotti
resolution: - fixed
stage: commit review - committed/rejected
status: open - closed
type: behavior - enhancement
___
Python tracker
Andrew Svetlov added the comment:
Cool! Thanks.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6696
___
___
Python-bugs-list mailing list
STINNER Victor added the comment:
Is there a reason you are not using 'with assertRaises' in the test?
The test is not testing the exception class, but the first argument of
the exception. How do you test that using assertRaises()? Especially
to check err.args[0] is missing.
--
New submission from Marc-Andre Lemburg:
A user reported a segfault when using our mxURL extension with Python 2.7.4.
Previous Python versions do not show this behavior, so it's new in Python 2.7.4.
The extension uses an Py_AtExit() function to clean up among other things a
reference to a
Marc-Andre Lemburg added the comment:
After a closer look at recent checkins, I found this checking for the trash can
mechanism: 5a2ef447b80d (ticket #13992).
This appears to be the cause:
1.20 #define Py_TRASHCAN_SAFE_BEGIN(op) \
1.21 -if (_PyTrash_delete_nesting
Marc-Andre Lemburg added the comment:
I think a solution to the problem would be to check _tstate for NULL and only
use it if it is non-NULL - without threads you don't need to keep track of them
;-)
--
___
Python tracker rep...@bugs.python.org
Amaury Forgeot d'Arc added the comment:
At the time the Py_AtExit functions are called, the thread state is NULL
I'd say this is the root cause. It's a bad thing to call Py_DECREF without a
thread state.
Was it the case in previous versions?
--
nosy: +amaury.forgeotdarc
Senthil Kumaran added the comment:
Andrew - Please go ahead with commit. I reviewed the patch and it looks good to
me as well. It is a bug so it should be backported.
Thanks for the patch and a good test, Jeff Knupp. Agree with your reasoning /
lack of documentation on send behavior w.r.t to
Senthil Kumaran added the comment:
I am closing this as an Invalid issue. Please bring to discussion at python-dev
if someone disagrees. Thank you!
--
resolution: - invalid
status: open - closed
___
Python tracker rep...@bugs.python.org
Kyle Roberts added the comment:
I'm working on a patch for this.
--
nosy: +kyle.roberts
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17673
___
R. David Murray added the comment:
with self.assertRaises(KeyError) as cm:
os.environ[missing]
self.assertEqual(cm.excecption.args[0], missing)
(I don't know why assertRaises returns itself rather than just returning the
exception in the with, but that's the API).
--
A.M. Kuchling added the comment:
Updated version of the patch:
* Correct the errors reported in the review.
* Restore 3-space indents.
* Mention the LINES and COLS variables.
* Add more links to the final section.
I believe everything in the howto also applies to 3.3; it would be fine if you
Marc-Andre Lemburg added the comment:
On 12.04.2013 16:00, Amaury Forgeot d'Arc wrote:
Amaury Forgeot d'Arc added the comment:
At the time the Py_AtExit functions are called, the thread state is NULL
I'd say this is the root cause. It's a bad thing to call Py_DECREF without a
thread
Xavier de Gaye added the comment:
The call to set_trace() installs a local trace function on all the
frames of the stack, including on the oldest frame, i.e. the module
level frame. This causes the invocation of frame_settrace() in
frameobject.c and the module frame f_lineno is evaluated by
R. David Murray added the comment:
It may be problematic, but it is also consistent with the way the shell works
in general. (Try the same things with PATH.)
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
1 - 100 of 166 matches
Mail list logo