[issue10655] Wrong powerpc define in Python/ceval.c

2010-12-08 Thread adrian
New submission from adrian : In Python/ceval.c is following line: #if defined(__ppc__) /* <- Don't know if this is the correct symbol; this section should work for GCC on any PowerPC platform, irrespecti

[issue10655] Wrong powerpc define in Python/ceval.c

2010-12-09 Thread adrian
adrian added the comment: Here is a patch that I had to include in my Linux PowerPC build of 2.7 and 3.2 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -31,10 +31,12 @@ typedef unsigned long long uint64; -#if defined(__ppc__) /* <- Don't know if this is the correct symbol; this +#if

[issue43374] Apple refuses apps written in Python

2021-03-02 Thread Adrian
Adrian added the comment: My apologies, you may disregard any libraries not downloaded from python.org <http://python.org/> I am strictly speaking about the following items related to this mailing list: • Contents/Frameworks/Python.framework/Versions/3.9/lib/libformw.5.dylib/_wadd_w

[issue43374] Apple refuses apps written in Python

2021-03-02 Thread Adrian
Adrian added the comment: My apologies, you may disregard any libraries not downloaded from python.org <http://python.org/> I am strictly speaking about the following items related to this mailing list: • Contents/Frameworks/Python.framework/Versions/3.9/lib/libformw.5.dylib/_wadd_w

[issue43374] Apple refuses apps written in Python

2021-03-02 Thread Adrian
Adrian added the comment: Hi Ned, I have a ticket opened with Apple. They refuse the software as it, they are in a position of absolute power, to reject and drop many years of work on a dime. What am I suppose to do? I can fix my own software, but then there are dependencies like Python

[issue43374] Apple refuses apps written in Python

2021-03-02 Thread Adrian
Adrian added the comment: Hi Ned, Yes, I have submitted Python apps to Mac App Store since 2009, for 12 years. Each new push opens a new pandoras box with different questions asked than previously. There is no learning curve, is just walls with more walls behind each submission. The

[issue43374] Apple refuses apps written in Python

2021-03-02 Thread Adrian
New submission from Adrian : My company maintains several Python related projects, one of them being an application published for many years in the Mac App Store. During the submittion of the last update for the app, we were refused by Apple to publish the software with the following reason

[issue43374] Apple refuses apps written in Python

2021-03-05 Thread Adrian
Adrian added the comment: Terry, After opening issues on this and other mailing lists (PyObjc) Apple validated our app without a comment. Adrian > On 5 Mar 2021, at 21:51, Terry J. Reedy wrote: > > > Terry J. Reedy added the comment: > > Adrian, when respondin

[issue33017] Special set-cookie setting will bypass Cookielib

2022-02-10 Thread Adrian Chaves
Adrian Chaves added the comment: So, PoC shows how an empty domain attribute (Domain=) is erroneously turned into a dot (.). I want to add that a dot (Domain=.) should be turned into an empty string (the specification asks to remove a leading dot if found). -- nosy: +adrian2

[issue31242] Add SSLContext.set_verify_callback()

2022-02-17 Thread Adrian Freund
Change by Adrian Freund : -- nosy: +freundTech ___ Python tracker <https://bugs.python.org/issue31242> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31242] Add SSLContext.set_verify_callback()

2022-02-17 Thread Adrian Freund
Change by Adrian Freund : -- keywords: +patch pull_requests: +29536 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/31391 ___ Python tracker <https://bugs.python.org/issu

[issue46779] Add ssl.CERT_REQUIRED_NO_VERIFY as possible value for ssl.SSLContext.verify_mode

2022-02-17 Thread Adrian Freund
New submission from Adrian Freund : Some networked applications might require connecting to client with invalid certificates but still requiring the client to send a certificate. ssl.SSLContext.verify_mode currently supports the following options: ssl.CERT_NONE: Don't require the clie

[issue31242] Add SSLContext.set_verify_callback()

2022-02-17 Thread Adrian Freund
Adrian Freund added the comment: I also need this feature for something I'm working on, so I looked into it a bit and pushed a small proof of concept implementation to GitHub (See PR 31391). I'm not sure if I'll have enough time to finish and clean up this implementation, but

[issue1001] 2to3 crashes on input files with no trailing newlines

2007-08-23 Thread Adrian Holovaty
Changes by Adrian Holovaty: -- components: Demos and Tools severity: normal status: open title: 2to3 crashes on input files with no trailing newlines type: crash __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1001] 2to3 crashes on input files with no trailing newlines

2007-08-23 Thread Adrian Holovaty
New submission from Adrian Holovaty: The 2to3 Python 3k migration utility crashes with the following traceback on any input file that does *not* have a trailing newline. It doesn't seem to matter whether the input file needs modifications or not. RefactoringTool: Can't parse /path/t

[issue1001] 2to3 crashes on input files with no trailing newlines

2007-08-23 Thread Adrian Holovaty
Adrian Holovaty added the comment: (Sorry, the previous error snippet isn't a traceback as I had said. It's the error text.) __ Tracker <[EMAIL PROTECTED]> <http://bugs.p

[issue1034] [patch] Add 2to3 support for displaying warnings as Python comments

2007-08-26 Thread Adrian Holovaty
New submission from Adrian Holovaty: Per a Python-3000 mailing list discussion here -- http://mail.python.org/pipermail/python-3000/2007-August/009835.html -- I have implemented an addition to the 2to3 utility that enables warnings to be output as comments in Python source code instead of being

[issue1034] [patch] Add 2to3 support for displaying warnings as Python comments

2007-08-26 Thread Adrian Holovaty
Adrian Holovaty added the comment: I'm also attaching 2to3_comment_warnings.diff, which is an example of how we could integrate the insert_comment() method from the first patch to replace the current functionality of fixes.basefix.BaseFix.warning(). __ Tr

[issue1001] 2to3 crashes on input files with no trailing newlines

2007-09-06 Thread Adrian Holovaty
Adrian Holovaty added the comment: I just checked, and, yes, it's been fixed. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1001> __ ___ Python-bugs-

[issue9708] cElementTree iterparse does not support "parser" argument

2010-08-28 Thread Adrian Nye
New submission from Adrian Nye : The (python) ElementTree library began in 2.7 to support the "parser" argument, but cElementTree does not support it. Either cElementTree should support it, or the documentation should mention that it does not. -- components: XML messages: 1

[issue10605] ElementTree documentation

2010-12-02 Thread Adrian Nye
New submission from Adrian Nye : TreeBuilder doc does not mention its "entity" argument which is the main way to deal with html entity encodings which are unfortunately a common problem in XML. Also the doc needs a discussion of the relationship of TreeBuilder and XMLParser. The

[issue9234] argparse: aliases for positional arguments (subparsers)

2010-12-12 Thread Adrian Sampson
Adrian Sampson added the comment: Thanks for the pointer, Éric. Here's a quick patch that integrates the same functionality into the existing subparser class. -- keywords: +patch Added file: http://bugs.python.org/file20026/argparse-aliases.

[issue9234] argparse: aliases for positional arguments (subparsers)

2010-12-13 Thread Adrian Sampson
Adrian Sampson added the comment: Sorry I'm slow. Here's a new patch that includes tests. I'll also write documentation if that would be helpful, although I'm not very familiar with the style recommendations. -- Added file: http://bugs.python.org/file20034/ar

[issue9234] argparse: aliases for positional arguments (subparsers)

2010-12-15 Thread Adrian Sampson
Adrian Sampson added the comment: Great. I've added a simple example to the documentation for argparse. I also added a space to the comma separator in the alias list, but I'm worried that adding 'aliases:' will make the help less readable (especially if every command

[issue9234] argparse: aliases for positional arguments (subparsers)

2010-12-17 Thread Adrian Sampson
Adrian Sampson added the comment: Thanks for the suggestion, Steven. I hadn't yet internalized the difference between dest and metavar. This version of the patch modifies metavar instead. Because it looks like this issue is up for 3.2b2, I've modified NEWS and ACKS (I hope this was

[issue10918] **kwargs unnecessarily restricted in API

2011-01-16 Thread Adrian Dries
New submission from Adrian Dries : An API such as in, e.g. futures: def submit(self, fn, *args, **kwargs): pass cannot be used thus: submit(foo, 1, 2, fn=bar) I can see two options: either mangle the named parameters: def submit(__self, __fn, *args, **kwargs): pass Or

[issue10918] **kwargs unnecessarily restricted in API

2011-01-17 Thread Adrian Dries
Adrian Dries added the comment: What now? Python 3.1.3 (r313:86834, Jan 17 2011, 22:33:40) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> def foo(f, **kw): ... pass ... >>> fo

[issue10918] **kwargs unnecessarily restricted in concurrent.futures 'submit' API

2011-01-17 Thread Adrian Dries
Adrian Dries added the comment: The futures case is one example of a broader API design issue. Note also that 'self' is similarly restricted. You might think these are 'corner cases', but to me it is poor API design. There may well be a reasonable case for passing &#x

[issue10918] **kwargs unnecessarily restricted in concurrent.futures 'submit' API

2011-01-17 Thread Adrian Dries
Adrian Dries added the comment: No, private mangling applies to any identifier in class-scope: Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>

[issue10918] **kwargs unnecessarily restricted in concurrent.futures 'submit' API

2011-01-18 Thread Adrian Dries
Adrian Dries added the comment: Have your cake and eat it: def submit(self, fn, args, kw): # submit implementation def sugar(*args, **kw): return args[0].submit(args[1], args[2:], kw) -- ___ Python tracker <http://bugs.python.

[issue2940] Building Python fails on SunOS

2008-05-22 Thread Adrian M
New submission from Adrian M <[EMAIL PROTECTED]>: $ uname -a SunOS ro1estw 5.9 Generic_117171-12 sun4u sparc SUNW,Sun-Fire-880 gcc 2.6.3 When running ./configure I'm getting warnings like: configure: WARNING: curses.h: present but cannot be compiled configure: WARNING: curses.h

[issue2940] Building Python fails on SunOS

2008-05-23 Thread Adrian M
Adrian M <[EMAIL PROTECTED]> added the comment: Also, please check: http://bugs.python.org/issue1544306 (exactly the same issue that has just been closed because of the lack of feedback from the original reporter) Here is another (old) report referring to the very same issue happen

[issue3330] webbrowser module doesn't correctly handle '|' character.

2008-07-09 Thread Adrian Petrescu
New submission from Adrian Petrescu <[EMAIL PROTECTED]>: The webbrowser module seems to treat URLs containing the "|" character differently based on whether the browser is already running or not. For instance, consider the following python script: import webbrowser url =

[issue3330] webbrowser module doesn't correctly handle '|' character.

2008-07-09 Thread Adrian Petrescu
Adrian Petrescu <[EMAIL PROTECTED]> added the comment: Just as an aside, the reason I consider this a fairly serious bug is that the Google Charts API urls make heavy use of the '|' character, which means if I want to have Python use it by opening the user's browser, it won

[issue7747] Function variable wrongly reported unassigned

2010-01-20 Thread Adrian May
New submission from Adrian May : Hi folks, The attached program says: $ ./bug.py a None b Traceback (most recent call last): File "./bug.py", line 49, in print number(s) File "./bug.py", line 34, in foo while eat != None: UnboundLocalError: local variable &#x

[issue7747] Function variable wrongly reported unassigned

2010-01-21 Thread Adrian May
Adrian May added the comment: OK, Thanks. Sorry for the hassle. Adrian. -- type: behavior -> compile error ___ Python tracker <http://bugs.python.org/iss

[issue35448] ConfigParser .read() - handling of nonexistent files

2019-10-22 Thread Adrian Wielgosik
Adrian Wielgosik added the comment: Yeah, I lost steam on this issue, sorry. Go ahead :) -- ___ Python tracker <https://bugs.python.org/issue35448> ___ ___ Pytho

[issue42128] Structural Pattern Matching (PEP 634)

2021-03-12 Thread Adrian Freund
Adrian Freund added the comment: For the last few days I've been working with pattern matching and it's ast for a bit, while trying to add support for it to mypy. During this I noticed an inconsistency in the ast: ast.MatchAs has an attribute name which is of type identifier (in C

[issue42128] Structural Pattern Matching (PEP 634)

2021-03-12 Thread Adrian Freund
Adrian Freund added the comment: Thanks for the response. Looks like I overlooked the imports, global, nonlocal, ... because I only searched for usages of identifier, but they use lists of identifiers. In that case I agree that it isn't inconsi

[issue43489] Can't install, nothing to install

2021-03-13 Thread Adrian LeDeaux
New submission from Adrian LeDeaux : Python 2.7 won't install. I get the error "there is nothing to install" or something to that effect. I am using MacOS High Sierra 10.13.6. I tried both installer downloads. None worked. And I got the same error every time. Anyone have any i

[issue43490] IDLE freezes at random

2021-03-13 Thread Adrian LeDeaux
New submission from Adrian LeDeaux : My IDLE shell keeps freezing when using the turtle module. I am using MacOS High Sierra 13.10.6. It says it is fine, but I can't get the window open. I have to restart the shell entirely. I can't type or do anything. I have to do the [c

[issue43490] IDLE freezes at random

2021-03-13 Thread Adrian LeDeaux
Adrian LeDeaux added the comment: Only when using the turtle module does it happen. -- type: -> behavior versions: -Python 3.10 ___ Python tracker <https://bugs.python.org/issu

[issue43490] IDLE freezes at random

2021-03-13 Thread Adrian LeDeaux
Adrian LeDeaux added the comment: My processor is Intel core 2 duo. -- ___ Python tracker <https://bugs.python.org/issue43490> ___ ___ Python-bugs-list mailin

[issue43489] Can't install, nothing to install

2021-03-13 Thread Adrian LeDeaux
Adrian LeDeaux added the comment: First, I am not asking for guesses. I am getting the installers from the www.python.org website, and I am running them with the MacOS installer app. The format is .mpkg -- Added file: https://bugs.python.org/file49874/Screen Shot 2021-03-13 at

[issue43489] Can't install, nothing to install

2021-03-13 Thread Adrian LeDeaux
Adrian LeDeaux added the comment: The main reason I am trying to install this is because I want to use pygame. Is pygame compatible with version 2.7.28? -- ___ Python tracker <https://bugs.python.org/issue43

[issue43489] Can't install, nothing to install

2021-03-14 Thread Adrian LeDeaux
Adrian LeDeaux added the comment: Alright! Thanks for the help! I will try that. -- ___ Python tracker <https://bugs.python.org/issue43489> ___ ___ Python-bug

[issue43531] Turtle module does not work

2021-03-17 Thread Adrian LeDeaux
New submission from Adrian LeDeaux : So when I try to do the command "import turtle" all I get back is: Traceback (most recent call last): File "", line 1, in import turtle File "/Users/Virsatech/Documents/turtle.py", line 2, in t = turtle.P

[issue43531] Turtle module does not work

2021-03-17 Thread Adrian LeDeaux
Adrian LeDeaux added the comment: Oh, OK. I am not an expert on python so I did not understand the error. Thanks for the help, and I will update you if the problems continue. -- ___ Python tracker <https://bugs.python.org/issue43

[issue43531] Turtle module does not work

2021-03-17 Thread Adrian LeDeaux
Adrian LeDeaux added the comment: That fixed it. -- ___ Python tracker <https://bugs.python.org/issue43531> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43531] Turtle module does not work

2021-03-17 Thread Adrian LeDeaux
Adrian LeDeaux added the comment: OK. -- ___ Python tracker <https://bugs.python.org/issue43531> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43761] Documenting dataclass and namedtuple changes for structural pattern matching

2021-04-07 Thread Adrian Freund
New submission from Adrian Freund : PEP 634 structural pattern matching adds an auto-generated __match_args__ attribute to classes with the dataclass decorator and to namedtuples. This change is currently not documented in the dataclass and namedtuple documentation, nor is it mentioned in

[issue43764] Turning off generation of __match_args__ for dataclasses

2021-04-07 Thread Adrian Freund
New submission from Adrian Freund : The dataclass decorator can take multiple parameters to enable or disable the generation of certain methods. PEP 634 Structural Pattern Matching extends dataclasses to also generate a __match_args__ attribute. I think adding a parameter to enable and

[issue43761] Documenting dataclass and namedtuple changes for structural pattern matching

2021-04-07 Thread Adrian Freund
Adrian Freund added the comment: Ok. I created https://bugs.python.org/issue43764 for that. -- ___ Python tracker <https://bugs.python.org/issue43761> ___ ___

[issue43764] Turning off generation of __match_args__ for dataclasses

2021-04-09 Thread Adrian Freund
Adrian Freund added the comment: > I assume the OP wants to have a class that doesn't allow positional patterns. > The right way to spell that is indeed to add > >__match_args__ = () > >to the class, there's no need to add another flag to @dataclass. The same

[issue43761] Documenting dataclass and namedtuple changes for structural pattern matching

2021-04-09 Thread Adrian Freund
Adrian Freund added the comment: I agree that __match_args__ shouldn't have to be added to the documentation of any class that supports it, however dataclass and (maybe to a lesser extend) NamedTuple aren't themselves classes, but aid in creating own classes. Their effects

[issue43761] Documenting dataclass and namedtuple changes for structural pattern matching

2021-04-10 Thread Adrian Freund
Adrian Freund added the comment: I think for namedtuple a short mention in the opening paragraph, where it also mentions the generation of a docstring and __repr__ method should be enough. -- ___ Python tracker <https://bugs.python.org/issue43

[issue43892] Make match patterns explicit in the AST

2021-04-20 Thread Adrian Freund
Change by Adrian Freund : -- nosy: +freundTech ___ Python tracker <https://bugs.python.org/issue43892> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43994] change representation of match as / capture as `Name(..., ctx=Store())`

2021-04-30 Thread Adrian Freund
Adrian Freund added the comment: I already brought this up on the main pattern matching issue some time ago (https://bugs.python.org/issue42128#msg388554), where the consensus was that not using a Name is consistent with other parts of the ast, such as `import ... as identifier`, `except

[issue39875] urllib.request.urlopen sends POST data as query string

2020-03-06 Thread Adrian Petrescu
Adrian Petrescu added the comment: This is not a bug, you've just misunderstood the urllib API. If you want to pass POST data as a payload, it's the second `data` parameter to `urlopen`: https://bugs.python.org/?@action=confrego&otk=KX9AqsI0JnOLkplIY1AGKXAmDKa38COy -

[issue39875] urllib.request.urlopen sends POST data as query string

2020-03-06 Thread Adrian Petrescu
Adrian Petrescu added the comment: (Oops, that was a bad paste! I meant this link: https://docs.python.org/2/library/urllib.html#urllib.urlopen) -- ___ Python tracker <https://bugs.python.org/issue39

[issue43127] Unable to install Python 3.9.1 - Windows 10

2021-02-04 Thread Adrian Lloyd
New submission from Adrian Lloyd : I get the following error when I try to install Python 3.9.1 on windows 10 0x80070659 The installation is forbidden by system policy. The log gives more information: [13A0:0FC0][2021-02-04T16:41:04]e000: Error 0x80070659: Failed to install MSI package

[issue42405] Add distutils mvsccompiler support for Windows ARM64 build

2020-11-19 Thread Adrian Vladu
New submission from Adrian Vladu : To add support for building packages that have C extensions on Windows ARM64, some fixes are required in the integrated distutils wrapper for Visual Studio compiler (Lib/distutils/msvc9compiler.py) This is a hardcoded fix that needs to be improved so that

[issue42405] Add distutils mvsccompiler support for Windows ARM64 build

2020-11-19 Thread Adrian Vladu
Change by Adrian Vladu : -- keywords: +patch pull_requests: +22291 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23399 ___ Python tracker <https://bugs.python.org/issu

[issue42405] Add distutils mvsccompiler support for Windows ARM64 build

2020-11-19 Thread Adrian Vladu
Adrian Vladu added the comment: This fix is __required__ to build a lot of important packages in the python ecosystem, like numpy, pandas, pywin32 and probably a lot more, as most of these important packages have not migrated to setuptools and usually maintain support for multiple python

[issue42405] Add distutils mvsccompiler support for Windows ARM64 build

2020-11-20 Thread Adrian Vladu
Adrian Vladu added the comment: Thank you for the suggestion, I will update the PR accordingly to change the __msvccompiler.py. I just need to find a good candidate that uses that implementation to check if the compilation gets fixed

[issue24700] array compare is hideously slow

2017-08-06 Thread Adrian Wielgosik
Changes by Adrian Wielgosik : -- pull_requests: +3042 ___ Python tracker <http://bugs.python.org/issue24700> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24700] array compare is hideously slow

2017-08-06 Thread Adrian Wielgosik
Adrian Wielgosik added the comment: Added a PR with a fast path that triggers when compared arrays store values of the same type. In this fast path, no Python objects are created. For big arrays the runtime reduction can reach 50-100x. It's possible to optimize the comparison loop a bit

[issue31453] ssl.PROTOCOL_TLS only select TLSv1.2

2017-09-13 Thread Adrian Vollmer
New submission from Adrian Vollmer: According to the documentation (https://docs.python.org/2/library/ssl.html#ssl.PROTOCOL_TLS), using ssl_version = ssl.PROTOCOL_TLS in a server socket should offer all TLS/SSL versions. However, it only offers TLSv1_2. I attached a proof of concept

[issue31453] ssl.PROTOCOL_TLS only select TLSv1.2

2017-09-13 Thread Adrian Vollmer
Adrian Vollmer added the comment: Debian buster/sid -- ___ Python tracker <https://bugs.python.org/issue31453> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31453] ssl.PROTOCOL_TLS only select TLSv1.2

2017-09-13 Thread Adrian Vollmer
Adrian Vollmer added the comment: I read about that, but I don't understand. If I use openssl s_server -port , I can connect using either one of the three protocols. Even if that's the new default, is there no way now to get python on Buster/Sid to use OpenSSL in a non-defaul

[issue31453] ssl.PROTOCOL_TLS only select TLSv1.2

2017-09-13 Thread Adrian Vollmer
Adrian Vollmer added the comment: Doesn't seem to do anything: >>> ctx.options 2181170175L >>> ctx.options & ~(ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1) 2181170175L -- ___ Python tracker <http

[issue31453] ssl.PROTOCOL_TLS only select TLSv1.2

2017-09-13 Thread Adrian Vollmer
Adrian Vollmer added the comment: Okay, thanks for your time! -- ___ Python tracker <https://bugs.python.org/issue31453> ___ ___ Python-bugs-list mailin

[issue31453] Debian Sid/Buster: Cannot enable TLS 1.0/1.1 with PROTOCOL_TLS

2017-09-13 Thread Adrian Vollmer
Adrian Vollmer added the comment: I have a workaround for now: versions = [ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_TLSv1_2, ] firstbytes = s.recv(16, socket.MSG_PEEK) ss = ssl.wrap_socket

[issue35448] ConfigParser .read() - handling of nonexistent files

2018-12-09 Thread Adrian Wielgosik
New submission from Adrian Wielgosik : Documentation of ConfigParser says: > If a file named in filenames cannot be opened, that file will be ignored. > This is designed so that you can specify an iterable of potential > configuration file locations (for example, the current direc

[issue30545] Enum equality across modules: comparing objects instead of values

2017-06-05 Thread Adrian Wan
Changes by Adrian Wan : -- nosy: +adrianwan2 status: pending -> open ___ Python tracker <http://bugs.python.org/issue30545> ___ ___ Python-bugs-list mai

[issue33094] dataclasses: ClassVar attributes are not working properly

2018-03-17 Thread Adrian Stachlewski
New submission from Adrian Stachlewski : Class variables should behave in the same way whether with or without ClassVar annotation. Unfortunately there are not. class A: __slots__ = () x: ClassVar = set() A() # it's ok @dataclass class B: __slots__ = () x = set() B()

[issue33094] dataclasses: ClassVar attributes are not working properly

2018-03-18 Thread Adrian Stachlewski
Adrian Stachlewski added the comment: Thanks for explaining. I was trying to do something like @dataclass class A: x: ClassVar = set() and thanks to you I know it should be @dataclass class A: x: ClassVar[Set] = set() If you are looking for improved error message, it's probably s

[issue33100] dataclasses and __slots__ - non-default argument (member_descriptor)

2018-03-18 Thread Adrian Stachlewski
New submission from Adrian Stachlewski : I've tried to declare two classes @dataclass class Base: __slots__ = ('x',) x: Any @dataclass class Derived(Base): x: int y: int As long as I correctly understood PEP 557 (inheritance part), changing type of variable is

[issue33094] dataclasses: ClassVar attributes are not working properly

2018-03-19 Thread Adrian Stachlewski
Adrian Stachlewski added the comment: Once more same mistake. 'x' should be declared as: - x: ClassVar[set] = set() - x: ClassVar[Set[Any]] = set() -- ___ Python tracker <https://bugs.python.o

[issue33100] dataclasses and __slots__ - non-default argument (member_descriptor)

2018-03-19 Thread Adrian Stachlewski
Adrian Stachlewski added the comment: I don't really get your point. @dataclass class Base: __slots__ = ('x',) x: Any This case is described in PEP 557 as correct, so I don't understand why you want to generate error. Also inheritance without defining slots is c

[issue33100] dataclasses and __slots__ - non-default argument (member_descriptor)

2018-03-19 Thread Adrian Stachlewski
Adrian Stachlewski added the comment: There's also another major problem. Because Base.x has value, __init__ is not prepared correctly (member_descriptor is passed as default). @dataclass class Base: __slots__ = ('x',) x: Any Base() # No TypeError exception Fixing

[issue33094] dataclasses: ClassVar attributes are not working properly

2018-03-20 Thread Adrian Stachlewski
Adrian Stachlewski added the comment: There's nothing to do, thanks for help one more again. -- status: pending -> open ___ Python tracker <https://bugs.python.org

[issue34334] QueueHandler logs exc_info twice

2018-08-04 Thread Adrian Dries
New submission from Adrian Dries : Since Python 3.7 logging.handlers.QueueHandler logs tracebacks twice:: >>> import logging >>> from logging.handlers import QueueHandler, QueueListener >>> from queue import Queue >>> q = Queue() >>>

[issue34918] Python 3 tkinter measurement problem

2018-10-06 Thread Adrian Keister
New submission from Adrian Keister : tkinter.Tk().winfo_screenmmwidth() and tkinter.Tk().winfo_screenmmheight() give manifestly incorrect values in Windows. This does not appear to be an issue in Linux. I have not tested a Mac. The values reported in Windows are too large by as much as 58

[issue14985] os.path.isfile and os.path.isdir inconsistent on OSX Lion

2012-06-02 Thread Adrian Bastholm
New submission from Adrian Bastholm : os.path.isfile doesn't reckognize a .picasa.ini file as a file and os.path.isdir doesn't reckognize a directory as a directory code: def traverse (targetDir): currentDir = targetDir dirs = os.listdir(targetDir) #dirs = [x for x in

[issue14986] print() fails on latin1 characters on OSX

2012-06-02 Thread Adrian Bastholm
New submission from Adrian Bastholm : print(listentry) fails on folder name with swedish (latin1) characters Error: File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/encodings/mac_roman.py", line 19, in encode return codecs.charmap_encode(input,s

[issue14986] print() fails on latin1 characters on OSX

2012-06-02 Thread Adrian Bastholm
Adrian Bastholm added the comment: The char in question: 'å'. It is a folder with this character in the name. My encoding is UTF-8. Running print("\u030a") gives a blank line U+00C5 LATIN CAPITAL LETTER A WITH RING ABOVE General Character Properties In Unicode since:

[issue14986] print() fails on latin1 characters on OSX

2012-06-02 Thread Adrian Bastholm
Adrian Bastholm added the comment: The last post is the CAPITAL Å. The following is the small letter "å" U+00E5 LATIN SMALL LETTER A WITH RING ABOVE General Character Properties In Unicode since: 1.1 Unicode category: Letter, Lowercase Canonical decomposition: U+0061 LATIN SMALL LE

[issue14985] os.path.isfile and os.path.isdir inconsistent on OSX Lion

2012-06-02 Thread Adrian Bastholm
Adrian Bastholm added the comment: You're right, my code was shite. Strange though it seemed to work on some files. The following updated version does everything as intended with the help of os.path.join: def traverse (targetDir): currentDir = targetDir dirs = os.listdir(targ

[issue14986] print() fails on latin1 characters on OSX

2012-06-02 Thread Adrian Bastholm
Adrian Bastholm added the comment: Output in console: Python 3.2.3 (v3.2.3:3d0686d90f55, Apr 10 2012, 11:25:50) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> im

[issue14986] print() fails on latin1 characters on OSX

2012-06-02 Thread Adrian Bastholm
Adrian Bastholm added the comment: my code runs fine in a console window, so it's some kind of configuration error. Sorry for wasting your time guys .. It would be nice to know why PyDev is not setting the right environment vars though .. >>> traverse(".") Processin

[issue14986] print() fails on latin1 characters on OSX

2012-06-03 Thread Adrian Bastholm
Adrian Bastholm added the comment: Thanks a lot for the help, guys ! -- ___ Python tracker <http://bugs.python.org/issue14986> ___ ___ Python-bugs-list mailin

[issue20967] hashlib memory leak

2014-03-18 Thread Adrian Teng
New submission from Adrian Teng: A particular usage pattern of hashlib will cause a memory leak. This leaks: import hashlib import sys if __name__ == '__main__': data_sha1 = "hello world" data_md5 = "hello world" for i in xrange(int(1e6)):

[issue20967] hashlib memory leak

2014-03-18 Thread Adrian Teng
Adrian Teng added the comment: Python 2.7.3, Red Hat Enterprise Linux Server release 5.5, with kernal 2.6.18-308.el5 -- ___ Python tracker <http://bugs.python.org/issue20

[issue20967] hashlib memory leak

2014-03-19 Thread Adrian Teng
Adrian Teng added the comment: Yup. Tested on 2.7.5 and it doesn't leak. I guess this is a duplicate of #15219. Cheers! -- resolution: -> duplicate ___ Python tracker <http://bugs.python.org

[issue9234] argparse: aliases for positional arguments (subparsers)

2010-07-12 Thread Adrian Sampson
New submission from Adrian Sampson : The argparse module supports "subparsers," which allow CLI tools to support invocation of subcommands (much like the svn or hg programs). For these subcommands, it is often useful to allow multiple names for the same command. For instance, in

[issue28813] Remove unneeded folded consts after peephole

2016-11-27 Thread Adrian Wielgosik
New submission from Adrian Wielgosik: The attached patch adds new logic to peephole compiler to remove constants that are no longer needed after the main peephole pass. For example: def f(): var = 'te' + 'xt' num = -12 num = -6 * 2

[issue28813] Remove unneeded folded consts after peephole

2016-11-27 Thread Adrian Wielgosik
Changes by Adrian Wielgosik : -- keywords: +patch Added file: http://bugs.python.org/file45661/indices_tweak.patch ___ Python tracker <http://bugs.python.org/issue28

[issue28813] Remove unneeded folded consts after peephole

2016-11-27 Thread Adrian Wielgosik
Changes by Adrian Wielgosik : Added file: http://bugs.python.org/file45662/clean_co_consts.patch ___ Python tracker <http://bugs.python.org/issue28813> ___ ___ Python-bug

[issue28813] Remove unneeded folded consts after peephole

2016-11-27 Thread Adrian Wielgosik
Adrian Wielgosik added the comment: Attached squashed patch. > But moving constant folding from the peephole optimizer to the AST level > (...) would totally eliminate the need in your patch. I'm aware of that and I'm okay with it. I chose an unfortunate moment for i

  1   2   >