yang added the comment:
I ran into the same issue and looked into the code, and found it more
complicated than I thought. The more I went on, more issues occur. I wonder if
I should open a new issue, but I will first comment here. If you feel like this
should be a new issue, I will open one
yang added the comment:
You assigned a handler to a variable `formatter`, and then called
`setFormatter(formatter)`, but `formatter` is in fact a handler. The two
classes `Formatter` and `Handler` happen to have a same name method `format`
which is called when logging. So what happend is
Change by yang :
--
keywords: +patch
nosy: +fhsxfhsx
nosy_count: 2.0 -> 3.0
pull_requests: +18760
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/19398
___
Python tracker
<https://bugs.python.org/i
yang added the comment:
If socket error occurred I think it is a timeout error or something. but It's
not error raising correctly but IndexError which is not correct error MSG.
It will be fixed or None type check needed.
--
resolution: -&g
Change by yang :
--
keywords: +patch
pull_requests: +5286
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32729>
___
___
Python-
yang added the comment:
In the lib/socket.py
Inside of readinto function, 576 line
needed None type check or something
--
___
Python tracker
<https://bugs.python.org/issue32
yang added the comment:
When timeout error occurred in urllib3.Poolmanager.urlopen(), the built-in
TimeoutError raised which is not caught in existing timeout exception clause.
Thus, It is caught by 'error' except and it is not checking Nonetype so that
raising IndexError
It pa
yang added the comment:
Oh.. you are right.
I think it's my bug. here is code
```
import urllib3
import certifi
from functools import wraps
import signal
from urllib3 import Timeout
def timeoutdec(sec):
def decorator(func):
def _timeout(signum, frame):
New submission from Yang :
The mismatched content length will cause hang up in sys.stdin.read().
The reason is probably described in Issue 1214 as well as 1725295.
length = int(os.environ.get('CONTENT_LENGTH', None))
"""Length fix for IIS 7.x to avoid hang up&qu
New submission from Jason Yang :
In python(3.8.10)/tkinter(8.6.9), it won't generate "<>" event
if we delete selected item of ttk.Treeview, but it will for
python(3.9.9/3.10.1)/tkinter(8.6.12).
Check it just by clicking 'Delete Item 1' button in following demo
New submission from Jason Yang :
Button no response when clicked if mouse move into tooltip and tooltip
destroyed for Python 3.9.9/3.10.1 and tkinter 8.6.12
You can check it by moving mouse into button, then move to tooltip after it
shown, then click button and you won't get respons
Jason Yang added the comment:
>From https://core.tcl-lang.org/tk/reportlist, I found the same issue
ttk::treeview <> event bug
https://core.tcl-lang.org/tk/tktview?name=2a6c62afd9
It is an old bug from 2014 anf not fixed, and now it fixed.
OK, no more question about it.
Thank you
New submission from Yilei Yang :
When Python is built and linked with tcmalloc, using ProcessPoolExecutor may
deadlock. Here is a reproducible example:
$ cat t.py
from concurrent import futures
import sys
def work(iteration, item):
sys.stdout.write(f'working: iteration={iteration},
Keelung Yang added the comment:
@pitrou
Firstly, I can't agree with `it is quite uncommon to open a file in append
mode`. It should be depended to users and their application scenes.
@pablogsal
Secondly, I think `Path.write_*(, append=False)` is better then adding new
APIs, as discuss
New submission from Yilei Yang :
Examples:
>>> datetime.datetime(, 1, 1, microsecond=99).timestamp()
7952371200.99
>>> datetime.datetime(, 1, 1, microsecond=99).timestamp()
43012195201.0
>>> datetime.datetime(2567, 1, 1, microsecond=98).timest
New submission from Keelung Yang :
Three reasons to improve issue 35095: Implement pathlib.Path.append_bytes and
pathlib.Path.append_text
1. If I want to append text to log at each startup(before calling basicConfig),
there is no simple way to do this.
2. Adding append keyword is better
Change by Keelung Yang :
--
components: +Library (Lib)
type: -> enhancement
versions: +Python 3.11
___
Python tracker
<https://bugs.python.org/issu
Keelung Yang added the comment:
@barneygale,
This is for simplifying code and improve readability, since `Readability
counts` in The Zen of Python.
Users needn't two lines code to append a file. And there is a minimal modifying
to reach it.
If inexperienced users are falling into the
Keelung Yang added the comment:
This shouldn't be limited logging.
In unstable application scene, file should be append and then close immediately
to avoid breaking filesystem (e.g. inode is not updated timely). Such as
main.py file in MicroPython development board, user may disconnec
Keelung Yang added the comment:
In file operations, write/modify/append, which one is generic/common? They're
all.
Modifying need more then one line code, but write/oppend needn't.
Two lines are bad to readability and readability counts.
How do you determine it's no
Keelung Yang added the comment:
Without append kwarg, users need two lines to append. It's bad to both
readability and writability.
Library developers should focus on bath language and library's design targets,
but how frequently used. And as all discussed here, at least one ap
Jason Yang added the comment:
The platform is WIN10 which shown at last line in first message.
I don't have other platforms to test if ok or not.
--
___
Python tracker
<https://bugs.python.org/is
Keelung Yang added the comment:
OK. Since most are opposed to append kwarg, I close this issue.
Thanks ALL!
--
resolution: -> wont fix
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Yilei Yang :
The libexpat 2.4.1 upgrade from https://bugs.python.org/issue44394 introduced
the following new exported symbols:
testingAccountingGetCountBytesDirect
testingAccountingGetCountBytesIndirect
unsignedCharToPrintable
Change by Yilei Yang :
--
keywords: +patch
pull_requests: +29540
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31397
___
Python tracker
<https://bugs.python.org/issu
New submission from Jason Yang :
When scrolled items by mouse wheel in tk.Listbox/ttk.Combobox, some items not
shown.
Is it a bug ? or I did something wrong ?
In following case, 'Wednesday' will not shown when scroll mouse wheel at
- tk.Listbox or vertical scrollbar of tk.L
New submission from Heran Yang :
I'm using `re.fullmatch` to match a string that only contains 0 and 1. The
regular expression is: (0+|1(01*0)*1)+
It runs rather slow with Python 3.7, but when I try using regex in C++, with
std::regex_constants::__polynomial, it works well.
Would so
New submission from Yilei Yang :
The uid & gid variable from
https://github.com/python/cpython/blob/9833bb91e4d5c2606421d9ec2085f5c2dfb6f72c/Modules/_posixsubprocess.c#L737-L738
can be passed to the `do_fork_exec` call below uninitialized and cause msan to
report use-of-uninitialized-v
New submission from Yang Zhang :
Calling Pool.map (and friends) on empty lists [] causes Pool._cache to hang on
to the MapResults forever:
tp = ThreadPool(5)
xs = tp.map(lambda x: 'a' * int(10e6), range(100))
# now using 1GB mem = 100 * 10MB strs
del xs
gc.collect()
# still usi
Yang Zhang added the comment:
Oops, sorry - pasted a wrong example.
In [38]: tp = ThreadPool(5)
In [39]: xs = tp.map(lambda x: x, [])
In [40]: xs
Out[40]: []
In [41]: tp._cache
Out[41]: {3: }
--
___
Python tracker
<http://bugs.python.
New submission from Yang Zhang :
I'm seeing this issue on all the multiple Ubuntu 10.04 boxes I've tried.
I reduced a problem I was seeing in my application down into the following test
case. In this code, a parent process concurrently spawns 2 (you can spawn more)
subprocesses t
Yang Zhang added the comment:
After way too much time, I figured it out, after a quote from this post jumped
out at me:
See the "I/O on Pipes and FIFOs" section of pipe(7) ("man 7 pipe")
"If all file descriptors referring to the write end of a pipe have
been c
New submission from Michael Yang <[EMAIL PROTECTED]>:
>>> help()
help> modules os
Here is a list of matching modules. Enter any module name to get more help.
posix - This module provides access to operating system
...
stringprep - Library that exposes various tables found in
New submission from Michael Yang <[EMAIL PROTECTED]>:
# pickle.dumps is not able to process an instance of
# a class that inherits from 'dict' and
# overrides the built-in __getattribute__ method
# but can successfully process one that
# overrides the__getattr__ method
>&
New submission from Yang Zhao <[EMAIL PROTECTED]>:
send_header() in BaseHTTPRequestHandler currently does a write to socket
every time send_header() is called. This results in excessive number of
TCP packets being regenerated. Ideally, as much of the HTTP packet is
buffered as possible, b
New submission from Jackson Yang :
# Python 3.1.2rc1 (r312rc1:78742, Mar 7 2010, 07:49:40)
# [MSC v.1500 32 bit (Intel)] on win32
import ctypes
class T(ctypes.Structure):
_fields_ = (
('member', ctypes.c_char * 16),
)
# dereference a c_char_Array vari
New submission from Michael Yang <[EMAIL PROTECTED]>:
doctest.testmod() fails when attempting to echo back a bytes type with
ord() > 128.
def ok():
"""
>>> bytes([255,])
b'\xff'
"""
pass
def notOK():
"""
>
New submission from Michael Yang :
I want to use the included test.regrtest (located in
$pythondir/lib/python[ver]/test) to regression test some of my own
scripts located in directory myDir. The script has some nice
configurability features to skip some tests based on machine
configurations
Changes by Michael Yang :
--
type: -> behavior
___
Python tracker
<http://bugs.python.org/issue4886>
___
___
Python-bugs-list mailing list
Unsubscri
New submission from Windson Yang :
At the beginning of https://docs.python.org/3.7/library/io.html#io.RawIOBase,
we declared that
> Binary I/O (also called buffered I/O)
and
> Raw I/O (also called unbuffered I/O)
But we didn't mention if Text I/O use buffer or not which led t
Windson Yang added the comment:
I found the document is not that clear when I try to understand what happens
when Python read/write a file. I'm not sure who also needs this information. As
you said, It wouldn't help the user program in Python. However, make it more
clear maybe
New submission from Windson Yang :
I got two errors when I try to build python document with
make venv
make html
The first one is
> Since v2.0, Sphinx uses "index" as master_doc by default. Please add
> "master_doc = 'contents'" to your conf.py
Change by Windson Yang :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue38125>
___
___
Python-bugs-list
New submission from Windson Yang :
bisect_left should be similar to bisect_right. However, the current implement
didn't reflect it. A little bit update for the bisect_left function could make
the user easy to understand their relation.
def bisect_left(a, x, lo=0, hi=None):
if l
New submission from Yang Feng :
In documentation of random.getstate(), it says:
“random.getstate()
Return an object capturing the current internal state of the generator. This
object can be passed to setstate() to restore the state.”
random.getstate() takes 0 argument and return the current
New submission from Huang Yang :
from ctypes import *
import struct
i = int('7f94e57c', 16)
cp = pointer(c_int(i))
fp = cast(cp, POINTER(c_float))
print(fp.contents.value) # nan
print(struct.pack(">f", fp.contents.value).hex()) # 7fd4e57c
# value change
Huang Yang added the comment:
It's reproducible only if the float is nan, with prefix 7f or ff.
Seems the value is OR operated by 0x0040.
--
___
Python tracker
<https://bugs.python.org/is
Huang Yang added the comment:
Also reproducible by:
from ctypes import *
i = int('7f94e57c', 16)
cp = pointer(c_int(i))
fp = cast(cp, POINTER(c_float))
print(fp.contents.value) # nan
p = pointer(c_float(fp.contents.value))
ip = cast(p, POINTER(c_int))
print(hex(ip.cont
Huang Yang added the comment:
OK. Seems it's the default behavior of CPU instruction. And CPU follows the
IEEE standard of float.
Is there any workaround?
--
status: pending -> open
___
Python tracker
<https://bugs.python.org
Edward Yang added the comment:
Supposing I like the old behavior (line number of the end of the statement), is
there any way to recover that line number from the traceback after this change?
--
nosy: +ezyang
___
Python tracker
<ht
New submission from Edward Yang :
The fact that the error indicator may be set during tp_dealloc is somewhat well
known
(https://github.com/posborne/dbus-python/blob/fef4bccfc535c6c2819e3f15384600d7bc198bc5/_dbus_bindings/conn.c#L387)
but it's not documented in the official manual. We s
Patrick Yang added the comment:
I ended up in this issue after I learnt the following from the Python Library
Reference Manual.
float(..).
For a general Python object x, float(x) delegates to x.__float__(). If
__float__() is not defined then it falls back to __index__().
The
Windson Yang added the comment:
Any update?
--
___
Python tracker
<https://bugs.python.org/issue36093>
___
___
Python-bugs-list mailing list
Unsubscribe:
Windson Yang added the comment:
Any update?
--
___
Python tracker
<https://bugs.python.org/issue36453>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Yang Feng :
Seeing the following program, in the second assertRaises(), function
"test_invalid_adpcm_state()" is recursively called. Then a fatal Python error
shows up and the Python interpreter crashes.
++
import unitt
New submission from Yang Feng :
In following teststr.py, class MyString is nestedly instanced in method
__getattr__(). This script will lead to a "core dump" in Python interpreter.
My Python version is 3.9.1 and my operating system is Ubuntu 16.04.
New submission from Yang Feng :
In the following programs, dict is created in recursive calls. Then a core dump
is reported by Python interpreter.
+++
def test_equal_operator_modifying_operand():
class X():
def __del__(DictTest
New submission from Yang Feng :
In the following programs, we call check_reentrant_insertion("s") twice, after
multiple of update and clear of dict, the Python interpreter crashes.
+++
def check_reentrant_insertion(mutate):
clas
New submission from Yang Feng :
We use run_with_locale() as decorator function, then we recursively call
test_float__format__locale in the following example. Python interpreter crashes.
+++
from test.support import run_with_locale
@run_with_locale
New submission from Yang Feng :
In the following program, we call check_free_after_iterating( ) twice, in the
second time, we recursively call function test_free_after_iterating(). Python
interpreter crashes.
+++
import unittest
import test.support
Yang Feng added the comment:
Could you please tell me your secret method of getting the minimal script?
I will try to provide minimal ones in our following work.
--
___
Python tracker
<https://bugs.python.org/issue43
Keelung Yang added the comment:
It's reoccurable in Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:37:02)
[MSC v.1924 64 bit (AMD64)] on windows version 10.0.19041.264
Just need to open "Python 3.8 Manuals (64-bit)" --> index --> input 'p' on
keyboard.
New submission from Edward Yang :
Consider the following program:
```
import inspect
from typing import Generic, TypeVar
T = TypeVar('T')
class A(Generic[T]):
def __init__(self) -> None:
pass
print(inspect.signature(A))
```
I expect inspect.signature to ret
Change by Jiachen Yang :
--
nosy: +Jiachen Yang
___
Python tracker
<https://bugs.python.org/issue41105>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Boris Yang :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue35286>
___
___
Python-bugs-list
New submission from Yilei Yang :
Because unittest adds a `default` filter before tests run, other warnings
filters are overridden if added before.
Ideally, unittest should not make the warnings less serious, e.g. if there is
already an 'error' filter that raises exception, it
harvey yang added the comment:
i am not use it to split whitespace or newline. i use it to split Chinese full
stop. and the result is showed at the earlier message.
--
___
Python tracker
<http://bugs.python.org/issue14
harvey yang added the comment:
i see. thanks :)
--
___
Python tracker
<http://bugs.python.org/issue14068>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Edward Yang :
The syslog module is missing constants for a number of logging priorities
available on modern Linuxen. In particular, the following options are missing:
LOG_ODELAY, LOG_AUTHPRIV, LOG_SYSLOG, LOG_UUCP.
--
components: Library (Lib)
messages: 156842
nosy
Edward Yang added the comment:
I misspoke about UUCP. SYSLOG appears to be missing from the documentation.
Arguably they should be present if Linux supports them, and missing if they
don't (same as LOG_PERROR, and some of the other constants.) Then you can do
feature detection Python
New submission from Edward Yang :
When generating a backtrace from an interactive Python session (e.g. the input
is from , Python attempts to actually find a file named , to
somewhat hilarious consequences.
See the strace'd Python session below:
>>> foo
open("/etc/defaul
Edward Yang added the comment:
"" is a valid name of a file on Unix systems. So the fix is not so clear.
ezyang@javelin:~$ python
Python 2.7.2+ (default, Oct 4 2011, 20:03:08)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license
Windson Yang added the comment:
I'm not sure it's a bug. When you write binary data to file (use BufferedIOBase
by default). It actually writes the data to a buffer. That is why tell() gets
out of sync. You can follow the instrument belolw. For instance, call flush()
after writ
Windson Yang added the comment:
I think we should mention it at the document, like in the tell() function.
--
___
Python tracker
<https://bugs.python.org/issue36
New submission from Windson Yang :
> PyBytes_FromStringAndSize(const char *v, Py_ssize_t len):
> Return a new bytes object with a copy of the string v as value and length len
> on success, and NULL on failure. If v is NULL, the contents of the bytes
> object are uninitialized.
Change by Jizhou Yang :
--
assignee: christian.heimes
components: SSL
nosy: Jizhou Yang, christian.heimes
priority: normal
severity: normal
status: open
title: PEM cadata causes ssl.SSLError: nested ans1 error
type: crash
versions: Python 2.7
New submission from Jizhou Yang :
Loading cadata in PEM format results in a nested asn1 error. Workaround is to
convert cadata to unicode.
Minimum code for reproducing the issue:
>>>import ssl
>>> with open('ca.crt') as f:
... ca_crt = f.read()
...
>&g
Jizhou Yang added the comment:
Thanks a lot for the quick answer! Verified that the proposed solution works
with PEM certificates in both Python 2 and 3.
--
stage: -> resolved
status: pending -> closed
___
Python tracker
<https://bugs.p
Windson Yang added the comment:
Sure. Feel free to edit my PR.
--
___
Python tracker
<https://bugs.python.org/issue37073>
___
___
Python-bugs-list mailin
Change by Windson Yang :
--
keywords: +patch
pull_requests: +13600
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/13713
___
Python tracker
<https://bugs.python.org/issu
Change by Windson Yang :
--
pull_requests: +13602
pull_request: https://github.com/python/cpython/pull/13715
___
Python tracker
<https://bugs.python.org/issue37
Change by Windson Yang :
--
keywords: +patch
pull_requests: +13651
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/13765
___
Python tracker
<https://bugs.python.org/issu
Windson Yang added the comment:
I just create a PR for it.
--
nosy: +Windson Yang
___
Python tracker
<https://bugs.python.org/issue37086>
___
___
Python-bug
Change by Windson Yang :
--
keywords: +patch
pull_requests: +13652
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/13768
___
Python tracker
<https://bugs.python.org/issu
Windson Yang added the comment:
Hi, Andrés Delfino. Are you still working on it?
--
nosy: +Windson Yang
___
Python tracker
<https://bugs.python.org/issue15
Windson Yang added the comment:
Sorry, I forgot about this PR, I will update the patch depends on review soon :D
--
___
Python tracker
<https://bugs.python.org/issue29
Change by Windson Yang :
--
pull_requests: +14813
pull_request: https://github.com/python/cpython/pull/15064
___
Python tracker
<https://bugs.python.org/issue29
Windson Yang added the comment:
I just updated the PR
--
___
Python tracker
<https://bugs.python.org/issue29750>
___
___
Python-bugs-list mailing list
Unsub
New submission from Yang Xiao:
There is a functionality bug in linecache library.
>>test.py<<
import linecache
def test_getline(f):
print linecache.getlines(f)
if __name__ == "__main__":
tf1 = 'aaa'
with open(tf1,'w') as f:
f.wr
Yang Xiao added the comment:
Sorry, there is a mistake in msg296874.
The expectant output shoule be:
['good morning\n']
['good evening\n']
['good morning 123\n']
['good evening 123\n']
--
___
Python tra
Change by Windson Yang :
--
assignee: -> docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python
___
Python tracker
<https://bugs.python.org/issu
Windson Yang added the comment:
I get NameError for both versions in both 3.4.4, 3.5.2, 3.6.4, 3.7.1
--
nosy: +Windson Yang
___
Python tracker
<https://bugs.python.org/issue35
New submission from Boris Yang :
How to repeat:
# -*- coding: UTF-8 -*-
from difflib import SequenceMatcher
seqMatcher = SequenceMatcher(None, "德阳孩子", "孩子德阳")
seqMatcher.get_matching_blocks()
Expect Result:
[Match(a=0, b=3, size=2), Match(a=2, b=0, size=2), Match(a=5, b=
Change by Boris Yang :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue35288>
___
___
Python-bugs-list
Change by Boris Yang :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue35289>
___
___
Python-bugs-list
Change by Boris Yang :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue35287>
___
___
Python-bugs-list
Windson Yang added the comment:
I will fix this issue after we have consensus with the future of .pth file in
#33944
--
___
Python tracker
<https://bugs.python.org/issue35
Windson Yang added the comment:
I will work on it if no one wants to create a PR for this next week.
--
___
Python tracker
<https://bugs.python.org/issue35
Windson Yang added the comment:
I agreed with Serhiy. I also found the function decode the output with latin-1,
I think it will be better to use utf-8 instead.
--
nosy: +Windson Yang
___
Python tracker
<https://bugs.python.org/issue35
Windson Yang added the comment:
If I understand correctly, this may be better.
Try to find the module name. If path is omitted or None, the list of directory
names given by sys.path is searched. If path is built-in or frozen modules,
return None instead.
BTW, the dosstring should also be
1 - 100 of 268 matches
Mail list logo