PydanticUserError (all model fields require a type annotation ) raised when Cython

Initial Checks

[X] I confirm that I'm using Pydantic V2

Description
The build process is successful (wheel is proceduced correctly) but when i try to import the class:
The to_dict is not a field model though.
Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from test_lib import TestModel
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'TestModel' from 'test_lib' (/tmp/cython_issue/.venv/lib/python3.10/site-packages/test_lib/__init__.py)
>>> from test_lib.test_file import TestModel
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "src/test_lib/test_file.py", line 5, in init test_lib.test_file
    class TestModel(BaseModel):
  File "/tmp/cython_issue/.venv/lib/python3.10/site-packages/pydantic/_internal/_model_construction.py", line 104, in __new__
    private_attributes = inspect_namespace(
  File "/tmp/cython_issue/.venv/lib/python3.10/site-packages/pydantic/_internal/_model_construction.py", line 370, in inspect_namespace
    raise PydanticUserError(
pydantic.errors.PydanticUserError: A non-annotated attribute was detected: `to_dict = <cyfunction TestModel.to_dict at 0x7fe7814f1ff0>`. All model fields require a type annotation; if `to_dict` is not meant to be a field, you may be able to resolve this error by annotating it as a `ClassVar` or updating `model_config['ignored_types']`.

For further information visit https://errors.pydantic.dev/2.4/u/model-field-missing-annotation

Example Code
from pydantic import BaseModel
from typing import Dict

class TestModel(BaseModel):
    packages: Dict[str, str]

    def to_dict(self) -> Dict[str, str]:
        return self.packages

Python, Pydantic & OS Version
Python 3.10.12
Cython 3.0.4
Ubuntu 22.04
Pydantic: 2.4.2

Got my answer via: https://github.com/pydantic/pydantic/issues/6670


Update numbers.py

@CodiumAI-Agent /review

PR Analysis

🎯 Main theme: Adding new parameters to the buy and update methods in numbers.py
📝 PR summary: This PR introduces new parameters to the buy and update methods in the numbers.py file. The new parameters include cnam, callback_url, and callback_method. These parameters are optional and their types are validated before use.
📌 Type of PR: Enhancement
🧪 Relevant tests added: No
⏱ Estimated effort to review [1-5]: 2
The PR is relatively small and straightforward, adding a few optional parameters to existing methods. However, without context or comments, it's hard to understand the purpose of these changes.
🔒 Security concerns: No
The PR does not seem to introduce any obvious security concerns. However, without knowing the context or the larger codebase, it's hard to be certain.

PR Feedback

💡 General suggestions: The code changes are clear and well-structured. However, it would be beneficial to include comments explaining the purpose of the new parameters. Additionally, it would be good to see tests that cover these new parameters to ensure they work as expected.

 🤖 Code feedback:

relevant file: plivo/resources/numbers.py
suggestion: Consider adding default values for the new parameters in the method signatures. This will make the function calls more readable and less error-prone. [medium]
relevant line: def buy(self, number, app_id=None, verification_info=None, cnam_lookup=None, cnam=None, callback_url=None, callback_method=None):

relevant file: plivo/resources/numbers.py
suggestion: It would be beneficial to add error handling within the methods to deal with cases where the optional parameters are not of the expected type. [important]
relevant line: def update(self, number, app_id=None, subaccount=None, alias=None, verification_info=None, cnam_lookup=None, cnam=None, callback_url=None, callback_method=None):

How to use

Tag me in a comment '@CodiumAI-Agent' and add one of the following commands:
/review [-i]: Request a review of your Pull Request. For an incremental review, which only considers changes since the last review, include the '-i' option.
/describe: Modify the PR title and description based on the contents of the PR.
/improve [--extended]: Suggest improvements to the code in the PR. Extended mode employs several calls, and provides a more thorough feedback.
/ask <QUESTION>: Pose a question about the PR.
/update_changelog: Update the changelog based on the PR's contents.

To edit any configuration parameter from configuration.toml, add --config_path=new_value
For example: /review --pr_reviewer.extra_instructions="focus on the file: ..."
To list the possible configuration parameters, use the /config command.

@CodiumAI-Agent /ask

@CodiumAI-Agent /describe

@CodiumAI-Agent /describe

@CodiumAI-Agent /review

@CodiumAI-Agent /ask


I wander how to properly use BlurView with hooks and typescript

Question
So I was playing around and ended up with this code
import React, { useRef } from "react";
import { findNodeHandle, View } from "react-native";

import { BlurView } from "@react-native-community/blur";

export const MyBlurView: React.FC = ({children}) => {
  const viewRef = useRef(null);

  return (
    <>
      <BlurView
        viewRef={findNodeHandle(viewRef)}
        blurType="light"
        blurAmount={10}
      />
      <View
        ref={viewRef}
      >
        {children}
      </View>
    </>
  );
};

which does not seems to work. What is the right way to wrap BlurView using hooks and TS?

Hi,
This PR is gonna take care of it :
https://github.com/react-native-community/react-native-blur/pull/358 no more need for viewRef on Android AND BlurView can have children now.

Hi @Daavidaviid  i'm trying to use the BlurView in android. I have the following error:
BlurView cannor contain any child views on Android. it seem that is not yet supported.
I've done some mistake?
<BlurView
style={{
position: "absolute",
top: 0,
left: 0,
bottom: 0,
right: 0
}}
blurType="dark"
blurAmount={32}
overlayColor='black'
>
test

I think the library has not been released on npm yet. You have to install the master to get it to work.
To do that you can just do :
yarn add react-native-community/react-native-blur


add temperature dependence to MSMR model

Description
The FR/T term now uses the appropriate local temperature. Individual parameters (x_j, U0_j, w_j, alpha_j) can also depend on temperature, but this isn't tested. Plett Volume 3 claims that those parameters should not change much as a function of temperature.
Type of change
Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.

[ ] New feature (non-breaking change which adds functionality)
[ ] Optimization (back-end change that speeds up the code)
[ ] Bug fix (non-breaking change which fixes an issue)

Key checklist:

[ ] No style issues: $ pre-commit run (or $ nox -s pre-commit) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)
[ ] All tests pass: $ python run-tests.py --all (or $ nox -s tests)
[ ] The documentation builds: $ python run-tests.py --doctest (or $ nox -s doctests)

You can run integration tests, unit tests, and doctests together at once, using $ python run-tests.py --quick (or $ nox -s quick).
Further checks:

[ ] Code is commented, particularly in hard-to-understand areas
[ ] Tests added that prove fix is effective or that feature works

Happy to merge this one once the conflicts are resolved. There are also some coverage issues, but the detailed report does not load, so it might be a Codecov artifact.


IfUnlessModifier versus MultilineIfModifier

I have the following code structure:
foobar =
  if foobar
    foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar
  end

This fails Style/IfUnlessModifier because technically the body of the if statement and the predicate could fit on one line. So I change it to:
foobar =
  foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar if foobar

But that fails Style/MultilineIfModifier because technically it's multiline. I think probably both of those should pass, but I'd be fine with either one.
RuboCop version
$ [bundle exec] rubocop -V
0.70.0 (using Parser <IP_ADDRESS>, running on ruby 2.6.3 x86_64-darwin18)

foobar =
  foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar if foobar

is not equivalent to your original code: Here the condition applies to the assignment; in the orignal version it applies to the right-hand side only.
This would be equivalent:
foobar =
  (foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar if foobar)

And both cops are happy with it. (I am not; so I'd probably rewrite this.)

Interesting - I'll close this, thanks for the feedback.


Native app structure

Screens:

Profile
Create story
Show story
Map

They can be dummy at the beginning

Done and merged to master in #19


Adding login page

@ankitapuri can i add login page to this project?
Thank you!

@ankitapuri can i add login page to this project?
Thank you!

we already have one


Embed build-time nvjitlink version and make accessible

pynvjitlink should embed the CUDA version used at build-time as a compile-time constant accessible via a Python API. That would be very helpful for us for debugging in the future. Since we're statically linking our only recourse for debugging purposes right now is to check when a particular pynvjitlink package was built and then see what version of CUDA the build scripts used at that time.
Once we provide this constant, we could also automatically check at import-time whether the CUDA runtime/driver on the system could lead to version mismatches that are unsupported by the current version of pynvjitlink.
Originally posted by @vyasr in https://github.com/rapidsai/pynvjitlink/pull/33#discussion_r1449479441

Would also recommend we do a version check during import pynvjitlink and error informatively if we find a mismatch

Perhaps we should do this by exposing nvJitLinkVersion() rather than adding our own logic to capture the build-time version.


Project won't compile if the Character Set is set to MultiByte

This code from trace_log_writer.h is causing the issue:
#ifdef _MS_WINDOWS
            // OutputDebugString is thread safe
            OutputDebugString(entry.c_str());
#else

Does not seem to be worth fixing. As per https://msdn.microsoft.com/en-us/library/ey142t48.aspx MBCS strings are legacy technology and should not be used in new projects. The following information is provided for scenarios in which you need to maintain existing code that uses MBCS and it is not feasible to upgrade the code to use Unicode.


Add Debug builds to CI

This PR resolves some issues with Debug builds failing when using OCIO_INSTALL_EXT_PACKAGES, and adds a Debug build to each platform in Azure Pipelines.

@hodoulp , @BernardLefebvre , when you have cycles can you give this a try in your Windows build env?
This is building Debug properly in Azure for Linux and macOS, and successfully linking all of the dependencies pulled with OCIO_INSTALL_EXT_PACKAGES on Windows. The Azure Windows build fails in Debug still because the agent doesn't have python27_d.lib, which Python is hardcoded to use for Debug linking (see: https://answers.opencv.org/question/68148/lnk1104-cannot-open-file-python34_dlib/). I opted to not build Python on Azure to test this, but assuming you have a proper debug Python lib, it should be a non-issue in practice.
I did have to update ilmbase, expat, and yaml-cpp to use their respective Debug suffixes, and adjust the Half install usage. I think the errors you were seeing were related to these issues.

Also to note: I swapped the PythonInterp/PythonLibs find_package calls because, according to CMake docs, order matters.

@michdolan Knowing that the debug build is quite often broken any time major works are done on the CMake files, I would recommend to keep one debug build per platform (i.e. Windows & Linux).
Note: The Windows Debug CI build could not compile the Python bindings and the documentation to avoid the Python debug install 'issue'. Or a later change could be done to use the Python release libraries when compiling in debug as I do not see any use case where someone would like to debug the Python libraries.

It is possible to hack the agent's Python config header to make it use the Release Python lib instead (it's hard coded in Python install itself, regardless of supplying the correct path to CMake), but I was apprehensive about relying on that. I'll disable Python in that build for now.

I added a Debug build to each platform in Azure, and disabled Python/docs in the Windows Debug build with a TODO.

MATCHES would require comparison with "[Dd][Ee][Bb][Uu][Gg]" to be case insensitive. I'll define it in the root cmake.

I could add a macro for case insensitive matching in general, which could be reused throughout.


False positive UnusedImport on inline val

Version of detekt used: commit da8b164c5da3a2c8017452355c1754df7344c8a7

package my.package

inline val myVal get() = 1

import my.package.myVal // reported as `UnusedImport`

fun main() {
    println(myVal)
}

This seems like an edge case the rule doesn't cover + a potentially good/simple contribution for someone that wants to pick this up

@cortinico I’d like to give it a try. Could you assign this to me?

@mgroth0  Sorry, I couldn't reproduce the issue. I switch to commit da8b164c5d, and wrote the test below, but no UnusedImport was reported.
    @Test
    fun `should not reports when import an inline val`(){
        val mainFile = """
            import x.y.myVal

            fun test() {
                println(myVal)
            }
        """.trimIndent()

        val additionalFile = """
            package x.y

            inline val myVal get() = 1
        """.trimIndent()

        assertThat(subject.lintWithContext(env, mainFile, additionalFile)).isEmpty()
    }

Did I get you wrong?


UITextField Did Change

Please, add support for UITextFieldTextDidChangeNotification and UIControlEventEditingChanged.

https://github.com/Serheo/SHSPhoneComponent/pull/9


Setting main service is cumbersome

That they need to do now is the following:

create new app on control center
create main service on shop
copy main service service email and paste to control center

I'm not sure how to improve it though...

Issue migrated to our-city-app/plugin-mobicage-control-center#16


Increase limits for etcd to avoid potential long down time during maintenance window.

How to categorize this PR?

/area control-plane auto-scaling high-availability cost
/kind post-mortem
What this PR does / why we need it:
Increase limits for etcd.
Which issue(s) this PR fixes:
Fixes https://github.tools.sap/kubernetes-live/issues-live/issues/250
Special notes for your reviewer:
Replacement for #3835 after out-of-band discussion.
There is a risk of longer downtime (also, possibly corrupted WAL files) during maintenance window in bigger clusters (if they have large fluctuations in usage pattern during 24h period) which is triggered by too drastic a scale down during maintenance window followed by sub-optimal subsequent scale ups.
The increased limit values are based on the spikes in CPU and memory usage in some of the largest shoot clusters in the landscapes including the one mentioned in the linked issue.
Please see here for more details -> https://github.tools.sap/kubernetes-live/issues-live/issues/250#issuecomment-202646
cc @mvladev  @vlerenc @istvanballok @mliepold @ialidzhikov @rfranzke @dguendisch
Release note:

Increase limits for etcd to avoid potential long down time during maintenance window.

/hold

/unhold

@amshuman-kr Following up on the discussion out-of-band: @mvladev suggested higher limits, but in the end, if we do not disable scale-down, how is that helping again in avoiding as many involuntary ETCD "reschedulings" as possible?
Maybe the pod isn't shot down if the limits are sufficiently high and the node has capacity (so nothing against this PR), but shouldn't we also prevent any ETCD scale-downs until we have clustered ETCD? If the load increases (not only in spikes, but sufficiently enough for VPA to scale up) and then decreases again (e.g. during the day or week), won't VPA scale down the ETCD and by that cause an ETCD "rescheduling" with the known and undesired consequences?
I.e. shouldn't we do this, but also prevent the scale-down in a separate/another PR?

I.e. shouldn't we do this, but also prevent the scale-down in a separate/another PR?

I have the local branch for the PR that I closed still. So, can open a new PR to disable ETCD scale down if that is agreed upon.


Expose responseURL on returned response object

Address https://github.com/hoppscotch/hoppscotch-extension/issues/41
What does this PR changes?
This expose Axios' response.request.responseURL value of response object, as a response.responseURL:

so that if a HTTP request result in a redirect, the final url after redirect can be retrieved.

For more details and context, please check the linked issue above.
Tested? ✅
Works fine:

locally on Chrome latest: Version 89.0.4389.90 (Official Build) (x86_64). Mac OS BigSur.
Also tested compatible with official https://hoppscotch.io/, at least nothing breaks as far as I can tell.

Sample result:

{
    "status": 200,
    "statusText": "",
    "headers": {  },
    "responseURL": "https://developers.googleblog.com/2018/03/transitioning-google-url-shortener.html",
    "data": "...",
    "timeData": {  }
}

In the sample above I try to proxy request through this extension, the request originally made to https://goo.gl which got redirected to another url. The final url is properly exposed as shown on the screenshot.
Note
The var name responseURL is opinionated, I just derive it from the original Axios' var name, let me know if you prefer other name.
Thanks!

Looks good to me!


Move some code around

I'd do it any other PR I was working on over the last 2-3 weeks, but all of them were too big, so I decided to create a separate one.

@Pastafarianist done


The detailed performance of Baselines ?

Thanks for your work, which helps me a lot!
Could u provide the performance of each class in the Baselines?  If I want to cite the results of some methods in this work, I just need following data:

the AP of each category?
the backbone network: RetinaNet-r50 ?
the GPU info for speed: NVIDIA 1080Ti * n ?

Thanks.

AP of each category will be updated. The backbone is Resnet 50 with FPN. The speed is reported with a single Tesla v100.


Display template needs to be updated

This issue is related to #102, as the new template will have a version code, as well.
Flow4enol and I spent some time fussing with the display template, which is the sole remaining legacy part from Steve Burcham's original cases. He was kind enough to create a new template, but it's not integrated into the Fusion files yet.

Now updated to version 3.


There is no "d:" on linux

$ mono Dns.exe

Unhandled Exception:
System.IO.FileNotFoundException: filename not found
File name: '/var/calculate/remote/distfiles/egit-src/csharp-dns-server.git/Dns/bin/Debug/d:\data\machineinfo.csv'
  at Dns.ZoneProvider.FileWatcherZoneProvider..ctor (System.String filename) <0x40ca25d0 + 0x00bef> in :0
  at Dns.ZoneProvider.AP.APZoneProvider..ctor (System.String machineInfoFile, System.String zoneSuffix) <0x40ca24a0 + 0x0001f> in :0
  at Dns.Program.Main (System.String[] args) <0x40c7a8b0 + 0x000c7> in :0
[ERROR] FATAL UNHANDLED EXCEPTION: Nested exception trying to figure out what went wrong

I've moved this to a relative path for now, and just working through how I'd want to configuration management and plugins to work.  The APZoneProvider is fairly basic - was focused on a specific machine-layout from that had C:\ and D:\data etc.
I'm thinking about maybe have a config provider that maps groups of dictionarys, maybe sourced from a set of YAML.   I'm thinking something Kubernetes ConfigMap-like, extensible so that I could deal with other kinds of Zone Providers, Resolvers, Cache Implementations/Configs etc.


Single port for all flow types?

Hey all,
I'm curious what the best approach is to having a single port that handles sflow/netflow, instead of having two separate ports. I know there will be some performance hit as we would need to parse and figure out what the flow type is before passing it further down the pipeline, but assuming I'm okay with that, any suggestions?

Hi @lamoni,
I wasn't sure how much I should be decoding per packet but after looking at the samples, looks like it's doable by reading 5 bytes.
Will implement something.
NetFlow v5 0x00 0x05
NetFlow v9 0x00 0x09
IPFIX 0x00 0x0A
sFlow v5 0x00 0x00 0x00 0x05

Amazing, thank you @lspgn !


install-bundler 1.2.0

What to do if the build fails?
At the moment contributors do not have access to the CI workflow triggered by StepLib PRs. In case of a failed build, we ask for your patience. Maintainers of Bitrise Steplib will sort it out for you or inform you if any further action is needed.
New Pull Request Checklist
Please mark the points which you did / accept.

[x] I will not move an already shared step version's tag to another commit
[x] I read the Step Development Guideline
[x] I have a test for my Step, which can be run with bitrise run test (in the step's repository)
[x] I did run bitrise run audit-this-step (in the step's repository - note, if you don't have this workflow in your bitrise.yml, you can copy it from the step template.)
[x] I read and accept the Abandoned Step policy

Changes since the latest version

Improved path resolution for Gemfile.lock file
Ensures bundle is properly installed before finishing the step

I'm not sure what is the error pointed out by the CI. Both audit-step and test runs successfully and the tag is properly set. Please, let me know if anything needs to be changed and I'll be happy to perform the necessary changes.

The build failed due to:
[bitrise-step-install-bundler] and [install-bundler] steps are using the same git source: [https://github.com/FutureWorkshops/bitrise-step-install-bundler.git]
As the bitrise-step-install-bundler was deprecated (but still available), looking into if it is possible to override this check.

FYI: I updated the StepLib CI workflow to skip deprecated Steps from the Step duplication check so that CI is green now.

@godrei Thanks for the feedback. Both points are valid and I'll perform the updates. Should I re-request review when the changes are done or close this PR and re-open when done?

As a rule of thumb, we suggest fixing a StepLib PR this way: Fixing issues in a StepLib pull request.
Mostly to make sure the Step version tag points to the correct commit.
In this case, the PR looks good to me, thanks for the changes.

@godrei Thanks for the resource and sorry that I was not following those instructions. I have saved this link for future reference and I’ll follow a better process if this happens again.


External package repos

Description of the new feature/enhancement
Allow ability to update default package repo to my own fork of winget-pkgs. My change will be instantly available to as the pull request move through approval process.
Other way is to allow multiple package repos like external buckets where one can keep like of packages not suitable for public package repo such as tools built for private consumption only.
Proposed technical implementation details (optional)

That's not how this works. The winget-pkgs repo is just an intermediate step that kicks of an Azure CI process that when successful updates a SQLite index file. This file is what the winget-cli retrieves in regular intervals. That means that winget-cli as it is now does not use the manifest files stored in winget-pkgs.

@jascodes we are working on #118 a REST API that would simplify hosting your own repository of packages. @megamorf correctly described how the GitHub packages repository is used. We are looking at an open source and/or an Azure Marketplace offering that would simplify the process of standing up a private repository.

@jascodes you can now stand up your own repository :)
https://github.com/microsoft/winget-cli-restsource
We've still got some documentation to update, but a compliant HTTPS REST implementation is supported by the client.


conflicting main.c files

In the examples folder there is a file called main.c.
When using this library, that file conflicts with the main.c file used in the actual project.
To fix this I had to delete both the screenshots folder and the examples folder in the project.

That seems pretty obvious to me that the sample program isn't part of the library!

Yeah I do get that, it was just an inconvenience I wanted to mention


why is this inscription incorrect?

I found such an inscription on testnet3, but I can't find it on ordinals.com. Can you tell me why this inscription is wrong? Thank you.
OP_PUSHBYTES_33 02d1c2aebced475b0c672beb0336baa775a44141263ee82051b5e57ad0f2248240
OP_CHECKSIG
OP_0
OP_IF
OP_PUSHBYTES_3 6f7264
OP_PUSHBYTES_1 01
OP_PUSHBYTES_24 746578742f706c61696e3b636861727365743d7574662d38
OP_0
OP_PUSHBYTES_56 7b226f70223a227472616e73666572222c2270223a226272632d3230222c227469636b223a226d6f6e61222c22616d74223a22313030227d
OP_ENDIF
https://mempool.space/testnet/tx/c769750df54ee38fe2bae876dbf1632c779c3af780958a19cee1ca0497c78e80#vin=0

Hi sharphill2022 - I'm not sure I completely understand your question, but here's what I would say.

that tx won't be on ordinals.com because https://ordinals.com is mainnet and this tx is from testnet
normally, the tx would be found on https://testnet.ordinals.com but that site is down for the time being.
here is the tx on @gmart7t2's testnet instance
if you compare against another inscription, you can see it has many PUSHDATA lines.  Maybe that is what you mean when you're asking why it's wrong?

Thanks for your reply, @cryptoni9n .
I have checked on testnet.ordinals.com and can't find this inscription.
My question is why this inscription can't be identied as an inscription. what is the reason?

Thanks for your reply, @cryptoni9n . I have checked on testnet.ordinals.com and can't find this inscription. My question is why this inscription can't be identied as an inscription. what is the reason?

Thanks for your reply, @cryptoni9n . I have checked on testnet.ordinals.com and can't find this inscription. My question is why this inscription can't be identied as an inscription. what is the reason?

The tx doesn't have a valid inscription envelope.

Envelopes consist of an OP_FALSE OP_IF … OP_ENDIF wrapping any number of data pushes.

It looks like your tx is missing the OP_FALSE line

OP_0 is the same as OP_FALSE, so that's not the real reason.

OP_0 is the same as OP_FALSE, so that's not the real reason.

You're right - thanks for the correction, I was unaware.  I'm not sure why then it isn't being recognized as a valid inscription.  Maybe you could provide some details on how it was created?  What type of inscription is it supposed to be?

All these data are on testnet. I also was confused with this case and looking for the reason here...

not me inscribed it. I just saw it and don't know why ordinals indexer can't recognize it as a correct inscription. from the aspect of ordinals protocol, this looks like a good inscription.

not me inscribed it. I just saw it and don't know why ordinals indexer can't recognize it as a correct inscription. from the aspect of ordinals protocol, this looks like a good inscription.

ok, thanks for the additional information.  It appears to be an attempted BRC-20 inscription.  I compared it to 5 other valid BRC-20 inscription P2TR tapscripts (all different tickers) and the only difference that sticks out as unique to the bad script is that it uses an OP_PUSHBYTES_33 for the public key while all other valid scripts used OP_PUSHBYTES_32.  This is my best guess at what the issue seems to be.  What do you think?

i agree with what you found.  But from the ordinals protocol, it only processes the data in the envelope. So do you think ordinals protocol also processes the script out of the envelope?

i agree with what you found. But from the ordinals protocol, it only processes the data in the envelope. So do you think ordinals protocol also processes the script out of the envelope?

Not necessarily, but if the public key was malformed, perhaps it could come out like this?  In any case, it seems that we're chasing a mystery here and without further details on how it was inscribed, it's just a guessing game as to what went wrong.

Yes. This is just an example on testnet, no such example on mainnet. It seems to be a better choice to ignore it.


Added support to label/annotate nodes

PR to include the option to add labels / annotations to nodes in the cluster without extra charts.

It's been two months since I sent this PR. Is there anything I can change so you can merge? Is there any issue with it? FYI we have this change implemented in some deployments without issues.

@mhjacks @day0hero Any reason not to merge this?

Looks OK to me. Sorry for the delay in merging.


new: link datasets to the attachments

#Changes:

Autolinks attachment to the match dataset
User can override linked attachment with an uploaded file
User can restore dataset link

@ktuite and I chatted yesterday, and we're thinking that it'd be the best use of our remaining time before QA for me to do the fuller review of this PR once it's ready. @sadiqkhoja, let me know when I should take another look!


Where can I find the other calculator??

Where can I find this calculator version?

This is your friendly Microsoft Issue Bot. I've seen this issue come in and have gone to tell a human about it.

Closing as a dupe of #161.


@std/expect toStrictEqual() on objects mis-compute their length

Steps to Reproduce
Migration from expect to @std/expect with the failures:
https://github.com/poolifier/poolifier-web-worker/actions/runs/11553093927/job/32153534099

Expected behavior
Objects strict comparison should work.
Environment
N/A

@eryue0220 Can you take a look?

@eryue0220 Can you take a look?

Sure, I'll check this later.


Convert the formal grammar for DocC compatibility

DocC doesn't support subscripts, so instead of using subscript "opt" for optionality, use a postfix question mark.  Alternatives considered included text like "OPT" or "(opt)" and Unicode subscript characters.  The former are hard to read and interrupt the flow of the grammar.  The latter render poorly because they're intended for phonetic annotation, so the different letters don't share a baseline in many fonts.
It's a known issue that DocC doesn't support hard breaks, so insert a paragraph break between each grammar production for now.  I added a "double" paragraph break between groups, where there used to be a blank line, to preserve that information for when DocC adds hard break support in the future.
Fixes https://github.com/apple/swift-book/issues/3
Fixes rdar://101001280

@swift-ci Please test.


Partially ported to ES6

Using import
Using classes
Webpack
Common.js format
eslint

Supersed https://github.com/dataarts/dat.gui/pull/71

Is anybody maintaining this repo?

Thanks! I've merging these changes (a few other pull requests) into a develop branch, which will eventually become the new version.


[Firebase/RemoteConfig] Remote Config ensureInitialized return unknown error

[REQUIRED] Step 1: Describe your environment

Xcode version: 11.7
Firebase SDK version: 6.28.2
Installation method: Zip file (select one)
Firebase Component: RemoteConfig

[REQUIRED] Step 2: Describe the problem
Steps to reproduce:
We cannot reproduce this bug in the development environment but have thousands of logs:

Relevant Code:
Recorded non-fatal error relates to line remoteConfig.ensureInitialized
public class FBRemoteConfig {
    public static let `default`: FBRemoteConfig = FBRemoteConfig()

    public let remoteConfig: RemoteConfig

    public init() {
        if FirebaseApp.app() == nil {
            guard let filePath = Bundle.main.path(forResource: appFirebasePlistPath, ofType: "plist"),
                let options = FirebaseOptions(contentsOfFile: filePath) else {
                fatalError("Cannot configure Firebase with plist file")
            }

            if FirebaseApp.app() == nil {
                FirebaseApp.configure(options: options)
            }
        }

        guard let app = FirebaseApp.app() else {
            fatalError("Cannot init FirebaseApp")
        }

        remoteConfig = RemoteConfig.remoteConfig(app: app)
        let settings = RemoteConfigSettings()
        settings.minimumFetchInterval = developerModeEnabled ? 15 : 15 * 60
        remoteConfig.configSettings = settings
        remoteConfig.setDefaults(fromPlist: "DefaultRemoteConfigValues")

        remoteConfig.ensureInitialized { [weak self] error in
            if let error = error {
                CrashlyticsLogger.recordError(error)
                #if DEBUG
                print("🤯🤯🤯 \(error.localizedDescription)")
                #endif
            }
            self?.fetchData()
        }
    }
}

Should we wait to RemoteConfig Initialized successfully then fetchConfig or can we just ignore it?

Can you share the error message?

Can you share the error message?

The error message is in the second picture. We just found that our logging code is not working properly, please wait while we update better error message.

Hi again, with the new app version, we get a better error message:
Domain: com.google.remoteconfig.ErrorDomain Code: 8003 NSLocalizedDescription: Timed out waiting for database load.

That error indicates the local device's database could not be loaded within the timeout interval (defined here. @karenyz, can you take a look at this issue?

I have been unable to reproduce this error and this ticket is quite old so I will close it. Please feel free to reopen it if you are still experiencing this issue on the latest SDK version and we will investigate it.


fixing segfault on Gamepad.name and Gamepad.guid

This issue wasn't obvious until I started testing disconnection/reconnection and multiple gamepads. The code seemed to work without modification with only one gamepad connected, but that was just luck.

Thanks! Just added :smile:


Installation on Windows

Hi pebblers !
I'm trying to get pybluetooth running on my pc but when pip tries to instal scapy, it fails :
Could not find a version that satisfies the requirement scapy==2.3.2.dev0 (from pybluetooth==0.0.2) (from versions: 2.2.0-dev.linux-x86_64, 2.2.0.dev0, 2.3.1, 2.3.2) No matching distribution found for scapy==2.3.2.dev0 (from pybluetooth==0.0.2)
I tried to modify the setup.py to remove the dev requirement and replace it by the last version (2.3.2) but it also fails, trying to execute a UNIX command :
Collecting scapy
  Using cached scapy-2.3.2.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\agodi\AppData\Local\Temp\pip-build-yal0ouik\scapy\setup.py", line 35
        os.chmod(fname,0755)
                          ^
    SyntaxError: invalid token

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\agodi\AppData\Local\Temp\pip-build-yal0ouik\scapy\

Thank you for your help,
Augustin

Resolved it by modifying the setup.py

Hi Augustin,
This project depends on scapy and new features that aren't part of an official release yet, though they have been merged into master.
I'd recommend installing scapy from our own clone: https://github.com/pebble/scapy
Hope that helps.
Let me know if it works on Windows. I haven't tested it at all on Windows yet.
Martijn

Thank you for your answer,
I did install scapy from your clone and just added a condition before os.chmod(fname,0755)
if os.name is 'posix':
    os.chmod(fname,0755)

It seems to work now.


867 simplify access control structure

Issue 867: improvements to access control

Eliminate one join from all queries.

user__uaccess__u2xxx --> user__r2xxx for all "xxx"
group__gacess__g2xxx --> group__g2xxx
resource__raccess__r2xxx -> resource__r2xxx

Raise standard exception PermissionDenied instead of custom exceptions. Eliminate custom exceptions.
Enhance anti-bugging assertions during debug mode; eliminate from production mode.
Complete implementation of User.is_active flag:

inactive users disappear from groups, shares, and other user lists.
acting as or on an inactive user raises PermissionDenied

Correct implementation of share_Y_with_Y:

undo now prohibits unshare with self.
unshare_X_with_Y matches can_unshare_X_with_Y

Can one of the admins verify this patch?

@alvacouch - Though this passes all tests will still need to look at the migrations using the existing www database.  Did a test deploy on https://alpha.hydroshare.org which didn't want to accept all migrations files. End result was users not having any resources associated with them.
Example console output:
Running migrations:
  Applying hs_access_control.0006_auto_add_new_fields... OK
  Applying hs_access_control.0007_manual_populate_new_fields... OK
  Applying hs_access_control.0008_auto_remove_many2many_relationships... OK
  Applying hs_access_control.0009_auto_remove_original_fields... OK
  Applying hs_access_control.0010_auto_rename_related_names... OK
  Applying hs_access_control.0011_auto_rename_new_fields_to_original_names... OK
  Applying hs_access_control.0012_auto_disallow_nulls...Traceback (most recent call last):
  File "manage.py", line 8, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 377, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 288, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 338, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/migrate.py", line 161, in handle
    executor.migrate(targets, plan, fake=options.get("fake", False))
  File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/executor.py", line 68, in migrate
    self.apply_migration(migration, fake=fake)
  File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/executor.py", line 102, in apply_migration
    migration.apply(project_state, schema_editor)
  File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/migration.py", line 108, in apply
    operation.database_forwards(self.app_label, schema_editor, project_state, new_state)
  File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/operations/fields.py", line 139, in database_forwards
    schema_editor.alter_field(from_model, from_field, to_field)
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/schema.py", line 470, in alter_field
    self._alter_field(model, old_field, new_field, old_type, new_type, old_db_params, new_db_params, strict)
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/schema.py", line 620, in _alter_field
    params,
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/schema.py", line 111, in execute
    cursor.execute(sql, params)
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 81, in execute
    return super(CursorDebugWrapper, self).execute(sql, params)
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 65, in execute
    return self.cursor.execute(sql, params)
  File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", line 94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/utils.py", line 65, in execute
    return self.cursor.execute(sql, params)
django.db.utils.IntegrityError: column "grantor_id" contains null values

Full deployment console log is here: http://ci.hydroshare.org:8080/view/2. Deployment/job/branch-builder-with-irods/16/console

Due to large number of changes in models.py, github is not showing those changes. @mjstealey, @ironfroggy Is there way to see changes in models.py?

See issue #889. This affects this pull and needs to be resolved first.

The only way I can think of seeing changes in models.py is to
a) rebase the build so that the changes are staged.
b) look at each wave of changes separately.
This would take a new repository and PR.
There is another way in Linux itself:
diff -C 10 old-models.py new-models.py
will do what GitHub does and list changes in a similar format.

@mjstealey: in migration 0007 I forgot to save() records. This is the cause of the above. Fixed in latest push.

You can easily very the diff in git without any rebasing or copying of the files between branches.
git fetch
git diff origin/develop origin/867-simplify-access-control-structure -- path/to/file

where path/to/file is the path in the repository to a specific file you want to see the diff between two branches for.

in migration 0007 I forgot to save() records. This is the cause of the above. Fixed in latest push.

@alvacouch - all of your migrations are now passing.
Branch has been re-deployed to https://alpha.hydroshare.org using www resources for testing.
A similar migration issue has been found in hs_model_program and a separate issue has been created for it.
Operations to perform:
  Synchronize unmigrated apps: debug_toolbar, galleries, irods_browser_app, accounts, conf, rest_framework, forms, corsheaders, generic, boot, comments, blog, jquery_ui, haystack, crispy_forms, core, hs_metrics, filebrowser_safe, sitemaps, gis, pages, mobile, autocomplete_light, djcelery, widget_tweaks, django_extensions
  Apply all migrations: redirects, theme, hs_geo_raster_resource, hs_geographic_feature_resource, ga_resources, ga_ows, hs_labels, hs_model_program, sites, contenttypes, hs_tools_resource, hs_access_control, hs_app_netCDF, hs_modelinstance, ref_ts, sessions, hs_swat_modelinstance, auth, django_docker_processes, hs_app_timeseries, oauth2_provider, admin, hs_core, django_irods
Synchronizing apps without migrations:
  Creating tables...
  Installing custom SQL...
  Installing indexes...
Running migrations:
  Applying hs_access_control.0006_auto_add_new_fields... OK
  Applying hs_access_control.0007_manual_populate_new_fields... OK
  Applying hs_access_control.0008_auto_remove_many2many_relationships... OK
  Applying hs_access_control.0009_auto_remove_original_fields... OK
  Applying hs_access_control.0010_auto_rename_related_names... OK
  Applying hs_access_control.0011_auto_rename_new_fields_to_original_names... OK
  Applying hs_access_control.0012_auto_disallow_nulls... OK
  Applying hs_access_control.0013_auto_add_uniqueness_constraints... OK
  Applying hs_model_program.0006_auto_20151216_1500...Traceback (most recent call last):
  File "manage.py", line 8, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 377, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 288, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 338, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/migrate.py", line 161, in handle
    executor.migrate(targets, plan, fake=options.get("fake", False))
  File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/executor.py", line 68, in migrate
    self.apply_migration(migration, fake=fake)
  File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/executor.py", line 102, in apply_migration
    migration.apply(project_state, schema_editor)
  File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/migration.py", line 108, in apply
    operation.database_forwards(self.app_label, schema_editor, project_state, new_state)
  File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/operations/models.py", line 282, in database_forwards
    getattr(new_model._meta, self.option_name, set()),
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/schema.py", line 310, in alter_unique_together
    ", ".join(columns),
ValueError: Found wrong number (0) of constraints for hs_model_program_mpmetadata(content_type_id, object_id)

Since it is not possible to see the changes of models.py in github, I am going to provide comments in reference to line number.
Line#:201: Indentation (PEP8)

Line#:254: Unused variable access_group
Line#:300: Is there a possibility this would return duplicate records (Group objects)?. The previous code used the distinct().
Line#:330 to 335: can be simplified replacing if with return
Line#:362 to 367: can be simplified replacing if with return

file: "test_access_control.py
Line#770 to 772: unused variables
Line#990, and 1014: should delete commented code
Line#3834 to 3840: should delete commented code
Line#4154 to 4234: unused variable foo

@pkdash All review comments addressed, except:

immutable flag is ready for a PR but not in this PR. Could include it now that base review has been completed.
I need comments in "return False" to maintain the correspondences between "can_X" and "X" for methods X.
distinct() is not needed in simple queries. It is needed in queries involving Q() expressions and |, because if both Q(A) and Q(B) match and we search for Q(A) | Q(B), we are guaranteed to have duplicates. My original version used distinct() too much.

@pkdash: also removed some erroneously inserted tabs in various files... due to use of vim editor.

@pkdash: Also, group semantics have not changed; this is a major change and is deferred until issue #893. This change is not ready to push.  So, at present, multiple people can indeed post the same privilege for the same group. This will be prevented in #893.

@alvacouch I am only seeing some of my comments being addressed. For example, original Line#1402 (new code line#1571): else is not needed. There are still those unused variables.

get_groups_with_explicit_access() just a wrapper function for get_groups_with_declared_privilege(). Why do we need the wrapper function?

modesl.py
Line#1670: why should we be raising exception if the resource has more than one owner?

May be it is time to split the test file. It is getting quite long.

@pkdash
Planning on splitting up tests in next version. Meanwhile, trying to get out a version that has full immutable semantics.
Some responses:
Line 1670: should not be able to remove last owner of resource. This exception reports that attempt. Otherwise, an owner would be able to remove the last owner (self).
In general, in cases where I had
if query.exists():
return True
else:
return False
This is not equivalent to
return query.exists()
The former returns bool. The latter returns unevaluated queryset. This is confusing.
Will split test file next time around. There is a natural split between unit tests, functional tests, and integration tests.
get_groups_with_combined_privilege has been eliminated from next version (being tested).
id__in and pk__in are equivalent. id__in is syntactic; pk__in is semantic and preferred. Changed all in next version to pk__in (under test).

@alvacouch Interesting that you are saying return query.exists() would not return a bool. I think have seen and even used myself in our codebase expecting it to return bool. This link https://docs.djangoproject.com/en/1.7/ref/models/querysets/#django.db.models.query.QuerySet.exists also says that it returns bool.
I am OK with your current implementation as this is I guess just a style issue. If you are not planning to make any further changes for me to review then let me know so that I can +1 this PR.

I am still working on this PR. I will post a new version with full immutable handling as soon as possible. I am still testing it.
(It is the second day of classes and I am up to my ears in students who think their problems are more important than mine.)

@pkdash This is likely to be the last change in this PR. Deferring other changes to later PRs.

Eliminated all unused variables; (I hope)
broke tests up into individual files with a helper library;
3 changed "if p.exists(): return True" to "return p.exists()".
surveyed functions in use.
standardized naming conventions.
modified uses of methods system wide for new names.
eliminated unused functions that are not usable in the future due to planned changes.

@hyi This change fully implements the immutable flag. All routines report effective privilege.
Summary of changes

Implemented necessary new routines for groups.
a. GroupAccess.view_users
b. GroupAccess.edit_users
c. GroupAccess.owners

Standardized naming conventions for access control calls.

Before
After
Comments

get_holding_users, get_holders, get_all_holders
view_users
Implemented consistently for resources and groups.

get_held_*
get_view_*
same for resources and groups.

get_editable_*
get_edit_*
same for resources and groups.

The point of all of this is that:

Desired action
get users
get groups and resources

VIEW
r.view_users, g.view_users
u.get_view_groups(), u.get_view_resources(), g.get_view_resources()

CHANGE
r.edit_users, g.edit_users
u.get_edit_groups(), u.get_edit_resources(), g.get_edit_resources()

OWNER
r.owners, g.owners
u.get_owned_groups(), u.get_owned_resources()

a. If you want something viewable, then you use get_view_* or view_* (depending upon whether you want  things to view or users).
b. If you want something editable, then you use get_edit_* or edit_* (depemding upon whether you  want things or users)
c. If you want something owned, then you use get_owned_* or owners (depending upon whether you want things or users).
What this version does not do:
This is not the big change in semantics that is promised. The semantics of ownership remain the same. The methods, however, have their final names for that change. In other words, multiple people can still assign CHANGE to one object.  This will be fixed in the next PR.
Also, I did not tackle the other major component of fixing semantics, which is to remove the undo_* routines and replace with unshare_* function.

@alvacouch I plan to do a final review of your latest changes today.

let me make a general comment on naming. I need a bit of advice:

The best practice for methods that do nontrivial queries is to list them as get_X() rather than properties X.
In our system, we have implemented ResourceAccess.owners, edit_users, view_users, edit_groups, view_groups as properties to trick mezzanine into using them. This is rather obsolete now for most cases but it's still in the code base. This is not considered best practice. It's expedient.
Everything else is implemented under the get_X() pattern, including

UserAccess.get_edit_resources(), get_view_resources(), get_owned_resources()
GroupAccess.get_edit_resources(), get_view_resources()

That being said, I am unwilling to rename ResourceAccess.owners, edit_users, view_users, edit_groups, or view_groups to best practice conventions (because of an overwhelming number of references).
The basic question is what to do with UserAccess.* and GroupAccess.*. It seems to me that the expedient thing is to name everything according to conventions established -- for better or worse -- to handle resources. Then we have entirely consistent naming, to wit:

ResourceAccess.owners, edit_users, view_users
UserAccess.owned_resources, edit_resources, view_resources.
GroupAccess.edit_resources, view_resources.

I am willing to do this, even though it is not best practice, because it is easier to remember. Do you agree?

@alvacouch I think having a consistent naming pattern (even though it may not fit to the best practice rules) would make it easier to remember and use. So I would favor these changes. Hope it won't take too much of your time to make these changes. I know this PR has been out there for quite sometime. We should close this ASAP. Thanks.

It is not a big deal. I don't use pycharm to do it. I use global replace in VIM. This allows me to substitute arbitrary patterns and to refactor get_x() to x very quickly. It literally takes longer to validate via global testing than to make the change.

(I think it is worth locking down the naming now, in this PR, so that everyone will know it and I can write documentation around it.)

@pkdash Made naming changes and documented in README.md for future reference.  IMHO ready to commit.

@pkdash changes now documented in master document:
https://docs.google.com/document/d/1c-3GXA_ALxr9tCTAX0oxOZQrbaB4KNWrM54aZxhflww/edit#

@alvacouch I am giving + 1 for this huge PR based on the fact that you have extensive set of unit tests for access_control and they all are passing. Due to the complex nature of the some of the database queries as result of the complex access rules that we have, it is very hard to do a proper review of such large number of changes in this PR. However, I believe through the code review process we got the code base for this app in a better position. Thanks for your patience as it took me a while to finish this review.

@pkdash Many, many thanks for your patience. Now I can go on to create the next PR, which is a lot simpler!


CupertinoTextField When users use the Sony mobile phone poboxPlux input method, they cannot input capital letters continuously

Hi @lidong-biubiubiu
can you please provide your flutter doctor -v and flutter run --verbose?
Also, to better address the issue, would be helpful if you could post a minimal code sample to reproduce the problem
Thank you

@TahaTesser thank you!
flutter doctor -v
[✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Mac OS X 10.15 19A583, locale zh-Hans)
• Flutter version 1.12.13+hotfix.8 at .../flutter
• Framework revision 0b8abb4724 (3 months ago),
• Engine revision e1e6ced81d
• Dart version 2.7.0
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at .../Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 28.0.3
• ANDROID_HOME = .../Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.1, Build version 11A1027
• CocoaPods version 1.8.3
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 41.1.2
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
flutter run --verbose
[  +74 ms] executing: [.../flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +211 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[   +3 ms] 0b8abb4724aa590dd0f429683339b1e045a1594d
[        ] executing: [.../flutter/] git describe --match v*.. --first-parent --long --tags
[ +258 ms] Exit code 0 from: git describe --match v*.. --first-parent --long --tags
[   +1 ms] v1.12.13+hotfix.8-0-g0b8abb472
[   +8 ms] executing: [.../flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +17 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/stable
[   +1 ms] executing: [.../flutter/] git ls-remote --get-url origin
[  +18 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +96 ms] executing: [.../flutter/] git rev-parse --abbrev-ref HEAD
[  +32 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] stable
[  +15 ms] executing: sw_vers -productName
[  +41 ms] Exit code 0 from: sw_vers -productName
[        ] Mac OS X
[        ] executing: sw_vers -productVersion
[  +27 ms] Exit code 0 from: sw_vers -productVersion
[        ] 10.15
[        ] executing: sw_vers -buildVersion
[  +35 ms] Exit code 0 from: sw_vers -buildVersion
[        ] 19A583
[  +61 ms] executing: /usr/bin/xcode-select --print-path
[  +14 ms] Exit code 0 from: /usr/bin/xcode-select --print-path
[        ] /Applications/Xcode.app/Contents/Developer
[   +2 ms] executing: /usr/bin/xcodebuild -version
[+1548 ms] Exit code 0 from: /usr/bin/xcodebuild -version
[        ] Xcode 11.1
Build version 11A1027
[  +97 ms] executing: .../Android/sdk/platform-tools/adb devices -l
[  +22 ms] Exit code 0 from: .../Android/sdk/platform-tools/adb devices -l
[        ] List of devices attached
emulator-5554          device product:sdk_gphone_x86_arm model:AOSP_on_IA_Emulator device:generic_x86_arm transport_id:1
[  +42 ms] executing: .../flutter/bin/cache/artifacts/libimobiledevice/idevice_id -h
[ +249 ms] /usr/bin/xcrun simctl list --json devices
[ +467 ms] More than one device connected; please specify a device with the '-d ' flag, or use '-d all' to act on all devices.
[   +6 ms] .../Android/sdk/platform-tools/adb -s emulator-5554 shell getprop
[  +44 ms] ro.hardware = ranchu
[  +10 ms] AOSP on IA Emulator • emulator-5554                        • android-x86 • Android 9 (API 28) (emulator)
[   +1 ms] iPhone 8 Plus       • F07891CF-C326-456D-8648-B5D6B683B7E0 • ios         • com.apple.CoreSimulator.SimRuntime.iOS-12-1 (simulator)
[  +21 ms] "flutter run" took 2,738ms.
#0      throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1      RunCommand.validateCommand (package:flutter_tools/src/commands/run.dart:289:7)

#2      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:590:11)
#3      FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:515:33)

#4      AppContext.run. (package:flutter_tools/src/base/context.dart:146:29)
#5      _rootRun (dart:async/zone.dart:1126:13)
#6      _CustomZone.run (dart:async/zone.dart:1023:19)
#7      _runZoned (dart:async/zone.dart:1518:10)
#8      runZoned (dart:async/zone.dart:1465:12)
#9      AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
#10     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:505:20)
#11     CommandRunner.runCommand (package:args/command_runner.dart:197:27)
#12     FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:413:21)

#13     AppContext.run. (package:flutter_tools/src/base/context.dart:146:29)
#14     _rootRun (dart:async/zone.dart:1126:13)
#15     _CustomZone.run (dart:async/zone.dart:1023:19)
#16     _runZoned (dart:async/zone.dart:1518:10)
#17     runZoned (dart:async/zone.dart:1465:12)
#18     AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
#19     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:364:19)
#20     CommandRunner.run. (package:args/command_runner.dart:112:25)
#21     new Future.sync (dart:async/future.dart:224:31)
#22     CommandRunner.run (package:args/command_runner.dart:112:14)
#23     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:250:18)
#24     run.. (package:flutter_tools/runner.dart:63:22)
#25     _rootRun (dart:async/zone.dart:1126:13)
#26     _CustomZone.run (dart:async/zone.dart:1023:19)
#27     _runZoned (dart:async/zone.dart:1518:10)
#28     runZoned (dart:async/zone.dart:1502:12)
#29     run. (package:flutter_tools/runner.dart:61:18)

#30     AppContext.run. (package:flutter_tools/src/base/context.dart:146:29)
#31     _rootRun (dart:async/zone.dart:1126:13)
#32     _CustomZone.run (dart:async/zone.dart:1023:19)
#33     _runZoned (dart:async/zone.dart:1518:10)
#34     runZoned (dart:async/zone.dart:1465:12)
#35     AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
#36     runInContext (package:flutter_tools/src/context_runner.dart:64:24)
#37     run (package:flutter_tools/runner.dart:50:10)
#38     main (package:flutter_tools/executable.dart:65:9)
#39     main (file:///b/s/w/ir/k/archive/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
#40     _startIsolate. (dart:isolate-patch/isolate_patch.dart:305:32)
#41     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:174:12)
code:
@override
Widget build(BuildContext context) {
return Container(
height: AppNumber.h_88,
padding: EdgeInsets.symmetric(horizontal: AppNumber.w_24),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(AppNumber.w_8),
color: widget.backgroundColor ?? AppColors.c_1F767680),
child: Row(
children: [
Expanded(
child: CupertinoTextField(
key: Key(widget.keyValue),
controller: widget.controller,
placeholder: widget.placeholder ?? '',
placeholderStyle: widget.placeholderStyle ??
AppTextStyle.c_FFFFFFFF_40_s_30_w_300,
style: widget.style ?? AppTextStyle.c_FFFFFFFF_60_s_30_w_300,
decoration: BoxDecoration(
border: Border.all(width: 0, color: Colors.transparent)),
keyboardType: widget.inputType,
maxLines: 1,
autofocus: widget.autofocus,
maxLength: widget.maxLength,
obscureText: widget.obscureText,
textInputAction: widget.inputAction,
clearButtonMode: _clearButtonMode,
focusNode: widget.focusNode,
onChanged: _onChanged,
onEditingComplete: widget.onEditingComplete,
),
)
],
),
);
}

Hi @lidong-biubiubiu
What is poboxPlux input method?
Do you experience this issue on only Sony mobile?
You sample is has lot of missing code,  post a minimal runnable code sample to reproduce the problem
Thank you

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.
Could everyone who still has this problem please file a new issue with the exact descriptions what happens, logs and the output of 'flutter doctor -v'  please.
All system setups can be slightly different so it's always better to open new issues and reference related issues.


local path in HTML?

@Eric89GXL
Is this intended?
mne_redo_file

Usage: /home/larsoner/custombuilds/mne/current/bin/mne_redo_file file-to-redo
mne_redo_file_nocwd

Usage: /home/larsoner/custombuilds/mne/current/bin/mne_redo_file_nocwd file-to-redo

We had this before, I think there was some sphinx option to avoid this.
On Wed, Jan 20, 2016 at 12:35 PM, Jean-Rémi KING<EMAIL_ADDRESS>wrote:

@Eric89GXL https://github.com/Eric89GXL
Is this http://martinosorg/mne/dev/manual/c_referencehtml#mne-redo-file
intended?
mne_redo_file
Usage: /home/larsoner/custombuilds/mne/current/bin/mne_redo_file file-to-redo
mne_redo_file_nocwd
Usage: /home/larsoner/custombuilds/mne/current/bin/mne_redo_file_nocwd file-to-redo
—
Reply to this email directly or view it on GitHub
https://github.com/mne-tools/mne-python/issues/2799.

Hah! No that's not intended. I don't remember fixing it previously, but it would be great if we could find it. Perhaps @agramfort remembers more

I have no idea... :( :(

I had actually put in the full path at some point. Fixed here:
https://github.com/mne-tools/mne-python/commit/47cc50a80ae6c6920d9a216678bc137587e09f36

It's still online though (dev + stable). But I'm not sure when / how the docs are compiled, so my comment may not be appropriate.

@jaeilepp any chance you can update the dev doc?


[Feature] Investigate integration of KubeRay and Volcano, add to docs

Search before asking

[X] I had searched in the issues and found no similar feature requirement.

Description
Investigate use of Volcano with KubeRay for gang scheduling.
Write up a user guide.
cc @kevin85421 @sihanwang41
Use case
Gang scheduling of KubeRay resources.
Related issues
This is a more specific version of https://github.com/ray-project/kuberay/issues/213
Are you willing to submit a PR?

[ ] Yes I am willing to submit a PR!

Is this one same as https://github.com/ray-project/kuberay/issues/213?

Re-ordered the text of the issue description to make it clearer:
I think it would be interesting specifically to target Volcano, since it's a popular tool.
Hopefully, KubeRay already exposes the necessary configuration and no changes are required.
Opened this issue on the basis of some discussion with @kevin85421.

Can look at how the Spark Operator handles integration as a reference:
https://github.com/GoogleCloudPlatform/spark-on-k8s-operator/blob/master/pkg/batchscheduler/volcano/volcano_scheduler.go
It's not yet clear to me if this requires modifying KubeRay to work, or if native integration just saves some boilerplate.

Well-documented boilerplate is the preferable route when possible.
IMO, KubeRay shouldn't be too opinionated about external tools.

From what I can gather, the only real requirement is to create a PodGroup for the Ray Cluster and tie it to the RayCluster CR via the ownerReferences metadata. Assuming this doesn't require some knowledge of RayClusters on the Volcano side, I think it should be doable to just have users create PodGroups manually.

The only other element to this is handling updates, like how the autoscaler can adjust the number of replicas. This could also benefit from native integration in KubeRay, as otherwise it could be difficult to intercept these changes to update the PodGroup. But that could be a "buyer beware" thing to put into the docs.


Faster Sync for onboarding Validators

Motivation
A validator is onboarded by mining VDF proofs and submitting the transaction. However, to sign the blocks and be rewarded, they have to sync with the network. The state sync takes long time (around 4 days for full node - 75 epochs). This would take even more as we progress on the chain.
Problem
Faster sync with the network to onboard the validators. Waypoints are generated per each epoch in Libra. In other words, sync from latest waypoint. Each waypoint has corresponding genesis.blob. We only have the network's first genesis blob.
We have the latest waypoint, we need latest genesis.blob to sync the network.
Progress
Work in progress
Related issues: #361
Possible approach: https://github.com/OLSF/libra/blob/OLv4/consensus/consensus-types/src/block.rs#L137

I don't think this strategy would work, since there doesn't seem to be a clear path from the Block type to a WriteSet. Or did I miss it?
https://github.com/OLSF/libra/blob/OLv4/consensus/consensus-types/src/block.rs#L137

OL restore allows catching up from archive.


[Debugging] Should we support debugging the script runnning in REPL window

For now, we only support debugging a script running in a PowerShell console or ISE. If we run the script in PowerShell Tools REPL window, we cannot attach to the process using the same VS.

(following is based on my understanding of how we execute things)
Doing this would require changing our current execution workflow from executing a script on a PowerShell object to using an actual/exposed process that loads the PowerShell execution engine. In theory this is doable, but would require an architecture change.

Following #676, this is now possible. Not 100% sure about the quality of the experience though.


Annotate zerver/views/user_settings

Annotate zerver/views/user_settings

Automated message from Dropbox CLA bot
@dawran6, it looks like you've already signed the Dropbox CLA. Thanks!

@timabbott hey could you review the PR for me? Thanks!

Made one small change, which is that the default of "" isn't an Optional:
diff --git a/zerver/views/user_settings.py b/zerver/views/user_settings.py
index ff61fd7..b23a744 100644
--- a/zerver/views/user_settings.py
+++ b/zerver/views/user_settings.py
@@ -60,7 +60,7 @@ def json_change_settings(request, user_profile,
                          old_password=REQ(default=""),
                          new_password=REQ(default=""),
                          confirm_password=REQ(default="")):
-    # type: (HttpRequest, UserProfile, text_type, Optional[text_type], Optional[text_type], Optional[text_type]) -> HttpResponse
+    # type: (HttpRequest, UserProfile, text_type, text_type, text_type, text_type) -> HttpResponse
     if new_password != "" or confirm_password != "":
         if new_password != confirm_password:
             return json_error(_("New password must match confirmation password!"))

, and merged, thanks @dawran6!

Coverage increased (+0.5%) to 67.276% when pulling f9a4d6f4743d36da7935783a0414d36e2f0017f2 on dawran6:ant_view_user_settings into 2a8e8129d1709fd091be4b3720944ab85ee7f6ff on zulip:master.


Pulling upstream changes

Upstream and Downstream
Advantages:
We can all can be working on a file at the same time
Disadvantages:
The process of adding individual contributions takes time and is not automatically accessible to everyone working on it


Android push is not working when app is in foreground

React Native version:

Steps To Reproduce
just integrated the FCM and launches the app.
Describe what you expected to happen:
It should receive a notification when app is in the foreground as well this.notifactionlistener should get called.

This doesn't seem like a react-native specific issue. All android apps need custom code to handle receiving FCM notifications in the foreground. Check out this article for a guide on integrating FCM in your react native app<EMAIL_ADDRESS>


fix(generator): try to detect automatically the routes definition

Proposed change
Try to detect automatically the routes definition
Related issues

:bug: Fixes #1873

could you check in<EMAIL_ADDRESS>that ng g @o3r/core:page updates app-routing? (git modified)

I think you can target 11.0 :S


Clarify how Session Affinity plays into Origin Selection

Clarify how Session Affinity plays into Origin Selection
Its not clear from the documentation how affinity is evaluated
For "Lowest latencies based traffic-routing" it walks through the flow on how Priority, Latency signal, Weights" are evaluated with no mention of Session Affinity.
For example i have stateful backends so i use Session Affinity. If i need to take a backend offline or upgrade a backend to a new one.  Ideally i could set the old backend to Priority 2 so that no new traffic gets routed there but any existing traffic that contains the affinity cookie still is routed to the backend.
This is not the behavior that i see, but rather the cookie is reissued when the old backend is Priority 2.  Is this this the expected behavior? It's not clear from the docs on how these play together.

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 31f1dbc3-4bd2-7238-2f2e-8b31e72d4f7c
Version Independent ID: 7528e36e-ab2e-4b40-f7a9-4dc92c279458
Content: Traffic routing methods to origin - Azure Front Door
Content Source: articles/frontdoor/routing-methods.md
Service: frontdoor
GitHub Login: @duongau
Microsoft Alias: duau

Thank you for your feedback! We will review and update as appropriate.

@arsnyder16 Thank you for your feedback.
When Azure Front Door determines if the endpoint is in unhealthy state, then Session affinity is not maintained, and it will send request to the healthy endpoint. The unhealthy state can be due to backend being disabled etc.
In your case above was the backend disabled when you observed the session affinity cookies were reissued.

@ChaitanyaNaykodi-MSFT are you saying it’s “disabled” because it’s lower priority?
What about weight?
If I do weight 1000 and weight 1 ?

@arsnyder16

are you saying it’s “disabled” because it’s lower priority?

No, not due to reducing the priority but as you mentioned in the post above "If I need to take a backend offline or upgrade a backend" I was wondering if the backend was not available when you observed the session affinity cookies were reissued or you had only interchanged the priorities and the original priority one backend was up and running fine.

@ChaitanyaNaykodi-MSFT No it was healthy just adjusted the priority
customers active must retain the affinity to their original  backends (priority 2)
new customer should  be deferred to the new priority 1 clusters
as customer sessions close on the priority 2 clusters, those clusters will eventually go idle and can be torn down

Think of it as a blue green deployment with stateful sessions that cannot be interrupted.

@arsnyder16
Thank you for the clarification. I am reaching out to the team internally regarding this issue and will post an update as soon as I get a response. Thank you!

@arsnyder16
I got an update the behavior observed above is expected, any update made on AFD causes the session affinity cookies to change.
The team is currently working on changing this behavior so that session affinity cookies are not changed when an update is made on AFD.
We will now proceed to close this issue out. Please tag me in your response if you have any additional questions. Thank you!

@ChaitanyaNaykodi-MSFT So I think you are saying this is a bug?
do we have any idea when this might be completed or will it be announced anywhere?
Is the fix going to apply to classic/standard/premium?


[WFCORE-5483] Provide a LoginModule compatible security realm.

Replacement PR for https://github.com/wildfly/wildfly-core/pull/4867

Core - Full Integration Build 11223 outcome was FAILURE using a merge of f258efc10f07400407dc67fc56dff8513a3f748a
Summary: Compilation error: Compiler (new) Build time: 00:01:22

Core - Full Integration Build 11111 outcome was FAILURE using a merge of f258efc10f07400407dc67fc56dff8513a3f748a
Summary: Compilation error: Compiler (new) Build time: 00:02:27


Do not use lazy mapValues in TrieNode

This seems to make creation of the TrieNode much faster. It might fix #33
https://issues.scala-lang.org/browse/SI-4776
The TrieNode tree seems to be pretty fast once it is created. I compared it with my RadixTree https://github.com/rklaehn/radixtree , which is more optimised for compact storage of very large string sets, and it is doing quite well.
But creation of a TrieNode containing e.g. all words from http://www-01.sil.org/linguistics/wordlists/english/wordlist/wordsEn.txt would not even terminate.

Here is a benchmark with two versions of TrieNode with the only difference being use of mapValues vs map { case (k, v) => ... }. You will need https://github.com/Ichoran/thyme to run it.
I am not exactly sure what is going on, since the mapValues should only affect the operations immediately afterwards, so it should be just a constant factor slowdown. But apparently this is not the case.
By the way: the TrieNode code is pretty neat!
The issue seems to be most severe with long strings.
Results:
Benchmark comparison (in 5.798 s): Create TrieNode Lazy vs. Eager 5
Significantly different (p ~= 0)
  Time ratio:    0.04878   95% CI 0.04786 - 0.04970   (n=20)
    First     409.1 us   95% CI 404.3 us - 413.8 us
    Second    19.95 us   95% CI 19.66 us - 20.25 us
Benchmark comparison (in 4.629 s): Create TrieNode Lazy vs. Eager 10
Significantly different (p ~= 0)
  Time ratio:    0.04145   95% CI 0.04100 - 0.04191   (n=20)
    First     1.017 ms   95% CI 1.008 ms - 1.026 ms
    Second    42.16 us   95% CI 41.88 us - 42.43 us
Benchmark comparison (in 254.9 s): Create TrieNode Lazy vs. Eager 30
Significantly different (p ~= 0)
  Time ratio:    0.00006   95% CI 0.00006 - 0.00006   (n=20)
    First     2.074 s   95% CI 2.073 s - 2.075 s
    Second    124.1 us   95% CI 116.6 us - 131.5 us

Code:
import ichi.bench.Thyme

import scala.annotation.tailrec

object TrieNodeBench extends App {

  val th = Thyme.warmed(verbose = println, warmth = Thyme.HowWarm.BenchOff)

  def createLazy(ns: Array[String]): AnyRef = new Lazy.TrieNode(ns)

  def createEager(ns: Array[String]): AnyRef = new Eager.TrieNode(ns)

  val names = (0 until 10000).map(NumberToWord.apply).toArray

  for(i <- Seq(5, 10, 30)) {
    val ns = names.take(i)
    th.pbenchOffWarm(s"Create TrieNode Lazy vs. Eager $i")(th.Warm(createLazy(ns)))(th.Warm(createEager(ns)))
  }
}

object Lazy {

  /**
    * An trie node for quickly matching multiple strings which
    * share the same prefix, one char at a time.
    */
  final class TrieNode(strings: Seq[String]) {

    val (min, max, arr) = {
      val children = strings.filter(!_.isEmpty)
        .groupBy(_ (0))
        .mapValues(ss => new TrieNode(ss.map(_.tail)))
      if (children.size == 0) (0.toChar, 0.toChar, new Array[TrieNode](0))
      else {
        val min = children.keysIterator.min
        val max = children.keysIterator.max
        val arr = new Array[TrieNode](max - min + 1)
        for ((k, v) <- children) arr(k - min) = v
        (min, max, arr)
      }
    }
    val word: Boolean = strings.exists(_.isEmpty) || arr.isEmpty

    def apply(c: Char): TrieNode = {
      if (c > max || c < min) null
      else arr(c - min)
    }

    /**
      * Returns the length of the matching string, or -1 if not found
      */
    def query(input: String, index: Int): Int = {
      @tailrec def rec(offset: Int, currentNode: TrieNode, currentRes: Int): Int = {
        if (index + offset >= input.length) currentRes
        else {
          val char = input(index + offset)
          val next = currentNode(char)
          if (next == null) currentRes
          else rec(
            offset + 1,
            next,
            if (next.word) offset
            else currentRes
          )
        }
      }
      rec(0, this, -1)
    }
  }
}

object Eager {

  /**
    * An trie node for quickly matching multiple strings which
    * share the same prefix, one char at a time.
    */
  final class TrieNode(strings: Seq[String]) {

    val (min, max, arr) = {
      val children = strings.filter(!_.isEmpty)
        .groupBy(_ (0))
        .map { case (k, ss) => k -> new TrieNode(ss.map(_.tail)) }
      if (children.size == 0) (0.toChar, 0.toChar, new Array[TrieNode](0))
      else {
        val min = children.keysIterator.min
        val max = children.keysIterator.max
        val arr = new Array[TrieNode](max - min + 1)
        for ((k, v) <- children) arr(k - min) = v
        (min, max, arr)
      }
    }
    val word: Boolean = strings.exists(_.isEmpty) || arr.isEmpty

    def apply(c: Char): TrieNode = {
      if (c > max || c < min) null
      else arr(c - min)
    }

    /**
      * Returns the length of the matching string, or -1 if not found
      */
    def query(input: String, index: Int): Int = {
      @tailrec def rec(offset: Int, currentNode: TrieNode, currentRes: Int): Int = {
        if (index + offset >= input.length) currentRes
        else {
          val char = input(index + offset)
          val next = currentNode(char)
          if (next == null) currentRes
          else rec(
            offset + 1,
            next,
            if (next.word) offset
            else currentRes
          )
        }
      }
      rec(0, this, -1)
    }
  }

}

/**
  * Helper object to generate realistic test cases for the radix tree. Used with permission from www.source-code.biz
  */
object NumberToWord {

  def apply(n: Int): String = convertNumberToWords(n)

  // This snippet may be used freely, as long as the authorship note remains in the source code.
  private val lowNames = Array("zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen")
  private val tensNames = Array("twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety")
  private val bigNames = Array("thousand", "million", "billion")

  /**
    * Converts an integer number into words (american english).
    * @author Christian d'Heureuse, Inventec Informatik AG, Switzerland, www.source-code.biz
    */
  private def convertNumberToWords(n0: Int): String = {
    var n = n0
    if (n < 0) "minus " + convertNumberToWords(-n)
    else if (n <= 999) convert999(n)
    else {
      var s: String = null
      var t = 0
      while (n > 0) {
        if (n % 1000 != 0) {
          var s2 = convert999(n % 1000)
          if (t > 0) {
            s2 = s2 + " " + bigNames(t - 1)
          }
          if (s == null) {
            s = s2
          } else {
            s = s2 + ", " + s
          }
        }
        n /= 1000
        t += 1
      }
      s
    }
  }

  private def convert999(n: Int): String = {
    val s1 = lowNames(n / 100) + " hundred"
    val s2 = convert99(n % 100)
    if (n <= 99) s2
    else if (n % 100 == 0) s1
    else s1 + " " + s2
  }

  private def convert99(n: Int): String = {
    if (n < 20) lowNames(n)
    else {
      val s = tensNames(n / 10 - 2)
      if (n % 10 == 0) s
      else s + "-" + lowNames(n % 10)
    }
  }
}

Here is the likely problem
       // DEFINES CHILDREN RECURSIVELY, DOES NOT EVALUATE
       val children = strings.filter(!_.isEmpty)
                             .groupBy(_(0))
                            .mapValues(ss => new TrieNode(ss.map(_.tail)))
       if (children.size == 0) (0.toChar, 0.toChar, new Array[TrieNode](0))
       else {
         val min = children.keysIterator.min // EVALUATES CHILDREN ONCE
         val max = children.keysIterator.max // EVALUATES CHILDREN SECOND TIME
         val arr = new Array[TrieNode](max - min + 1)
         for ((k, v) <- children) arr(k - min) = v  // EVALUATES CHILDREN THIRD TIME
         (min, max, arr)
       }

We'd expect O(3^lengthOfTrie) behavior from this, and that appears to match up with what we're seeing in the benchmarks.
Until we put together a faster trie (DAT or whatever) to use, I think this will be sufficient for now and should make things sufficiently faster to close the original issue.
My only request for this diff: can we have a regression test for this for unreasonably-large non-toy input data? I'm thinking thousands to hundreds of thousands of strings thousands to hundreds of thousands of characters long. Such an input might take a moment to initialize or query, but the fact that it completes should be sufficient to verify that this behavior doesn't occur. It should probably live in https://github.com/lihaoyi/fastparse/blob/2023b5ead1f876397855b86b1784cb1b8e57d177/fastparse/shared/src/test/scala/fastparse/MiscTests.scala#L7

Also, the pythonparse integration test seems to be complaining about a new file in the django project it can't parse and is not skipped
https://travis-ci.org/lihaoyi/fastparse/jobs/97345190#L3097
Could you add it to the whitelist, just as a housekeeping matter to keep the build up to date?

I don't think there is anything wrong with the tree once constructed. The performance should be pretty close to optimal. Just the memory usage can be very high, especially if somebody is using unicode characters. See example below.
If I understand it correctly, the DAT mostly buys you a more compact representation while still using O(1) array lookups. I think in this case the less-than-optimal space usage is perfectly fine, since people will just use it for a small number of identifiers, not all words of the English language.
Example for large space usage:
val infinity = StringIn("Infinity", "∞")

That would allocate a pretty large child array (from 'i'.toInt 73 to '∞'.toInt 8734). Still shouldn't be a problem for this use case.
I will add a test case that runs for longer than the travis timeout with the unfixed implementation.
I am not sure what you want me to do regarding the whitelist. The patch does not add any new files, so what exactly is the problem?

w.r.t. the whitelist, the integration test suite isn't hermitic and just pulls in master from a bunch of other repos. One of those repos has changed since the last diff was submitted, and we need to do basic housekeeping to keep that those tests running. That's why the build is red, let's make it green before landing =)

OK, I have added a single performance test that creates a TrieNode from 1000 strings. It runs almost instantaneously with the eager version, and will probably not terminate before the end of the universe with the lazy version. That should do to prevent regressions. Let me know if you need more.

Cool looks good, thanks a lot!


[Suggestion] Sidedness and a way to "flush the tanks" in Salination plant

I think some useful adjustments to the salination plant would be to have two different values, one for input and one for output, or a configurable valve such as Big Reactors has.
It would also be nice to have a "flush tank" button for those times when you want to repurpose the plant or correct an error. Breaking the controller breaks the fourth wall in addition to resetting the temperature.
As an aside, would you please add flush/dump buttons to the machines like the PRC? I made some oopsies setting things up last night and had the wrong fluid/gas in the wrong places. Having to move it all out into tanks with a gauge was painful.

What would you think about flushing a gas/fluid tank by holding shift while clicking it with a gauge dropper?  I just don't like having dump buttons clutter an interface.

I can't speak for Xeno, but I like the idea of having the dropper able to void a tank in one shift-click.  As it is now, the gauge dropper is a little clunky when trying to empty something.

Done! :)

Sorry for the late reply, been at work :)
A good GUI finds a balance between aesthetics, functionality and consistency. A combination of these things results in what users consider "intuitive". As much as you might feel that dump buttons clutter a GUI, I think they provide simple and easily-understood functionality and since you use these buttons in other machines, they provide consistency across your mod. Shift-click functionality on the dropper is hidden functionality therefore not "intuitive". As such I think the buttons should be implemented on all machines and tanks.
If I might make some general suggestions on your UI, the lack of contrast and symbols may raise some issues for users with visual impairment and general usability. Also, thanks to the ubiquity of mods like TE, people have been conditioned to work with right-loaded UIs. I'd also upsize the in/out controls a bit.
I'm no artist, but here's a mockup of what I feel would be a positive change to your UI when applied consistently across all machines. http://i.imgur.com/ToyOeXM.jpg http://i.imgur.com/jXTvpdE.jpg
Cheers, Xeno


One CMakeLists.txt for all samples

This makes it easier for users, they now only have to configure one
CMake project to build all samples. They can also open just one
directory to open all samples in their IDE.
Using one CMakeLists.txt also gets rid of a lot of code duplication.
Many of the samples depend on third party libraries, in particular Eigen
3, OpenCV or PCL. The user might not be interested in installing all of
these dependencies to get some samples to work, so we included options
USE_EIGEN3 etc. to allow turning samples with certain dependencies on or
off. The user can then choose between providing a third party library,
or turning off samples depending on that library.
An alternative approach was discussed, where all samples with third
party dependencies were turned off by default, and the user would have
to explicitly turn them on. We decided against this, since we are afraid
they'll then simply never notice these samples at all.
This approach with one CMakeLists.txt also solves the potential future
problem of how to handle samples which have more than one dependency. In
this case the previous approach with one directory per dependency would
fall apart.
Finally, we also introduce an option to turn off all samples which
depend on Zivid::Vis3D, as this is currently hard to get to build on
Linux. We'll hopefully solve that problem soon, but in the mean time
it's convenient to be able to skip those samples.

Oh no, seems like I published my review after this was merged. I would still appreciate if the comments was answered or addressed. Sorry for the inconvenience @SatjaSivcev and @knatten.


Done and Tested @Musa-Sina-Ertugrul Week03

Describe your changes
Checklist

[x] I have read the [CONTRIBUTING]
[x] I have performed a self-review of my own code
[x] I have run the code locally and it works as expected
[x] I have commented my code, particularly in hard-to-understand areas

Screenshots (if appropriate)

PS C:\Users\msert\projects\ParallelProgramming> pytest Week03\test_decorators.py
============================================================================================== test session starts ==============================================================================================
platform win32 -- Python 3.11.4, pytest-7.4.0, pluggy-1.3.0
rootdir: C:\Users\msert\projects\ParallelProgramming
plugins: anyio-3.5.0
collected 3 items

Week03\test_decorators.py ...                                                                                [100%]

============================================================================================== 3 passed in 26.00s ===============================================================================================

PS C:\Users\msert\projects\ParallelProgramming> pytest Week03\hw\test_functions.py
============================================================================================== test session starts ==============================================================================================
platform win32 -- Python 3.11.4, pytest-7.4.0, pluggy-1.3.0
rootdir: C:\Users\msert\projects\ParallelProgramming
plugins: anyio-3.5.0
collected 5 items

Week03\hw\test_functions.py .....                                                                                [100%]

=============================================================================================== 5 passed in 0.04s ===============================================================================================


Cleanup task not keeping releases correctly

Q
A

Issue Type
Bug

Deployer Version
master

Local Machine OS
N/A

Remote Machine OS
N/A

Description
Example of the bug can be seen on https://3v4l.org/cXYMq
When you only want to keep 1 release it deletes it, whilst keeping more releases it seems to keep 1 less than required

As mentioned in the PR #1176 my use case separates code deployment and release symlink into two separate commands because our release could be a DB upgrade release or may just be an atomic release, so a deploy may look something like below
vendor/bin/dep deploy production
vendor/bin/dep release:upgrade production

With this in mind the second command includes the new release in the release list while common deploys with one command will use the cache from a get('release_list') call from earlier in the task list.
In my opinion this caching is causing unexpected behaviour ... what do you think ?

I agree. I think we need to update releases list cache after new release and use your pr.

What are your thoughts on defining if it's cachable on the set method .. so it's signature would change to set(name, value, cacheable = true)
This way there are things that never change during deployment that can be cached, e.g. binary locations etc while other closures can be set to run each time they are called by setting cacheable to false

No, i think it will make stuff more complicated. I just was thinking about adding this to deployer:release:
add('releases_list', $new_release);

Ahh yeah that makes sense, I'm still learning the codebase so was unaware of that function 😄 , I'll update and reopen that PR with this change later today 👍

Fixed.


flask run rejects --key foo.pem --cert foo.cert

When trying the development server, I find that flask run --cert foo.cert --key foo.pem works fine, but flask run --key foo.pem --cert foo.cert fails with:
Error: Invalid value for '--key': "--cert" must also be specified.

Isn't this somewhat counterintuitive?
In flask/cli.py, _validate_key() function insists the certificate file should have been specified, and it feels too restrictive. But I'm not familiar with Click to contribute a pretty PR...
Environment:

Python version: 3.9.10
Flask version: 2.0.3

I am humbled to share my findings using click. Apparently, the order of arguments being passed to the cli seems to matter in click(not sure whether or not it is intentional).  I've found that the context manager only keeps track of the first option being passed. Take the following as an example:
import click

options = set()

def orders_params(ctx, param, value):
    global options
    print(ctx.params.items())
    options.add((param, value))

@click.command()
@click.option("--foo", required=True, multiple=True, callback=orders_params)
@click.option("--bar", required=True, multiple=True, callback=orders_params)
def run_command(*, foo, bar):
    print("Parameters order:")
    for param, val in options:
        print("   " + param.name + str(val))

if __name__ == "__main__":
    run_command()

After running the above script, it generates different results depending on the ordering:
(.venv) ➜  ✗ python3 cli.py --foo foo --bar bar
dict_items([])
dict_items([('foo', None)])
Parameters order:
   bar('bar',)
   foo('foo',)

(.venv) ➜  ✗ python3 cli.py --bar bar --foo foo
dict_items([])
dict_items([('bar', None)])
Parameters order:
   foo('foo',)
   bar('bar',)

As you may notice, the output generated from the first command, the ctx object holds only the first option  foo after two callbacks being triggered. Similarly, the ctx object in the command contains only the first option bar.
With that noted, running flask run --cert foo.cert --key foo.pem and flask run --key foo.pem --cert foo.cert would result in different behavious.
Running the latter would result in cert being None:
https://github.com/pallets/flask/blob/4843590c4a7f2225fd18bd10963139a6f29a2a59/src/flask/cli.py#L723
And it will trigger the following case:
https://github.com/pallets/flask/blob/4843590c4a7f2225fd18bd10963139a6f29a2a59/src/flask/cli.py#L738-L739
IMHO, adding support for this edge case would require overriding the parse_args method of the click.Command and passing it in the decorator.
@click.command(..., cls=OrderParams)
                                   ^___ this argument

and OrderParams is some kind of class that inherits from click.Command to override the parse_args method.
class OrderParams(click.Command)
  parse_args(self, ctx: click.core.Context, args: List[str]) -> List[str]:
    # custom logic goes here

Hopefully, the above info can help resolve the issue.

Well, it's worth making the _validate_cert function. And for --cert option set callback=_validate_cert. Just a humble guess

No, implementing custom Command.parse_args is not the way to solve this.

@davidism, how do you like my thoughts?
Now I thought that this is not very good, because. the code is almost identical to _validate_key...
I also wanted to add that I didn't mean to change the option type, I just want to add a new callback without changing the option type

Marking the --cert option as being is_eager=True so that it is evaluated before the --key option would leave the existing logic unchanged.
Proposed PR submitted.


Actors in coswift

Is your feature request related to a problem? Please describe.
It's currently not possible to implement coroutine actors using the coswift library in Swift code.
Describe the solution you'd like
It would be helpful for co_actor() and related functions and classes in coobjc to be implemented in coswift for usage in Swift code.
Describe alternatives you've considered
I've tried using the functions from the coobjc Objective-C API and there are a number of issues with getting it to work nicely in Swift. For example, COActorChan can't be iterated in a for-loop. And COActorCompletable is a COPromiserather than the coswift equivalent Promise. Also, importing the <coobjc/coobjc.h> API in the Swift bridging header introduces ambiguous function definitions such as co_delay().

coobjc is not design for swift.
We will consider it: implement COActor in coswift

Swift 5.5 will support async/await,  https://forums.swift.org/t/swift-5-5-release-process/45644, coswift will be deprecated.


fix send, fix lost data before connect open, add example.

Some change may be not proper to PR, it need change or cherry-pick.
important change is send returning from cold Observable to third mode
1(Direct) send and return true or false (false when socket is not open)
2(Promise) send and return promise
3(Observable) send and return cold Observable
the default mode is 3(Observable).
and that, import bluebird to support Promise.

@Lyoko-Jeremie The only thing I would fix is that you reference your own fork in the package.json, not this one.
Slightly related: It just hit me, but shouldn't the dependencies on angular be peer dependencies? It's a waste of bandwidth to download those libs again when the client application likely already has them.

Thank you. Could you please update Readme?

@afrad What's missing from the readme? He updated it with the new send modes.

Sorry oversaw it. Great, thank you.

Oh, Thanks for yours work.
and i find some error in the example
ws.send("this will be send and return Observer.").subscribe(

may be change to
ws.send("this will be send and return Observer.", WebSocketSendMode.Observable).subscribe(

and i think that
when use flatmap in observer mode
return next may good than return complete
so, maybe add 4th mode to return old observer ?
@afrad
^_^

Looks interesting. Could you please create a PR?

@afrad can you please push up the current version to NPM in the meantime? Thanks in advance!

done


Automated cherry pick of #4750: fix: cloudevent 成功条件补充

Cherry pick of #4750 on release/2.14.
#4750: fix: cloudevent 成功条件补充

Codecov Report

:exclamation: No coverage uploaded for pull request base (release/2.14@ed4020b). Click here to learn what that means.
The diff coverage is n/a.

@@              Coverage Diff               @@
##             release/2.14   #4752   +/-   ##
==============================================
  Coverage                ?   6.87%
==============================================
  Files                   ?     523
  Lines                   ?   89082
  Branches                ?       0
==============================================
  Hits                    ?    6121
  Misses                  ?   82453
  Partials                ?     508

Flag
Coverage Δ

#aFlag
6.87% <ø> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ed4020b...1ebeea4. Read the comment docs.

/lgtm

/approve