New submission from de :
hi all,
I'm using win7, with Ff as default browser.
i wont to open url in other browser installed on my PC.
i tried:
url = 'http://www.google.com'
op = webbrowser.get('opera')
op.open(url)
and i get this error:
Traceback (most recent call las
Change by Jun De :
--
keywords: +patch
nosy: +AngstyDuck
nosy_count: 1.0 -> 2.0
pull_requests: +26859
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28457
___
Python tracker
<https://bugs.python.org/i
Jun De added the comment:
Yeap Steve, I was thinking the same thing. I've taken the buffered data into
consideration when checking if the file is closed in my fix, feel free to take
a look and let me know what you think :)
--
___
Python tr
Jun De added the comment:
Awesome! To be honest I was very inclined to add test cases for this edge case,
but while some existing test cases use native objects like io.BytesIO, the one
that our edge case uses is HTTPResponse from `urllib3.response.py`. Should I
still go ahead with writing
Changes by de la Musse:
--
components: Library (Lib)
severity: normal
status: open
title: locale.format bug if thousand separator is space (french separator as
example)
type: behavior
versions: Python 2.4
__
Tracker <[EMAIL PROTECTED]>
New submission from de la Musse:
locale.format function delete spaces in result which is a problem when
thousand separator is space (in French for example).
The problem seems in the code below (extract from locale.py):
145 while seps:
146 # If the number was formatted for a
Changes by
Gabriel de Perthuis
:
--
nosy: +onyxg7
type: -> rfe
_
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/
New submission from Xavier de Gaye :
A regression occurs in python 3.2 when doing a copy of an asyncore
dispatcher.
$ python3.1
Python 3.1.2 (r312:79147, Apr 4 2010, 17:46:48)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" f
Xavier de Gaye added the comment:
The infinite recursion occurs also when running python 3.2 with the
extension modules copy, copyreg and asyncore from python 3.1. So it
seems this regression is not caused by a modification in these
modules.
Anyway, the bug is in asyncore. The attached patch
Xavier de Gaye added the comment:
About why the asyncore bug shows up in python 3.2:
The simple test below is ok with python 3.1 but triggers a
"RuntimeError: maximum recursion depth exceeded..." with python 3.2:
$ python3.1
Python 3.1.2 (r312:79147, Apr 4 2010, 17:46:48)
[GCC
Xavier de Gaye added the comment:
> So, in 3.1 hasattr(y, '__setstate__') *did* recurse and hit the limit,
> but the exception was caught and hasattr returned False?
This is right.
> I think I prefer the new behavior...
> The patch looks good, I would simply have rais
New submission from Maurice de Rooij :
Regular expressions with 0 to 65536 repetitions and above makes Python crash
with a "OverflowError: regular expression code size limit exceeded" exception.
65535 repetitions do not raise this issue.
Tested and confirmed this with versions 2.7.1
Maurice de Rooij added the comment:
So if I understand correctly, the maximum of 65535 repetitions is by design?
Have tried a workaround by repeating the repetitions by placing it inside a
capturing group, which is perfectly legal with Perl regular expressions:
$mystring = "test
New submission from Xavier de Gaye :
Pdb skips frames after hitting a breakpoint and running step commands
that walk back the frame stack.
Run the following two tests with the two files named foo.py and bar.py:
=== foo.py
from bar import bar
Changes by Xavier de Gaye :
--
type: -> behavior
___
Python tracker
<http://bugs.python.org/issue13183>
___
___
Python-bugs-list mailing list
Unsubscri
Xavier de Gaye added the comment:
Uploaded restore_trace_2.patch that improves the test case.
--
Added file: http://bugs.python.org/file23418/restore_trace_2.patch
___
Python tracker
<http://bugs.python.org/issue13
Xavier de Gaye added the comment:
Uploaded restore_trace.py27.patch with a fix and test case for python 2.7.
--
Added file: http://bugs.python.org/file23419/restore_trace.py27.patch
___
Python tracker
<http://bugs.python.org/issue13
Sjoerd de Vries added the comment:
Hi Éric,
There you go, adapted from http://effbot.org/librarybook/py-compile.htm :
# File: py-compile-example-1.py
import py_compile
# explicitly compile this module
py_compile.compile("py-compile-example-1.py","py-compil
Xavier de Gaye added the comment:
> I am not marking 'test needed' since the problem is 'hardly reproducible'.
The attached script named 'asyncore_epipe.py' may be used to reproduce
systematically the EPIPE error on linux with Python 3.2:
* the Reader clos
Xavier de Gaye added the comment:
Uploaded the patch 'epipe-default.patch' with a test case that breaks
on linux when EPIPE is not handled by asyncore, which is the case with
Python 3.2 and previous versions.
--
Added file: http://bugs.python.org/file23533/epipe-def
Xavier de Gaye added the comment:
Uploaded the same test case for Python 2.7.
--
Added file: http://bugs.python.org/file23534/epipe-2.7.patch
___
Python tracker
<http://bugs.python.org/issue5
Xavier de Gaye added the comment:
> Did you try with the current branches?
Yes, the test is pass against the current default and 2.7 branches.
One must remove EPIPE from the asyncore._DISCONNECTED frozenset to
make the test to fail.
> Yes, see RFC1122 section 4.2.2.13:
> "&quo
Xavier de Gaye added the comment:
The test fails when use_poll is True.
The difference between using poll() and poll2():
poll: All the read events are processed before the write events,
so the close after the first recv by TestHandler will be followed
by a send by TestClient within
Xavier de Gaye added the comment:
> Actually the class asyncore.dispatcher_with_send do not handle
> properly disconnection. When the endpoint shutdown his sending part
> of the socket, but keep the socket open in reading, the current
> implementation of dispatcher_with_send wi
Xavier de Gaye added the comment:
Thanks for the explanations.
I confirm that the patch fixes 'asyncore_12498.py' with your changes
applied to this script.
Note that the patch may break applications that have given different
semantics to 'closing' ('closing'
Xavier de Gaye added the comment:
> Note that the patch may break applications that have given different
> semantics to 'closing' ('closing' being such a common name for a
> network application) after they noticed that this attribute is never
> used by asyncore
Changes by Xavier de Gaye :
Added file: http://bugs.python.org/file23559/asyncore_shutdown.py
___
Python tracker
<http://bugs.python.org/issue12498>
___
___
Python-bug
Xavier de Gaye added the comment:
While writing the test case, I found out that the test case does not
fail before the patch. It seems that draining the output buffer
already works:
The attached script 'asyncore_shutdown.py' drains the output buffer
when run without the patch, with
Xavier de Gaye added the comment:
> That's because you didn't define a handle_read() method
Ooops...
Attached is a patch for dispatcher_with_send and asynchat with a test
case for each, that fail when the fix is not applied.
--
Added file: http://bugs.python.
New submission from Xavier de Gaye :
Add the following lines to test_handle_expt (this makes sense, a
dispatcher instance is supposed to implement handle_read and call recv
in order to detect that the remote end has closed the socket):
--- a/Lib/test/test_asyncore.py
+++ b/Lib/test
New submission from Xavier de Gaye :
When the remote end disconnects, handle_close is only called if recv
is called (from handle_read). The default implementation of
handle_read does not call recv.
Not having the default implementation of handle_read call recv, has
the following drawbacks
Xavier de Gaye added the comment:
Hi Charles-François,
> And indeed, that's a known kernel regression introduced in 2.6.28,
> and fixed by this commit:
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b634f87522dff87712df8bda2a6c9061954d552a
> http
New submission from Xavier de Gaye :
When an asyncore dispatcher initiates a tcp connection, its
representation lacks the peer address. The output of the attached
script 'dispatcher_addr.py' gives on linux with Python 3.2:
call stack in handle_connect_event:
->main->l
Changes by Xavier de Gaye :
Added file: http://bugs.python.org/file23593/dispatcher_addr.py
___
Python tracker
<http://bugs.python.org/issue13325>
___
___
Python-bug
Changes by Xavier de Gaye :
--
keywords: +patch
Added file: http://bugs.python.org/file23594/dispatcher_addr.diff
___
Python tracker
<http://bugs.python.org/issue13
Xavier de Gaye added the comment:
Review done after Charles-François review.
--
___
Python tracker
<http://bugs.python.org/issue12498>
___
___
Python-bugs-list m
Xavier de Gaye added the comment:
Attached is a new patch following the code review.
After rewriting the asyncore test to check that the data has been
successfully received by the client, the test fails when
using poll() and a data size of 4096 bytes. The reason is that when
TestHandler closes
Xavier de Gaye added the comment:
> I'd say your patch can be useful only in case the dispatcher subclass
> doesn't send() neither recv() any data, in which case the connection
> is supposed to remain open forever.
There are some cases where it is important to detect tha
Xavier de Gaye added the comment:
> In this kind of situation, it is perfectly legitimate for the client
> to perform a half-duplex close (shutdown(SHUT_WR)), since it does
> not intend to send data (which is implied by the fact that the sever
> doesn't implement an han
Xavier de Gaye added the comment:
> I think the best would be to not handle POLLHUP events while POLLIN
> is set, so that the handlers can have a chance to drain the input
> socket buffer.
Ok.
> But it's a separate issue, could you create a new one?
The test case fails if
Xavier de Gaye added the comment:
Follow my comments about half_duplex_close.diff (current latest patch).
+def handle_close(self):
+if not self._closing:
+self._closing = True
+# try to drain the output buffer
+while self.writable() and
Xavier de Gaye added the comment:
> this is the handling of a half-duplex disconnection on the remote
> side ?
Actually this is not the handling of a half-duplex disconnection on the
remote side, but we need a half-duplex disconnection to t
Xavier de Gaye added the comment:
Attached yet another patch.
This patch does not use a while loop in handle_close() and handles
POLLHUP as suggested by Charles-François. No changes have been made to
both tests (test_half_duplex_close).
--
Added file: http://bugs.python.org/file23609
New submission from Xavier de Gaye :
When use_poll is True, test_handle_close in test_asyncore.py invokes
twice the handle_close() method.
The attached patch:
modifies test_handle_close so that it fails when handle_close() is
called more than once
includes a fix that makes
New submission from Irmen de Jong :
Pickling of bytearrays is quite inefficient right now, because bytearray's
__reduce__ encodes the bytes of the bytearray into a str. A pickle made from a
bytearray is quite a bit larger than necessary because of this, and it also
takes a lot more proce
Changes by Irmen de Jong :
Added file: http://bugs.python.org/file23813/bytearray27.patch
___
Python tracker
<http://bugs.python.org/issue13503>
___
___
Python-bugs-list m
Irmen de Jong added the comment:
btw I'm aware of PEP-3154 but I don't think this particular patch requires a
pickle protocol bump.
--
___
Python tracker
<http://bugs.python.o
Irmen de Jong added the comment:
Added new patch that only does the new reduction when protocol is 3 or higher.
--
Added file: http://bugs.python.org/file23852/bytearray3x_reduceex.patch
___
Python tracker
<http://bugs.python.org/issue13
Irmen de Jong added the comment:
Alexandre: the existing test_bytes already performs byte array pickle tests.
--
___
Python tracker
<http://bugs.python.org/issue13
New submission from Sjoerd de Vries :
When you specify cfile to be in the current directory, an error occurs (line
133).
I have fixed the file, see attached
--
components: Library (Lib)
files: py_compile.py
messages: 140940
nosy: sjdv1982
priority: normal
severity: normal
status: open
Sjoerd de Vries added the comment:
The attached file just works.
You can diff with trunk, or wherever python devs store the latest version.
--
___
Python tracker
<http://bugs.python.org/issue12
Sjoerd de Vries added the comment:
Makes no sense to me: since I don't have the trunk version, I can only diff -c
against 3.2 release. Doing a diff against trunk is 1 sec of work for you.
But I am just being a helpful user; so if a diff is what you want, here it is.
No trouble for me,
Sjoerd de Vries added the comment:
Good to hear that the patch is helpful.
Again, I am just trying to be a helpful user, making a (very very little)
contribution to make Python better. I am not a Python dev at all: Python is
already awesome enough for me, no desire to change it :-)
I just
New submission from Xavier de Gaye :
The 'Advanced Logging Tutorial' states about the lastResort handler:
"The handler’s level is set to WARNING, so all events at this and
greater severities will be output."
Python 3.2 does not follow this behavior:
Python 3.2 (r32:88445, J
New submission from Craig de Stigter :
Steps to reproduce:
# create a large (>4gb) file
f = open('foo.txt', 'wb')
text = 'a' * 1024**2
for i in xrange(5 * 1024):
f.write(text)
f.close()
# now zip the file
import zipfile
z = zipfile.ZipFile('foo.zi
Craig de Stigter added the comment:
Yes, the bug still exists in Python 3.1.2. However, struct.pack() no longer
silently ignores overflow, so I get this error instead:
>>> z.write('foo.txt')
Traceback (most recent call last):
File "", line 1, in
File &
Craig de Stigter added the comment:
Hi, sorry no I haven't had time to add a real test for this
--
___
Python tracker
<http://bugs.python.org/issue9720>
___
___
Willem de Bruijn added the comment:
Good call. The posix regular expression character class [[:alpha:]] is
apparently not as universally supported as I thought. Posix mandates it for
filepath expansion[1], but that's not of much help on older and non-compliant
systems. However, from w
New submission from Simon de Vlieger :
When I have replaced sys.stdin with my own file-like object and I try to do a
multiprocessing.Pool(processes=x) I get errors about sys.stdin not having a
fileno or close method.
For at least fileno it is described in the docs
(http://docs.python.org
Michiel de Hoon added the comment:
Would it be possible to add an open() function to the bz2 module? Currently
gzip has such a function, but bz2 does not:
>>> import gzip
>>> gzip.open
>>> import bz2
>>> bz2.open
Traceback (most recent call last):
New submission from Roberto De Renzi :
I don't know if a suggestion is allowed here. I am an absolute beginner trying
to substitute my matlab+fortran with python. I just passed the stage of
tutorials and I have to struggle looking for the right syntax to implement my
simple-minded pro
Roberto De Renzi added the comment:
Thank you, Eric. My comment was not intended either as a bug (I thought
it was the wrong place to post it, but coud not find any better) or a
help request. It is just a suggestion.
We non professional progammers happen to be writing code for some time
New submission from Xavier de Gaye :
Description:
1. When deleting a single breakpoint, all the breakpoints located on
the line of this breakpoint are also deleted. See the test case
below.
2. The pdb 'clear' command documentation does not mention that all the
b
New submission from Irmen de Jong <[EMAIL PROTECTED]>:
I've ran into a problem where it would be very nice to be able to tell
the tread.get_ident() of a given threading.Thread object.
Currently, when creating a new Thread object, there is no good way of
getting that thread's g
Irmen de Jong <[EMAIL PROTECTED]> added the comment:
Adding it in the run method would only work for threads that I create in
my own code. The thing is: I need to be able to get the tread
identification from threads created by third party code. So I cannot
rely on that code putting it
Irmen de Jong <[EMAIL PROTECTED]> added the comment:
Thanks Gregory, for taking the time to make a patch.
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2871>
__
New submission from Christophe de Vienne <[EMAIL PROTECTED]>:
If I define unicode docstrings in my python source, autodoc crash
because it tries to decode them, which force a ascii encode first.
A trivial patch fix the issue :
Index: sphinx/ext/auto
New submission from Michiel de Hoon <[EMAIL PROTECTED]>:
PyMem_Malloc is called in the Util_ReadAhead function in bz2module.c.
The code checks if PyMem_Malloc returns NULL, but in that case no
MemoryError is raised. So, if in the following code:
>>> input = bz2.BZ2File("myfi
New submission from Willem de Bruijn :
(this is very low priority: an issue in a nonstandard build)
I am porting Python 2.6.4 to a system with only partial Posix support that
requires static linking for all modules. To enable sqlite, I added the line
_sqlite3 _sqlite/cache.c _sqlite
New submission from Palluat de Besset :
/usr/bin/gcc-4.0 -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
-DPYTHONFRAMEWORK='"Python"' -o pythonw ./Tools/pythonw.c -I.. -I./../Include
../Python.framework/Versions/3.2/Python
./Tools/pythonw.c:22:19:./Tools/py
Palluat de Besset added the comment:
Yes, sorry for the confusion. I'm trying to build a universal 32 bit version of
Python that will be embedded in our software. we need it to run on 10.4 to 10.6
Mac systems, and would like to build it on a 10.6 machine. I've been trying
wi
Irmen de Jong added the comment:
Sure, I'll give it another go.
I've not done any c-development for quite a while though, so I have to pick up
the pieces and see how far I can get. Also, I don't have any compiler for
Windows so maybe I'll need someone else to validate
Irmen de Jong added the comment:
Ok I've looked at it again and think I can build an acceptable patch this time.
However there are 2 things that I'm not sure of:
1) how to return the partial data to the application if the recv() loop fails
before completion. Because the method wil
Irmen de Jong added the comment:
Ok I think I've got the code and doc changes ready. I added a recvall and a
recvall_into method to the socket module. Any partially received data in case
of errors is returned to the application as part of the args for a new
exception, socket.partialdata
Changes by Irmen de Jong :
Removed file: http://bugs.python.org/file6439/patch.txt
___
Python tracker
<http://bugs.python.org/issue1103213>
___
___
Python-bugs-list mailin
Changes by Irmen de Jong :
Added file: http://bugs.python.org/file16762/socketmodulepatch.txt
___
Python tracker
<http://bugs.python.org/issue1103213>
___
___
Python-bug
Changes by Irmen de Jong :
Added file: http://bugs.python.org/file16763/libpatch.txt
___
Python tracker
<http://bugs.python.org/issue1103213>
___
___
Python-bugs-list m
Changes by Irmen de Jong :
Added file: http://bugs.python.org/file16764/docpatch.txt
___
Python tracker
<http://bugs.python.org/issue1103213>
___
___
Python-bugs-list m
Irmen de Jong added the comment:
Currently if MSG_WAITALL is defined, recvall() just calls recv() internally
with the extra flag. Maybe that isn't the smartest thing to do because it
duplicates recv's behavior on errors. Which is: release the data and raise an
error.
Would it b
New submission from Irmen de Jong :
Doc/library/socket.rst doesn't mention the return value for recv_into. Adding a
simple "Returns the number of bytes received." should fix this.
(note that recvfrom_into does mention its return value)
--
assignee: georg.br
johan de taeye added the comment:
Is the report posted in:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/3ec
6af1279a162ca#
also a symptom of the same problem?
Johan
--
nosy: +jdetaeye
___
Python tracker
<h
johan de taeye added the comment:
@koen: You're aboslutely right. The issue is solved indeed by adding a
dependency in the manifest.
___
Python tracker
<http://bugs.python.org/i
New submission from Erik De Bonte :
Recent discussions about PEP 681 (dataclass_transform) have focused on support
for descriptor-typed fields. See the email thread here:
https://mail.python.org/archives/list/typing-...@python.org/thread/BW6CB6URC4BCN54QSG2STINU2M7V4TQQ/
Initially we were
Xavier de Gaye added the comment:
According to my last post on this issue 2 years ago, this test "does not fail
on android-24-x86_64". This means that it does not fail on API level 24. IMO
the issue may be closed.
--
___
Python track
New submission from Wouter De Borger :
# Problem
the functools.lru_cache decorator locks all arguments to the function in memory
(inclusing self), causing hard to find memory leaks.
# Expected
I had assumed that the lru_cache would keep weak-references and that when an
object is garbage
Change by Wouter De Borger :
--
type: -> resource usage
___
Python tracker
<https://bugs.python.org/issue44310>
___
___
Python-bugs-list mailing list
Un
New submission from Freek de Kruijf :
In a piece of code I have
pT = datetime.strptime(a[0],"%Y-%m-%dT%H:%M:%S.%f")
When I check type(a[0]) I got type(a[0]): not
In this case I get: message attribute of type 'NoneType' is not
callableTraceback
When I use str(a[0]) instea
Freek de Kruijf added the comment:
The python program is called from a surrounding system called domoticz. I will
include the python program.
--
Added file: https://bugs.python.org/file50360/plugin.py
___
Python tracker
<https://bugs.python.
Freek de Kruijf added the comment:
When I try it in a few lines, there is no problem. So it is an issue in this
bigger context with class definitions.
In the few lines type(a[0]) reports ; in the bigger context
type(a[0]) reports . I have no idea how to reduce this issue in a
few lines. It
Freek de Kruijf added the comment:
About what version of Python is used, I don't know. Both 2.7.18 and 3.6.12 are
installed. I use the program on a Raspberry Pi 4B with openSUSE Leap 15.3.
--
___
Python tracker
<https://bugs.python.org/is
Freek de Kruijf added the comment:
The content of a[0] is something like '2021-10-15T15:02:11.486'
--
___
Python tracker
<https://bugs.python.o
Freek de Kruijf added the comment:
Op zaterdag 16 oktober 2021 00:03:41 CEST schreef u:
> Eric V. Smith added the comment:
>
> It sounds like you're using python 2.7, which is unsupported.
>
> You've not even shown us what line produces the error you're s
New submission from Vito De Tullio :
It would be useful to let json.tool support empty rows during handling of json
lines
generally speaking, this tolerance is already present in parsers like srsly and
jsonlines
actual behavior:
# happy scenario
$ echo -e '{"foo":1}\n{"b
Change by Vito De Tullio :
--
keywords: +patch
pull_requests: +28086
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29858
___
Python tracker
<https://bugs.python.org/issu
Vito De Tullio added the comment:
My final goal is to preserve the empty lines - I think I can do some bash
magic, but maybe something more complex that a simple sed call.
FWIW on https://jsonlines.org/#line-separator-is-n I see "The last character in
the file may be a line separator
Xavier de Gaye added the comment:
test_crypt fails on android following last changes made at
243a73deee4ac61fe06602b7ed56b6df01e19f27.
The android libc does not have a crypt() function and the _crypt module is not
built.
generic_x86_64:/data/local/tmp/python $ python
Python 3.9.0a0 (heads
New submission from Xavier de Gaye :
On android which is a platform that is missing the shared memory
implementation, test___all__ fails because 'multiprocessing.managers' has no
attribute 'SharedMemoryManager' which is listed in __all__.
2|generic_x86_64:/data/local
New submission from Xavier de Gaye :
This is the same kind of issue as reported in #28684.
python -m test -v test_asyncio -m
test_create_datagram_endpoint_existing_sock_unix
== CPython 3.9.0a0 (heads/abifa-dirty:cf805c25e6, Nov 18 2019, 16:40:26) [Clang
8.0.2 (https://andro
New submission from Xavier de Gaye :
See also the related issues:
#32126: [asyncio] test failure when the platform lacks a functional sem_open()
#28668: instanciation of multiprocessing.Queue raises ImportError in
test_logging
The test failure on android API 24:
generic_x86_64:/data/local
Change by Xavier de Gaye :
--
resolution: fixed ->
stage: resolved -> needs patch
status: closed -> open
___
Python tracker
<https://bugs.python.or
1 - 100 of 1794 matches
Mail list logo