Wei-Cheng Pan added the comment:
I cannot import asyncio.task, so I did this instead:
import asyncio.tasks
asyncio.tasks.Task = asyncio.tasks._PyTask
Then it changed to this:
Executing wait_for=
created at /.../lib/python3.8/unittest/async_case.py:118> took 0.187 seconds
I supp
Wei-Cheng Pan added the comment:
Executing () created at /.../lib/python3.8/asyncio/queues.py:70>
took 0.104 seconds
Executing () created at /.../lib/python3.8/asyncio/queues.py:70>
took 0.121 seconds
I was expecting it can display the stack of the awa
Wei-Cheng Pan added the comment:
> Usually, it is a sign of a problem in user code, e.g. something should be
> pushed into executor.
Sometimes also happens on low-end CI machines.
And the message is somewhat unclear to me.
I have to grep cpython sources to understand that it is comin
New submission from Wei-Cheng Pan :
In bpo-32972 we enabled debug mode in
IsolatedAsyncioTestCase._setupAsyncioLoop, which may print some warnings that
are not that important to tests.
(e.g. Executing took 0.110 seconds)
I personally don't really like it being turn on by default
Wei-Cheng Pan added the comment:
The SSL connection still cannot close cleanly in 3.7.0.
It will keep throwing read error during shutdown, so shutdown callback will
never be called.
I've been test this PR for a while, and at least it fixes my problem.
Hope this PR can be included in 3.7.1
Changes by Calvin Cheng <calvin.cheng...@gmail.com>:
--
nosy: +calcheng -Calvin Cheng
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Changes by Calvin Cheng <calvin.cheng...@gmail.com>:
--
nosy: +Calvin Cheng -calcheng
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
New submission from Calvin Cheng:
The attached test script works fine with IPv4 syslog:
$ python test_syslog.py 192.168.1.4
(no errors reported)
When running the attached script with python 3.5.2 on Ubuntu 16.04, received
the following error:
$ python3 test_syslog.py ::1
--- Logging error
Wei-Cheng Pan added the comment:
1. Replaced non-ASCII literals to \u
2. Removed failed assertion
Test passed with LC_ALL=en_US and LC_ALL=en_US.UTF-8 .
I've tried to use locale.getdefaultlocale(), but seems the output string will
vary in different locales.
--
Added file:
https
Changes by Wei-Cheng Pan <legnale...@gmail.com>:
Removed file:
https://bugs.python.org/file44243/json-add-an-option-to-bypass-non-ascii-characters-v3.patch
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python
Changes by Wei-Cheng Pan <legnale...@gmail.com>:
Removed file:
https://bugs.python.org/file43596/json-add-an-option-to-bypass-non-ascii-characters.patch
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python
Wei-Cheng Pan added the comment:
Added doc and test.
--
Added file:
https://bugs.python.org/file44243/json-add-an-option-to-bypass-non-ascii-characters-v3.patch
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/i
Wei-Cheng Pan added the comment:
> The patch needs tests and documentation.
Ok, I'll update it later.
>> +parser.add_argument('--no-ensure-ascii', action='store_true',
>> default=False,
>I'd go with ``action='store_false', default=True``.
If I'm not misre
Wei-Cheng Pan added the comment:
Use "--no-ensure-ascii" instead.
--
Added file:
http://bugs.python.org/file43596/json-add-an-option-to-bypass-non-ascii-characters.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.py
Changes by Wei-Cheng Pan <legnale...@gmail.com>:
Removed file:
http://bugs.python.org/file43578/json-add-an-option-to-bypass-non-ascii-characters.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Wei-Cheng Pan added the comment:
If the arguments should be aligned with those in dump/load, then maybe
"--no-ensure-ascii" is an option?
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.py
New submission from Wei-Cheng Pan:
This patch adds a command line option "--no-escape" that allows json.tool to
display non-ASCII characters.
e.g.:
$ echo '"測試"' | python -m json.tool
"\u6e2c\u8a66"
$ echo '"測試"' | python -m json.tool --no-escape
&
Changes by Wei-Cheng Pan legnale...@gmail.com:
--
components: Library (Lib)
files: cookiejar_fix_deprecated_method_calls.patch
keywords: patch
nosy: Wei-Cheng.Pan
priority: normal
severity: normal
status: open
title: DeprecationWarning fix on cookiejar module since Python 3.3
versions
New submission from Wei-Cheng Pan:
Please ignore previous typo patch.
This is the correct version
--
Added file:
http://bugs.python.org/file29753/cookiejar_fix_deprecated_method_calls.patch
___
Python tracker rep...@bugs.python.org
http
Changes by Wei-Cheng Pan legnale...@gmail.com:
Removed file:
http://bugs.python.org/file29752/cookiejar_fix_deprecated_method_calls.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17678
On Monday, August 6, 2012 12:50:13 PM UTC-7, Mok-Kong Shen wrote:
I ran the following code:
def xx(nlist):
print(begin: ,nlist)
nlist+=[999]
print(middle:,nlist)
nlist=nlist[:-1]
print(final: ,nlist)
u=[1,2,3,4]
print(u)
xx(u)
print(u)
Hi all,
In a py file, when to use import statements in the header, when to use
import statements in the blocks where they are used?
What are the best practices?
Thanks!
Pat
--
http://mail.python.org/mailman/listinfo/python-list
Sophia K. Cheng sophia.ch...@gmail.com added the comment:
Hi Ned,
Thanks for the patch, I appreciate it. Sadly, I've since upgraded my
laptop to Win 7, and don't seem to be having the problem anymore :-/ , so I
can't verify. But thank you for writing a patch.
Sincerely,
Sophia
On Wed, Dec
Yes, I'm using this document now but I was wondering if there is a formal spec
for lexical grammar? It looks like some part of the doc
http://docs.python.org/py3k/reference/grammar.html; is missing.
We can find some replacement in lexical_analysis.html but it seems this
document is write for
New submission from Robert Cheng robert.h.ch...@gmail.com:
When reporthook is None, size variable is not computed and defaulted to -1.
Thus, without reporthook, ContentTooShortError is not raised even when
Content-Length header is supplied and download size is less than expected
amount
Cheng CHEOK
--
http://mail.python.org/mailman/listinfo/python-list
Thanks everyone for all the suggestions! New to python, so reading up on the
struct module Construct library now, hope to get my problem fixed soon.
- Original Message -
Bitfields are most commonly used for extreme space optimization - i.e.
shoving several variables and flags with
- Original Message -
From: Stefan Behnel
To: python-list@python.org
Sent: Tuesday, September 07, 2010 2:55 PM
Subject: Re: Bit fields in python?
If you can tell us what these structs are being used for in the original C
code, we might be able to point you to a suitable way to
Hi,
I'm trying to rewrite a c program in python encountered several problems. I
have some data structures in my c program like below:
typedef struct
{
unsigned short size;
unsigned short reserved:8;
unsigned short var_a1:2;
unsigned short var_a2:2;
unsigned short var_a3:2;
New submission from Chu-Cheng chuch...@gmail.com:
x={1:{1}}
x[1] = (x.get(1).add(2))
x
{1: None}
But...
x={1:{1}}
o = x.get(1)
o.add(2)
o
{1, 2}
x[1] = o
x
{1: {1, 2}}
--
components: None
messages: 93674
nosy: chucheng
severity: normal
status: open
title: Bug while put a set
Chu-Cheng chuch...@gmail.com added the comment:
my fault, I know what is the difference now :) sorry for bugging
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7075
Sophia K. Cheng sophia.ch...@gmail.com added the comment:
Thanks!! This worked perfectly! Finally got around to trying this out
today.
Sincerely,
Sophia
On 3/20/09 4:26 AM, Timothy Zhang rep...@bugs.python.org wrote:
Timothy Zhang z...@live.cn added the comment:
I meet the same
:
cur_out = function_handle(**kwargs)
function_outputs.append(cur_out)
Am I missing something here? I cannot seem to get map to pass on keyword
arguments.
Thanks in advance,
Cheng Soon
--
http://mail.python.org/mailman/listinfo/python-list
New submission from Sophia K. Cheng [EMAIL PROTECTED]:
Hello,
I was able to run IDLE once or twice on my laptop. Then I downloaded
kiki and tried to run it but had forgotten to install wxPython. After
that, IDLE no longer opens although the command prompt does still work.
I get the following
Hi guys,
This may be a cygwin issue but I was hoping to get some answers here
as well if someone has fixed this problem before.
Basically, I am able to run python scriptname.py python files in
command prompt. Unfortunately, I can't seem to get it to work in
cygwin. I always get an error that
Hi,
I am attempting to convert a bunch of .txt files into html using the
docutils package.
It works for most of the txt files except for the index.txt file which
gives 2 errors:
(1) Error/3 Unknown Directive type toctree
(2) (ERROR/3) Unknown interpreted text role ref.
Any idea how I can fix
hi all
a string like
(word1 (Word2|woRd3))
how can i use the re to split it to
['word1', 'word2', 'word3']
--
http://mail.python.org/mailman/listinfo/python-list
im sorry, my engilsh is not vell well,
the string not only contain '' and '|' and it can be anyting
i just want to split out the whole word inside the string
--
http://mail.python.org/mailman/listinfo/python-list
i try
query = query.lower()
print re.split(r'\W+',theString)
the reslut is :
['', 'word1', 'word2', 'word3', '']
how can i fix the statment to get
['word1', 'word2', 'word3']
--
http://mail.python.org/mailman/listinfo/python-list
i try
theString= theString.lower()
print re.split(r'\W+',theString)
the reslut is :
['', 'word1', 'word2', 'word3', '']
how can i fix the statment to get
['word1', 'word2', 'word3']
--
http://mail.python.org/mailman/listinfo/python-list
thx for help..i got it now :)
--
http://mail.python.org/mailman/listinfo/python-list
hi,all, i try to replace every target word found in the text
for target in splitText:
if stopwords.find(target) = 0 :
text = re.sub(r'\b%s\b','',text) target
when i using the statment:
text = re.sub(r'\b%s\b','',text) target
get error : unsupported operand type(s) for :
hi all..it a problem about dict:
print target, dict[target]
get output:
keyword
{page3.html, page2.html, page1.html}
is it some ways to change it to:
keyword
{page1.html, page2.html, page3.html}
--
http://mail.python.org/mailman/listinfo/python-list
hi,all
if the html like:
meta name = description content = a test page
meta name = keywords content = keyword1 keyword2
if i use:
def handle_starttag(self, tag, attrs):
if tag == 'meta':
self.attr = attrs
self.headers += ['%s' % (self.attr)]
self.attr =
p.sub('','a\nbc')
'abc'
p.sub('','%s') % a\nbc
'a\nbc'
is it anyone got some idea why it happen?
--
http://mail.python.org/mailman/listinfo/python-list
thx for help :)
--
http://mail.python.org/mailman/listinfo/python-list
-list
--
Choe, Cheng-Dae()
Blog: http://www.comdongin.com/
--
http://mail.python.org/mailman/listinfo/python-list
47 matches
Mail list logo