Change by Marin M :
--
keywords: +patch
pull_requests: +30374
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/32312
___
Python tracker
<https://bugs.python.org/issu
New submission from Marin M :
LZMAFile doesn't have attribute name, unlike GzipFile which has it. Trying to
access that attribute results in error.
PR is ready with code changes and tests which mimics what is already available
for GzipFile (e.g. we do not take name from BytesIO() ob
Change by Marin M :
--
keywords: +patch
pull_requests: +30373
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/32311
___
Python tracker
<https://bugs.python.org/issu
New submission from Marin M :
BZ2File doesn't have attribute name, unlike GzipFile which has it. Trying to
access that attribute results in error.
PR is ready with code changes and tests which mimics what is already available
for GzipFile (e.g. we do not take name from BytesIO() ob
Change by Marin M :
--
keywords: +patch
pull_requests: +30371
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/32310
___
Python tracker
<https://bugs.python.org/issu
New submission from Marin M :
init of class GzipFile has mtime as an optional argument, but open() function
does not.
When using open(), mtime will always be set to the current time and so far
there was no way of fixing it to a specific timestamp.
In case two people would tar.gz the same
New submission from David M. :
Awaiting multiple times on a single task that failed with an exception results
in an unbounded increase in memory usage. Enough repeated "await"s of the task
can result in an OOM.
The same pattern on a task that didn't raise an exception beha
New submission from Curtis M <3ed7qja...@liamekaens.com>:
Example code to replicate issue on python 3.10.2 is attached.
How to replicate issue:
1. Define a namedtuple where all fields have default values. At least one
field's default value will be an empty list: []
2. Instantiate
M Z <10mauryc...@gmail.com> added the comment:
FYI: My platform is arch linux on amd64.
--
___
Python tracker
<https://bugs.python.org/issue46206>
___
___
New submission from M Z <10mauryc...@gmail.com>:
Reproduction steps:
0. start rpel. command: ``python``
1. enter into '___😀'
2. use arrow keys and backspace to delete an underscore
3. press enter.
4. observe segfault
- insertion of chars before emoji can also cause crash
New submission from Sergey M. :
Due to
```python
try:
self.handle()
finally:
self.finish()
```
construct in `socketserver.BaseRequestHandler.__init__()` method inherited
classes with `overrided __init__()` method may suffer from incomplete
initialization.
For example, in the
Mgs M Rizqi Fadhlurrahman added the comment:
OK, thank you for the answers. Sorry for the false alarm.
--
___
Python tracker
<https://bugs.python.org/issue45
Mgs M Rizqi Fadhlurrahman added the comment:
@eric.smith Wow you're right! Somehow the """ got deleted. (screenshot attached)
It can run normally now after I added the """ back.
More details:
I'm using Ubuntu 18.04.2.
I installed python 3.10.0 using
Mgs M Rizqi Fadhlurrahman added the comment:
Here:
```
Python 3.10.0 (default, Oct 30 2021, 15:16:25) [GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import getopt
Traceback (most recent call las
Mgs M Rizqi Fadhlurrahman added the comment:
Screenshot attached
https://bugs.python.org/file50422/OnPaste.20211103-125049.png
--
___
Python tracker
<https://bugs.python.org/issue45
New submission from Mgs M Rizqi Fadhlurrahman :
It looks like there is a breaking change related to python 3.10.0
implementation that impacted getopt package.
https://docs.python.org/3/library/getopt.html
https://github.com/python/cpython/blob/3.10/Lib/getopt.py
Steps to reproduce:
1. Run
New submission from E. M. P. Höller :
urllib.request.Request internally .capitalize()s header names before adding
them, as can be seen here:
https://github.com/python/cpython/blob/3.9/Lib/urllib/request.py#L399
Since HTTP headers are case-insensitive, but dicts are not, this ensures that
New submission from John M. Boger :
In the documentation for sqlite3.executescript() in python 3.9+, the pseudoword
"transation" appears. I am reasonably sure "transaction" is meant, although it
could be "translation".
--
assignee: docs@python
comp
T M added the comment:
That's fine. I couldn't find anything official on it, but that change is
working for me.
Thank you!
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.py
T M added the comment:
importlib_resources 1.1.X also behaves this way:
https://github.com/python/importlib_resources/issues/85
--
___
Python tracker
<https://bugs.python.org/issue44
New submission from T M :
In Python 3.7 and 3.8, importlib.resources.path worked perfectly with a
directory.
For example:
with importlib.resources.path(__package__, "dir") as dir:
os.listdir(dir)
In Python 3.9, this is raised: IsADirectoryError: [Errno 21] Is a directory:
On 04.05.2021 22:07, Steve Dower wrote:
>
> Perhaps what I'm suggesting here is that I don't see any reason for "sudo pip
> install ..." into a distro-installed Python to ever need to work, and would
> be quite happy for it to just fail miserably every time (which is already the
> case for the
Kevin M added the comment:
eryksun, wow, that's speedy analysis, but there might be more to it. I went
and tested a bunch of test cases. my subrocess code doesn't seem to hang on
Linux where the thread example code does?
Linux - Python 3.6.8 - your threading example DOESN
New submission from Kevin M :
I've noticed an issue (or user error) in which Python a call that otherwise
usually works in the __del__ step of a class will freeze when the Python
interpreter is exiting.
I've attached sample code that I've ran against Python 3.9.1 on Window
On 31.03.2021 11:30, STINNER Victor wrote:
>
> To me, it sounds really weird to accept an encoding when a file is opened in
> binary mode. open(filename, "rb", encoding="locale") looks like a bug.
Same here.
If encoding is used as an argument and then not used, this is a bug,
not a feature :-)
On 19.03.2021 14:57, Inada Naoki wrote:
>
> Background: PEP 597 adds new `encoding="locale"`option to open() and
> TextIOWrapper(). It is same to `encoding=None` for now, but it means using
> "locale encoding" explicitly.
>
> But this is wrong in UTF-8 mode.
Please address UTF-8 mode explicitl
On 19.03.2021 14:47, STINNER Victor wrote:
>
> STINNER Victor added the comment:
>
>> - If you add "current", people will rightly ask: then what do all the
>> other APIs in the locale module return ? Of course, they all return
>> the current state of settings :-) So this is unnecessary as well.
On 19.03.2021 12:35, Eryk Sun wrote:
>
> Eryk Sun added the comment:
>
>> Read the ANSI code page on Windows,
>
> I don't see why the Windows implementation is inconsistent with POSIX here.
> If it were changed to be consistent, the default encoding at startup would
> remain the same, since s
On 19.03.2021 12:26, STINNER Victor wrote:
>
> STINNER Victor added the comment:
>
> Recently, I spent some days to document properly encodings used by Python.
Thanks for documenting this.
I would prefer to leave the locale module to really just an interface
to the lib C locale logic and not a
On 19.03.2021 12:05, STINNER Victor wrote:
> I'm not sure what to do with locale.getdefaultlocale(). Should we deprecate
> it? I never used this function. How is it used? For which purpose?
>
> I undertand that in 2000, locale.getdefaultlocale() was interesting to avoid
> calling setlocale(LC_CTY
On 19.03.2021 11:36, STINNER Victor wrote:
>
> STINNER Victor added the comment:
>
>> locale.getencoding()
>>
>> which interfaces to nl_langinfo(CODESET) or the Windows code
>> page and does not try to do any magic, ie. does *not* call
>> setlocale(). It needs to return what the lib C currently
On 19.03.2021 10:17, STINNER Victor wrote:
>
> New submission from STINNER Victor :
>
> I propose to add two new functions:
>
> * locale.get_locale_encoding(): it's exactly the same than
> locale.getpreferredencoding(False).
>
> * locale.get_current_locale_encoding(): always get the current lo
New submission from Marek M :
It can be helpful to mention that variables defined in try block are visible in
except/finally block as well. I did not find this info in Python tutorial and
for me (having C++ background) this is quite unexpected feature.
--
assignee: docs@python
Marcos M added the comment:
Let me provide a link to ease finding this piece of documentation
https://docs.python.org/3/howto/descriptor.html#static-methods
--
___
Python tracker
<https://bugs.python.org/issue43
New submission from Marcos M :
> To recap, functions have a __get__() method so that they can be converted to
> a method when accessed as attributes. The non-data descriptor transforms an
> obj.f(*args) call into f(obj, *args). Calling cls.f(*args) becomes f(*args).
I THINK it s
On 17.02.2021 15:02, Anders Munch wrote:
>> BTW: What is wxWidgets doing with the returned values ?
>
> wxWidgets doesn't call getlocale, it's a C++ library (wrapped by wxPython)
> that uses C setlocale.
>
> What does use getlocale is time.strptime and datetime.datetime.strptime, so
> when getl
On 17.02.2021 10:55, Anders Munch wrote:
import locale
locale.setlocale(locale.LC_ALL, 'en_DE')
> 'en_DE'
locale.getlocale()
> Traceback (most recent call last):
> File "", line 1, in
> File "C:\flonidan\env\Python38-64\lib\locale.py", line 591, in getlocale
> return _parse_
On 20.01.2021 12:07, STINNER Victor wrote:
> Maybe we should even go further in Python 3.10 and only split at "&" by
> default, but let the caller to opt-in for ";" separator as well.
+1.
Personally, I've never seen URLs encoded with ";" as query parameter
separator in practice on the server sid
M. Eric Irrgang added the comment:
Actually, it looks like performance concerns were raised as issues
[2303](https://bugs.python.org/issue2303) and
[2534](https://bugs.python.org/issue2534). For #2534, the issue was different.
For issue #2303, behavior-changing optimization was proposed
M. Eric Irrgang added the comment:
The optimization appears to have been made without this level of discussion.
The change to PEP 3119 was likely overlooked. The intended PEP 3119 behavior
seems clear and reasonable.
r61575 was a small part of the SVN merge that became git commit
Change by M. Eric Irrgang :
--
nosy: +eirrgang
___
Python tracker
<https://bugs.python.org/issue35083>
___
___
Python-bugs-list mailing list
Unsubscribe:
On 25.11.2020 11:13, STINNER Victor wrote:
> Platform was always a thin wrapper to OS functions. For example, there is no
> unified API to retrieve OS name and version on Windows, macOS or Linux. You
> need to pick the proper function. For me, freedesktop_os_release() just
> follows this trend.
Joshua M. Clulow added the comment:
Hi! I'm a member of the illumos core team, and I'm also pretty keen for us to
keep Python support! Some of our core OS build and packaging tooling is
written in Python, and certainly applications like Synapse (Matrix) and Review
Board are im
New submission from Thomas M. Alldread :
Several attempts to install numpy/scipy packages failed. Pip reported pages of
error information. Reverting back to version 3.8.5 resolved the issue using the
exact same procedure.
--
components: Extension Modules, Installation, Windows
Ian M. Hoffman added the comment:
I agree with you. When I wrote "desired behavior" I intended it to mean "my
selfishly desired outcome of not loading my struct with a dangling pointer."
This issue seems to have descended into workarounds that treat the symptoms;
I
Ian M. Hoffman added the comment:
You are correct.
After further review, I found an older ctypes issue #12836 which was then
enshrined in a workaround in the numpy.ndarray.ctypes interface to vanilla
ctypes.
https://numpy.org/doc/stable/reference/generated/numpy.ndarray.ctypes.html
Numpy
New submission from Ian M. Hoffman :
A description of the problem, complete example code for reproducing it, and a
work-around are available on SO at the link:
https://stackoverflow.com/questions/64083376/python-memory-corruption-after-successful-return-from-a-ctypes-foreign-function
In
Just found an internal API which already takes care of
unregistering a search function: _PyCodec_Forget().
All that needs to be done is to expose this as codecs.unregister()
and add the clearing of the lookup cache.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the
On 23.09.2020 14:56, STINNER Victor wrote:
> Marc-Andre Lemburg explained:
>
> "There is no API to unregister a codec search function, since deregistration
> would break the codec cache used by the registry to speedup codec
> lookup."
>
> One simple solution would be to clear the cache
> (PyInte
Edson Tadeu M. Manoel added the comment:
> I'm not sure if this warning is intentional, since in Python 3 there seems to
> be no special reason for dicts to try to compare 'a' with b'a' (other than
> possible implementation details).
Okay, there's on
New submission from Edson Tadeu M. Manoel :
Here is the inconsistent behavior, when running with `python -bb` (or just
`python -b`), caused by an internal cache:
>>> import struct
>>> struct.calcsize(b'!d') # cache for '!d' uses bytes
8
&
Phillip M. Feldman added the comment:
I'd forgotten about ''.join; this is a good solution. I withdraw my
comment.
On Mon, Sep 7, 2020 at 3:25 PM Steven D'Aprano
wrote:
>
> Steven D'Aprano added the comment:
>
> Marco, sum should be as fast as pos
New submission from Phillip M. Feldman :
I'm not sure whether this is a bug or a feature request, but it seems as though
the following should produce the same result:
In [1]: 'a' + 'b' + 'c'
Out[1]: 'abc'
In [2]: sum(('a', 'b',
Change by M-o-T :
--
title: Problem in tutorial/introduction.html#strings -> fix
___
Python tracker
<https://bugs.python.org/issue41666>
___
___
Python-
Change by M-o-T :
--
nosy: -mohammadtavakoli1378
___
Python tracker
<https://bugs.python.org/issue41666>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from M-o-T :
Hi, I found a problem with this address
https://docs.python.org/3/tutorial/introduction.html#strings
In here
>>> word[0:2] # characters from position 0 (included) to 2 (excluded)
'Py'
>>> word[2:5] # characters from position 2 (include
Change by M W :
--
assignee: -> christian.heimes
components: +SSL
nosy: +M W2, christian.heimes
___
Python tracker
<https://bugs.python.org/issue39603>
___
_
Change by Gustavo J. A. M. Carneiro :
--
nosy: +gustavo
___
Python tracker
<https://bugs.python.org/issue4>
___
___
Python-bugs-list mailing list
Unsub
New submission from Arkady M :
I am running an HTTP server (socketserver.ThreadingMixIn,
http.server.HTTPServer) in a Docker container (FROM ubuntu:19.10)
Occasionally I get an exception:
Exception happened during processing of request from ('172.17.0.1', 35756)
Traceback (most r
New submission from M T :
I have no use for IPv6 and, when recompiling my OS, disable the feature
completely. Python compiles nicely despite of this, but the IPv6-related tests
fail instead of being skipped:
ERROR: test_create_server_ipv6
Mauro S. M. Rodrigues added the comment:
So per Serhiy comment can I assume the patch is not necessary? If so I believe
the issue should be closed as well.
--
___
Python tracker
<https://bugs.python.org/issue25
Mauro S. M. Rodrigues added the comment:
Hi Anthony,
Thanks for asking, yeah I'm interested in push a new version. I'll do it later
today and I'll post a link to the pr here.
--
___
Python tracker
<https://bugs.pyt
New submission from Shani M :
It showing the wrong string order. 'sss' is to be appear at 3rd place but it
comes at last place. 'qwe' is to appear at last place but it comes at 3rd place.
--
files: Screenshot from 2020-02-10 14-08-52.png
messages: 361675
nosy: Shan
New submission from Santiago M. Mola :
PyUnicode_FromKindAndData copies input data and transforms it to the most
compact representation. This behavior is not documented.
Proposed wording:
> The input buffer is copied and transformed into the canonical representation,
> if necessar
New submission from Shanavas M :
Doc says "A special quirk of Python is that -- if no :keyword:`global`
statement is in A special quirk of Python is that -- if no :keyword:`global`
or :keyword:`nonlocal`
effect -- assignments to names always go into the innermost scope."
nonlo
Bernhard M. Wiedemann added the comment:
ping.
Another 19th of January passed.
I'd still like to see progress on this, because this hinders my other y2038 bug
discovery work.
--
versions: +Python 3.5, Python 3.8, Python 3.9
___
Python tr
Raphaël M added the comment:
Thank you very much!
--
___
Python tracker
<https://bugs.python.org/issue35459>
___
___
Python-bugs-list mailing list
Unsubscribe:
Raphaël M added the comment:
Any pointer would also be welcome, and a piece of code showing the bug would
help me a lot. Thank you.
--
___
Python tracker
<https://bugs.python.org/issue35
Raphaël M added the comment:
I stumbled upon this issue while reading Python 3.8 and this made me curious.
I've tried writing some Python code to reproduce this bug, but I'm unable to --
I should be missing something. Is there a simple snippet showing the issue?
Also, the change
Change by M. Eric Irrgang :
--
pull_requests: +16231
pull_request: https://github.com/python/cpython/pull/16648
___
Python tracker
<https://bugs.python.org/issue32
Sangeeta M Chauhan added the comment:
Sir, I was expecting that the precedence should be given to relational
operator ( 7>"str") and according to that instead of printing 9 it
should give error.
On Mon, Sep 9, 2019 at 8:38 PM Tim Peters wrote:
>
> Tim Peters
Sangeeta M Chauhan added the comment:
i am not satisfied ..with your answer . as in the following expression 9
or 7 > "str" precedence must be given to relational operator . why is is
executing logical operator first??
if we write 4>9 or 7> "str&quo
New submission from Sangeeta M Chauhan :
precendence betweeen relational and logical operators not working properly if
expression contains single values instead of sub expressions. . Please see
attached file
--
components: Interpreter Core
files: pythonBug.py
messages: 351344
nosy
M. Anil Tuncel added the comment:
I guess the use of negative indices serve the same purpose here as in lists or
strings.
Though as Ezio pointed out, the current behaviour is already accepting negative
indices but providing inconsistent results in comparison to various other
Python modules
M. Anil Tuncel added the comment:
Are they still missing? inspect.ismodule() seems to be there at least.
https://docs.python.org/3/library/inspect.html
--
nosy: +anilbey
___
Python tracker
<https://bugs.python.org/issue19
MANI M added the comment:
sorry my bad
query = "insert into table(column) values('{}')".format(escape("Hello'`~world"))
--
___
Python tracker
MANI M added the comment:
I've scripts which insert data into MySQL database. The values may contain
symbols. Hence in order to escape that I use re.escape(). @erik.smith isn't
re.escape() supposed to escape all the symbols. If not why is this introduced
in 3.7 whereas previou
MANI M added the comment:
Thanks a lot for the info. May I know in what version of python the patches are
applied? Because still 3.7.3 seems to have the issue.
--
___
Python tracker
<https://bugs.python.org/issue37
New submission from MANI M :
Recently I figured out an issue in python3 re which doesn't escape some special
characters.
Not sure whether this bug has been reported already.
Have attached screenshots for your reference.
Steps to reproduce:
1. wget https://www.python.org/ftp/python/
Change by Bernhard M. Wiedemann :
--
keywords: +patch
pull_requests: +12308
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issu
New submission from Bernhard M. Wiedemann :
While working on reproducible builds for openSUSE, I found countless python
modules that come with binary .so files that did not build reproducibly from
non-deterministic filesystem readdir order.
One contributing factor is bpo-30461 that will not
Bernhard M. Wiedemann added the comment:
unreproducible .pyc files are still one of the major headaches for my work on
openSUSE reproducible builds.
There is also one aspect where i586 builds end up with different .pyc files
than x86_64 builds. And then we randomly chose one of them for our
Phillip M. Feldman added the comment:
'Should include "_ssl" somewhere in the message?' Exactly so. If a given
import statement imports 30 items, it would be helpful to know which one
caused the hickup. Thanks!
On Wed, Mar 13, 2019 at 12:28 PM Steve Dower wrote:
&g
Phillip M. Feldman added the comment:
Hello Steve,
I'm buying only 50 percent of this. The Python interpreter must know what
module it was trying to import, and can at least be able to report that.
Phillip
On Tue, Mar 12, 2019 at 8:42 AM Steve Dower wrote:
>
> Steve Dower
New submission from Phillip M. Feldman :
I have a module that contains an import statement that imports a large number
of items. This import was failing with the following error message:
ImportError: DLL load failed: The specified module could not be found.
The message would be so much more
Change by Mathew M. :
--
pull_requests: +10473
___
Python tracker
<https://bugs.python.org/issue32077>
___
___
Python-bugs-list mailing list
Unsubscribe:
Bernhard M. Wiedemann added the comment:
It does not need to be fixed tomorrow, but 2037 is too late, because by then
there will be a lot of legacy systems around.
(Un)fortunately many systems live 10+ years now
--
___
Python tracker
<ht
New submission from Bernhard M. Wiedemann :
To reproduce:
touch -d 2038-01-20 /usr/lib/python3.6/site-packages/six.py
python3 /usr/lib64/python3.6/compileall.py
File "/usr/lib64/python3.6/compileall.py", line 198, in compile_path
legacy=legacy, optimize=optimize)
File &
Gustavo J. A. M. Carneiro added the comment:
What a shame, I've seen this error many times as well.
Surely making it BaseException will not break that much code?...
--
nosy: +gustavo
___
Python tracker
<https://bugs.python.org/is
New submission from Johannes M. :
Since about a decade, it's a know problem that NumPy and Pandas initialization
function crashes on reinitialization after a call to Py_Finalize() +
Py_Initialize().
[https://github.com/numpy/numpy/issues/8097]
[https://github.com/numpy/numpy/issues/
Phillip M. Feldman added the comment:
My apologies for the tone of my remark. I am grateful to you and others
who donate their time to develop the code.
I'm attaching the wrapper code that I created to work around the problem.
Phillip
def expander(paths='./*'):
"&qu
Phillip M. Feldman added the comment:
It appears that the `importlib` package has the same issue: One can't
provide an iterator for the path. When searching a large folder tree for
an item that is likely to be found early in the search process (i.e., at a
high level in the folder tree)
New submission from Phillip M. Feldman :
`imp.find_module` goes down in flames if one tries to pass an iterator rather
than a list of folders. Firstly, the message that it produces is somewhat
misleading:
RuntimeError: sys.path must be a list of directory names
Secondly, it would be
Phillip M. Feldman added the comment:
That works. Thanks!
I think that this boils down to a documentation issue. The following says
that the default behavior is to line-wrap the help messages. At least to
me, this doesn't imply that whitespace is getting eaten.
RawDescriptionHelpForm
New submission from Phillip M. Feldman :
With `argparse`, I'm providing a triple-quoted string via the `description`
argument of the constructor. When I invoke the script with the -h or --help
argument, all formatting in the triple-quoted string is lost, i.e., all
paragraphs ar
Bernhard M. Wiedemann added the comment:
also related to this topic: https://github.com/pypa/pip/pull/5525 for pip's
RECORD file.
--
___
Python tracker
<https://bugs.python.org/is
Scott M added the comment:
7 years and counting...
My need for a fix is long gone, but I'd like to be able to tell the original
group I worked with whether it's now safe to use tkinter from threads. It looks
like my original guesses were validated and a fix has been made, but I c
Change by Scott M :
--
nosy: +PythonInTheGrass
___
Python tracker
<https://bugs.python.org/issue33257>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from M J Harvey :
Hi,
multiprocessing's default assumption about Pool size is os.cpu_count() ie all
the cores visible to the OS.
This is tremendously unhelpful when running multiprocessing code inside an HPC
batch system (PBS Pro in my case), as there's no way to h
New submission from Mariano M. Chouza :
When trying to import a module from a ZIP archive containing more than 65535
files, the import process fails:
$ python3 -VV
Python 3.6.4 (default, Jan 6 2018, 11:49:38)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)]
$ cat create_zips.py
1 - 100 of 456 matches
Mail list logo