New submission from Andrey :
```
import os, sys
def import_module(dir_path, module_name, ref_module_name = None):
module_file_path = os.path.join(dir_path, module_name).replace('\\', '/')
if sys.version_info[0] > 3 or sys.version_info[0] == 3 and
sys.version_i
Andrey added the comment:
Confirmed. I have the same problem. I suspect this is related to
https://bugs.python.org/issue41699.
--
nosy: +whoKilledLora
___
Python tracker
<https://bugs.python.org/issue44
New submission from Andrey :
Add an ability to use "elif" in for statement and while statement besides "else"
Example
Now:
```python3
for i in range(j):
...
else:
if i > 5:
...
else:
...
```
Shall be:
```python3
for i in range(j):
...
e
Change by Andrey :
--
keywords: +patch
pull_requests: +17082
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/17610
___
Python tracker
<https://bugs.python.org/issu
New submission from Andrey :
The bug is happened when the async reading/writing interrupted by other async
method which reconnects the socket. The closed socket calls the appropriate
handler in the loop due to cannot be removed due to wrong fileno of socket.
--
components: asyncio
Change by Andrey :
--
keywords: +patch
pull_requests: +4334
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32015>
___
___
Python-
Change by Andrey :
--
title: Asyncio cycling during simultaneously socket read/write and reconnection
-> Asyncio looping during simultaneously socket read/write and reconnection
___
Python tracker
<https://bugs.python.org/issu
Andrey added the comment:
Yes, however would it make sense to add it, so mimetypes recognizes it by
default? I will make a PR if it makes sense.
--
___
Python tracker
<https://bugs.python.org/issue32
Andrey added the comment:
When "type, encoding = mimetypes.guess_type('file.js.br')" is used not only the
"encoding" is not set to "brotli", but the type is also not recognized.
Such code is used in aiohttp for example.
My proposal is to add
Andrey added the comment:
Currently aiohttp doesn't support Brotli. (I'm here because I would like to get
that support)
When it gets (as a server) a request for file.html it checks if file.html.gz
exists (and accept-encoding contains 'gzip'). It then send file.html.gz to
Andrey added the comment:
NodeJS: https://www.npmjs.com/package/brotli
Python:
https://pypi.python.org/pypi/brotlipy
https://pypi.python.org/pypi/Brotli
Ubuntu: https://launchpad.net/ubuntu/+source/brotli
That said I don't expect an average user to compress their files as .br, but i
New submission from Andrey :
On reconnect from aiomysql (after the pool has recycled the old connection) by
using ssl context it hangs forever. Interrupting gives the following Traceback:
File "/usr/local/lib/python3.6/site-packages/aiomysql/connection.py", line
464, in _connect
New submission from Andrey:
Hi all,
The PyArena data type is defined in the pyarena.h under the #ifndef
Py_LIMITED_API statement, so it's not included in the limited api. But this
type is used in Python-ast.h, ast.h and asdl.h headers that included in the
limited api, because they
Andrey added the comment:
There are just three simple steps to setup ABI checker:
1. Create ABI dump of the _reference_ version (see instructions [1]) and commit
it to the source tree (ABI-ref.dump):
$> abi-compliance-checker -l python -dump descriptor.xml -dump-path ABI-ref.dump
2. Cre
New submission from Andrey Morozov :
run_me.py:
import subprocess, sys
e = {'PATH_TO_MY_APPS' : "path/to/my/apps"}
p = subprocess.Popen(sys.executable + " test1.py 123", env=e, shell=True,
stdout=subprocess.PIPE)
print(p.stdout.readlines())
p.wait()
test1.py
Andrey Morozov added the comment:
WIDW ?
--
Added file: http://bugs.python.org/file23839/test1.py
___
Python tracker
<http://bugs.python.org/issue13524>
___
___
Andrey Morozov added the comment:
it fix my problem:
e = os.environ.copy()
e['PATH_TO_MY_APPS'] = "path/to/my/apps"
p = subprocess.Popen(sys.executable + " test1.py 123", env=e, shell=True,
stdout=subprocess.PIPE)
answer: need have copy of environments
---
New submission from Andrey Men :
In russian windows seven SP1, x32, installed from 2.7.1/2.7.2 MSI installer:
>>> import SimpleHTTPServer
Traceback (most recent call last):
File "", line 1, in
import SimpleHTTPServer
File "C:\Python\lib\SimpleHTTPServer.py&
Andrey Vlasovskikh added the comment:
> On closer look your patch is also ignoring SystemExit. I think it's
> beneficial to honor SystemExit, so a user could use this as a means to
> replace the current process with a new one.
Yes, SystemExit should cancel all the tasks that ar
Changes by Andrey Vlasovskikh :
--
nosy: +vlasovskikh
___
Python tracker
<http://bugs.python.org/issue9205>
___
___
Python-bugs-list mailing list
Unsubscribe:
Andrey Popp <8may...@gmail.com> added the comment:
> the spec says "an object of type str" he means 'type(x) is str' as opposed to
> 'isinstance(x, str)'
-1 Liskov substitution principle states, that every subtype S of type T can be
used whenever typ
Andrey Popp <8may...@gmail.com> added the comment:
I've also sent message[1] to web-sig about this issue.
[1]: http://mail.python.org/pipermail/web-sig/2011-January/004986.html
--
___
Python tracker
<http://bugs.python.
New submission from Andrey Vlasovskikh :
multiprocessing.Pool methods map, imap, etc. are said to be able to normally
handle exceptions. But it seems that it is true only for synchronous exceptions
inside their first func arguments.
When (typically during a long-running parallel map) a user
Andrey Vlasovskikh added the comment:
Yes, here is my test case.
--
Added file: http://bugs.python.org/file16743/test_pool_keyboardinterrupt.py
___
Python tracker
<http://bugs.python.org/issue8
Andrey Vlasovskikh added the comment:
Yes, I've come up with the same solution by myself, but it cannot cover all the
cases of the bug. It works only for cases when ^C is hit during a call to the
users' function:
http://stackoverflow.com/questions/1408356/keyboard-interrupts-wi
Andrey Vlasovskikh added the comment:
Despite of several workarounds available on the Web, the problem persists.
Almost any exception that is rised in `worker` function while putting or
getting tasks from queues result in Pool hang up. Currently, `worker` is only
aware of Exception
Changes by Andrey Vlasovskikh :
Removed file: http://bugs.python.org/file16743/test_pool_keyboardinterrupt.py
___
Python tracker
<http://bugs.python.org/issue8
Andrey Vlasovskikh added the comment:
Here is a patch that fixes this problem. Basically, it catches all the
BaseExceptions that could happen during: a) getting a task from the `inqueue`,
b) calling a user function, c) putting a task into the `outqueue`. The
exception handler puts the
New submission from Andrey Skvortsov <[EMAIL PROTECTED]>:
stat.ST_CTIME and stat.ST_ATIME are mixed up.
ST_CTIME gives access time and should be ST_ATIME and vice versa
ST_ATIME gives creation time. Linux.
--
components: Library (Lib)
messages: 64310
nosy: sassas
severity:
New submission from Andrey Petrov :
In the SocketServer.UDPServer Example, the second last line:
server = SocketServer.UDPServer((HOST, PORT), BaseUDPRequestHandler)
Should be:
server = SocketServer.UDPServer((HOST, PORT), MyUDPHandler)
--
assignee: georg.brandl
components
New submission from Andrey Moiseev :
sys.stdin.readline() in Windows console only allows 512 characters on input per
line. So large pastes are truncated at 512 chars, which is a bit inconvenient
for prototyping.
The buffer size seems to be determined by BUFSIZ compile time constant:
https
New submission from Andrey Brykin :
Python crashes when running this code (I attached the error message screenshot):
import pandas as pd
d = {'col1': [[0.] * 25] * 2560}
df = pd.DataFrame(data=d)
df.to_parquet('data.parquet')
for j in range(15):
table = pd.read_parquet(
Andrey Brykin added the comment:
pandas version is 1.1.5
--
___
Python tracker
<https://bugs.python.org/issue44460>
___
___
Python-bugs-list mailing list
Unsub
New submission from Andrey Moiseev :
The following code hangs:
import asyncio
import unittest
class TestCancellation(unittest.IsolatedAsyncioTestCase):
async def test_works(self):
raise asyncio.CancelledError()
if __name__ == '__main__':
uni
Andrey Bienkowski added the comment:
I'll give it a try
--
___
Python tracker
<https://bugs.python.org/issue42384>
___
___
Python-bugs-list mailing list
Change by Andrey Bienkowski :
--
pull_requests: +23139
pull_request: https://github.com/python/cpython/pull/24320
___
Python tracker
<https://bugs.python.org/issue42
Change by Andrey Bienkowski :
--
pull_requests: +23140
pull_request: https://github.com/python/cpython/pull/24321
___
Python tracker
<https://bugs.python.org/issue42
Change by Andrey Bienkowski :
--
pull_requests: +23141
pull_request: https://github.com/python/cpython/pull/23412
___
Python tracker
<https://bugs.python.org/issue42
Change by Andrey Bienkowski :
--
pull_requests: +23142
pull_request: https://github.com/python/cpython/pull/24322
___
Python tracker
<https://bugs.python.org/issue42
Change by Andrey Bienkowski :
--
pull_requests: +23143
pull_request: https://github.com/python/cpython/pull/24323
___
Python tracker
<https://bugs.python.org/issue42
New submission from Andrey Petukhov :
Is it possible to use callable to replace __del__ method of class?
if so, how to get self variable?
class A(object):
"""A."""
class C(object):
"""Callable."""
def __call__(self,
New submission from Andrey Bienkowski :
This was mentioned in #31121, but I believe this deserves its own separate
issue. If the debug target is specified using a relative path and later the
current directory is changed, pdb tries to search for the target in the new
current directory. This
Andrey Bienkowski added the comment:
Another way to reproduce this that will continue to work once #42383 is fixed
is to delete or move the script while it's being debugged.
--
nosy: +hexagonrecursion
___
Python tracker
<https://bugs.py
New submission from Andrey Bienkowski :
The first entry in sys.path is different between `python foo.py` and `python -m
pdb foo.py`. In the former it is the absolute path to the parent directory of
foo.py while in the later it is a relative path (unless the debug target was
specified using
Andrey Bienkowski added the comment:
I'll look into fixing this after I fix #42383
--
___
Python tracker
<https://bugs.python.org/issue42384>
___
___
Pytho
Andrey Bienkowski added the comment:
I'm working on fixing this
--
___
Python tracker
<https://bugs.python.org/issue42383>
___
___
Python-bugs-list m
Andrey Bienkowski added the comment:
After reading Lib/pdb.py:main I believe I can fix both by changing a single
line.
--
___
Python tracker
<https://bugs.python.org/issue42
Change by Andrey Bienkowski :
--
keywords: +patch
pull_requests: +7
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23338
___
Python tracker
<https://bugs.python.org/issu
Change by Andrey Bienkowski :
--
keywords: +patch
pull_requests: +8
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23338
___
Python tracker
<https://bugs.python.org/issu
New submission from Andrey Bienkowski :
When the target exits, pdb automatically restarts it. If the target changed
something before exiting the changes will remain unless pdb explicitly undoes
them. While working on #42383 I had an idea: it would be useful if pdb reverted
the changes the
Change by Andrey Bienkowski :
--
pull_requests: +22305
pull_request: https://github.com/python/cpython/pull/23412
___
Python tracker
<https://bugs.python.org/issue42
Andrey Kislyuk added the comment:
For anyone else looking for a solution to this, I wrote a library:
https://github.com/kislyuk/rehash
--
nosy: +Andrey.Kislyuk
___
Python tracker
<http://bugs.python.org/issue11
Changes by Bienkowski Andrey :
--
pull_requests: +3217
___
Python tracker
<http://bugs.python.org/issue737999>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Andrey Ovchinnikov :
--
nosy: +anikey
___
Python tracker
<https://bugs.python.org/issue23428>
___
___
Python-bugs-list mailing list
Unsubscribe:
Andrey Paramonov added the comment:
Might as_completed() be considered a low-level API, but as of Python 3.7 there
are seemingly no ready alternatives to achieve proposed behavior. All of
asyncio.gather(), asyncio.wait(), asyncio.as_completed() expect awaitables list
of limited size; doing
Andrey Paramonov added the comment:
> an implicit requirement that back pressure from the consumer should be
> handled (i.e. if whoever's iterating through "async for fut in
> as_completed(...)" is too slow, then the tasks should pause until it catches
> u
New submission from Andrey Lemets :
This code (https://gist.github.com/EnotYoyo/d751951c5ff77e22686715aa9ab05b56)
works correctly in python3.6.6 but does not in python3.6.8+
--
components: asyncio
messages: 338953
nosy: Andrey Lemets, asvetlov, yselivanov
priority: normal
severity
Andrey Paramonov added the comment:
Hello!
Below is updated implementation containing more consistent error handling.
The main rough edges encountered:
1. asyncio.Queue alone proved insufficient for precise control of limit, as
asyncio.create_task() schedules created Task() immediately and
New submission from Andrey Bychkov :
In some linux distributions, the information about the distribution is
incorrectly determined when the linux_distribution() method is called from the
platform class. Since the information file os-release becomes a certain
standard, I propose first of all
Andrey Bychkov added the comment:
it's patch is not actual. new diff in git pull request!
--
___
Python tracker
<https://bugs.python.org/issue33435>
___
___
New submission from Andrey Bychkov :
In some linux distributions, the information about the distribution is
incorrectly determined when the linux_distribution() method is called from the
platform class. Since the information file os-release becomes a certain
standard, I propose first of all
Change by Andrey Bychkov :
--
keywords: +patch
Added file: https://bugs.python.org/file47590/fix-issue-33513.patch
___
Python tracker
<https://bugs.python.org/issue33
Change by Andrey Bychkov :
--
pull_requests: +6530
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue33513>
___
___
Python-bugs-list mai
Andrey Bychkov added the comment:
I think that it would be good to update linux_distribution, the discussion has
been going on for a long time, but still in some cases the information is not
determined correctly.
It seems to me that the methods used are not entirely correct. My change more
New submission from Andrey Klinger :
Brotli (.br) encoding is not recognized by mimetypes module.
mimetypes doesn't have API for adding encodings.
The encoding is supported by most browsers: https://caniuse.com/#feat=brotli
--
components: Library (Lib)
messages: 306188
nosy: A
Andrey Bychkov added the comment:
I think, at this moment, the optimal is parsing information from os-release
file, because it's contained in majority linux distributions. Also can using
'Lsb_release -a' command, but not all distributions support 'Linux Standard
Base
Change by Andrey Bychkov :
--
pull_requests: +6650
___
Python tracker
<https://bugs.python.org/issue28167>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Andrey Ovchinnikov :
--
nosy: +anikey
___
Python tracker
<https://bugs.python.org/issue31267>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Andrey Vlasovskikh :
--
keywords: +patch
pull_requests: +8116
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issue1
Andrey Vlasovskikh added the comment:
I've added a PR with a patch I developed during the EuroPython 2018 sprint.
I've fixed this issue in a way that is more or less consistent with how
'_thread' threads interact with sys.excepthook, but I haven't added the log
line
Andrey Vlasovskikh added the comment:
> Would it be possible to modify the default implementation of sys.excepthook
> to have a different output when it's not called from the main thread? Mimick
> the current traceback from threads.
I agree it's a good idea to mimic wha
New submission from Andrey Paramonov :
Currently, memoryview values can be assigned from all bytes-like objects
(https://docs.python.org/3/glossary.html#term-bytes-like-object) except byte
array.array:
import array
mview = memoryview(bytearray(b'hello'))
mview[:] = byt
Andrey Kislyuk added the comment:
FYI: http://pypi.python.org/pypi/argcomplete
--
nosy: +Andrey.Kislyuk
___
Python tracker
<http://bugs.python.org/issue14
New submission from Andrey Antsut:
When embedding Python into C++, Py_Initialize() crashes with following errors
if the standard library (python33\lib) is in a zip archive (e.g. python33.zip):
Fatal Python error: Py_Initialize: unable to load the file system codec
ImportError: No module named
Andrey Antsut added the comment:
Just checked - confirming that it works with 3.3.5rc2.
--
status: pending -> open
___
Python tracker
<http://bugs.python.org/issu
New submission from Andrey Antsut:
Importing modules from subdirectories as "implicit namespace packages" (PEP
420) inside a ZIP archive only works one level deep. Imports from within nested
namespaces fail with "ImportError: No module named 'XXX'".
I am att
Andrey Petrov added the comment:
Once upon a time I wrote a library that did some of this among other things:
http://code.google.com/p/urllib3/
Or specifically:
http://code.google.com/p/urllib3/source/browse/trunk/urllib3/filepost.py
The code was borrowed from some of the recipes mentioned
New submission from Andrey Chichak :
After setting cookies with same name and different path only nearest to
root cookie is available.
Attached patch:
1. Set Cookie to nearest value.
2. Collects all same name values in Cookie._multi[''] in
order.
--
components: Library (
Andrey Chichak added the comment:
Remake for patch due the requirements of
http://www.python.org/dev/patches/
--
Added file: http://bugs.python.org/file15606/Cookie_multi.diff
___
Python tracker
<http://bugs.python.org/issue7
Andrey Chichak added the comment:
This is fix for rare problem. If I set 2 cookies:
sid=pub.GHoBitAWLt, path="/"
sid=cab.S97jUfeihM, path="/cab"
All browsers in Cookie header send for any URL '/cab*':
sid=cab.S97jUfeihM; sid=pub.GHoBitAWLt
Current implementat
New submission from Andrey Rahmatullin :
Mbox file is recreated during flush(), so the new file has access
rights according to umask, which is not necessarily the same as of the
old file.
--
components: Library (Lib)
messages: 82604
nosy: wRAR
severity: normal
status: open
title
Andrey Rahmatullin added the comment:
Linux
--
___
Python tracker
<http://bugs.python.org/issue5346>
___
___
Python-bugs-list mailing list
Unsubscribe:
Andrey Chichak added the comment:
1. Cookie.py.diff is fix for error, very rare error.
2. Cookie_multi.diff is extention for supporting same name cookies set for
diferent pathes.
Cookie.py contain error!
--
___
Python tracker
<h
Andrey Kislyuk added the comment:
Is there any chance of getting this into 3.6? We are still in a situation where
the shlex module misleads developers into believing that it has functionality
to parse things the way the shell does. I've had to vendor the copy of shlex
with patches from
New submission from Andrey Lebedev:
Under certain circumstances, wsgiref.simple_server.demo_app may return unicode
data, but that is prohibited by PEP-.
This happens if environ with unicode key is passed to demo_app. Unicode keys
are then written to StringIO instance, automatically making
Andrey Tykhonov added the comment:
Also:
errno.EXDEV in Lib/distutils/file_util.py
errno.ENOTCONN in Lib/poplib.py
errno.EINVAL in Lib/subprocess.py
errno.ENOTCONN in Lib/smtpd.py, Lib/ssl.py, Lib/imaplib.py
errno.EOPNOTSUPP, errno.ENOTSUP, errno.ENOTSUP, errno.ENODATA in Lib/shutil.py
Changes by Andrey Tykhonov :
--
components: Library (Lib)
nosy: asvetlov, atykhonov
priority: normal
severity: normal
status: open
title: Errno checking replaced by concrete classes inherited from OSError
type: enhancement
versions: Python 3.4
Changes by Andrey Tykhonov :
--
keywords: +patch
Added file: http://bugs.python.org/file29716/issue17651.diff
___
Python tracker
<http://bugs.python.org/issue17
Changes by Andrey Tykhonov :
--
components: +Library (Lib)
type: -> enhancement
versions: +Python 3.4
___
Python tracker
<http://bugs.python.org/issu
Andrey Tykhonov added the comment:
Sure!
--
___
Python tracker
<http://bugs.python.org/issue17651>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Andrey Wagin:
In [1]: import socket
In [2]: sks = socket.socketpair(socket.AF_UNIX, socket.SOCK_DGRAM)
In [3]: sks[1].send("asdfasdfsadfasdfsdfsadfsdfasdfsdfasdfsadfa")
Out[3]: 42
In [4]: sks[0].recv(1, socket.MSG_PEEK | socket.MSG_TRUNC)
Out[4]:
'a\x00\x
Andrey Wagin added the comment:
sendto(4, "asdfasdfsadfasdfsdfsadfsdfasdfsd"..., 42, 0, NULL, 0) = 42
recvfrom(3,
"a\0n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0\0\0\0\0\2\0\0\0"..., 1,
MSG_TRUNC, NULL, NULL) = 42
I think the exit code is interpreted incorrectly. In this
Andrey Wagin added the comment:
There is the same behavior for python 3.4
>>> sks[1].send(b"asdfasdfsadfasdfsdfsadfsdfasdfsdfasdfsadfa")
42
>>> sks[0].recv(1, socket.MSG_PEEK | socket.MSG_TRUNC)
b'a\x00Nx\x94\x7f\x00\x00sadfasdfsdfsadfsdfasdfsdfasdfsadfa'
Changes by Andrey Wagin :
--
type: -> security
___
Python tracker
<http://bugs.python.org/issue24933>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Andrey Fedyashov:
Here's actual OS version:
OS Name: Microsoft Windows 10 Enterprise Insider Preview
OS Version:10.0.10534 N/A Build 10534
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstati
New submission from Andrey Smirnov:
Termios magic constants for the following baud rates:
- B50
- B576000
- B921600
- B100
- B1152000
- B150
- B200
- B250
- B300
- B350
- B400
in Linux are different between various architectures (i. e
New submission from Andrey Fedorov:
The attach_mock in the following code sample fails silently:
>>> from mock import patch, Mock
>>> p = patch('requests.get', autospec=True)
>>> manager = Mock()
>>> manager.attach_mock(p.st
Changes by Andrey Fedorov :
--
title: mock.attach_mock should work with return value of patch() ->
mock.attach_mock should work with any return value of patch()
___
Python tracker
<http://bugs.python.org/issu
Andrey Fedorov added the comment:
There's some vagueness on how this is implemented, but I would prefer
manager.attach_mock to also work with whatever the return value of patch()
is.
On Fri, Nov 11, 2016 at 12:08 PM, Syed Suhail Ahmed
wrote:
>
> Syed Suhail Ahmed added the comm
Andrey Fedorov added the comment:
To clarify, this is how I would expect these two functions to work together
"out of the box"
patches = { 'requests_get': 'requests.get', ... }
root_mock = mock.Mock()
for name, path in patches.items():
m = m
1 - 100 of 101 matches
Mail list logo