[issue47161] pathlib method relative_to doesnt work with // in paths

2022-03-30 Thread Jan Bronicki
Jan Bronicki added the comment: Hmm..., I get it, but Im not gonna lie it's pretty confusing given that in other places `//` works as a substitute for `/`. Maybe it should be mentioned in the documentation? -- ___ Python tracker &

[issue47161] pathlib method relative_to doesnt work with // in paths

2022-03-30 Thread Jan Bronicki
Jan Bronicki added the comment: But shouldn't it just work with `//` as a `/`? It seems like this is the behavior elsewhere. Sure I get that it cannot be done for 3.8. But the new error message implies that either `//` is not a subpath of `/` which it is, or that one is relative an

[issue47161] pathlib method relative_to doesnt work with // in paths

2022-03-30 Thread Jan Bronicki
New submission from Jan Bronicki : The `//` path should be equivalent to `/`, and in some ways, it does behave like that in pathlib. But in the `relative_to` method on a `Path` object, it does not work This is causing our CI pipeline to fail. In the documentation here you can see `//` being

[issue46270] Comparison operators in Python Tutorial 5.7

2022-01-06 Thread Jan
Jan added the comment: Sounds reasonable. -- resolution: works for me -> fixed ___ Python tracker <https://bugs.python.org/issue46270> ___ ___ Python-bugs-lis

[issue46270] Comparison operators in Python Tutorial 5.7

2022-01-05 Thread Jan
Jan added the comment: I really like this solution because it mentions the buzz word "membership". But I would change "container" to "sequence" because the term "container" doesn't appear in chapter 5, "sequence" on the other hand mult

[issue46270] Comparison operators in Python Tutorial 5.7

2022-01-05 Thread Jan
New submission from Jan : In chapter 5.7 in the official Python tutorial (see: https://docs.python.org/3/tutorial/datastructures.html), there is the following paragraph: "The comparison operators in and not in check whether a value occurs (does not occur) in a sequence. The operators i

[issue41945] http.cookies.SimpleCookie.parse error after [keys] or some JSON data values

2022-01-04 Thread Jan Novak
Jan Novak added the comment: New examples with the structured data. Problems are with quotes and spaces inside { or [ cookie-script.com set those cookie data: CookieScriptConsent={"action":"accept","categories":"[\\"performance\\"]"} Py

[issue34931] os.path.splitext with more dots

2022-01-03 Thread Jan Novak
Jan Novak added the comment: It is interesting that pathlib.Path works fine: >>> pathlib.Path('jpg').suffix '.jpg' >>> pathlib.Path('path/jpg').suffix '.jpg' -- _

[issue34931] os.path.splitext with more dots

2022-01-03 Thread Jan Novak
Jan Novak added the comment: Thank you all for discussion and partial solution in latest Python versions and extending documentation. For the future development of Python the initial question remains. How to easy detect extensions for each file with standard python library function. Without

[issue20751] Harmonize descriptor protocol documentation: direct call, super binding with Descriptor Howto docs

2021-12-12 Thread Jan Kaliszewski
Jan Kaliszewski added the comment: Sure. But don't you think there should be ``.__get__(a, type(a))`` rather than ``.__get__(a, A)``? Then the whole statement would be true regardless of whether A is the actual type of a, or only a superclass of the type of a. That would also be

[issue20751] Harmonize descriptor protocol documentation: direct call, super binding with Descriptor Howto docs

2021-12-07 Thread Jan Kaliszewski
Jan Kaliszewski added the comment: I am very sorry, I just noticed another mistake. It should be: A dotted lookup such as ``super(A, obj).x`` (where ``obj`` is an instance of ``A`` or of a subclass of ``A``) searches ``type(obj).__mro__`` for such a base class ``B`` that follows

[issue20751] Harmonize descriptor protocol documentation: direct call, super binding with Descriptor Howto docs

2021-12-07 Thread Jan Kaliszewski
Jan Kaliszewski added the comment: Sorry, a few mistakes distorted my proposal. It should be: A dotted lookup such as ``super(A, obj).x`` (where ``obj`` is an instance of ``A`` or of a subclass of ``A``) searches ``A.__mro__`` for a base class whose `__dict__` contains name ``&q

[issue20751] Harmonize descriptor protocol documentation: direct call, super binding with Descriptor Howto docs

2021-12-07 Thread Jan Kaliszewski
Jan Kaliszewski added the comment: So the current (after the aforementioned commit) form of the description is: A dotted lookup such as ``super(A, a).x`` searches ``obj.__class__.__mro__`` for a base class ``B`` following ``A`` and then returns ``B.__dict__['x'].__get__(a,

[issue45505] Remove unneeded ZipFile IO

2021-10-17 Thread Jan Wolski
New submission from Jan Wolski : Currently in the ZipFile class implementation, when processing the zip file headers "extra" field, a .read() call is used without using the returned value in any way. This call could be replaced with a .seek() to avoid actually doing the IO. The ch

[issue34897] distutils test errors when CXX is not set

2021-10-14 Thread Jan Pieczkowski
Jan Pieczkowski added the comment: This issue also still affects Python versions 3.6.15 and 3.7.12 IMHO it would make sense to backport this patch to the 3.6 and 3.7 branches, especially as it only affects one line of code and doesn't seem to affect anything else, but solves the same

[issue45031] [Windows] datetime.fromtimestamp(t) when t = 253402210800 fails on Python 3.8

2021-08-27 Thread Jan Ripke
New submission from Jan Ripke : When executing the following statement on a Windows machine it fails. On a linux machine it returns the expected date (-31-12 00:00:00) The Error we get on Windows is: OSError: [Errno 22] Invalid argument In another manor it was reported before: https

[issue44762] getpass.getpass on Windows fallback detection is bad

2021-07-28 Thread jan matejek
Change by jan matejek : -- versions: +Python 3.9 ___ Python tracker <https://bugs.python.org/issue44762> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44762] getpass.getpass on Windows fallback detection is bad

2021-07-28 Thread jan matejek
Change by jan matejek : -- versions: -Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue44

[issue44762] getpass.getpass on Windows fallback detection is bad

2021-07-28 Thread jan matejek
jan matejek added the comment: For that matter, in standard Windows Command Prompt `sys.stdin` and `sys.__stdin__` are also identical, but `isatty()` reports True. I suspect is that the code has drifted and `sys.stdin` is _always_ identical to `sys.__stdin__

[issue44762] getpass.getpass on Windows fallback detection is bad

2021-07-28 Thread jan matejek
jan matejek added the comment: ...this is a problem because: When the check incorrectly infers that it can use `msvcrt` while its stdin is a pipe, the calls to `putwch` and `getwch` are going into the void and the program effectively freezes waiting for input that never comes. See also

[issue44762] getpass.getpass on Windows fallback detection is bad

2021-07-28 Thread jan matejek
New submission from jan matejek : The fallback detection for `win_getpass` checks that `sys.stdin` is different from `sys.__stdin__`. If yes, it assumes that it's incapable of disabling echo, and calls `default_getpass` which reads from stdin. If they are the same object, it assumes it

[issue39812] Avoid daemon threads in concurrent.futures

2021-04-26 Thread Jan Konopka
Jan Konopka added the comment: Hi all! While browsing StackOverflow I came across this question: https://stackoverflow.com/q/67273533/2111778 The user created a ThreadPoolExecutor which started a Process using multiprocessing. The Process produces an exitcode of 0 in Python 3.8 but an

[issue42853] `OverflowError: signed integer is greater than maximum` in ssl.py for files larger than 2GB

2021-02-05 Thread Jan Steinke
Change by Jan Steinke : -- nosy: +jan-xyz ___ Python tracker <https://bugs.python.org/issue42853> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42050] ensurepip fails if cwd contains illformed setup.cf

2021-01-30 Thread Jan Christoph
Jan Christoph added the comment: Just wanted to say, I ran into this while using direnv. See the issue I opened before knowing of this one: https://bugs.python.org/issue43038 -- nosy: +con-f-use Added file: https://bugs.python.org/file49779/shell-session.txt

[issue43038] ensurepip: tries to use setup.py/setup.cfg

2021-01-27 Thread Jan Christoph
New submission from Jan Christoph : Running python3 -Im ensurepip --upgrade --default-pip in a directory that contains a setup.cfg / setup.py combination, caused ensurepip to try and use these files, leading to distutils.errors.DistutilsOptionError: error in setup.cfg: command 'build

[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2020-12-03 Thread Jan Tojnar
Jan Tojnar added the comment: One benefit of using a compile time feature over a runtime method is that the former allows for more predictable dedenting by first dedenting and only then interpolating variables. For example, the following code does not dedent the test string at all

[issue41945] http.cookies.SimpleCookie.parse error after [keys]

2020-11-05 Thread Jan Novak
Jan Novak added the comment: Possible patch, load parts one by one: http_cookie = 'id=12345; [object Object]=data; something=not_loaded' for cookie_key in http_cookie.split(';'): c.load(cookie_key) print c Set-Cookie: id=12345 Set-Cookie:

[issue42173] Drop Solaris support

2020-10-30 Thread Jan Poctavek
Jan Poctavek added the comment: I'm speaking officially for Danube Cloud, an advanced project which is open-source virtualization platform similar to Proxmox, XCP-NG, oVirt, Joyent Triton, etc. Our base platform is SmartOS and we have everything written in Python. If you drop suppor

[issue42079] Why does tarfile.next swallow InvalidHeaderError

2020-10-19 Thread Jan Schatz
New submission from Jan Schatz : I have a tar gz archive that fails to be extracted via tarfile.extractall(). By adding some debug code I found that at some point InvalidHeaderError is raised inside tarfile.next(). But the function just swallows the exception, because the offset isn't 0

[issue41945] http.cookies.SimpleCookie.parse error after [keys]

2020-10-05 Thread Jan Novak
New submission from Jan Novak : If brackets [] are around cookie name, next cookie names are not loaded. try: import http.cookies as Cookie except ImportError: import Cookie c = Cookie.SimpleCookie() c.load('id=12345; [object Object]=data; something=not loaded') print(c) Note

[issue41417] SyntaxError: assignment expression within assert

2020-07-28 Thread Jan Češpivo
Jan Češpivo added the comment: Hi Ronald, thank you. It works! :) -- ___ Python tracker <https://bugs.python.org/issue41417> ___ ___ Python-bugs-list mailin

[issue41417] SyntaxError: assignment expression within assert

2020-07-28 Thread Jan Češpivo
New submission from Jan Češpivo : Hi, it should be useful if assignment expression works within assertion. For example (real use-case in tests): assert r := re.match(r"result is (\d+)", tested_text) assert int(r.group(1)) == expected_number I haven't found a mention abou

[issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups

2020-06-29 Thread Jan Hudec
Jan Hudec added the comment: Confirming the fixed version linked in previous comment by Thomas Waldmann is correct and matches what `hostname -f` does. -- nosy: +bulb versions: +Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

[issue40395] Scripts folder is Empty in python 3.8.2 for Windows 7.

2020-04-27 Thread BenTen Jan
BenTen Jan added the comment: First and foremost thanks for replying, 1. I don't have any virus scanner installed. 2. I have tried running "python -m ensurepip" it shows me Following error C:\Python>Python get-pip.py Traceback (most recent call last): File "get-

[issue40395] Scripts folder is Empty in python 3.8.2 for Windows 7.

2020-04-26 Thread BenTen Jan
New submission from BenTen Jan : I downloaded python 3.8.2 which is the latest version of python for windows. Run as admin , changed path of installation though its getting empty Scripts folder. though setup shows successful. Please find attached log files from my %temp% folder. Thanks

[issue34028] Python 3.7.0 wont compile with SSL Support 1.1.0 > alledged missing X509_VERIFY_PARAM_set1_host() support

2020-04-24 Thread Jan Wilmans
Jan Wilmans added the comment: I couldn't get this to work at all, python 3.7 compiled fine, but at the end it reports: ''' *** WARNING: renaming "_ssl" since importing it failed: libssl.so.1.1: cannot open shared object file: No such file or directory *** WARN

[issue27793] Double underscore variables in module are mangled when used in class

2020-03-06 Thread Jan Christoph
Jan Christoph added the comment: In particular, this might conflict with the documentation of global, which states: > If the target is an identifier (name): > >If the name does not occur in a global statement in the current code > block: the name is bound to the object in

[issue27793] Double underscore variables in module are mangled when used in class

2020-03-04 Thread Jan Christoph
Jan Christoph added the comment: Just because it is documented, doesn't mean it's not a bug or illogical and unexpected. -- ___ Python tracker <https://bugs.python.o

[issue27793] Double underscore variables in module are mangled when used in class

2020-03-04 Thread Jan Christoph
Jan Christoph added the comment: I would argue to reopen this. Seeing I and other people run into that issue (e.g. https://stackoverflow.com/q/40883083/789308) quiet frequently. Especially since it breaks the `global` keyword, e.g.: __superprivate = "mahog" class AClass(object

[issue16487] Allow ssl certificates to be specified from memory rather than files.

2020-03-01 Thread Jan-Philip Gehrcke
Jan-Philip Gehrcke added the comment: I am not too attached to "my" patch, but because I love Python I really would like us to land on a solution. > However I want all changes and new additions to the SSL module to follow PEP > 543 so I can provide a PEP 543-compatible inter

[issue9625] argparse: Problem with defaults for variable nargs when using choices

2019-11-20 Thread Jan Hutař
Jan Hutař added the comment: I think there is a same issue with "nargs='+'" - if you are aware of the, please ignore me. $ python3 --version Python 3.7.5 With "choices=...", there seems to be a problem: $ cat bbb.py #!/usr/bin/env python3 import argparse pa

[issue36850] shutil.copy2 fails with even with source network filesystem not supporting extended attributes

2019-05-08 Thread Jan-Martin Kuhnigk
Change by Jan-Martin Kuhnigk : -- nosy: +grebdioZ ___ Python tracker <https://bugs.python.org/issue36850> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36208] AsyncIO V4MAPPED addresses with V6ONLY.

2019-03-06 Thread Jan Seeger
Jan Seeger added the comment: The intention for V4MAPPED is to allow "single-stack" usage of V4 and V6 addresses (or am I misunderstanding the purpose of the V4MAPPED socket option here?). The application only handles V6 addresses, and the system transparently converts from mapped

[issue36208] AsyncIO V4MAPPED addresses with V6ONLY.

2019-03-06 Thread Jan Seeger
New submission from Jan Seeger : I'm working with aiocoap, which uses the AI_V4MAPPED flag to use IPv4-mapped addresses for dual-stack support. When trying to run on Windows, creating a connection fails, because the socket option IPV6_V6ONLY is set to true per default on Windows, wherea

[issue34931] os.path.splitext with more dots

2018-10-29 Thread Jan Novak
Jan Novak added the comment: Yes, dot behaviour is well documented. But splitext() is a function to split name and extension, not take care about hidden files. Hidden files starting with dot is Unix like system feature. https://en.wikipedia.org/wiki/Hidden_file_and_hidden_directory Hidden

[issue34947] inspect.getclosurevars() does not get all globals

2018-10-23 Thread Jan Hermann
Jan Hermann added the comment: Ok, that’s fair. But then the inspect module currently doesn’t provide tools to the user to construct the recursive identification without duplicating code already in stdlib. For that, one would need to refactor getclosurevars() to two parts: getcode() and

[issue30670] pprint for dict in sorted order or insert order?

2018-10-17 Thread Jan-Hein Bührman
Jan-Hein Bührman added the comment: @terry.reedy - If I understand correctly, this issue was closed by you awaiting what would happen with the dict insertion order after 3.6. It has been decided that dict insertion will stay for now and in the future. >>> Should this issue now be

[issue34947] inspect.getclosurevars() does not get all globals

2018-10-09 Thread Jan Hermann
New submission from Jan Hermann : inspect.getclosurevars() omits globals or nonlocals that are bound within comprehensions: 22:50 ~ python3 Python 3.7.0 (default, Aug 17 2018, 21:14:48) [Clang 9.1.0 (clang-902.0.39.2)] on darwin Type "help", "copyright", "credi

[issue34931] os.path.splitext with more dots

2018-10-08 Thread Jan Novak
New submission from Jan Novak : There are some old tickets about changing splitext() in 2007: https://bugs.python.org/issue1115886 https://bugs.python.org/issue1681842 Present python documentation: Leading periods on the basename are ignored; splitext('.cshrc') returns ('.cshrc

[issue16487] Allow ssl certificates to be specified from memory rather than files.

2018-09-06 Thread Jan-Philip Gehrcke
Jan-Philip Gehrcke added the comment: Thanks for the discussion. Since I tried to join the efforts here in 2016 two years ago I was (and still am) enthusiastic, and willing to invest quite a bit of energy. Still, we have missed the 3.6 and 3.7 releases to change something about the fact

[issue34076] Nested loop in dictionary comprehension gives `global name not defined` inside class

2018-07-10 Thread Jan Christoph
Jan Christoph added the comment: Updated example with reversed variable order for reference. This really seems to be related to issue3692, but really not the same thing. IMHO both `a` and `b` should be passed in a situation like this: a = range(5) b = range(3) c = [x+y for x in a for y

[issue34076] Nested loop in dictionary comprehension gives `global name not defined` inside class

2018-07-10 Thread Jan Christoph
Jan Christoph added the comment: Okay, so we're a in another scope inside the dictionary comprehension (all comprehensions for that matter), and only one symbol is passed to the inside. That's why `strange_reversed_working = {x+s.replace('(+/-)',''):None for x

[issue34076] Nested loop in dictionary comprehension gives `global name not defined` inside class

2018-07-10 Thread Jan Christoph
Jan Christoph added the comment: But the simpler dictionary compprehension `{s.replace('(+/-)',''):None for s in infts.split(', ')}` works perfectly. Shouldn't that also give the error if it was a scope issue? -- ___

[issue34076] Nested loop in dictionary comprehension gives `global name not defined` inside class

2018-07-09 Thread Jan Christoph
New submission from Jan Christoph : The python code: ``` class _tri(object): infts = '(+/-)inf, (+/-)infty, (+/-)infinity' strange_failing = {x+s.replace('(+/-)',''):None for x in ('+','-','') for s in infts.split('

[issue34048] Bad behavior of re.IGNORECASE

2018-07-04 Thread Jan Švec
Jan Švec added the comment: Not a bug, it assigns the value of re.IGNORECASE into the count parameter. Sorry -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue34048] Bad behavior of re.IGNORECASE

2018-07-04 Thread Jan Švec
New submission from Jan Švec : re.sub() is behaving incorrectly, if re.IGNORECASE is used. Tested on 2.7, 3.4 and 3.6. The code follows: import re def subst(text): text = re.sub(r"\bnine\b", "niner", text, re.IGNORECASE) return text print(subst("nine nine nine

[issue8557] subprocess PATH semantics and portability

2018-06-20 Thread Jan Lachnitt
Jan Lachnitt added the comment: A related issue exists with cwd: #15533. -- nosy: +pepalogik ___ Python tracker <https://bugs.python.org/issue8557> ___ ___ Pytho

[issue15533] subprocess.Popen(cwd) documentation: Posix vs Windows

2018-06-20 Thread Jan Lachnitt
Jan Lachnitt added the comment: Nobody responds yet, so I will. I think that the basic proposal was made by Chris Jerdonek in msg171692 already on 2012-10-01: First document both behaviors and then discuss the possible harmonization. I think the proposal was good and further discussion has

[issue15533] subprocess.Popen(cwd) documentation: Posix vs Windows

2018-06-13 Thread Jan Lachnitt
Jan Lachnitt added the comment: @eryksun: Sorry for my late reply, apparently I did not have time to reply in 2017. I see your point, but still I think that Python is conceptually multi-platform, so its behavior on Linux and Windows should be as much consistent as possible. I am not the

[issue30773] async generator receives wrong value when shared between coroutines

2018-05-24 Thread Jan
Jan added the comment: I've reproduced the problem also in 3.7 branch. ``` import asyncio loop = asyncio.get_event_loop() async def consumer(): while True: await asyncio.sleep(0) message = yield print('received', message) async def amain():

[issue14573] json iterencode can not handle general iterators

2018-04-12 Thread Jan Vlcinsky
Jan Vlcinsky added the comment: I found proposed change very handy (came here researching why it is not behaving that way). Taking into account: - Python shines in handling lists, using generators and iterators - Largest group of python developers develop web apps, and there it is typical

[issue32223] distutils doesn't correctly read UTF-8 content from config files

2018-01-25 Thread Jan Vlcinsky
Jan Vlcinsky added the comment: The fix shall go to https://github.com/python/cpython/blob/2812d3d99287c50bab99625d7240bcf1c2e32369/Lib/distutils/dist.py#L406 where `parser.read(filename)` shall be changed to `parser.read(filename, encoding="utf-8")` This assumes that the setup.cf

[issue16487] Allow ssl certificates to be specified from memory rather than files.

2017-11-28 Thread Jan-Philip Gehrcke
Jan-Philip Gehrcke added the comment: Hello! I would very much appreciate if we can find a way for us to get another review for the last patch. I did most of the work in August 2016 and got a review from Senthil and Christian which I processed. When I got back to the patch for converting it

[issue29515] socket module missing IPPROTO_IPV6, IPPROTO_IPV4 on Windows

2017-10-30 Thread Jan Gosmann
Change by Jan Gosmann : -- nosy: +jgosmann ___ Python tracker <https://bugs.python.org/issue29515> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7167] Smarter FTP passive mode

2017-10-06 Thread Albert-Jan Nijburg
Albert-Jan Nijburg added the comment: I understand the standpoint that the server is configured incorrectly, and I see why this might not be the best solution to the problem. But not everyone owns the ftp server they're connecting to. And the `EPSV` command often doesn't i

[issue16487] Allow ssl certificates to be specified from memory rather than files.

2017-10-02 Thread Jan-Philip Gehrcke
Jan-Philip Gehrcke added the comment: Hey Antoine, Christian, Senthil! I have invested quite a bit more time to double-check my responses to the questions asked so far, clarified where appropriate, and updated the pull request on GitHub after manually resolving the merge conflicts that

[issue1294959] Problems with /usr/lib64 builds.

2017-09-22 Thread jan matejek
Changes by jan matejek : -- pull_requests: +3682 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue1294959> ___ ___ Python-bugs-list mai

[issue31369] re.RegexFlag is not included in __all__

2017-09-06 Thread Pieter-Jan Briers
Pieter-Jan Briers added the comment: I suppose it may be an implementation detail, though I wouldn't be amazed that had enum existed when re was written it'd have been used instead of constant integers at the time. Though I do suppose exposing it fully would add two ways to get

[issue31369] re.RegexFlag is not included in __all__

2017-09-06 Thread Pieter-Jan Briers
New submission from Pieter-Jan Briers: It exists and its flags are exported, but not the direct classes itself. This seems inconsistent to me and fixing it would make things like using static typing on it just a little bit easier. -- components: Regular Expressions messages: 301516

[issue16487] Allow ssl certificates to be specified from memory rather than files.

2017-06-27 Thread Jan-Philip Gehrcke
Jan-Philip Gehrcke added the comment: Hey Senthil and Christian! > Could you convert your latest patch into PR against > https://github.com/python/cpython That was fun. There we go: https://github.com/python/cpython/pull/2449 I hope I was not too late with that for the 3.7 devel

[issue16487] Allow ssl certificates to be specified from memory rather than files.

2017-06-27 Thread Jan-Philip Gehrcke
Changes by Jan-Philip Gehrcke : -- pull_requests: +2506 ___ Python tracker <http://bugs.python.org/issue16487> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30656] typo in PyModule_New documentation

2017-06-13 Thread Jan Hnatek
New submission from Jan Hnatek: The doc for PyModule_New() refers to "PyImport_NewObject()", while it should refer to "PyModule_NewObject()": https://docs.python.org/3.6/c-api/module.html#c.PyModule_New -- assignee: docs@python components: Documentation message

[issue25324] Importing tokenize modifies token

2017-06-01 Thread Albert-Jan Nijburg
Changes by Albert-Jan Nijburg : -- pull_requests: +1990 ___ Python tracker <http://bugs.python.org/issue25324> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25324] Importing tokenize modifies token

2017-06-01 Thread Albert-Jan Nijburg
Albert-Jan Nijburg added the comment: Aah! Oops I can fix later today. On Thu, 1 Jun 2017 at 18:08, STINNER Victor wrote: > > STINNER Victor added the comment: > > We got a bug report from Coverity: > > *** CID 1411801: Incorrect expression (MISSING_COMMA) > /Parse

[issue25324] Importing tokenize modifies token

2017-05-31 Thread Albert-Jan Nijburg
Albert-Jan Nijburg added the comment: I've updated token.rst and Misc/NEWS. Let me know if the wording is correct. -- ___ Python tracker <http://bugs.python.org/is

[issue25324] Importing tokenize modifies token

2017-05-30 Thread Albert-Jan Nijburg
Albert-Jan Nijburg added the comment: Let me know if you want me to add/change anything about my PR :) I'm happy to do so. -- ___ Python tracker <http://bugs.python.org/is

[issue30455] Generate C code from token.py and not vice versa

2017-05-30 Thread Albert-Jan Nijburg
Albert-Jan Nijburg added the comment: I think this covers all the changes from PR #1608. Looks a lot nicer too, building it every time from the make file. You may want to add to the docs that token.py is now the source of the tokens. -- ___ Python

[issue9544] xdrlib.Packer().pack_fstring throws a TypeError when called with a str()

2017-05-30 Thread Jan Hnatek
Jan Hnatek added the comment: Attached an updated patch against 3.7 fixing the remaining mentions of string. -- Added file: http://bugs.python.org/file46914/issue9544.2.patch ___ Python tracker <http://bugs.python.org/issue9

[issue9544] xdrlib.Packer().pack_fstring throws a TypeError when called with a str()

2017-05-29 Thread Jan Hnatek
Changes by Jan Hnatek : -- nosy: +hnhn ___ Python tracker <http://bugs.python.org/issue9544> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue30216] xdrlib.Unpacker.unpack_string returns bytes (docs say should be str)

2017-05-29 Thread Jan Hnatek
Jan Hnatek added the comment: There's a patch for xdrlib documentation in Issue9544. Would that solve this issue? -- nosy: +hnhn ___ Python tracker <http://bugs.python.org/is

[issue25324] Importing tokenize modifies token

2017-05-24 Thread Albert-Jan Nijburg
Albert-Jan Nijburg added the comment: I've updated the PR and added the tokenize tokens to token.h and their names to tokenizer.c. This way they'll show up when you run token.py. The names will always be in tok_name and tokenizer.py will use those. Not breaking the public api and

[issue30377] Unnecessary complexity in tokenize.py around handling of comments and newlines

2017-05-19 Thread Albert-Jan Nijburg
Albert-Jan Nijburg added the comment: Still no CLA, I checked my username on the pdf, and it's correct, hope someone looks at it soon :) -- ___ Python tracker <http://bugs.python.org/is

[issue30377] Unnecessary complexity in tokenize.py around handling of comments and newlines

2017-05-16 Thread Albert-Jan Nijburg
Albert-Jan Nijburg added the comment: I did yesterday, should be coming through today right? -- ___ Python tracker <http://bugs.python.org/issue30377> ___ ___

[issue25324] Importing tokenize modifies token

2017-05-16 Thread Albert-Jan Nijburg
Albert-Jan Nijburg added the comment: lib2to3 appears to have it's own token.py as well with NL and COMMENT withtout ENCODING... Lib/lib2to3/pgen2/token.py -- ___ Python tracker <http://bugs.python.org/is

[issue25324] Importing tokenize modifies token

2017-05-16 Thread Albert-Jan Nijburg
Albert-Jan Nijburg added the comment: > I prefer to add tokenize tokens directly in Lib/token.py, and then get > COMMENT, NL and ENCODING using tok_name.index(). That would make more sense from a breaking change perspective, but we would step on the toes of anyone adding `COMMENT`, `N

[issue30377] Unnecessary complexity in tokenize.py around handling of comments and newlines

2017-05-16 Thread Albert-Jan Nijburg
Albert-Jan Nijburg added the comment: Oh yes you're right! I've updated the code on github. Even cleaner this way :). -- ___ Python tracker <http://bugs.python.o

[issue25324] Importing tokenize modifies token

2017-05-16 Thread Albert-Jan Nijburg
Changes by Albert-Jan Nijburg : -- pull_requests: +1699 ___ Python tracker <http://bugs.python.org/issue25324> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30377] Unnecessary complexity in tokenize.py around handling of comments and newlines

2017-05-16 Thread Albert-Jan Nijburg
New submission from Albert-Jan Nijburg: While porting tokenize.py to javascript I stumbled upon this. The bit of code that checks if it's a newline or a comment, checks for comment twice. These can be split up, this way the code is a bit more readable. https://github.com/python/cpython

[issue29949] sizeof set after set_merge() is doubled from 3.5

2017-03-30 Thread Jan Gosmann
Changes by Jan Gosmann : -- nosy: +jgosmann ___ Python tracker <http://bugs.python.org/issue29949> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29817] File IO r+ read, write, read causes garbage data write.

2017-03-15 Thread Jan
Changes by Jan : -- title: File IO read, write, read causes garbage data write. -> File IO r+ read, write, read causes garbage data write. ___ Python tracker <http://bugs.python.org/issu

[issue29817] File IO read, write, read causes garbage data write.

2017-03-15 Thread Jan
New submission from Jan: In Python 2.7.12 when reading, writing and subsequently reading again from a file, python seems to write garbage. For example when running this in python IDLE: import os testPath = r"myTestFile.txt" ## Make sure the file exists and its empty with open(t

[issue26789] Please do not log during shutdown

2017-02-21 Thread Jan Vorwerk
Jan Vorwerk added the comment: Indeed, the error message is quite... surprising and misleading. To reproduce, please run the attached (admittedly wrong) program that I could simplify a lot. It seems to occur when a exception is raised at the wrong time... I hope this helps nail down (at least

[issue29324] test_aead_aes_gcm fails on Kernel 4.9

2017-02-16 Thread jan matejek
Changes by jan matejek : -- pull_requests: +94 ___ Python tracker <http://bugs.python.org/issue29324> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29324] test_aead_aes_gcm fails on Kernel 4.9

2017-02-02 Thread jan matejek
jan matejek added the comment: the attached patch fixes the test for me -- keywords: +patch Added file: http://bugs.python.org/file46494/test_socket_aead_kernel49.patch ___ Python tracker <http://bugs.python.org/issue29

[issue29324] test_aead_aes_gcm fails on Kernel 4.9

2017-02-02 Thread jan matejek
jan matejek added the comment: The "'0' * taglen" part is now considered part of plaintext. Which makes a lot of sense :) Removing the "empty taglen" fixes the encryption part of the tests for me. Similarly, for the decryption test, we must only read and chec

[issue1294959] Problems with /usr/lib64 builds.

2017-01-16 Thread jan matejek
jan matejek added the comment: Attached is a patch that I'd like to propose for inclusion. It introduces a new configure option "--with-custom-platlibdir=", which defaults to `basename $libdir`. This is converted to makefile variable "platlibdir", which is used in ge

[issue29283] duplicate README in site-packages

2017-01-16 Thread jan matejek
New submission from jan matejek: Lib/site-packages directory now contains README.txt in addition to README. Both files are identical. One of them should probably go away? -- components: Installation messages: 28 nosy: matejcik priority: normal severity: normal status: open title

[issue1294959] Problems with /usr/lib64 builds.

2017-01-10 Thread jan matejek
jan matejek added the comment: at this again, when porting SUSE patches to 3.6.0 :) ( :( ) Last time there was a discussion, Barry suggested using sysconfig variables to find the proper libdir. Trouble is, to fill out the variables, sysconfig itself uses two sources: a) compiled-in

[issue28180] sys.getfilesystemencoding() should default to utf-8

2017-01-06 Thread Jan Niklas Hasse
Jan Niklas Hasse added the comment: > Can you please tell me if these variables are set and if yes, give me their > value? None of these variables are set (with `docker run -it fedora:25 /bin/bash`). -- ___ Python tracker <http://bugs.p

[issue29145] failing overflow checks in replace_*

2017-01-05 Thread jan matejek
jan matejek added the comment: some instances are present in unicodeobject.c too -- Added file: http://bugs.python.org/file46156/unicode-overflow.patch ___ Python tracker <http://bugs.python.org/issue29

  1   2   3   4   5   >