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 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 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
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 Yilei Yang :
The libexpat 2.4.1 upgrade from https://bugs.python.org/issue44394 introduced
the following new exported symbols:
testingAccountingGetCountBytesDirect
testingAccountingGetCountBytesIndirect
unsignedCharToPrintable
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
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:
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
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:
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:
@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
Change by Keelung Yang :
--
components: +Library (Lib)
type: -> enhancement
versions: +Python 3.11
___
Python tracker
<https://bugs.python.org/issu
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
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
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 :
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},
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 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
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
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
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
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
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
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:
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
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
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
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
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
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 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 :
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 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 :
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 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
Change by Boris Yang :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue35286>
___
___
Python-bugs-list
Change by Jiachen Yang :
--
nosy: +Jiachen Yang
___
Python tracker
<https://bugs.python.org/issue41105>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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.
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
Windson Yang added the comment:
Any update?
--
___
Python tracker
<https://bugs.python.org/issue36453>
___
___
Python-bugs-list mailing list
Unsubscribe:
Windson Yang added the comment:
Any update?
--
___
Python tracker
<https://bugs.python.org/issue36093>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
Change by Windson Yang :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue38125>
___
___
Python-bugs-list
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
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 :
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 just updated the PR
--
___
Python tracker
<https://bugs.python.org/issue29750>
___
___
Python-bugs-list mailing list
Unsub
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:
Sorry, I forgot about this PR, I will update the patch depends on review soon :D
--
___
Python tracker
<https://bugs.python.org/issue29
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
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:
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: +13651
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/13765
___
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: +13600
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/13713
___
Python tracker
<https://bugs.python.org/issu
Windson Yang added the comment:
Sure. Feel free to edit my PR.
--
___
Python tracker
<https://bugs.python.org/issue37073>
___
___
Python-bugs-list mailin
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
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
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 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.
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
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:
IIUC, in the c code we just hardcode the name "_io.FileIO" for "PyFileIO_Type"
in https://github.com/python/cpython/blob/master/Modules/_io/fileio.c#L1180. If
we want to get a dynamic name, we should replace the hardcode name with th
Windson Yang added the comment:
I added a PR for like this:
.. note::
You should specify the "xmlcharrefreplace" error handler when open a file
with
specified encoding::
writer = open(
filename, "w", encoding="utf-8
Change by Windson Yang :
--
keywords: +patch
pull_requests: +13263
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Windson Yang :
--
keywords: +patch
pull_requests: +13245
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Windson Yang added the comment:
Where are the documents actually?
--
nosy: +Windson Yang
___
Python tracker
<https://bugs.python.org/issue9267>
___
___
Pytho
Windson Yang added the comment:
I created a PR for it. TBO, meta_path is not a good name since it doesn't
contain any *path* at all.
--
nosy: +Windson Yang
___
Python tracker
<https://bugs.python.org/is
Change by Windson Yang :
--
keywords: +patch
pull_requests: +13211
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue30535>
___
___
Py
Windson Yang added the comment:
An easy fix would be
"Raise ValueError if paths contain (note: use contain instead of contains) both
absolute and relative pathnames or the path are on the different drives."
--
nosy: +Windson Yang
Windson Yang added the comment:
Hello, @Rémi, are you still working on this issue?
--
nosy: +Windson Yang
___
Python tracker
<https://bugs.python.org/issue18
Windson Yang added the comment:
Just to make sure, the expected behavior would be the items should not be
copied because of the permission and the error messages above, right?
--
nosy: +Windson Yang
___
Python tracker
<https://bugs.python.
Windson Yang added the comment:
Frome the answer from Alnitak
(https://stackoverflow.com/questions/12355858/how-many-symbol-can-be-in-an-email-address).
Maybe we should raise an error when the address has multiple @ in it.
--
___
Python tracker
Windson Yang added the comment:
I found the issue located in
https://github.com/python/cpython/blob/master/Lib/email/_parseaddr.py#L277
elif self.field[self.pos] in '.@':
# email address is just an addrspec
# this isn't very efficient since we start over
se
Windson Yang added the comment:
Another question will be are we going to replace the * in our source code in
the future? Since I found lots of our code use 'from xxx import *' pattern.
--
nosy: +Windson Yang
___
Python track
Windson Yang added the comment:
In your first case, *any positive index except 2 will work*, For example:
L = [0, 1, 2]
L[::1], *rest = "abcdef" # L became ['a']
or
L[::3], *rest = "abcdef" # L became ['a', 1, 2]
I found iff when you change the length
Windson Yang added the comment:
> Maybe a line should be added in the documentation to prevent people using
> this as a validator without more check?
I don't expect uuid.UUID could be used as a validator myself, but I agreed we
can warn users in the documentation if lots of t
Windson Yang added the comment:
Thanks, SilentGhost, you are right. I will leave this to a Windows expert
instead.
--
___
Python tracker
<https://bugs.python.org/issue36
Windson Yang added the comment:
on macOS 10.14.4, I got `ValueError: offset must be a timedelta representing a
whole number of minutes, not datetime.timedelta(0, 29143).` I will do some
research to see why this happen.
--
nosy: +Windson Yang
New submission from Windson Yang :
We don't have the base example for priority queue in
https://docs.python.org/3.8/library/heapq.html#priority-queue-implementation-notes,
We can add something like:
> q = Q.PriorityQueue()
> q.put(10)
> q.put(1)
> q.put(5)
> while not
Change by Windson Yang :
--
keywords: +patch
pull_requests: +12871
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue36654>
___
___
Py
Windson Yang added the comment:
Yes, I can make a PR for it.
--
___
Python tracker
<https://bugs.python.org/issue36654>
___
___
Python-bugs-list mailin
Change by Windson Yang :
--
keywords: +patch
pull_requests: +12826
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Windson Yang :
--
keywords: +patch
pull_requests: +12821
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Windson Yang :
--
pull_requests: +12820
___
Python tracker
<https://bugs.python.org/issue36682>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Windson Yang :
--
keywords: +patch
pull_requests: +12819
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Windson Yang :
--
keywords: +patch
pull_requests: +12818
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Windson Yang :
--
keywords: +patch
pull_requests: +12817
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Windson Yang :
--
keywords: +patch
pull_requests: +12816
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Windson Yang added the comment:
I agreed most of the documents won't need the change, but some documents like
https://docs.python.org/3/library/dataclasses.html#dataclasses.field didn't
mention we have to run `from typing import List` and I guess most developers
not familiar
Windson Yang added the comment:
I can find some example in the docs that didn't `import the correct module`
even in the first example. Should we add the `import` statement for all of them?
--
nosy: +Windson Yang
___
Python tracker
&
New submission from Windson Yang :
> The tokenize() generator requires one argument, readline, which must be a
> callable object which provides the same interface as the io.IOBase.readline()
> method of file objects. Each call to the function should return one line of
> input as
Windson Yang added the comment:
I added some tests in the PR. Actually, there are some tests for extend_path
already (see
https://github.com/python/cpython/blob/master/Lib/test/test_pkgutil.py#L235).
However, I didn't test every line of the code in the extend_path fun
Change by Windson Yang :
--
keywords: +patch
pull_requests: +12795
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue14817>
___
___
Py
New submission from Windson Yang :
Is it an expected behavior the get_importer function only returns the first
valid path_hook(importer) from sys.path_hooks?
def get_importer(path_item):
"""Retrieve a finder for the given path item
The returned find
Windson Yang added the comment:
My base idea would be some unittests for the function like:
class ExtendPathBaseTests(unittest.TestCase):
def test_input_string(self):
path = 'path'
name = 'foo'
self.assertEqual('path', pkgutil.ext
Windson Yang added the comment:
This looks interesting. Let me try to fix it.
--
nosy: +Windson Yang
versions: +Python 3.8, Python 3.9 -Python 3.6
___
Python tracker
<https://bugs.python.org/issue36
1 - 100 of 268 matches
Mail list logo