[issue42369] Reading ZipFile not thread-safe

2022-01-03 Thread Thomas
Thomas added the comment: @khaledk I finally got some time off, so here you go https://github.com/1/ParallelZipFile I can not offer any support for a more correct implementation of the zip specification due to time constraints, but maybe the code is useful for you anyway

difflib.SequenceMatcher fails for larger strings

2007-03-12 Thread Thomas
I'm trying to write a program to test a persons typing speed and show them their mistakes. However I'm getting weird results when looking for the differences in longer strings: import difflib a = '012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678

[issue43477] from x import * behavior inconsistent between module types.

2021-03-11 Thread Thomas
New submission from Thomas : I'm looking for clarification as to how `from x import *` should operate when importing file/directory-based modules versus when importing a sub-module from within a directory-based module. While looking into a somewhat related issue with pylint, I noticed

[issue43477] from x import * behavior inconsistent between module types.

2021-03-13 Thread Thomas
Thomas added the comment: I've spent a bit of time building (and rebuilding) Python 3.9 with a modified `Lib/importlib/_bootstrap.py`/regenerated `importlib.h` to give me some extra logging, and believe the answer I was looking for is `_find_and_load_unlocked`. `_find_and_load_unl

[issue43477] from x import * behavior inconsistent between module types.

2021-03-13 Thread Thomas
Thomas added the comment: Ahh, I always forget about blame. Though the form was different, the initial commit of `importlib` (authored by Brett, so the nosy list seems fine for the moment) behaved the same way, and had an additional comment noting that the section in question was included

[issue42369] Reading ZipFile not thread-safe

2021-06-30 Thread Thomas
Thomas added the comment: The monkey patch works for me! Thank you very much! (I have only tested reading, not writing). However, the lock contention of Python's ZipFile is so bad that using multiple threads actually makes the code run _slower_ than single threaded code when reading

[issue34451] docs: tutorial/introduction doesn't mention toggle of prompts

2021-07-12 Thread Thomas
Change by Thomas : -- keywords: +patch nosy: +thmsdnnr nosy_count: 6.0 -> 7.0 pull_requests: +25650 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27105 ___ Python tracker <https://bugs.python.org/i

[issue44961] @classmethod doesn't set __wrapped__ the same way as functool's update_wrapper

2021-08-20 Thread Thomas
New submission from Thomas : @classmethod defines a __wrapped__ attribute that always points to the inner most function in a decorator chain while functool's update_wrapper has been fixed to set the wrapper.__wrapped__ attribute after updating the wrapper.__dict__ (see

[issue34451] docs: tutorial/introduction doesn't mention toggle of prompts

2021-09-20 Thread Thomas
Thomas added the comment: I added a pull request to attempt to fix this issue. It received a label but no review and has gone stale, so I am sending out a ping. -- ___ Python tracker <https://bugs.python.org/issue34

[issue45259] No _heappush_max()

2021-09-21 Thread Thomas
New submission from Thomas : There is no heappush function for a max heap when the other supporting helper functions are already implemented (_siftdown_max()) -- components: Library (Lib) messages: 402351 nosy: ThomasLee94 priority: normal severity: normal status: open title: No

[issue45259] No _heappush_max()

2021-09-21 Thread Thomas
Change by Thomas : -- nosy: +rhettinger, stutzbach -ThomasLee94 ___ Python tracker <https://bugs.python.org/issue45259> ___ ___ Python-bugs-list mailin

[issue45259] No _heappush_max()

2021-09-21 Thread Thomas
Change by Thomas : -- versions: +Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue45259> ___ ___

[issue39247] dataclass defaults and property don't work together

2021-10-21 Thread Thomas
Thomas added the comment: Hello everyone, A quick look on SO and Google + this python issue + this blog post and its comments: https://florimond.dev/en/posts/2018/10/reconciling-dataclasses-and-properties-in-python/ show that this is still a problem where dataclass users keep hitting a

[issue39247] dataclass defaults and property don't work together

2021-10-21 Thread Thomas
Thomas added the comment: Thinking a little more about this, maybe a different solution would be to have default values be installed at the class level by default without being overwritten in the init, as is the case today. default_factory should keep being set in the init as is the case

[issue39247] dataclass defaults and property don't work together

2021-10-21 Thread Thomas
Thomas added the comment: Scratch that last one, it leads to problem when mixing descriptors with actual default values: @dataclass class Foo: bar = field(default=some_descriptor) # technically this is a descriptor field without a default value or at the very least, the dataclass

[issue39247] dataclass defaults and property don't work together

2021-10-21 Thread Thomas
Thomas added the comment: Agreed on everything but that last part, which I'm not sure I understand: > If we allow descriptor to accept an iterable as well you could have multiple > descriptors just like normal. Could you give an example of what you mean with a regular class? I&#

[issue39247] dataclass defaults and property don't work together

2021-10-21 Thread Thomas
Thomas added the comment: Just to rephrase, because the explanation in my last message can be ambiguous: At dataclass construction time (when the @dataclass decorator inspects and enhances the class): for field in fields: if descriptor := getattr(field, 'descriptor'):

[issue39247] dataclass defaults and property don't work together

2021-10-21 Thread Thomas
Thomas added the comment: > An example of multiple descriptors would be to have: > @cached_property > @property > def expensive_calc(self): > #Do something expensive That's decorator chaining. The example you gave is not working code (try to return something from expe

[issue42369] Reading ZipFile not thread-safe

2020-11-16 Thread Thomas
New submission from Thomas : According to https://docs.python.org/3.5/whatsnew/changelog.html#id108 bpo-14099, reading multiple ZipExtFiles should be thread-safe, but it is not. I created a small example where two threads try to read files from the same ZipFile simultaneously, which crashes

[issue42369] Reading ZipFile not thread-safe

2020-11-16 Thread Thomas
Change by Thomas : -- components: +Library (Lib) type: -> crash ___ Python tracker <https://bugs.python.org/issue42369> ___ ___ Python-bugs-list mai

[issue42369] Reading ZipFile not thread-safe

2020-11-16 Thread Thomas
Thomas added the comment: I have not observed any segfaults yet. Only zipfile.BadZipFile exceptions so far. The exact file at which it crashes is fairly random. It even crashes if all threads try to read the same file multiple times. I think the root cause of the problem is that the reads

[issue42369] Reading ZipFile not thread-safe

2020-11-16 Thread Thomas
Thomas added the comment: Scratch what I said in the previous message. I thought that the lock was created in _SharedFile and did not notice that it was passed as a parameter. -- ___ Python tracker <https://bugs.python.org/issue42

[issue42369] Reading ZipFile not thread-safe

2020-11-16 Thread Thomas
Thomas added the comment: I have simplified the test case a bit more: import multiprocessing.pool, zipfile # Create a ZipFile with two files and same content with zipfile.ZipFile("test.zip", "w", zipfile.ZIP_STORED) as z: z.writestr("file1", b"0"*1

[issue24882] ThreadPoolExecutor doesn't reuse threads until #threads == max_workers

2019-05-18 Thread Thomas
Thomas added the comment: We ran into this issue in the context of asyncio which uses an internal ThreadPoolExecutor to provide an asynchronous getaddrinfo / getnameinfo. We observed an async application spawned more and more threads through several reconnects. With a maximum of 5 x CPUs

[issue24964] Add tunnel CONNECT response headers to httplib / http.client

2015-09-04 Thread Thomas
Thomas added the comment: Martin: Thanks for your quick answer (and sorry for sending the whole file) ! I think it is indeed a good idea to detach the proxy connection and treat it as any other connection, as you did in your patch. It would be great if you would be able to dig it up

[issue26628] Segfault in cffi with ctypes.union argument

2016-03-23 Thread Thomas
New submission from Thomas: Passing ctypes.Union types as arguments crashes python. Attached is a minimal example to reproduce. Due to undefined behavior, you may have to increase the union _fields_ to reproduce. I tested with 3.5.1 and 2.7.11. It seems that cffi treats the union as a normal

[issue26628] Segfault in cffi with ctypes.union argument

2016-03-23 Thread Thomas
Thomas added the comment: Note [http://www.atmark-techno.com/~yashi/libffi.html] > Although ‘libffi’ has no special support for unions or bit-fields, it is > perfectly happy passing structures back and forth. You must first describe > the structure to ‘libffi’ by creating a new

[issue26628] Undefined behavior calling C functions with ctypes.Union arguments

2016-03-24 Thread Thomas
Thomas added the comment: So after some more pondering about the issue I read the documentation again: > Warning ctypes does not support passing unions or structures with bit-fields > to functions by value. Previously I always read this as 'does not support passing unions with

[issue26657] Directory traversal with http.server and SimpleHTTPServer on windows

2016-03-28 Thread Thomas
New submission from Thomas: SimpleHTTPServer and http.server allow directory traversal on Windows. To exploit this vulnerability, replace all ".." in URLs with "c:c:c:..". Example: Run python -m http.server and visit 127.0.0.1:8000/c:c:c:../secret_file_that_should_be_s

[issue26657] Directory traversal with http.server and SimpleHTTPServer on windows

2016-03-29 Thread Thomas
Thomas added the comment: Martin Panter: Regarding the warning, you appear to be correct. However, reading the source of http.server again made me notice _url_collapse_path(path) which seems to have some overlap with translate_path. Also it crashes with an IndexError if path contains '..&#x

[issue26657] Directory traversal with http.server and SimpleHTTPServer on windows

2016-04-02 Thread Thomas
Thomas added the comment: Looks ok to me security-wise. But I just noticed that it the trailing slash is inconsistent on Windows, e.g.: translate_path('asdf/') == 'C:\\Users\\User\\Desktop\\temp\\asdf/' <- this slash because path += '/' is used instead of o

[issue26628] Undefined behavior calling C functions with ctypes.Union arguments

2016-04-05 Thread Thomas
Changes by Thomas : Added file: http://bugs.python.org/file42372/libfoo.c ___ Python tracker <http://bugs.python.org/issue26628> ___ ___ Python-bugs-list mailin

[issue26628] Undefined behavior calling C functions with ctypes.Union arguments

2016-04-05 Thread Thomas
Thomas added the comment: Thanks Eryk for the additional explanation. I added a more elaborate example that doesn't abuse the standard c function that actually doesn't expect a union: % gcc -shared -fPIC libfoo.c -o libfoo.so -Wall % python pyfoo.py

[issue26799] gdb support fails with "Invalid cast."

2016-04-18 Thread Thomas
New submission from Thomas: Trying to use any kind of python gdb integration results in the following error: (gdb) py-bt Traceback (most recent call first): Python Exception Invalid cast.: Error occurred in Python command: Invalid cast. I have tracked it down to the _type_... globals, and I

[issue26799] gdb support fails with "Invalid cast."

2016-04-19 Thread Thomas
Thomas added the comment: I have done a bit more digging, turns out it is actually no problem at all to debug python in gdb with gdb with python support (at least using a fixed python-gdb-py). Turns out the type->length of the the globally initialized ptr types is wrong: It is 4 instead o

[issue26799] gdb support fails with "Invalid cast."

2016-04-20 Thread Thomas
Thomas added the comment: The second option seems like the safest choice, attached is a patch that addresses just that. -- keywords: +patch Added file: http://bugs.python.org/file42538/gdb-python-invalid-cast.patch ___ Python tracker <h

[issue26799] gdb support fails with "Invalid cast."

2016-04-21 Thread Thomas
Thomas added the comment: Thank you for the quick integration and fixing the return. I have signed the electronic form yesterday. -- ___ Python tracker <http://bugs.python.org/issue26

[issue26833] returning ctypes._SimpleCData objects from callbacks

2016-04-23 Thread Thomas
New submission from Thomas: If a callback function returns a ctypes._SimpleCData object, it will fail with a type error and complain that it expects a basic type. Using the qsort example: def py_cmp_func(a, b): print(a.contents, b.contents) return c_int(0) > TypeError: an integer

[issue21461] Recognize -pthread

2021-12-10 Thread Thomas Klausner
Change by Thomas Klausner : -- pull_requests: +28257 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30032 ___ Python tracker <https://bugs.python.org/issu

[issue21461] Recognize -pthread

2021-12-10 Thread Thomas Klausner
Thomas Klausner added the comment: gcc supports this flag. According to the man page: This option consistently for both compilation and linking. This option is supported on GNU/Linux targets, most other Unix derivatives, and also on x86 Cygwin and MinGW targets. On NetBSD, using -pthread

[issue21461] Recognize -pthread

2021-12-10 Thread Thomas Klausner
Thomas Klausner added the comment: I must confess, I don't know. This patch has been in pkgsrc since at least the import of the first python 2.7 package in 2011, and I haven't dug deeper. If you think it is unnecessary, I'll trust you. I've just removed it from the py

[issue21459] DragonFlyBSD support

2021-12-10 Thread Thomas Klausner
Thomas Klausner added the comment: Not interested in this any longer, and Dragonfly's Dports doesn't carry this patch, so it's probably not needed any longer. -- stage: -> resolved status: open -> closed ___ P

[issue46045] NetBSD: do not use POSIX semaphores

2021-12-11 Thread Thomas Klausner
New submission from Thomas Klausner : On NetBSD by default, the following tests do not finish in > 1h: 1:07:13 load avg: 0.00 running: test_compileall (1 hour 7 min), test_multiprocessing_fork (1 hour 7 min), test_concurrent_futures (1 hour 6 min) Defining HAVE_BROKEN_POSIX_SEMAPHORES fi

[issue46045] NetBSD: do not use POSIX semaphores

2021-12-11 Thread Thomas Klausner
Change by Thomas Klausner : -- keywords: +patch pull_requests: +28272 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30047 ___ Python tracker <https://bugs.python.org/issu

[issue46053] NetBSD: ossaudio support incomplete

2021-12-11 Thread Thomas Klausner
New submission from Thomas Klausner : When compiling Python on NetBSD, the ossaudio module is not enabled. 1. the code tries to export some #define that are not in the public OSS API (but that some other implementations provide) 2. on NetBSD, you need to link against libossaudio when using OSS

[issue46053] NetBSD: ossaudio support incomplete

2021-12-11 Thread Thomas Klausner
Change by Thomas Klausner : -- keywords: +patch pull_requests: +28285 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30065 ___ Python tracker <https://bugs.python.org/issu

[issue30512] CAN Socket support for NetBSD

2021-12-11 Thread Thomas Klausner
Change by Thomas Klausner : -- pull_requests: +28286 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30066 ___ Python tracker <https://bugs.python.org/issu

[issue46083] PyUnicode_FSConverter() has confusing reference semantics

2021-12-15 Thread Thomas Wouters
New submission from Thomas Wouters : The PyUnicode_FSConverter function has confusing reference semantics, and confusing documentation. https://docs.python.org/3/c-api/unicode.html#c.PyUnicode_FSConverter says the output argument "must be a PyBytesObject* which must be released when it

[issue45996] Worse error from asynccontextmanager in Python 3.10

2021-12-19 Thread Thomas Grainger
Thomas Grainger added the comment: > Actually I don't agree with Thomas's logic... his argument feels like > consistency for its own sake. Do you expect sync and async contextmanagers to act differently? Why would sync contextmanagers raise AttributeError and async contextm

[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2021-12-20 Thread Thomas Gläßle
Thomas Gläßle added the comment: Ok, it seems at least the incorrect documentation has been fixed in the mean time. I'm going to close this as there seems to be no capacity to deal with this. -- ___ Python tracker <https://bugs.py

[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2021-12-20 Thread Thomas Gläßle
Change by Thomas Gläßle : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue34624> ___ ___ Pyth

[issue46150] test_pathlib assumes "fakeuser" does not exist as user

2021-12-22 Thread Thomas Wouters
New submission from Thomas Wouters : test_pathlib contains, in PosixPathTest.test_expanduser, a check that expanduser on a nonexistent user will raise RuntimeError. Leaving aside the question why that's a RuntimeError (which is probably too late to fix anyway), the test performs this

[issue38415] @asynccontextmanager decorated functions are not callable like @contextmanager

2021-12-22 Thread Thomas Grainger
Change by Thomas Grainger : -- nosy: +graingert nosy_count: 3.0 -> 4.0 pull_requests: +28454 pull_request: https://github.com/python/cpython/pull/30233 ___ Python tracker <https://bugs.python.org/issu

[issue38415] @asynccontextmanager decorated functions are not callable like @contextmanager

2021-12-22 Thread Thomas Grainger
Thomas Grainger added the comment: actually it was already done in 13 months! -- ___ Python tracker <https://bugs.python.org/issue38415> ___ ___ Python-bug

[issue46308] Unportable test(1) operator in configure script

2022-01-08 Thread Thomas Klausner
New submission from Thomas Klausner : The configure script uses the test(1) '==' operator, which is only supported by bash. The standard comparison operator is '='. -- components: Installation messages: 410120 nosy: wiz priority: normal severity: normal status: op

[issue46308] Unportable test(1) operator in configure script

2022-01-08 Thread Thomas Klausner
Change by Thomas Klausner : -- keywords: +patch pull_requests: +28693 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30490 ___ Python tracker <https://bugs.python.org/issu

[issue34602] python3 resource.setrlimit strange behaviour under macOS

2022-01-08 Thread Thomas Klausner
Change by Thomas Klausner : -- nosy: +wiz nosy_count: 8.0 -> 9.0 pull_requests: +28694 pull_request: https://github.com/python/cpython/pull/30490 ___ Python tracker <https://bugs.python.org/issu

[issue46053] NetBSD: ossaudio support incomplete

2022-01-14 Thread Thomas Klausner
Thomas Klausner added the comment: ping - this patch needs a review -- ___ Python tracker <https://bugs.python.org/issue46053> ___ ___ Python-bugs-list mailin

[issue46045] NetBSD: do not use POSIX semaphores

2022-01-14 Thread Thomas Klausner
Thomas Klausner added the comment: ping - this patch needs a review -- ___ Python tracker <https://bugs.python.org/issue46045> ___ ___ Python-bugs-list mailin

[issue46415] ipaddress.ip_{address, network, interface} raise TypeError instead of ValueError if given a tuple as address

2022-01-17 Thread Thomas Cellerier
New submission from Thomas Cellerier : `IPv*Network` and `IPv*Interface` constructors accept a 2-tuple of (address description, netmask) as the address parameter. When the tuple-based address is used errors are not propagated correctly through the `ipaddress.ip_*` helper because of the

[issue46415] ipaddress.ip_{address, network, interface} raise TypeError instead of ValueError if given a tuple as address

2022-01-17 Thread Thomas Cellerier
Change by Thomas Cellerier : -- keywords: +patch pull_requests: +28845 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30642 ___ Python tracker <https://bugs.python.org/issu

[issue46415] ipaddress.ip_{address, network, interface} raises TypeError instead of ValueError if given a tuple as address

2022-01-17 Thread Thomas Cellerier
Change by Thomas Cellerier : -- title: ipaddress.ip_{address,network,interface} raise TypeError instead of ValueError if given a tuple as address -> ipaddress.ip_{address,network,interface} raises TypeError instead of ValueError if given a tuple as addr

[issue46045] NetBSD: do not use POSIX semaphores

2022-01-18 Thread Thomas Klausner
Thomas Klausner added the comment: Thanks for merging this, @serhiy.storchaka! -- ___ Python tracker <https://bugs.python.org/issue46045> ___ ___ Python-bug

[issue46522] concurrent.futures.__getattr__ raises the wrong AttributeError message

2022-01-25 Thread Thomas Grainger
New submission from Thomas Grainger : >>> import types >>> types.ModuleType("concurrent.futures").missing_attribute Traceback (most recent call last): File "", line 1, in AttributeError: module 'concurrent.futures' has no attribute &

[issue46522] concurrent.futures.__getattr__ raises the wrong AttributeError message

2022-01-25 Thread Thomas Grainger
Thomas Grainger added the comment: this also applies to io and _pyio -- ___ Python tracker <https://bugs.python.org/issue46522> ___ ___ Python-bugs-list mailin

[issue44863] Allow TypedDict to inherit from Generics

2022-02-03 Thread Thomas Grainger
Thomas Grainger added the comment: there's a thread on typing-sig for this now: https://mail.python.org/archives/list/typing-...@python.org/thread/I7P3ER2NH7SENVMIXK74U6L4Z5JDLQGZ/#I7P3ER2NH7SENVMIXK74U6L4Z5JDLQGZ -- nosy: +graingert ___ P

[issue42752] multiprocessing Queue leaks a file descriptor associated with the pipe writer (#33081 still a problem)

2022-02-17 Thread Thomas Grainger
Change by Thomas Grainger : -- nosy: +graingert, vstinner ___ Python tracker <https://bugs.python.org/issue42752> ___ ___ Python-bugs-list mailing list Unsub

[issue46824] use AI_NUMERICHOST | AI_NUMERICSERV to skip getaddrinfo thread in asyncio

2022-02-22 Thread Thomas Grainger
New submission from Thomas Grainger : now that the getaddrinfo lock has been removed on all platforms the numeric only host resolve in asyncio could be moved back into BaseEventLoop.getaddrinfo -- components: asyncio messages: 413699 nosy: asvetlov, graingert, yselivanov priority

[issue46824] use AI_NUMERICHOST | AI_NUMERICSERV to skip getaddrinfo thread in asyncio

2022-02-22 Thread Thomas Grainger
Change by Thomas Grainger : -- keywords: +patch pull_requests: +29627 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31497 ___ Python tracker <https://bugs.python.org/issu

[issue46824] use AI_NUMERICHOST | AI_NUMERICSERV to skip getaddrinfo thread in asyncio

2022-02-22 Thread Thomas Grainger
Thomas Grainger added the comment: hello, it's actually a bit of a round about context, but it was brought up on a tornado issue where I was attempting to port the asyncio optimization to tornado: https://github.com/tornadoweb/tornado/issues/3113#issuecomment-1041019287 I think it wou

[issue46827] asyncio SelectorEventLoop.sock_connect fails with a UDP socket

2022-02-22 Thread Thomas Grainger
New submission from Thomas Grainger : the following code: import socket import asyncio async def amain(): with socket.socket(family=socket.AF_INET, proto=socket.IPPROTO_UDP, type=socket.SOCK_DGRAM) as sock: sock.setblocking(False) await asyncio.get_running_loop

[issue46827] asyncio SelectorEventLoop.sock_connect fails with a UDP socket

2022-02-22 Thread Thomas Grainger
Change by Thomas Grainger : -- keywords: +patch pull_requests: +29629 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31499 ___ Python tracker <https://bugs.python.org/issu

[issue45390] asyncio.Task doesn't propagate CancelledError() exception correctly.

2022-02-23 Thread Thomas Grainger
Thomas Grainger added the comment: there could be multiple messages here perhaps it could be: ``` finally: # Must reacquire lock even if wait is cancelled cancelled = [] while True: try: await self.acquire

[issue46885] Ensure PEP 663 changes are reverted from 3.11

2022-02-28 Thread Thomas Wouters
Change by Thomas Wouters : -- nosy: +twouters ___ Python tracker <https://bugs.python.org/issue46885> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43923] Can't create generic NamedTuple as of py3.9

2022-03-05 Thread Thomas Grainger
Thomas Grainger added the comment: The main advantage for my usecase is support for heterogeneous unpacking On Sat, Mar 5, 2022, 6:04 PM Alex Waygood wrote: > > Alex Waygood added the comment: > > I sense we'll have to agree to disagree on the usefulness of NamedTuple

[issue1039] Asssertion in Windows debug build

2007-08-27 Thread Thomas Heller
New submission from Thomas Heller: In a windows debug build, an assertion is triggered when os.execvpe is called with an empty argument list: self.assertRaises(OSError, os.execvpe, 'no such app-', [], None) The same problem is present in the trunk version. Attached is a patch that

[issue1043] test_builtin failure on Windows

2007-08-27 Thread Thomas Heller
New submission from Thomas Heller: test test_builtin failed -- Traceback (most recent call last): File "c:\svn\py3k\lib\test\test_builtin.py", line 1473, in test_round self.assertEqual(round(1e20), 1e20) AssertionError: 0 != 1e+020 -- components: Windows messages:

[issue1042] test_glob fails with UnicodeDecodeError

2007-08-27 Thread Thomas Heller
New submission from Thomas Heller: Unicode errors in various tests - not only in test_glob: test_glob test test_glob failed -- Traceback (most recent call last): File "c:\svn\py3k\lib\test\test_glob.py", line 87, in test_glob_directory_names eq(self.glob('*',

[issue1040] Unicode problem with TZ

2007-08-27 Thread Thomas Heller
Thomas Heller added the comment: BTW, setting the environment variable TZ to, say, 'GMT' makes the problem go away. __ Tracker <[EMAIL PROTECTED]> <http://bugs.p

[issue1040] Unicode problem with TZ

2007-08-27 Thread Thomas Heller
New submission from Thomas Heller: In my german version of winXP SP2, python3 cannot import the time module: c:\svn\py3k\PCbuild>python_d Python 3.0x (py3k:57600M, Aug 28 2007, 07:58:23) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits"

[issue1041] io.py problems on Windows

2007-08-27 Thread Thomas Heller
New submission from Thomas Heller: Running the PCBuild\rt.bat script fails when it compares the expected output with the actual output. Some inspection shows that the comparison fails because there are '\n' linefeeds in the expected and '\n\r' linefeeds in the actual ou

[issue1617699] slice-object support for ctypes Pointer/Array

2007-08-28 Thread Thomas Wouters
Thomas Wouters added the comment: I'd like to check this into the trunk, without the non-step-1 support for now, so that we can remove simple slicing from the py3k branch. We can always add non-step-1 support later (all the sooner if someone who isn't me volunteers to do the painful bi

[issue1617687] specialcase simple sliceobj in list (and bugfixes)

2007-08-28 Thread Thomas Wouters
Thomas Wouters added the comment: I prefer the current method, as it's more obviously walking in two strides across the same array. I also dislike hiding the final memmove() of the tail bit inside the loop. As for which is more obvious, I would submit neither is obvious, as it took me qu

[issue1617702] extended slicing for buffer objects

2007-08-28 Thread Thomas Wouters
Thomas Wouters added the comment: Committed revision 57619. -- assignee: -> twouters resolution: -> fixed status: open -> closed _ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1617701] extended slicing for structseq

2007-08-28 Thread Thomas Wouters
Thomas Wouters added the comment: Committed revision 57619. -- assignee: -> twouters resolution: -> fixed status: open -> closed _ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1617698] Extended slicing for array objects

2007-08-28 Thread Thomas Wouters
Thomas Wouters added the comment: Committed revision 57619. -- assignee: -> twouters resolution: -> fixed status: open -> closed _ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1617682] specialcase simple sliceobj in tuple/str/unicode

2007-08-28 Thread Thomas Wouters
Thomas Wouters added the comment: Committed revision 57619. -- assignee: -> twouters resolution: -> fixed status: open -> closed _ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1617691] Extended slicing for UserString

2007-08-28 Thread Thomas Wouters
Thomas Wouters added the comment: Committed revision 57619. -- assignee: -> twouters resolution: -> fixed status: open -> closed _ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1617700] slice-object support for mmap

2007-08-28 Thread Thomas Wouters
Thomas Wouters added the comment: Committed revision 57619. -- assignee: -> twouters resolution: -> fixed status: open -> closed _ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1056] test_cmd_line starts python without -E

2007-08-29 Thread Thomas Wouters
New submission from Thomas Wouters: test_cmd_line tests various things by spawning sys.executable. Unfortunately it does so without passing the -E argument (which 'make test' does do) so environment variables like PYTHONHOME and PYTHONPATH can cause the test to fail. -

[issue1617699] slice-object support for ctypes Pointer/Array

2007-08-29 Thread Thomas Wouters
Thomas Wouters added the comment: Added tests (by duplicating any slicing operations in the test suite with extended slice syntax, to force the use of slice-objects ;) _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/iss

[issue1617699] slice-object support for ctypes Pointer/Array

2007-08-29 Thread Thomas Wouters
Changes by Thomas Wouters: _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1617699> _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue1040] Unicode problem with TZ

2007-08-29 Thread Thomas Heller
Thomas Heller added the comment: IMO the very best would be to avoid as many conversions as possible by using the wide apis on Windows. Not for _tzname maybe, but for env vars, sys.argv, sys.path, and so on. Not that I would have time to work on that

[issue1617699] slice-object support for ctypes Pointer/Array

2007-08-29 Thread Thomas Wouters
Changes by Thomas Wouters: _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1617699> _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue1039] Asssertion in Windows debug build

2007-08-30 Thread Thomas Heller
Thomas Heller added the comment: Applied in rev. 57731. -- resolution: accepted -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1617699] slice-object support for ctypes Pointer/Array

2007-08-30 Thread Thomas Heller
Thomas Heller added the comment: Set to accepted. As pointed out in private email, please apply it to the trunk. Your thoughts about the 'length' of pointers make sense, and are very similar to what I had in mind when I implemented pointer indexing. For indexing pointers, negative i

[issue1617699] slice-object support for ctypes Pointer/Array

2007-08-30 Thread Thomas Heller
Changes by Thomas Heller: -- assignee: theller -> twouters _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1617699> _ ___ Python-bugs-li

[issue1617699] slice-object support for ctypes Pointer/Array

2007-08-30 Thread Thomas Wouters
Thomas Wouters added the comment: Well, that's not quite how I implemented the slicing, and it's also not how the existing simple-slicing was implemented: A negative start index is taken to mean 0, and a stop index below the start index is taken to mean 'the start index'

[issue1617699] slice-object support for ctypes Pointer/Array

2007-08-30 Thread Thomas Heller
Thomas Heller added the comment: Yes. But looking at your examples I think it would be better to forbid missing indices completely instead of allowing them only where they clearly mean 0. Writing (and reading!) a 0 is faster than thinking about if a missing index is allowed or what it means

[issue1617699] slice-object support for ctypes Pointer/Array

2007-08-30 Thread Thomas Wouters
Thomas Wouters added the comment: Hmmm Well, that's fine by me, but it changes current behaviour, and in a way that ctypes own testsuite was testing, even ;) (it does, e.g., 'p[:4]' in a couple of places.) Requiring the start always would possibly break a lot of code. We coul

  1   2   3   4   5   6   7   8   9   10   >