Change by Ivan Pozdeev :
--
keywords: +patch
pull_requests: +6903
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue33709>
___
___
Py
Change by Ivan Pozdeev :
--
pull_requests: +6904
___
Python tracker
<https://bugs.python.org/issue33709>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Ivan Pozdeev :
c:\Users\Sasha\Documents\cpython\Tools\msi>python msi.py
Traceback (most recent call last):
File "msi.py", line 1372, in
add_files(db)
File "msi.py", line 956, in add_files
generate_license()
File "msi.py&quo
Ivan Pozdeev added the comment:
... can be built with such a glaring mistake in the script.
--
___
Python tracker
<https://bugs.python.org/issue33711>
___
___
Ivan Levkivskyi added the comment:
Hm, replacing the return with a random string, this leads to another crash:
Traceback (most recent call last):
File "", line 1, in
File "/Users/ilevkivskyi/src/cpython/Lib/_sitebuiltins.py", line 103, in
__call__
return pydo
Ivan Levkivskyi added the comment:
Adding Yury as an inspect expert. I don't think this is something urgent, we
can probably postpone this to 3.7.1.
--
nosy: +yselivanov
___
Python tracker
<https://bugs.python.org/is
Ivan Pozdeev added the comment:
It's not about "convincing" me or anyone else. It's about showing how this will
be a strict improvement.
I showed that the HTTP RFC allows apps to rely on the fact that they are
receiving all the headers. So filtering them arbitrari
Ivan Pozdeev added the comment:
In 3.x, it turns out, this doesn't result in test failures in stock
configuration.
It does though if PYTHONLEGACYWINDOWSFSENCODING is in system environment.
I was diagnosing failures in 2.x and saw that 3.x has the same logic, so it was
a no-brain
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.o
Ivan Levkivskyi added the comment:
Oh yes, this is a "stateful" bug. It will not appear if run in isolation. Btw,
the underlying bug will be worse with `from __future__ import annotations`, so
it would make sense to fix this sooner than later.
--
nosy: +lu
New submission from Ivan Konovalov :
Normally, when I upload files using the PUT request I get upload speed of about
100 Mb/s.
But as soon as I set the timeout, the speed drops to about 4 Mb/s (can vary
depending on the server):
# Running on Windows 10, using Python 3.6.5
from io import
Ivan Pozdeev added the comment:
In [1]: import logging
In [2]: logging.Logger.__module__
Out[2]: 'logging'
In [4]: import sys
In [6]: sys.modules[logging.Logger.__module__].__file__
Out[6]: 'C:\\Program Files\\Python36\\lib\\logging\\__init__.py'
--
Ivan Pozdeev added the comment:
What do you mean by "class source code" anyway? A class doesn't actually
contain any executable code (and there's no code object associated with it).
--
___
Python tracker
<https://bug
Ivan Pozdeev added the comment:
I got that part, thank you.
I can't get 1)what you're expecting as an output and 2)why this should work the
way you're suggesting 'cuz functions and classes are very different.
In particular, classes can be modified dynamically, unlike
Ivan Pozdeev added the comment:
Oh, I see, you want to be able to get the source for code entered into the
interactive session.
IPython does this by creating a separate fake "file name" for every input and
adding corresponding entries for them into `linecache.cache'. This do
Ivan Pozdeev added the comment:
I *think* we need to ask maintainers of packages who use .pth -- at least, Mark
Hammond (pywin32) -- to find out the impact and if everything can be done with
other means.
AFAICS it at least allows pywin32 to have many top-level modules without
cluttering
Ivan Pozdeev added the comment:
> They are very difficult to debug because they're processed too early.
.pth's are processed by site.py, so no more difficult than site/sitecustomize.
You can e.g. run `site.addpackage(,,None)' to debug the logic.
> They usually contain
Ivan Levkivskyi added the comment:
> 3.7 is less convenient and less consistent
Taking into account that internal API is something one should never use, I
don't think these terms apply here. Anyway, we will provide some helpers for
external use in one of the next
Ivan Levkivskyi added the comment:
New changeset 336c945858055059a65134d4c501a85037d70d99 by Ivan Levkivskyi
(Ville Skyttä) in branch 'master':
bpo-34336: Don't promote possibility to leave out typing.Optional (#8677)
https://github.com/python
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Ivan Levkivskyi added the comment:
FWIW I am rather -1 on this. More detailed errors messages are always good, but
in the proposed form it looks more like a distraction. I think just showing a
fully qualified name of the function would be both more concise and more
informative, since the
Change by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<https://bugs.python.org/issue34363>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
OK, so the crux of the bug is this difference:
>>> a = (1, 2)
>>> tuple(x for x in a)
(1, 2)
>>> NamedTupleAttribute(x for x in a)
NamedTupleAttribute(example= at 0x10e2e52a0>)
A potential solution would be to either
Ivan Levkivskyi added the comment:
The problem with this solution is that it may brea (relatively common) use case
of tuple valued fields, e.g.:
>>> tuple(*[x for x in a])
Traceback (most recent call last):
File "", line 1, in
TypeError: tuple expected at most
Ivan Pozdeev added the comment:
I confirm violation of https://tools.ietf.org/html/rfc3986#section-3.2.2 .
URLs are now covered by RFC 3986 which obsoletes RFC 1808 that `urllib's
documentation refers to.
This new URL RFC adds [] to 'reserved' characters, so them being pr
Ivan Levkivskyi added the comment:
Eric, I like your solution. It is probably not perfect, but at least it solves
the existing problem without introducing obvious problems.
Neil, your way will not work since named tuples don't have NamedTuple in their
MROs:
CustomNT.mro == (CustomNT,
Ivan Levkivskyi added the comment:
This is an intentional change. It would be a bad idea to use `_name` instead of
`__name__`, because semantics is subtly different. Also the fact that type in
typing object used to be actual class object was an implementation detail (also
typing is still
Ivan Levkivskyi added the comment:
Oh I just re-read my comment and there are so many typos that I will write a
new one, sorry.
--
___
Python tracker
<https://bugs.python.org/issue34
Ivan Levkivskyi added the comment:
This is an intentional change. It would be a bad idea to use `__name__` instead
of what is currently `_name`, because semantics is subtly different. Also the
fact that types in typing module used to be actual class objects was an
implementation detail
Change by Ivan Levkivskyi :
--
Removed message: https://bugs.python.org/msg323770
___
Python tracker
<https://bugs.python.org/issue34422>
___
___
Python-bug
Ivan Levkivskyi added the comment:
This is why we have 4 months of betas :-)
On one hand making objects in `typing` module not classes was intentional, but
on another hand this use case looks totally fine.
I would say we could update the check in `functools` to accept more things. I
am
Ivan Levkivskyi added the comment:
> Could we revert abstract types in `typing` to respond True to
> `isinstance(..., type)` again?
No, making them classes will cause significant performance penalty (I don't
remember numbers now, but importing `typing` may be twice slower). Plus
Change by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<https://bugs.python.org/issue34499>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
TBH, I don't like this idea. Consider this situation:
@singledispatch
def what(x: Iterable) -> None:
print('general case')
@what.register
def _(x: Sequence[int]) -> None:
print('special case'
Ivan Levkivskyi added the comment:
It was a deliberate decision. You can find some motivation in PEP 560, and yes
we used provisional status here. It was a hard decision, but we decided that
giving up few percent of backwards compatibility is a reasonable price for up
to 5x performance
Ivan Levkivskyi added the comment:
> but even then types in the typing could themselves implement
> `__instancecheck__` and `__subclasscheck__` and retain the old behavior.
It doesn't work that way. `__instancecheck__` and `__subclasscheck__` tweaks
the behaviour of superclas
Ivan Levkivskyi added the comment:
> [..] but I think it's the best we can do. It's consistent with any other
> class derived from tuple or list: [...]
I agree with this argument. Sorry for delay with my response and thank you Eric
for taking care
Ivan Levkivskyi added the comment:
This was a conscious decision (i.e we decided that the old inconsistency is a
bug). See https://bugs.python.org/issue33018 for previous discussion. What is
your use case? If it is critical, we can reconsider this
Ivan Levkivskyi added the comment:
OK, lets close this for now. We will see if there are any other situations.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Ivan Levkivskyi added the comment:
I think there is also a fourth option: add a flag to `get_type_hints()` that
will guard evaluation of forward references, as proposed in
https://github.com/python/typing/issues/508. If the evaluation of a "forward
reference" raises an error, th
Change by Ivan Levkivskyi :
--
assignee: -> levkivskyi
___
Python tracker
<https://bugs.python.org/issue34700>
___
___
Python-bugs-list mailing list
Un
Change by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<https://bugs.python.org/issue34776>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
New changeset 5eea0ad50c32d38909ff4e29309e2cc3c6ccb2c0 by Ivan Levkivskyi (Noah
Wood) in branch 'master':
bpo-34921: Allow escaped NoReturn in get_type_hints (GH-9750)
https://github.com/python/cpython/commit/5eea0ad50c32d38909ff4e29309e2c
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Ivan Levkivskyi added the comment:
Hm, I think this should be allowed. The formulation in the docs is not very
clear, but the wording in the PEP clarifies the intention. Indeed, only
annotations at the same scope with global declarations should be prohibited.
So I think this is a bug
Ivan Levkivskyi added the comment:
I think we can just go ahead and allow this. If there is a volunteer, please go
ahead, otherwise I will try to find time for this myself.
--
___
Python tracker
<https://bugs.python.org/issue34
New submission from Ivan Krivosheev :
When convert email.message.Message to bytes, into header with non-ascii
character in address add to match *\r* symbol.
Simple script for reproduce problem:
>>> from email.message import Message
>>> from email.policy impor
Change by Ivan Krivosheev :
--
versions: +Python 3.8
___
Python tracker
<https://bugs.python.org/issue35016>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Ivan Krivosheev :
--
keywords: +patch
pull_requests: +9297
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35016>
___
___
Py
Ivan Levkivskyi added the comment:
OK, so now we have two "competing" PRs. I think I like Serhiy's PR a bit more,
since it is simpler. I would propose to look at benchmarks and then decide. Are
there any other factors I am missing for choosing one or
Change by Ivan Pozdeev :
--
keywords: +patch
pull_requests: +9463
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue33944>
___
___
Py
Ivan Pozdeev added the comment:
The primary motivation behind the suggestion seems to be the fact that the
feature is abused.
However, the documentation has no info whatsoever on what is the intended use
-- thus what constitutes abuse. Without that, the accusations are kind of
baseless
Ivan Levkivskyi added the comment:
New changeset c8a8d6b347d5a6899feb7c810d28f22f3cb151b8 by Ivan Levkivskyi
(Sebastian Rittau) in branch 'master':
bpo-35089: Don't mention typing.io and typing.re (GH-10173)
https://github.com/python/cpython/commit/c8a8d6b347d5a6899feb7c810
Ivan Levkivskyi added the comment:
Serhiy, thanks for benchmarks and good suggestions!
> If make NewType a class, I would make the repr looking like a call
This is a nice idea, it indeed looks better. We can probably also use
`_type_repr()` helper for the argument (for consiste
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Ivan Pozdeev added the comment:
@Thomas Viehmann , as it's currently formulated, this is a duplicate because it
strives to allow getting class source from past interactive input -- which, as
I explained, is already possible without the patch and seems to be
inappropriate for vanilla co
Ivan Pozdeev added the comment:
> which, as I explained, is already possible without the patch
Sorry, I myself explained in https://bugs.python.org/msg319692 that it's not
possible. The rest still stands though.
--
___
Python tracker
Ivan Pozdeev added the comment:
See
https://bugs.python.org/issue33826?@ok_message=msg%20328824%20created%0Aissue%2033826%20message_count%2C%20messages%20edited%20ok&@template=item#msg319692
how IPython stores source from interactive input and why it's not appropriate
for vanilla
Ivan Levkivskyi added the comment:
Yes, this is expected, you should use ``super().__setattr__()``.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<https://bugs.python.org/issue35143>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
Ah, sorry, I didn't understand this was a documentation issue. Please feel free
to submit a PR that fixes the example to use `super().__setattr__()`.
--
resolution: not a bug ->
stage: resolved -> needs patch
status: clo
Ivan Levkivskyi added the comment:
New changeset 0bee3c36d406e47fa9f99cfc1e07b701512c4f3f by Ivan Levkivskyi
(Denis Osipov) in branch 'master':
bpo-35119: Fix RecursionError in example of customizing module attribute
access. (GH-10323)
https://github.com/python/cpyt
Change by Ivan Levkivskyi :
--
nosy: -miss-islington
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Ivan Pozdeev added the comment:
@barry
> Interdependent namespace packages. If they get loaded in the wrong order,
> they can mess up __path__ settings
Actually, when writing the PR, I had a revelation how this could be
implemented. Via an import hook that would work like a union F
Ivan Levkivskyi added the comment:
The separation may look arbitrary, but the idea is quite simple. Only those
classes with few methods support structural checks. Those classes have few
independent abstract methods (or even just one method), while in classes with
large APIs like `Sequence
Ivan Pozdeev added the comment:
> I’m a little concerned about this approach because it means random third
> party modules can affect the global environment for your application, without
> knowing it. Since the hook installation happens at import time, and just
> depending on a
Change by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<https://bugs.python.org/issue35232>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Ivan Johansen:
In Python/importdl.c around line 99 in the function
_PyImport_LoadDynamicModule() you can find the code:
def = PyModule_GetDef(m);
def->m_base.m_init = p;
If the module m, which is returned from a newly imported extension, is not
created
Ivan Johansen added the comment:
If possible it would be nice if any module could be returned from a C
extension. Specifically I was trying to subclass module (PyModule_Type) and use
that.
But an error message is better than a crash.
--
___
Python
New submission from Ivan Sergeev :
The SMTPServer class of the smtpd module creates a server socket with the IPv4
socket.AF_INET address family hardcoded, and this prevents it from later
binding to an IPv6 local address.
This occurs on line 282 of smtpd.py for the Python 2.7 branch:
http
New submission from Ivan K:
Here is a code. https://gist.github.com/anonymous/9994217 When I run it in
freeze and never end. If I run it without pool with loop or joblib - it works
fine.
Also there is a question on stackoverflow:
http://stackoverflow.com/q/22881850/1888017
Python 2.7.6
Ivan K added the comment:
Sorry, I'm not sure I describe it correct. Freeze that means = goes fozen, so
stop progress. It's do no do anything, but computations still load single core
of my cpu for 100% untill I do not kill the python process.
But the same code work's fine if e
Ivan K added the comment:
Yes, I'm not using any tool. Code just not working.
--
___
Python tracker
<http://bugs.python.org/issue21162>
___
___
Python-bugs-l
Ivan K added the comment:
Sorry, could you specify what is 'func' ?
--
___
Python tracker
<http://bugs.python.org/issue21162>
___
___
Python-bugs-l
Ivan K added the comment:
Sorry, stupdi question. Forget that this is from my gist
--
___
Python tracker
<http://bugs.python.org/issue21162>
___
___
Python-bug
Ivan K added the comment:
Yes, it work fine and output was
LogisticRegression(C=1.0, class_weight=None, dual=False, fit_intercept=True,
intercept_scaling=1, penalty=l2, random_state=None, tol=0.0001)
--
___
Python tracker
<h
New submission from Ivan Bykov:
Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> b = b't'
>>> b[0] in [b]
New submission from Ivan Pozdeev:
It appears that the interpreter assigns an identifier to local or global scope
at compilation time rather than searching locals, then globals (i.e. vars()) at
the time of execution.
An example:
>>> def test():
... vars()['a']=1
... pr
Ivan Johansen added the comment:
Probably not. I am setting status to closed with resolution fixed.
--
resolution: -> fixed
status: pending -> closed
___
Python tracker
<http://bugs.python.org/i
New submission from Ivan Radic:
Shutil supports deleting of files and directories but it offers no way to
delete directory content (without deleting directory itself). Shell programming
includes a lot of "rm -rf /dir" and "rm -f /dir/*", and there is no direct
equivalent
New submission from Ivan Radic:
shutil.rmtree works nice on Windows until it hits file with read only attribute
set. Workaround is to provide a onerror parameter as a function that checks and
removes file attribute before attempting to delete it. Can option to delete
read_only files be
Ivan Radic added the comment:
>You are essentially asking that we have an option to make the windows behavior
>mirror the posix behavior? (A read only file in a writable directory can be
>deleted in posix, since only the directory entry, not the file, is being
>deleted.)
Ac
New submission from Ivan Pozdeev:
a LibraryLoader returns the same _FuncPtr object for a given function every
time. This way, if two libraries set its attributes (most possibly, `argtypes')
to incompatible values (both representing the same C-level entities), one of
them will stop wo
Changes by Ivan Pozdeev :
--
keywords: +patch
Added file: http://bugs.python.org/file36795/cdll_dont_cache.patch
___
Python tracker
<http://bugs.python.org/issue22
Changes by Ivan Pozdeev :
--
title: ctypes.LibraryLoader returns singleton objects, resulting in usage
conflicts -> ctypes.CDLL returns singleton objects, resulting in usage conflicts
___
Python tracker
<http://bugs.python.org/issu
Ivan Pozdeev added the comment:
Another possible solution is to prohibit settings attributes of vanilla
_FuncPtr objects, requiring a library to make a private copy to be able to do
that.
--
___
Python tracker
<http://bugs.python.org/issue22
Ivan Pozdeev added the comment:
@R. David Murray: haha, the reverse change that introduced this problem in the
first place! issue 14201's problem is exactly why I was going to suggest to
also make _FuncPtr's compare equal if they point to the same function.
@eryksun: Packages do th
Ivan Pozdeev added the comment:
> If you want cached libs without polluting ctypes.cdll or ctypes.windll, just
> create your own instance such as windll = ctypes.LibraryLoader(ctypes.WinDLL).
This one looks like the next best thing to the current state of affairs,
requiring minimal cha
New submission from Ivan Bykov :
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit
(Intel)] on win32
IDLE 2.6.2
>>> import zipfile
>>> new = zipfile.ZipFile('C:\\x', 'w', zipfile.ZIP_DEFLATED)
>>> zi = zipfile.ZipInfo
New submission from Ivan Pozdeev :
pdb.Pdb.checkline() throws AttributeError at pdb.py:470 if invoked before
starting a debugging session because self.curframe doesn't exist at that time.
This breaks IPython's %run magic command (v0.10, Magic.py:1663). The command
sets a breakpo
Ivan Levkivskyi added the comment:
SETUP_ANNOTATIONS and STORE_ANNOTATION opcodes are documented in documentation
for dis module. Should they be documented also somewhere else?
--
nosy: +levkivskyi
___
Python tracker
<http://bugs.python.
New submission from Ivan Levkivskyi:
__module__ attribute is set differently depending on whether a metaclass is
explicitly called or invoked in a class statement:
>>> A = ABCMeta('A', (), {})
>>> A.__module__
'abc'
>>> class B(metaclas
Changes by Ivan Levkivskyi :
--
type: -> behavior
___
Python tracker
<http://bugs.python.org/issue28869>
___
___
Python-bugs-list mailing list
Unsubscrib
Ivan Levkivskyi added the comment:
> As a matter of fact, A.__module__ in this case is abc.ABCMeta.__module__. A
> class body creates a __module__ key, while a direct metaclass call does not.
But
>>> A = ABCMeta('A', (), {})
>>> ABCMeta.__module__ = '
Ivan Levkivskyi added the comment:
The failure is fixed now, but it is fixed not in an elegant way (sys._getframe
is used).
I think this is not urgent. If there are no objections, then I would propose to
change priority to normal.
--
___
Python
Changes by Ivan Pozdeev :
--
nosy: +Ivan.Pozdeev
versions: +Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.7
___
Python tracker
<http://bugs.python.org/issue25
Ivan Pozdeev added the comment:
The current solution looks fishy to me. We should stick to
https://tools.ietf.org/html/rfc959 . In particular, 226 is sent when the server
closes the auxiliary socket, so the module should react accordingly. Debug
printing and/or issuing warnings is an obvious
New submission from Ivan Pozdeev:
$ head 'c:\Py\Lib\lib-tk\Tix.py' -n 1
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
There's no "iso-latin-1-unix" encoding in Python, so this declaration produces
an error in some code analysis tools
Ivan Pozdeev added the comment:
Found the root problem: a 1xx response doesn't complete a LIST command, it
should wait further for a 2xx one. See RFC 959 section 6 (state diagrams).
This could be `urllib`'s rather than `ftplib`'s fault: the former calls
low-level subroutine
Changes by Ivan Pozdeev :
Removed file: http://bugs.python.org/file45813/ftp_error_illustration.txt
___
Python tracker
<http://bugs.python.org/issue25458>
___
___
Pytho
601 - 700 of 953 matches
Mail list logo