Georg Brandl ge...@python.org added the comment:
In any case, this is not an issue in Python as PlaySound is only a thin
wrapper around the OS' function.
--
nosy: +georg.brandl
resolution: - wont fix
status: open - closed
___
Python tracker
New submission from Georg Brandl ge...@python.org:
With lambda, the ban on return x in generators can be evaded:
x = lambda: ((yield 1), (yield 2))
list(x())
[1, 2, (None, None)]
dis.dis(x)
1 0 LOAD_CONST 0 (1)
3 YIELD_VALUE
4 LOAD_CONST
Graham Dumpleton graham.dumple...@gmail.com added the comment:
If making changes in wsgireg.validate, may be worthwhile also fixing up one
area where it isn't strictly correct
according to WSGI PEP.
As per discussion:
New submission from Mohammad Al mramah...@hotmail.com:
It seems that RotatingFileHandler is experiencing an issue when
attempting to rotate log files under Windows. The following errors are
received:
Traceback (most recent call last):
File C:\Python25\lib\logging\handlers.py, line 73, in
Dmitry Vasiliev d...@hlabs.spb.ru added the comment:
Graham Dumpleton wrote:
the check for number of arguments supplied to wsgi.input.read() is wrong as
it allows for an optional argument,
when argument is supposed to mandatory.
I think it's a good idea. I'll update the patch soon.
Dmitry Vasiliev d...@hlabs.spb.ru added the comment:
Attached more generic version of the patch.
--
nosy: +hdima
Added file: http://bugs.python.org/file12450/io_fixes.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4604
New submission from anatoly techtonik techto...@gmail.com:
When tarfile is directed to create tar.gz compressed archive file in a
path different from current, it saves full path information in .gz
header where only filename is required.
This causes problems with decompression utilities, such as
Changes by anatoly techtonik techto...@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file12452/tarfile.directory.fix.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4750
New submission from ebfe knabberknusperh...@yahoo.de:
The hashlib functions provided by _hashopenssl.c hold the GIL all the
time although the underlying openssl-library is basically thread-safe.
I've attached a patch (svn diff) which basically does four things:
* If python is compiled with
Dmitry Vasiliev d...@hlabs.spb.ru added the comment:
Added check for wsgi.input.read() argument.
Added file: http://bugs.python.org/file12454/wsgiref2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4718
anatoly techtonik techto...@gmail.com added the comment:
Please reopen this bug. issue#1886 is different it take a long time
until it is committed.
I attach patch from Giampaolo here.
--
keywords: +patch
nosy: +techtonik
versions: +Python 2.5, Python 2.7
Added file:
anatoly techtonik techto...@gmail.com added the comment:
I attach an improved patch1886.use.tarfile.module.diff that fixes all
bugs addressed in this issue.
It also removes second call to compression program leaving that
privilege to tar.
I notice that the archive generated by tarfile module
anatoly techtonik techto...@gmail.com added the comment:
Oh, my mistake - the bug with extra dir component in archive is in issue4750
Second shell call to compression program is removed only for the case
when tarfile or any of required compression modules are not available.
Roumen Petrov bugtr...@roumenpetrov.info added the comment:
about patch1886.use.tarfile.module.diff - the original tar don't support
-j flag.
--
nosy: +rpetrov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1886
anatoly techtonik techto...@gmail.com added the comment:
What are the systems where does this original tar still exist as a
default utility?
If there is no tarfile module on this systems and tar version is so
old then you need a more modern system to wrap your releases or more
modern tar. The
Antoine Pitrou pit...@free.fr added the comment:
Hi,
The patch looks ok to me, although the tests against mutable byte-like
types are probably useless.
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4718
Changes by Gabriel Genellina gagsl-...@yahoo.com.ar:
--
nosy: +gagenellina
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4722
___
___
New submission from Andrey Petrov andrey.pet...@shazow.net:
In the SocketServer.UDPServer Example, the second last line:
server = SocketServer.UDPServer((HOST, PORT), BaseUDPRequestHandler)
Should be:
server = SocketServer.UDPServer((HOST, PORT), MyUDPHandler)
--
assignee:
Antoine Pitrou pit...@free.fr added the comment:
Armin, by reading the pypy-dev mailing-list it looks like you were
interested in this.
--
nosy: +arigo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4753
STINNER Victor victor.stin...@haypocalc.com added the comment:
I think that you don't use Py_BEGIN_ALLOW_THREADS /
Py_END_ALLOW_THREADS correctly: the GIL can be released when the
hashlib lock is acquired (to run hash functions in parallel threads).
So the macros should be:
#define
Antoine Pitrou pit...@free.fr added the comment:
Hi,
Very good idea. However, you don't need to discriminate for the bytes
type specifically. When a buffer is taken on the object (with
PyObject_GetBuffer()), the object is internally locked until the
buffer is release with PyBuffer_Release().
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment:
I could not reproduce the behaviour you describe.
Could you provide a test case? That fails with the current code and is
fixed after applying your patch.
(BTW, the r.e. should be a raw string literal, even the original one)
STINNER Victor victor.stin...@haypocalc.com added the comment:
EVP_copy() and EVP_get_digest_size() should call
ENTER_HASHLIB/LEAVE_HASHLIB to protect self-ctx.
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4751
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +pitrou
priority: - normal
stage: - patch review
versions: -Python 2.5, Python 2.6, Python 3.0
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4738
STINNER Victor victor.stin...@haypocalc.com added the comment:
If view.len is negative, EVP_hash() may read invalid memory :-/ Be
careful of integer overflow in this block:
Py_ssize_t offset = 0, sublen = len;
while (sublen) {
unsigned int process = sublen MUNCH_SIZE ? MUNCH_SIZE
New submission from Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp:
This comes from Issue4741. The patch
- clarify meaning of None as the parameter of *sound* to
PlaySound
- notify SND_PURGE is not supported by MS now
--
assignee: georg.brandl
components: Documentation
files:
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:
The patch is for release26-maint.
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4754
___
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment:
Yes, this is exactly the problem. The execution never goes beyond print
('here'); if you print frame.f_lineno you'll see it blocks at io.py
line 1036, waiting for a Lock for the second time.
So the trace function cannot use print, not
Antoine Pitrou pit...@free.fr added the comment:
Thanks for the investigation! The problem has already been reported in
#3618. Closing this one.
--
resolution: - duplicate
status: open - closed
superseder: - possible deadlock in IO library (Lib/io.py)
STINNER Victor victor.stin...@haypocalc.com added the comment:
New version of ebfe's patch:
- ENTER/LEAVE_HASHLIB:
* don't touch GIL in ENTER_HASHLIB (it's useless)
* add mandatory argument (explicit use of self)
- EVP_hash():
* restore Py_SAFE_DOWNCAST
* simplify the code: always
STINNER Victor victor.stin...@haypocalc.com added the comment:
New comments about the last patch:
- GIL is not released for adler() or crc32() whereas these functions
may be slow for long strings: just add Py_BEGIN_ALLOW_THREADS /
Py_END_ALLOW_THREADS before / after adler(...) and crc32(...)
STINNER Victor victor.stin...@haypocalc.com added the comment:
I love with ... as f: and I want it for gzip/bz2 files!
Comment about the patch:
(1) the IOError message is different for the two modules:
I/O operation on closed GzipFile object
vs
I/O operation on closed file
Specify the
STINNER Victor victor.stin...@haypocalc.com added the comment:
-debug may be equivalent to -d -e -b -u -g (if none of these options
have an argument), but no to --debug. If you like to use -d as an
alias to --debug, just use: add_option(-d, --debug, ...).
--
nosy: +haypo
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment:
Patch to posixmodule.c including test case and documentation updates.
Note: I've only run the tests on Windows.
--
keywords: +patch
Added file: http://bugs.python.org/file12460/inheritable_pipes.diff
Changes by ebfe knabberknusperh...@yahoo.de:
Removed file: http://bugs.python.org/file12453/hashopenssl_threads.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4751
___
ebfe knabberknusperh...@yahoo.de added the comment:
Thanks for the advices.
Antoine, maybe you could clarify the situation regarding buffer-locks
for me. In older versions of PEP 3118 the PyBUF_LOCK flag was still
present but it doesn't seem to have made it's way into the final draft.
Is it
Antoine Pitrou pit...@free.fr added the comment:
Is it save to assume that a buffer-view will not change until release()
is called - for all types supporting the buffer protocol in py3k ??
Yes, it is!
___
Python tracker rep...@bugs.python.org
Antoine Pitrou pit...@free.fr added the comment:
(1) the IOError message is different for the two modules:
I/O operation on closed GzipFile object
vs
I/O operation on closed file
I've reused the same error message as used in other parts of each
module.
(2) For bz2module, Why don't
STINNER Victor victor.stin...@haypocalc.com added the comment:
I've taken on haypo's patch to release the GIL only
when the buffer is larger than 10kb
You can factorize the code by moving Py_BEGIN_ALLOW_THREADS /
Py_END_ALLOW_THREADS *into* EVP_hash ;-)
10 KB is a random value or the fast
ebfe knabberknusperh...@yahoo.de added the comment:
new svn diff attached
- GIL is now released for adler32 and crc32 if the buffer is larger than
5kb (we don't want to risk burning cpu cycles by GIL-stuff)
- adler32 got it's param by s# but now does s* - why s# anyway?
- ENTER_ZLIB no longer
Changes by ebfe knabberknusperh...@yahoo.de:
Removed file: http://bugs.python.org/file12448/zlib_threads.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4738
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
New version of my md5sum.py program limited to 10 threads. New
benchmark with 160 files (size in 7..10 MB):
- Python unpatched: best=4.8 sec
- C version (/usr/bin/md5sum): best=3.6 sec
- Python patched: best=2.1 sec
As everybody
Changes by STINNER Victor victor.stin...@haypocalc.com:
Removed file: http://bugs.python.org/file12462/md5sum.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4751
___
ebfe knabberknusperh...@yahoo.de added the comment:
Here is another simple benchmarker. For me it shows almost perfect
scaling (2 cores = 196% performance) if the buffer put into .update() is
large enough.
I deliberately did not move Py_BEGIN_ALLOW_THREADS into EVP_hash as we
might call this
STINNER Victor victor.stin...@haypocalc.com added the comment:
Comments on zlib_threads-2.diff:
- the indentation is strange: don't mix spaces and tabs!
- I prefer ; after a call to a macro: ENTER_ZLIB(self); instead
of ENTER_ZLIB(self). It makes vim happy (auto indent code correctly)
and it
STINNER Victor victor.stin...@haypocalc.com added the comment:
hashlibtest.py results on my Quad Core with 4 threads:
- unpatched: best=13.0 sec
- patched: best=3.25 sec
Some maths: 13.0 / 4 = 3.25 \o/
___
Python tracker rep...@bugs.python.org
ebfe knabberknusperh...@yahoo.de added the comment:
new svn diff attached
the indentation in this file is not my fault, it has tabs all over it...
The 5kb limits protects from the overhead of releasing the GIL. With
very small buffers the overall runtime in my benchmark tends to double.
I set
Benjamin Peterson benja...@python.org added the comment:
Attaching patch?
BTW, how did you find this bug? :)
--
keywords: +needs review, patch
nosy: +benjamin.peterson
stage: - patch review
type: - behavior
Added file: http://bugs.python.org/file12467/nasty_lambda_generators.patch
Changes by ebfe knabberknusperh...@yahoo.de:
Removed file: http://bugs.python.org/file12463/zlib_threads-2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4738
___
Changes by Giampaolo Rodola' billiej...@users.sourceforge.net:
--
nosy: +giampaolo.rodola, josiah.carlson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4744
___
Benjamin Peterson benja...@python.org added the comment:
r67928 makes 2to3 more tolerant about multiple imports on a line. It
also warns when there is an absolute import and relative import on the
same line.
--
nosy: +benjamin.peterson
resolution: - fixed
status: open - closed
Benjamin Peterson benja...@python.org added the comment:
Fixed in r67929.
--
nosy: +benjamin.peterson
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4745
Benjamin Peterson benja...@python.org added the comment:
Looks fine to me. This happens in the trunk already, right?
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4740
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:
Not yet. This patch is for trunk. But HIGHEST_PROTOCOL is 2 in trunk,
so no difference in behavior. (Just useful for consistency)
Added file: http://bugs.python.org/file12468/trunk_use_HIGHEST_PROTOCOL.patch
Benjamin Peterson benja...@python.org added the comment:
Go ahead.
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4740
___
___
Python-bugs-list mailing list
New submission from Skip Montanaro s...@pobox.com:
os.path.commonprefix returns the common prefix of a list of paths taken
character-by-character. This can
return invalid paths. For example, os.path.commonprefix([/export/home/dave,
/etc/passwd]) will return /e, which likely has no meaning
Nick Coghlan ncogh...@gmail.com added the comment:
A new function sounds like a good solution to me. How about just calling
it os.path.commonpath though?
I agree having a path component based prefix function in os.path is
highly desirable, particularly since the addition of relpath in 2.6:
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:
Done. Fixed in r67930(trunk), r67931(py3k)
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4740
Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp:
--
stage: patch review - committed/rejected
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4740
___
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment:
Your usage of os.sep is incorrect, both when reading and writing
directories.
Zip files are (more-or-less) platform independent. The specification
*requires* forward slashes in paths [1], and the zipfile module
already writes them
New submission from Gabriel Genellina gagsl-...@yahoo.com.ar:
Patch to zipfile.is_zipfile, adding support for file and file-like
objects. Includes test cases and documentation updates.
This fixes issue4241 too.
--
components: Library (Lib)
files: is_zipfile_filelike.diff
keywords:
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment:
The patch for issue4756 fixes this too.
--
nosy: +gagenellina
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4241
___
Changes by Gabriel Genellina gagsl-...@yahoo.com.ar:
--
nosy: +gagenellina
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3618
___
___
63 matches
Mail list logo