ANN: EmPy 4.0.1

2024-01-01 Thread Erik Max Francis via Python-list
Py 3._x_ and 4.0](http://www.alcyone.com/software/empy/ANNOUNCE.html#full-list-of-changes-between-empy-3-x-and-4-0) for a more comprehensive list. -- Erik Max Francis && m...@alcyone.com && http://www.alcyone.com/max/ San Jose, CA, USA && 37 18 N 121 57 W && S

Re: Passing info to function used in re.sub

2023-09-05 Thread Jan Erik Moström via Python-list
On 3 Sep 2023, at 18:10, Jan Erik Moström via Python-list wrote: > I'm looking for some advice for how to write this in a clean way Thanks for all the suggestion, I realize that I haven't written Python code in a while. I should have remembered this myself !!! Thanks for reminding me. =

Re: Passing info to function used in re.sub

2023-09-03 Thread Jan Erik Moström via Python-list
On 3 Sep 2023, at 19:13, MRAB via Python-list wrote: > You could use pass an anonymous function (a lambda) to re.sub: Of course !! Thanks. = jem -- https://mail.python.org/mailman/listinfo/python-list

Passing info to function used in re.sub

2023-09-03 Thread Jan Erik Moström via Python-list
I'm looking for some advice for how to write this in a clean way I want to replace some text using a regex-pattern, but before creating replacement text I need to some file checking/copying etc. My code right now look something like this: def fix_stuff(m): # Do various things that

ImportError: No module named spambayes.resources (line 12 of setup_all.py)

2022-08-24 Thread Erik M. Brown via Python-list
module import error? I can provide files and/or more details as well. Thank you all for the help! Take care, Erik Brown -- https://mail.python.org/mailman/listinfo/python-list

[issue47174] Define behavior of descriptor-typed fields on dataclasses

2022-03-30 Thread Erik De Bonte
New submission from Erik De Bonte : Recent discussions about PEP 681 (dataclass_transform) have focused on support for descriptor-typed fields. See the email thread here: https://mail.python.org/archives/list/typing-...@python.org/thread/BW6CB6URC4BCN54QSG2STINU2M7V4TQQ/ Initially we were

[issue47071] asyncio proactor udp transport stops responding after send to port that isn't listening

2022-03-20 Thread Erik Soma
Erik Soma added the comment: Certainly: https://github.com/python/cpython/pull/32011 -- ___ Python tracker <https://bugs.python.org/issue47071> ___ ___ Pytho

[issue47071] asyncio proactor udp transport stops responding after send to port that isn't listening

2022-03-20 Thread Erik Soma
Change by Erik Soma : -- keywords: +patch pull_requests: +30099 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32011 ___ Python tracker <https://bugs.python.org/issu

[issue47071] asyncio proactor udp transport stops responding after send to port that isn't listening

2022-03-20 Thread Erik Soma
Erik Soma added the comment: Uploading my hack to `asyncio.windows_events.py` -- this is based off 3.10.2's distribution. -- Added file: https://bugs.python.org/file50692/windows_events.py ___ Python tracker <https://bugs.python.org/issue47

[issue47071] asyncio proactor udp transport stops responding after send to port that isn't listening

2022-03-20 Thread Erik Soma
New submission from Erik Soma : Reproducer attached. Change `USE_PROACTOR` to `False` to use the `SelectorEventLoop` instead, which doesn't exhibit this behavior. The output on my machine when using the proactor loop is: ``` datagram received b'ping 1' datagram received b'ping 2

[issue46755] QueueHandler logs stack_info twice

2022-02-15 Thread Erik Montnemery
Change by Erik Montnemery : -- keywords: +patch nosy: +emontnemery nosy_count: 1.0 -> 2.0 pull_requests: +29504 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31355 ___ Python tracker <https://bugs.p

[issue31084] QueueHandler not formatting messages

2022-02-15 Thread Erik Montnemery
Change by Erik Montnemery : -- nosy: +emontnemery nosy_count: 2.0 -> 3.0 pull_requests: +29505 pull_request: https://github.com/python/cpython/pull/31355 ___ Python tracker <https://bugs.python.org/issu

[issue46755] QueueHandler logs stack_info twice

2022-02-15 Thread Erik Montnemery
New submission from Erik Montnemery : logging.handlers.QueueHandler logs stack twice when stack_info=True: >>> import logging >>> from logging.handlers import QueueHandler, QueueListener >>> from queue import Queue >>> q = Queue() >>>

[issue38401] Make dataclass attribute docstrings accessible

2021-12-29 Thread Erik Gebeshuber
Erik Gebeshuber added the comment: There is some confusion in the answers that I want to clear up: "Attribute docstrings" were suggested in PEP 224 in August 2000 and rejected March 2001: https://www.python.org/dev/peps/pep-0224/ taleinat mentioned already PEP 258 from May 2001,

[issue45972] typing.NamedTuple with default arguments without type annotations is falsy

2021-12-03 Thread Erik Montnemery
Erik Montnemery added the comment: Maybe something like this: diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index 735d477db4..8de913d8db 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -1291,7 +1291,8 @@ These are not used in annotations. They are building

[issue45972] typing.NamedTuple with default arguments without type annotations is falsy

2021-12-03 Thread Erik Montnemery
Erik Montnemery added the comment: I think elaborating in the documentation that only annotated attributes make it to the underlying namedtuple() would be helpful, it's not obvious that they are instead just class attributes. -- ___ Python

[issue45972] typing.NamedTuple with default arguments without type annotations is falsy

2021-12-03 Thread Erik Montnemery
New submission from Erik Montnemery : typing.NamedTuple behaves in surprising ways when it has default arguments which lack type annotations: >>> from typing import NamedTuple >>> class MyTuple(NamedTuple): ... a = 1000 ... >>> tmp = MyTuple() >>> tm

[issue31842] pathlib: "Incorrect function" during resolve()

2021-11-12 Thread Erik Aronesty
Erik Aronesty added the comment: bug is worse than that: perfectly valid redirected paths (winfsp ram drives for example) now break in python 3.9.6 (maybe fixed in later version?) >>> import pathlib >>> p=pathlib.Path('C:\\Users\\erik\\Atakama') >>> p.resolve()

[issue45537] Cygwin is unsupported - close all open issues and list them here.

2021-10-20 Thread Erik Bray
Change by Erik Bray : -- pull_requests: +27359 pull_request: https://github.com/python/cpython/pull/4149 ___ Python tracker <https://bugs.python.org/issue45

[issue45537] Cygwin is unsupported - close all open issues and list them here.

2021-10-20 Thread Erik Bray
Change by Erik Bray : -- keywords: +patch nosy: +erik.bray nosy_count: 1.0 -> 2.0 pull_requests: +27357 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14013 ___ Python tracker <https://bugs.python.org/i

[issue31882] Cygwin: asyncio and asyncore test suites hang indefinitely due to bug in Cygwin

2021-10-19 Thread Erik Bray
Erik Bray added the comment: To my knowledge this issue is *not* fixed upstream. However, my PR no doubt needs rebasing. -- ___ Python tracker <https://bugs.python.org/issue31

[issue31885] Cygwin: socket test suites hang indefinitely due to bug in Cygwin

2021-10-19 Thread Erik Bray
Erik Bray added the comment: That person was me--I have the keys to a cygwin buildbot, but it's currently not running. I lost the urgency to make cygwin fully supported, though it's come a long way. In particular the deprecation of distutils should help nix some of the long-standing

[issue31885] Cygwin: socket test suites hang indefinitely due to bug in Cygwin

2021-10-19 Thread Erik Bray
Erik Bray added the comment: Thanks for asking. Indeed the fix to that issue was included in https://cygwin.com/git/?p=newlib-cygwin.git;a=commit;h=5ca28a0cd71436a84797d5d66831790004e0 and as Cygwin obsoletes old releases rather quickly I see no reason to keep this issue open

[issue34553] Python Crashes when trying to access any date related fields in MailItem

2021-10-19 Thread Erik Janssens
Erik Janssens added the comment: At least for us, the issue seems to be related to the MSVC runtime. We compiled python with mingw using the mingw runtime, and the issue was gone. On Tue, 2021-10-19 at 09:02 +, Irit Katriel wrote: > Irit Katriel added the comment: > It doesn't loo

[Python-announce]ANN: Astropy v4.3 and v4.0.6 released

2021-08-24 Thread Erik Tollerud
, a community-developed core Python package for Astronomy (Astropy Collaboration, 2013, 2018). We hope that you enjoy using Astropy as much as we enjoyed developing it! Erik Tollerud v4.3 Release Coordinator on behalf of The Astropy Project https://www.astropy.org/announcements/release-4.3.html

[issue44552] incomplete documentation of __main__.py

2021-07-02 Thread Erik Carstensen
Erik Carstensen added the comment: thanks for the pointer and sorry for the noise! I'll review your text. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue44552] incomplete documentation of __main__.py

2021-07-02 Thread Erik Carstensen
New submission from Erik Carstensen : I can find partial information on how Python treats __main__.py here: https://docs.python.org/3/library/__main__.html However, it is not documented how python handles __main__.py when passing the Python package to the interpreter without -m. If I have

[issue44487] Regression in pathlib.path.read_text

2021-06-22 Thread Erik Faye-Lund
Erik Faye-Lund added the comment: After digging some more, I no longer suspect that this commit is to blame, but instead some logic in Meson that effectively disabled the problematic code under in our use-case before we upgraded our Visual Studio version. The reason is that I was able

[issue44487] Regression in pathlib.path.read_text

2021-06-22 Thread Erik Faye-Lund
Change by Erik Faye-Lund : -- title: Regression -> Regression in pathlib.path.read_text ___ Python tracker <https://bugs.python.org/issue44487> ___ ___ Python-

[issue44487] Regression

2021-06-22 Thread Erik Faye-Lund
New submission from Erik Faye-Lund : This commit lead to a regression when using Meson on Windows to build the Mesa project: https://github.com/python/cpython/commit/4827483f47906fecee6b5d9097df2a69a293a85c The reason is that pathlib.read_text now uses the locale as the encoding when

[issue44344] Documentation for pow() should include the possibility of complex numbers as a return type

2021-06-21 Thread Erik Y. Adams
Erik Y. Adams added the comment: I still think the most important aspect of this is that pow() will return complex numbers, contrary to what is implied by the statement I quoted at the beginning of this thread. Perhaps we should just borrow from the documentation for the power operator

Recommendation for drawing graphs and creating tables, saving as PDF

2021-06-11 Thread Jan Erik Moström
I'm doing something that I've never done before and need some advise for suitable libraries. I want to a) create diagrams similar to this one https://www.dropbox.com/s/kyh7rxbcogvecs1/graph.png?dl=0 (but with more nodes) and save them as PDFs or some format that can easily be converted to

[issue44344] Documentation for pow() should include the possibility of complex numbers as a return type

2021-06-07 Thread Erik Y. Adams
New submission from Erik Y. Adams : https://docs.python.org/3/library/functions.html#pow The built-in pow() function will return a complex number if the base is negative and the exponent is a float between 0 and 1. For example, the value returned by `pow(-1, 1.0/3)` is `(1.0002

[issue44225] stop() on a stopped loop inhibits the next run_forever

2021-05-24 Thread Erik Carstensen
New submission from Erik Carstensen : If you call stop() on an already stopped event loop, then the next call to run_forever will terminate after one loop iteration. I would expect the stop to either be a nop, or to be invalid in this state (and raise an exception). Example: import asyncio

[issue43905] dataclasses.astuple does deepcopy on all fields

2021-05-20 Thread Erik Carstensen
Erik Carstensen added the comment: Would it make sense to make dataclasses iterable, like so? def __iter__(self): return (getattr(self, field.name) for field in fields(self)) With that in place, deprecating astuple would maybe be less disruptive

[issue43918] anext builtin docstring has no signature text or info about default argument

2021-04-24 Thread Erik Welch
Erik Welch added the comment: Thanks for taking a look Terry. I saw that error as well. It is separate from this issue, and I don't think it is a bug. No other builtin functions or methods that raise this error with this text have such a notice in their docstring, so it doesn't seem

[issue43918] anext builtin docstring has no signature text or info about default argument

2021-04-22 Thread Erik Welch
Change by Erik Welch : -- keywords: +patch pull_requests: +24271 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25551 ___ Python tracker <https://bugs.python.org/issu

[issue43918] anext builtin docstring has no signature text or info about default argument

2021-04-22 Thread Erik Welch
New submission from Erik Welch : The new builtin `anext` does not have a signature (from `inspect.signature(anext)`). This is expected, because `inspect` does not yet support signatures with C NULL default value. However, `anext` also doesn't have text in its docstring that describes its

[issue43905] dataclasses.astuple does deepcopy on all fields

2021-04-21 Thread Erik Carstensen
New submission from Erik Carstensen : It seems that the 'dataclass.astuple' function does a deepcopy of all fields. This is not documented. Two problems: 1. Dictionary keys that rely on object identity are ruined: import dataclasses @dataclasses.dataclass class Foo: key

[issue43310] Method __del__ with callable

2021-02-24 Thread Erik Soma
Erik Soma added the comment: You can wrap your callable in a regular function: ``` def hack_c(): c = C() def _(*args, **kwargs): return c(*args, **kwargs) return _ A.__del__ = hack_c() ``` Or (untested) make your callable an extension type

[issue42840] `type` takes **kwargs for __init_subclass__

2021-02-18 Thread Erik Soma
Erik Soma added the comment: The CPython PR has gone stale waiting for core review, pinging this per the dev guide. -- ___ Python tracker <https://bugs.python.org/issue42

[issue42840] `type` takes **kwargs for __init_subclass__

2021-01-08 Thread Erik Soma
Erik Soma added the comment: Seems I misframed the issue a bit. I didn't realize keyword arguments besides 'metaclass' were introduced with PEP 3115 with Python 3.0. In any case I've posted a PR to update the docs and typeshed. Typeshed PR for reference: https://github.com/python/typeshed

[issue42840] `type` takes **kwargs for __init_subclass__

2021-01-08 Thread Erik Soma
Change by Erik Soma : -- keywords: +patch pull_requests: +23000 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24173 ___ Python tracker <https://bugs.python.org/issu

[issue42840] `type` takes **kwargs for __init_subclass__

2021-01-06 Thread Erik Soma
Erik Soma added the comment: Can do. I have found a blurb in the 3.6 What's New that confirms it was purposeful (https://docs.python.org/3/whatsnew/3.6.html#index-37). -- ___ Python tracker <https://bugs.python.org/issue42

[issue42840] `type` takes **kwargs for __init_subclass__

2021-01-06 Thread Erik Soma
New submission from Erik Soma : The documentation (https://docs.python.org/3/library/functions.html#type) shows type's signature as: class type(object) class type(name, bases, dict) But the "actual" 2nd signature in CPython 3.6+ is: class type(name, bases, dict, **kwargs) **k

[issue42687] tokenize module does not recognize Barry as FLUFL

2020-12-26 Thread Erik Soma
Change by Erik Soma : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue42687> ___ ___ Python-bugs-

[issue42687] tokenize module does not recognize Barry as FLUFL

2020-12-19 Thread Erik Soma
Change by Erik Soma : -- keywords: +patch pull_requests: +22722 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23857 ___ Python tracker <https://bugs.python.org/issu

[issue42687] tokenize module does not recognize Barry as FLUFL

2020-12-19 Thread Erik Soma
New submission from Erik Soma : '<>' is not recognized by the tokenize module as a single token, instead it is two tokens. ``` $ python -c "import tokenize; import io; import pprint; pprint.pprint(list(tokenize.tokenize(io.BytesIO(b'<>').readline)))" [TokenInfo(type

Library for text substitutions with calculations?

2020-12-15 Thread Jan Erik Moström
I want to do some text substitutions but a bit more advanced than what string.Template class can do. I addition to plain text substitution I would like to be able to do some calculations: $value+1 - If value is 16 this would insert 17 in the text. I would also like to subtract. $value+1w -

[issue42609] Eval with too high string multiplication crashes newer Python versions

2020-12-09 Thread Erik Lamers
Change by Erik Lamers : -- title: Eval with two high string multiplication crashes newer Python versions -> Eval with too high string multiplication crashes newer Python versions ___ Python tracker <https://bugs.python.org/issu

[issue42609] Eval with two high string multiplication crashes newer Python versions

2020-12-09 Thread Erik Lamers
Change by Erik Lamers : -- versions: +Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue42609> ___ ___ Python-bugs-list mailin

[issue42609] Eval with two high string multiplication crashes newer Python versions

2020-12-09 Thread Erik Lamers
New submission from Erik Lamers : For Python version 3.7 and above the following statement will end up in a segfault. eval("1 + 100"*100) Whereas Python versions 3.6 and below would tread this as a Recursion error. -- components: Interpreter Core messages: 382791

[issue42094] isoformat() / fromisoformat() for datetime.timedelta

2020-11-17 Thread Erik Cederstrand
Erik Cederstrand added the comment: There are two conflicting interests: ISO 8601 that allows non-precise durations, and timedelta that assumes precise durations. For me, the non-precise durations only make sense in date arithmetic - to a human, it's pretty clear what adding 3 months

ANN: Astropy v4.1 released

2020-10-27 Thread Erik Tollerud
is: This research made use of Astropy, a community-developed core Python package for Astronomy (Astropy Collaboration, 2018). We hope that you enjoy using Astropy as much as we enjoyed developing it! Erik Tollerud v4.1 Release Coordinator on behalf of The Astropy Project https://www.astropy.org

[issue42094] isoformat() / fromisoformat() for datetime.timedelta

2020-10-20 Thread Erik Cederstrand
Erik Cederstrand added the comment: Among other things, ISO 8601 duration strings are commonly used to communicate offset values in timezone definitions. -- ___ Python tracker <https://bugs.python.org/issue42

[issue42094] isoformat() / fromisoformat() for datetime.timedelta

2020-10-20 Thread Erik Cederstrand
New submission from Erik Cederstrand : Python 3.7 gained support for parsing ISO 8601 formatted time, date and datetime strings via the fromisoformat() methods. Python has seen improved support for ISO 8601 in general; ISO calendar format codes were added in Python 3.6, and fromisocalendar

[issue31878] Cygwin: _socket module does not compile due to missing ioctl declaration

2020-10-19 Thread Erik Bray
Change by Erik Bray : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42073] classmethod does not pass "type/owner" when invoking wrapped __get__

2020-10-18 Thread Erik Welch
Change by Erik Welch : -- keywords: +patch pull_requests: +21720 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22757 ___ Python tracker <https://bugs.python.org/issu

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2020-10-18 Thread Erik Welch
Change by Erik Welch : -- nosy: +eriknw nosy_count: 8.0 -> 9.0 pull_requests: +21721 pull_request: https://github.com/python/cpython/pull/22757 ___ Python tracker <https://bugs.python.org/issu

[issue42073] classmethod does not pass "type/owner" when invoking wrapped __get__

2020-10-18 Thread Erik Welch
New submission from Erik Welch : The following is new to Python 3.9, and I consider the implementation incomplete. I have code that works for Python 3.8 and before, but not for Python 3.9: "Class methods can now wrap other :term:`descriptors ` such as :func:`property`." https://

[issue39671] Mention in docs that asyncio.FIRST_COMPLETED does not guarantee the completion of no more than one task

2020-08-31 Thread Erik Bray
Change by Erik Bray : -- keywords: +patch nosy: +erik.bray nosy_count: 4.0 -> 5.0 pull_requests: +21125 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21918 ___ Python tracker <https://bugs.python.org/i

[issue41599] get/set_payload deprecated, but get_set_content do not provide full replacement functionality

2020-08-20 Thread Erik Quaeghebeur
New submission from Erik Quaeghebeur : >From Python 3.6 onwards, get/set_payload methods are deprecated on the basic >email message class, email.message.EmailMessage (changed from >email.message.Message). The get/set_content methods are suggested instead. >However, with get/set

[issue41585] policy.max_line_length is incorrectly assumed to never be None

2020-08-20 Thread Erik Quaeghebeur
Erik Quaeghebeur added the comment: The script that triggered the issue can be found at https://github.com/equaeghe/mailfilters/blob/master/html2alternative.py You'll have to remove ", cte='8bit'" on line 68 to expose the bug (that was added as a workaround for thi

[issue41585] policy.max_line_length is incorrectly assumed to never be None

2020-08-18 Thread Erik Quaeghebeur
New submission from Erik Quaeghebeur : I got the following error (Python 3.7.8): Traceback (most recent call last): File "/home/equaeghe/.local/bin/html2alternative.py", line 68, in replaceable.add_alternative(plain) File "/usr/lib/python3.7/email/message

[issue41553] encoded-word abused for header line folding causes RFC 2047 violation

2020-08-14 Thread Erik Quaeghebeur
Erik Quaeghebeur added the comment: We also shouldn't forget Resent-Message-Id. So in the header registry <https://github.com/python/cpython/blob/2a9f709ba23c8f6aa2bed821aacc4e7baecde383/Lib/email/headerregistry.py#L562>, 'message-id': MessageIDHeader, should be replaced by 'mess

[issue41553] encoded-word abused for header line folding causes RFC 2047 violation

2020-08-14 Thread Erik Quaeghebeur
Erik Quaeghebeur added the comment: Note that In-Reply-To can also contain multiple message ids: <https://tools.ietf.org/html/rfc5322#section-3.6.4>. It should be treated the same as References. When you say that a message_id parser exists, then that means it is not applied to the Mess

[issue41553] encoded-word abused for header line folding causes RFC 2047 violation

2020-08-14 Thread Erik Quaeghebeur
New submission from Erik Quaeghebeur : Encoded-word is apparently used for header line folding sometimes. This appears to me as an abuse of this encoding technique. However, that is not the main issue: it also causes a violation of RFC 2074, as it also encodes message id's: https

[issue18876] Problems with files opened in append mode with io module

2020-08-04 Thread Erik Bray
Erik Bray added the comment: Indeed, this can be closed. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue20082] Misbehavior of BufferedRandom.write with raw file in append mode

2020-08-04 Thread Erik Bray
Change by Erik Bray : -- pull_requests: +20873 pull_request: https://github.com/python/cpython/pull/21729 ___ Python tracker <https://bugs.python.org/issue20

[issue35003] Provide an option to venv to put files in a bin/ directory on Windows

2020-01-22 Thread Erik Aronesty
Erik Aronesty added the comment: > The Scripts/bin thing is not specific to venv - for whatever reason, the > original Windows implementation chose to use "Scripts" rather than "bin" That's irrelevant to the PR, which solves the problem in a compatible way.

[issue35003] Provide an option to venv to put files in a bin/ directory on Windows

2020-01-20 Thread Erik Aronesty
Erik Aronesty added the comment: See https://github.com/python/cpython/pull/18083 for an example of a 'simple copy' for shell script compatibility ... rather than trying to make Scripts move around (which it can't trivially). -- ___ Python

[issue35003] Provide an option to venv to put files in a bin/ directory on Windows

2020-01-20 Thread Erik Aronesty
Change by Erik Aronesty : -- pull_requests: +17474 pull_request: https://github.com/python/cpython/pull/18083 ___ Python tracker <https://bugs.python.org/issue35

[issue35003] Provide an option to venv to put files in a bin/ directory on Windows

2020-01-20 Thread Erik Aronesty
Erik Aronesty added the comment: the single Scripts/activate tool should be simply copied to bin/activate ... this is what you have to do to write a bash script for python now: source bin/activate || source Scripts/activate we should not assume that all windows users use things like CMD

ANN: Astropy v4.0 released

2020-01-08 Thread Erik Tollerud
, a community-developed core Python package for Astronomy (Astropy Collaboration, 2018). Special thanks to the coordinator for this release: Brigitta Sipocz. We hope that you enjoy using Astropy as much as we enjoyed developing it! Erik Tollerud, Tom Robitaille, Kelle Cruz, and Tom Aldcroft

[issue38964] Output of syntax error in f-string contains wrong filename

2019-12-04 Thread Erik Cederstrand
Erik Cederstrand added the comment: Additionally, the output in the 2nd example does not contain the helpful text printing the context and location of the code containing the syntax error. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38964] Output of syntax error in f-string contains wrong filename

2019-12-04 Thread Erik Cederstrand
New submission from Erik Cederstrand : When I have a normal syntax error in a file, Python reports the filename in the exception output: $ cat syntax_error.py 0x=5 $ python3.8 syntax_error.py File "syntax_error.py", line 1 0x=5 ^ SyntaxError: invalid hexadecim

[issue22107] tempfile module misinterprets access denied error on Windows

2019-11-20 Thread Erik Aronesty
Erik Aronesty added the comment: This is the fist of what I'm using: https://gist.github.com/earonesty/a052ce176e99d5a659472d0dab6ea361 Seems OK for my use cases. There's probably issues with relying on __del__ this way. But it solves the Windows close/reopen problem, too

Re: nonlocal fails ?

2019-11-14 Thread Jan Erik Moström
On 14 Nov 2019, at 15:15, R.Wieser wrote: Too bad though, it means that procedures that want to share/use its callers variables using nonlocal can never be called from main. And that a caller of a procedure using nonlocal cannot have the variable declared as global (just tested it). So

Re: nonlocal fails ?

2019-11-14 Thread Jan Erik Moström
On 14 Nov 2019, at 14:06, R.Wieser wrote: I've also tried moving "MyVar = 7" to the first line, but that doesn't change anything. Using "global MyVar" works.. Try def outer(): MyVar = 10 def Proc1(): nonlocal MyVar MyVar = 5 Proc1()

[issue38736] argparse: wrong type from get_default when type is set

2019-11-08 Thread Erik Ahlén
Erik Ahlén added the comment: So, not a bug since you can just do `default = Path('file.txt')`? -- ___ Python tracker <https://bugs.python.org/issue38

[issue38736] argparse: wrong type from get_default when type is set

2019-11-07 Thread Erik Ahlén
New submission from Erik Ahlén : The type of the object returned by get_default isn't converted to the specified type supplied to add_argument. I would expect the type to be the same. -- components: Library (Lib) files: test.py messages: 356194 nosy: Erik Ahlén priority: normal

[issue30548] typo in documentation for create_autospec

2019-10-30 Thread Erik Byström
Erik Byström added the comment: Yes, you're right. I do think the docs are a bit misleading. Maybe something like this would make it more clear? "If a class is used as a spec then the returned object will be a mock of that class. When the constructor of the returned mock class is in

[issue22107] tempfile module misinterprets access denied error on Windows

2019-09-27 Thread Erik Aronesty
Erik Aronesty added the comment: i would like to point out that the primary reason any of this nonsense exists is because of short filename restrictions. i've replaces nearly all of my temp file creation code in all of my project to `return os.urandom(32).hex()` ... which is reliable

[issue37801] Compilation on MINGW64 fails (CODESET,wcstok,...)

2019-08-17 Thread Erik Janssens
Erik Janssens added the comment: fyi 1 : this issue pops up in multiple places, cfr : * bpo-35890 * bpo-20596 the selection of the wcstok function is based on MS_WINDOWS being defined, rather than eg. an autoconf check on which function is available. fyi 2 : I've been able to cross

Re: bool(Enum) should raise ValueError

2019-07-28 Thread Erik Aronesty
class Status: valid = 1 invalid = 2 unknown = 3 On Fri, Jul 26, 2019, 3:37 PM Chris Angelico wrote: > On Sat, Jul 27, 2019 at 5:16 AM Erik Aronesty wrote: > > > > I just spend a while tracking down and killing all "if Enum" and "if not > > En

bool(Enum) should raise ValueError

2019-07-26 Thread Erik Aronesty
I just spend a while tracking down and killing all "if Enum" and "if not Enum" bugs in my code. I was frankly shocked that this didn't raise a ValueError to begin with. Apparently all enums are true/false depending on whether the underlying value is truthy or falsy. Which breaks the

[issue22107] tempfile module misinterprets access denied error on Windows

2019-07-01 Thread Erik Aronesty
Erik Aronesty added the comment: Series of operations needed to answer the questions os.access is not answering on windows: bool CanAccessFolder( LPCTSTR folderName, DWORD genericAccessRights ) { bool bRet = false; DWORD length = 0; if (!::GetFileSecurity( folderName

[issue37477] NamedTemporaryFile can hang on windows

2019-07-01 Thread Erik Aronesty
Erik Aronesty added the comment: yes, duplicate of https://bugs.python.org/issue22107 ... tried looking first, sry. -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/i

[issue37477] NamedTemporaryFile can hang on windows

2019-07-01 Thread Erik Aronesty
Change by Erik Aronesty : -- type: -> crash ___ Python tracker <https://bugs.python.org/issue37477> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue37477] NamedTemporaryFile can hang on windows

2019-07-01 Thread Erik Aronesty
New submission from Erik Aronesty : Depending on the user's permissions, this code can hang, instead of raising an exception: from tempfile import NamedTemporaryFile NamedTemporaryFile(dir="/") The problamatic code is in tempfile.py: When encountering a "[Errno 13] Pe

ANN: Astropy v3.2 released

2019-06-18 Thread Erik Tollerud
Collaboration, 2018). where (Astropy Collaboration, 2018) is a reference to https://doi.org/10.3847/1538-3881/aabc4f Special thanks to the coordinator for this release: Brigitta Sipocz. We hope that you enjoy using Astropy as much as we enjoyed developing it! Erik Tollerud, Tom Robitaille, Kelle

[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2019-06-12 Thread Erik Bray
Erik Bray added the comment: FWIW (unsurprisingly) the new test added here is broken on Cygwin, whose libc's (newlib) behavior in this undefined case. So I get: >>> from datetime import date >>> t = date(2005, 1, 1) >>> t.strftime("%Y") #

[issue28459] _pyio module broken on Cygwin / setmode not usable

2019-06-12 Thread Erik Bray
Change by Erik Bray : -- pull_requests: +13877 pull_request: https://github.com/python/cpython/pull/14013 ___ Python tracker <https://bugs.python.org/issue28

[issue9665] Buid issues on Cygwin - _curses, _curses_panel, and _io

2019-06-12 Thread Erik Bray
Erik Bray added the comment: I think this issue can probably be closed. It refers to a very old version of Cygwin as well as old versions of Python. I don't have any problem building the _curses or _io modules on recent versions of Cygwin (>=2.9) and with current cpython master (3.9.

[issue32628] Add configurable DirectoryIndex to http.server

2019-05-31 Thread Erik Paulson
Erik Paulson added the comment: I think my use case was Sharepoint and static site generators - Sharepoint can serve a tree of .aspx files as raw HTML, but maddeningly not .html files. The site generator we used spit out a fairly complicated site where the internal links point

[issue21536] extension built with a shared python cannot be loaded with a static python

2019-05-27 Thread Erik Bray
Erik Bray added the comment: Thanks everyone. And FWIW I agree the original change is positive overall, if a bit presumptuous about different linkers' behaviors :) -- ___ Python tracker <https://bugs.python.org/issue21

[issue21536] extension built with a shared python cannot be loaded with a static python

2019-05-24 Thread Erik Bray
Change by Erik Bray : -- pull_requests: +13463 ___ Python tracker <https://bugs.python.org/issue21536> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21536] extension built with a shared python cannot be loaded with a static python

2019-05-24 Thread Erik Bray
Change by Erik Bray : -- pull_requests: +13461 ___ Python tracker <https://bugs.python.org/issue21536> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21536] extension built with a shared python cannot be loaded with a static python

2019-05-24 Thread Erik Bray
Erik Bray added the comment: I vaguely recall seeing some discussion about this on python-dev or elsewhere and wish I had chimed in sooner, as I didn't realize action was going to be taken on this so soon. This completely breaks building extension modules on Windows-based platforms like

[issue36965] use of STATUS_CONTROL_C_EXIT in Modules/main.c breaks compilation with non MSC compilers

2019-05-22 Thread Erik Janssens
Change by Erik Janssens : -- pull_requests: +13401 ___ Python tracker <https://bugs.python.org/issue36965> ___ ___ Python-bugs-list mailing list Unsubscribe:

  1   2   3   4   5   6   7   8   9   10   >