New submission from chen-y0y0 :
A simple class definition:
class Foo: bar = property(lambda self: self.bar)
And get the value of Foo.bar, it returns correctly, .
And get the value of Foo().bar, it raises RecursionError:
Traceback (most recent call last):
File "", line 1, in
File
Change by Bo-wei Chen :
--
keywords: +patch
pull_requests: +29342
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31169
___
Python tracker
<https://bugs.python.org/issu
New submission from Bo-wei Chen :
convert_timestamp function in Lib/sqlite3/dbapi2.py fails to parse a timestamp
correctly, if it does not have microseconds but comes with timezone
information, e.g. b"2022-02-01 16:09:35+00:00"
Traceback:
Traceback (most recent call last):
Fi
Change by chen-y0y0 :
--
title: Bugs of 2to3 -> Bugs of 2to3 on built-in function or types(classes)
___
Python tracker
<https://bugs.python.org/issu
New submission from chen-y0y0 :
I have a file named foo.py:
try :
input = raw_input
int = long
chr = unichr
range = xrange
except NameError :
pass
When I process this file to 2to3, it shows:
--- foo.py (original)
+++ foo.py (refactored)
@@ -1,7 +1,7 @@
try :
input
New submission from Zhiyuan Chen :
Current cpython code base still contains a massive amount of code that is not
complied with the PEP-8 formatting.
For example, there are 553 one line if statement (`if xxx: yyy`) in the current
codebase.
--
files: onelineif.txt
messages: 408761
chen-y0y0 added the comment:
And NOT ONLY Python 2.2, there aren't also Python 2.1 or earlier version.
--
___
Python tracker
<https://bugs.python.org/issue45
New submission from chen-y0y0 :
The output:
Upload failed (400): Invalid value for classifiers. Error: Classifier '
Programming Language :: Python :: 2.2' is not a valid classifier.
error: Upload failed (400): Invalid value for classifiers. Error: Classifier '
Programming Language :: Python
Change by Chen Zero :
--
title: Python exception object is different after pickle.loads and pickle.dumps
-> Python exception object is different after pickle.dumps and pickle.loads
___
Python tracker
<https://bugs.python.org/issu
New submission from Chen Zero :
Hi, when I'm trying to serialize/deserialize python exception object through
pickle, I found that deserialize result is not the same as the original
object...
My python version is 3.9.1, working os: macOS Big Sur 11.4
Here is minimum reproducing code example
New submission from chen-y0y0 :
# Ɪ know, if Ɪ press enter key while input(), the method will be completed and
return a str value.
# Ɪ am trying to insert newline characters as normal characters while input()
method.
# The “normal characters” means:
# 1. It can be deleted by backspace(“\x7b
Change by chen-y0y0 :
--
components: Installation, Windows
nosy: paul.moore, prasechen, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: What does "Python for Windows will still be Python for DOS" mean?
type: performance
versions: P
New submission from chen-y0y0 :
# I tried to install Python 2.0.1 onto my virtual machine(Windows 3.1) for
low-version developing, but an error occurred while the installation:
# Error
# Could not load the DLL library
# C:\TEMP\~GLF256B.TMP.
--
components: IO, Installation
Change by Will Chen :
--
nosy: +WCA
nosy_count: 6.0 -> 7.0
pull_requests: +25458
pull_request: https://github.com/python/cpython/pull/26862
___
Python tracker
<https://bugs.python.org/issu
Will Chen added the comment:
I opened a PR with a fix and a couple comments on its method:
https://github.com/python/cpython/pull/26862
I also *think* I signed the CLA correctly. Not sure. I used my login name here,
rather than my Github login, but my account is linked.
Didn't add any
Change by Will Chen :
--
keywords: +patch
pull_requests: +25437
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/26862
___
Python tracker
<https://bugs.python.org/issu
New submission from Will Chen :
An issue was recently closed that caused synthetic classes and base classes
with invalid `__module__` attributes to raise `KeyError()` in
`typing.get_type_hints()`:
https://bugs.python.org/issue41515
However, the implemented solution appears to be to skip
David Chen added the comment:
After some investigation, i almost finally identified the root cause - it was
caused by the following line in `Server` class in `manager.py` file:
```
self.listener = Listener(address=address, backlog=16)
```
i'm not sure where the magic number `16` came from
New submission from David Chen :
could someone help me out? i spent a lot of time to debug a race condition i
have encountered when using BaseManager, Pool within multiprocessing library.
here is the simplified code:
```
import sys, time
from multiprocessing.managers import BaseManager
New submission from Jerry Chen :
I am not sure if this is a bug or an expected case.
Long story short, I tried to print the content of a
`multiprocessing.Manager().dict()` in the main thread, but I got a strange
error.
I encountered this error only when the number of pools is rather large
New submission from Ran Chen :
If __getattr__ raises exception within a contextlib.context_manager, it creates
a reference cycle and prevents the frame from being garbage collected. This
only happens if the exception is raised inside a context manager inside
__getattr__. It doesn't happen
New submission from Qihao Chen :
Hello, I'm a student from China, and I think there is a bug in Python3.7.
When I use the method "title()", I think the method should not make "'s" upper.
I would appreciate it if you could consider my advice.
--
files: title().
Change by Guanzhong Chen :
--
keywords: +patch
pull_requests: +23406
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24622
___
Python tracker
<https://bugs.python.org/issu
New submission from Guanzhong Chen :
The note about the GIL is buried pretty deep in the threading documentation,
and this makes it hard for first time users to discover why their attempts at
using threading to parallelizing their application did not work.
This used to be the case in the old
New submission from chen-y0y0 :
A example in this picture:
In the red circles, the texts should not be translated. They should be their
original states. Because these texts are options that programmers will input
into their programs. If these texts are translated and input
Kevin Chen added the comment:
Awesome thanks! Does the rewrite fix the issue with creating negated flags as
well?
--
___
Python tracker
<https://bugs.python.org/issue42
New submission from Kevin Chen :
Here's a code sample:
```
import time
from enum import Flag, auto
class MyFlag(Flag):
NONE = 0
FLAG_1 = auto()
FLAG_2 = auto()
FLAG_3 = auto()
FLAG_4 = auto()
FLAG_5 = auto()
FLAG_6 = auto()
#
# NOT_FLAG_1_OR_2 = ~FLAG_1
New submission from Kevin Chen :
Ignore this, opened issue by accident
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/i
Change by Kevin Chen :
--
nosy: aspin2
priority: normal
severity: normal
status: open
title: enum.Flag ~ bitwise negation is very slow
versions: Python 3.8
___
Python tracker
<https://bugs.python.org/issue42
chen-y0y0 added the comment:
--REOPEN--
>>> # I try:
>>> import xxx
>>> del sys.modules['xxx']
>>> # But:
Traceback (most recent call last):
File "", line 1, in
del sys.modules['xxx']
NameError: name 'sys' is not found
>>> # I try
Change by chen-y0y0 :
--
resolution: -> not a bug
stage: needs patch -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from chen-y0y0 :
# I create a module:
# \sys.path\xxx.py
a = 9
# And:
>>> import xxx
>>> xxx.a
9
# I delete this imported module and modified this module:
del xxx
# \sys.path\xxx.py
a = 9
b = 8
# And re-import:
>>> import xxx
>>> xxx.b
# B
chen-y0y0 added the comment:
Yep.
--
___
Python tracker
<https://bugs.python.org/issue41716>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Jason Chen :
import asyncio
from contextvars import *
var = ContextVar('VarTest', default=None)
def get_var(tag=None):
obj = var.get()
if obj is None:
obj = object()
var.set(obj)
print(f'{tag=}: get_var result is {obj=}')
return obj
async
New submission from chen-y0y0 :
# I try:
>>> range(0,5,0.5)
# I hope it will (0.0,0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5). But...
Traceback (most recent call last):
File "", line 1, in
range(0,5,0.5)
TypeError: 'float' object cannot be interpreted as an integer
--
New submission from chen-y0y0 :
# I try to run:
import os
os.system(r"start C:\Windows\System32\")
# But I get an Exception:
SyntaxError: EOL while scanning string literal
# A string after “r” means the string's original meaning. But……
--
components: Argument Clinic
messag
New submission from Baozhen Chen :
when clicking the MacOS menubar-File-About Python, it appears
>>> can't invoke "tk_messageBox" command: application has been destroyed
while executing
"tk_messageBox -icon info -type ok -title [mc "About Widget Dem
Change by Bowie Chen :
--
nosy: +bowiechen
___
Python tracker
<https://bugs.python.org/issue40442>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Bowie Chen :
--
nosy: +bowiechen
___
Python tracker
<https://bugs.python.org/issue40358>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by pingchao chen :
--
keywords: +patch
pull_requests: +17343
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/15498
___
Python tracker
<https://bugs.python.org/issu
New submission from yucheng chen :
issue8277
It couldn't work for those comments before the root element.
It will raise an error that "xml.etree.ElementTree.ParseError: multiple
elements on top level".
Example:
test.xml
test.py
---
from xml.et
Kevin Chen added the comment:
Sorry for the noise. I upgraded my gevent (1.3.5 to 1.4.0) and greenlet
(0.4.13 to 0.4.15) libraries, and that appears to have resolved the issue. I
assume there was an incompatibility in one or both of the older versions of
these libraries with python 3.7
New submission from Kevin Chen :
Unfortunately, I don't currently have a simple test case, but after migrating
an app from python 3.6 to python 3.7, python frequently (but not always)
segfaults when running tests for my app in code related to StopIteration
(perhaps somehow related
Luna Chen added the comment:
Yes I am! :)
Should I start looking into this?
--
___
Python tracker
<https://bugs.python.org/issue34805>
___
___
Python-bugs-list m
Henry Chen added the comment:
PEP 558 will fix this issue, which I've verified with the proposed
implementation (https://github.com/python/cpython/pull/3640/files).
Perhaps this issue can be closed?
--
___
Python tracker
<https://bugs.python.
KunYu Chen added the comment:
Hi alter-bug-tracer,
We notice about this pitfall when extracting zipbomb files.
and we have discussion here
https://bugs.python.org/issue36260
--
nosy: +18z
___
Python tracker
<https://bugs.python.org/issue36
Thank you so much Dennis for the direction.
:)
Wen
-Original Message-
From: Python-list On
Behalf Of Dennis Lee Bieber
Sent: Wednesday, 1 May 2019 4:27 PM
To: python-list@python.org
Subject: Re: python3 html to rtf or doc
On Wed, 1 May 2019 00:16:43 +, Wen-Chen Hol
declaimed
Looking for a library or utility that could transform html to rtf in redhat
environment.
Googled a while still could not find a solution I like.
Any suggestions would be much appreciated
Thanks in advance
Wen
With python2.7 and zopyx.convert, was able to do html to rtf export, with some
css kept
KunYu Chen added the comment:
Thank you for the responses.
I agree with Christian Heimes.
It's indeed better to improve the documentation rather than directly implement
the heuristic.
--
___
Python tracker
<https://bugs.python.org/issue36
KunYu Chen added the comment:
Thank you Karthikeyan Singaravelan.
We're working on it :D
Kunyu Chen
--
___
Python tracker
<https://bugs.python.org/issue36
KunYu Chen added the comment:
Dear community,
I am one of the discoverer of this vulnerability, please tell us what to do
next :D
Kunyu Chen
--
nosy: +18z
___
Python tracker
<https://bugs.python.org/issue36
Change by Henry Chen :
--
nosy: +scotchka
___
Python tracker
<https://bugs.python.org/issue35892>
___
___
Python-bugs-list mailing list
Unsubscribe:
Henry Chen added the comment:
Yes, the mode function could ALWAYS return a list, but that breaks backward
compatibility, as does the currently proposed change.
--
___
Python tracker
<https://bugs.python.org/issue28
Henry Chen added the comment:
The problem remains that the function can return a number or a list for input
that is a list of numbers. This means the user will need to handle both
possibilities every time, which is a heavy burden for such a simple function.
SciPy's mode function does return
Change by Henry Chen :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Henry Chen added the comment:
Another example of this, same bot:
https://buildbot.python.org/all/#/builders/168/builds/669
--
nosy: +scotchka
___
Python tracker
<https://bugs.python.org/issue36
Henry Chen added the comment:
As it happens @cheryl.sabella has created a very useful data set of which files
are impacted by open PRs: https://github.com/csabella/pulls
and as of 2019-02-18, the only open PR that relates to Lib/types.py is
https://github.com/python/cpython/pull/5068
Change by Henry Chen :
--
keywords: +patch
pull_requests: +12021
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36091>
___
___
Py
New submission from Henry Chen :
the following script:
```
import sys, types
def tr(frame, event, arg):
print(frame, event, arg)
return tr
sys.settrace(tr)
```
gives the output:
```
call None
exception (,
GeneratorExit(), )
return None
```
This is due to Lib/types.py creating
Henry Chen added the comment:
I'm having trouble reproducing this issue. The main_coro seems to disappear
when an exception is raised in it, so that it does not show up in the set of
tasks to cancel. I'm probably misunderstanding something basic here. Is it
possible to provide a minimal
Henry Chen added the comment:
An attempt to clarify the issue in my own mind:
def foo():
# import pdb; pdb.set_trace()
exec('pass', {}, FakeContainer())
This function runs successfully. But if you uncomment the pdb line and then
step thru in the pdb console, there is an Exception
Henry Chen added the comment:
Hmm, the example works for me (Python 3.6.5):
>>> import pdb
>>> class FakeContainer:
... def __getitem__(self, key):
... raise KeyError(key)
...
>>> pdb.run("eval('1+1',{},FakeContainer())")
> (1)()
Henry Chen added the comment:
I agree that this behavior is normal, unless there is a use case for passing a
partially implemented mapping object to pdb.run. However I cannot think of such
a use case.
--
___
Python tracker
<ht
Change by Henry Chen :
--
nosy: +scotchka
___
Python tracker
<https://bugs.python.org/issue34782>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Henry Chen :
--
title: Update timeit documentation to reflect default repeat of three -> Update
timeit documentation to reflect default repeat of five
___
Python tracker
<https://bugs.python.org/issu
Change by Henry Chen :
--
keywords: +patch, patch, patch
pull_requests: +11196, 11197, 11198
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Henry Chen :
--
keywords: +patch, patch
pull_requests: +11196, 11197
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Henry Chen :
--
keywords: +patch
pull_requests: +11196
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35738>
___
___
Py
Luna Chen added the comment:
Hi Chih-Hsuan Yen,
I have noticed in your `__init__` method, you have `super().__init__(self)`,
I'm just wondering if the `self` argument is intentional, as the `Foo` object
is to become the format itself?
Because inheritance seems to work fine for me
Luna Chen added the comment:
Hi Chih-Hsuan Yen,
I will check this out and let you know the outcome.
Thanks! :)
--
___
Python tracker
<https://bugs.python.org/issue35
Change by Henry Chen :
--
pull_requests: +10309
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue9633>
___
___
Python-bugs-list mai
Change by Henry Chen :
--
nosy: +henry
___
Python tracker
<https://bugs.python.org/issue22577>
___
___
Python-bugs-list mailing list
Unsubscribe:
Luna Chen added the comment:
Hi bradengroom,
I have reviewed your PR, it's just a small thing! If you could update your PR,
it would be amazing!
Thank you!
--
nosy: +BNMetrics
___
Python tracker
<https://bugs.python.org/issue16
Luna Chen added the comment:
Hi there Lysandros, I'm happy to investigate into this and send a PR. I think
we will need some test cases for this as well. Please let me know! :)
--
nosy: +BNMetrics
___
Python tracker
<https://bugs.python.
Luna Chen added the comment:
Hi Pekka Klärck, I would like to work on this issue and make a PR if you
haven't done it yet.
Thanks!:)
--
nosy: +BNMetrics
___
Python tracker
<https://bugs.python.org/issue34
Change by Luna Chen :
--
pull_requests: +9608
___
Python tracker
<https://bugs.python.org/issue29341>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Luna Chen :
--
pull_requests: +9607
___
Python tracker
<https://bugs.python.org/issue29341>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Luna Chen :
--
keywords: +patch
pull_requests: +9434
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issue29341>
___
_
Luna Chen added the comment:
Farhaan Bukhsh: you said you wanted to work on this but that was over a month
ago, so I presume you've directed your attention elsewhere, and I'd like to
give this a try.
--
nosy: +BNMetrics -thatiparthy
___
Python
Change by Luna Chen :
--
resolution: -> out of date
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Luna Chen added the comment:
Hi Berker, Yes this workaround is mostly for python3.6.0.
I have noticed my PR won't let me get to that version it seems. :(
This bug seems to be present for python 3.5 as well. Would you recommend adding
the fix to 3.5 instead or just simply close it?
Thanks
Change by Luna Chen :
--
keywords: +patch
pull_requests: +9274
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35002>
___
___
Python-
New submission from Luna Chen :
In `configparser.ConfigParser.read()`, it allows us to pass in either a single
filepath or a list of filepath.
As python3 supports pathlib Path. We can potentially pass in a `PosixPath` to
`configparser.ConfigParser.read()`, especially when passing in a list
Change by Luna Chen :
--
keywords: +patch
pull_requests: +9088
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34844>
___
___
Python-
Luna Chen added the comment:
Thank you Vinay!
I think you have some good points! :)
I'm going to make the following changes
- re-raise the keyError into ValueError in XXXStyle.format
- add validate() methods to XXXstyle class, and call them in logging.Formatter
Best regards,
Luna Chen
Change by Luna Chen :
--
title: logging.Formatter enhancement - Checking on style and ->
logging.Formatter enhancement - Checking on style and fmt fields
___
Python tracker
<https://bugs.python.org/issu
New submission from Luna Chen :
Issue: Currently logging.Formatter does not check if the format passed in is
valid style or if the field is valid when creating the logging.Formatter
object. It would be nice to have such check in the constructor of the
logging.Formatter.
Here are 2 scenarios
chen wu added the comment:
to fix this, we change the code of our urilib3. before passing params to
httplib, we set Host in headers if it's ipv6 address.
Thanks so much.
--
resolution: duplicate -> not a bug
stage: -> resolved
status: pending -&g
New submission from Tao Chen :
[Brief Description]
Python 3.7.0 IDLE. After create one Menu instance, and invoke it's config() or
configure() method without any parameter, python print UnicodeDecodeError.
[Walk around]
menubar = Menu(root)
menubar.config(font=('Arial'))
[LOG]
Python 3.7.0
chen wu added the comment:
yeah, i noticed that. but this function also return host with '[]'.
183# IPv6
184if url and url[0] == '[':
185host, url = url.split(']', 1)
186host += ']'
if url is [aaa:bbb]:123, host is [aaa:bbb] and url is ':123'after this process.
when
chen wu added the comment:
Thanks so much for your reply.
when httplib.HTTPConnection is inited with host [fc00::0a08::2] and port 35357,
we can make a request normally. only the 'Host' set in header is wrong. I think
the most simple way to fix this is adding judgement condition, maybe
New submission from chen wu :
when I tried to request a url like "https://[fc00:0a08::2]:35357", I got 400.
The code is like:
import requests
requests.get("https://[fc00:0a08::2]:35357;, verify=False)
And the apache logs:
vhost.c(889): [client fc00:ac1c::9a5:58692]
s-ci.org/urievenchen/speedy-net/jobs/410482655 (by the way,
with Python 3.4.6 the tests pass).
Do you know what is the problem and why I receive these deprecation
warnings?
Thanks,
Uri.
*Uri Even-Chen*
[image: photo] Phone: +972-54-3995700
Email: u...@speedy.net
Website: http://www.speedysoftwa
New submission from Pochang Chen :
Relevant code (Objects/listobject.c lines 2268 -- 2286 as of commit e76ac9d):
/* Choose the best compare, given what we now know about the keys. */
if (keys_are_all_same_type) {
if (key_type == _Type && strings_a
Change by Kevin Chen <kc...@mit.edu>:
--
nosy: +kchen
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue20891>
___
___
Python
New submission from Larry Chen <larry.c...@microsemi.com>:
Upgraded from 3.6.1 to 3.6.3; but got an error when trying to create my virtual
environment.
[larrchen@rslab239 Larry]$ /opt/python3.6.3/bin/python3.6 -m venv
/u/larrchen/work2/SAN/Users/Larry/rslab239_myENV_363
Error: Command
r keys
--- i sum
OK
And the end of the long list after the --- marker we found i and sum. They are
all locals() at the point in the in-line python block. Let's see them:
OK i . cr
99
OK sum . cr
4950
OK
Again, we found the root cause of why the sum is not 5050 because i didn't
reach to 1
New submission from Kevin Chen:
File objects generated with socket.makefile and that attempt to use line
buffering appear to not actually use line buffering, at least for writing. In
this example, the string does not appear to be written until the flush call.
First, set up a socket:
$ nc -l
New submission from Fengyuan Chen:
I suppose asyncio lack async version of sock_close that can call
loop.remove_reader and others before close socket and perhaps lack something
like coroutine AbstractEventLoop.sock_make_blocking that can do some deregister
job.
switch constant in the script
KunYu Chen added the comment:
Thanks Terry,
I'll focus on the current tests. Will catch up with you guys later. :D
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
1 - 100 of 296 matches
Mail list logo