Job's __unicode__ method leads to misleading representations
See original GitHub issueExpected Behavior
When printing job or converting one to string, I’d expect to see an indication that it is the Job object I’m operating on.
Current Behavior
Job prints its name followed by parenthesis and some properties. If the name is misleading (eg. MagicMock), the job disguises itself as something else.
Steps to Reproduce
task = MagicMock()
job = scheduler.add_job(task, ...)
print(job)
>>> MagicMock (trigger:...)
Context (Environment)
It is confusing and potentially error-prone when debugging or serialising Jobs.
Detailed Description
I suggest that Job should always print Job
at the beginning when converting to unicode.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
How Unicode Works: What Every Developer Needs to ...
Unicode characters can be referenced by their code point. This Stack Overflow article does a good job of explaining what a code point...
Read more >10 Understanding Unicode Compliance Standards
The Unicode Standard is the universal character-encoding scheme for written characters and text. It defines a consistent way of way of encoding multilingual ......
Read more >Unicode & Character Encodings in Python: A Painless Guide
In this tutorial, you'll get a Python-centric introduction to character encodings and unicode. Handling character encodings and numbering systems can at ...
Read more >How to get string objects instead of Unicode from JSON
Purely for performance. Mark's answer decodes the JSON text fully first with Unicode strings, then recurses through the entire decoded value to convert...
Read more >Unicode, UTF8 & Character Sets: The Ultimate Guide
A potentially misleading function is utf8_decode . It turns UTF-8 into ISO-8859-1. Any characters not available in ISO-8859-1 (like Cyrillic, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Voyz please subscribe to #465 to keep updated on the progress.
hey @agronholm just following up on these two questions I posted last time. Thanks