customize json tag

Sorry, I found that the tags option cannot generate custom json tags, so I wrote a json_tag tag myself, and later changed the package name because I think this PR will not be merged for the time being and I want to use it for my own project

I see. I'd accept a pull request that allows the tags directive to override the json tag.

I reset the branch and forced to push it, I don’t know if this is a valid PR

I think I understand what you mean

now,the tags directive to override the json tag.But I reset the branch and forced push it, I don’t know if this is a valid PR

I think the tags order is not very important

Hi @liov! Thanks for the updates in the last commit.
Would it make sense to import and use this package instead of reimplementing it here? https://pkg.go.dev/github.com/fatih/structtag

Well, shoot.
https://twitter.com/go100and1/status/1333773730519031808?s=21

Superceded by #31. Thanks @liov!


MIAJS-1748 feature/matb: Add 'Level' word translation

I created a property with default value of 'Level'.
When we bind to it inside kiosk we will pipe it through translation for languages that we support with translations.

Suggestions applied.

Remember to apply a "minor" label to this pull request. That will make sure it is released to NPM as a semantically minor version (it is an addition after all).


Always use multipart upload

Closes #280
Previously we would conditionally use multipart based on project type, but since all project types can have bindings, and since multipart works with or without bindings, this PR standardizes toward doing just that.
There is one ugly thing here that I would like advice on handling better. Commented inline.

Approving since combining those two functions isn't in scope for this PR

my only outstanding hesitation for pushing that big green button is this:
because the API uses the format of the PUT request (is it multipart?) to decide whether to clear bindings, in the existing code there is a potential edge case wherein a user could have a js type project where you configure bindings in the UI and update their JavaScript from Wrangler without overwriting their bindings. Thus, this is a potential breaking change for users who have figured this out.

@ashleymichal could we use the "inherit" binding type to preserve already-uploaded bindings via the UI?

oh whoops! my comment was too late. Something to think about for a future PR though?

@gabbifish inheritance still requires that you specify the name of the bindings to inherit so I don't think that solves this

@EverlastingBugstopper ugh schucks that is true. Perhaps we could GET the preexisting worker binding from the CF API, get the names of the bindings to inherit, and then set all those bindings to type inherit, but that is potentially messy logic.

@gabbifish i have a thing for this... https://wiki.cfops.it/display/EW/Protect+Overwrite (coming soon as an RFC here!)


MultiCloudTest does not account for different bucket key and blob name

Describe the bug
The MultiCloudTest creates a blob with name from constant TESTFILE_NAME and the S3 data destination uses the same TESTFILE_NAME as bucket keyname. This is not the actual usage behaviour since a consumer shouldn't know what is the name of the blob in the DataAddress, and the key name it will use in the AmazonS3 data destination will differ.
Also, if the blobname in the DataAddress contains a prefix (i.e. _folder/_objectname), the transfer will not be successed as described in this upstream issue: https://github.com/eclipse-edc/Technology-Aws/issues/238

Since support for multi object transfer was included in Technology-Aws, the S3 bucket keyname defined in the data destination is not considered anymore for renaming the transfered file. Hence, the name of the object transfered to S3 is dynamically resolved using the keyName property of the S3Part.
Renaming the file transered to the consumer to the keyName property in the transfer data destination is not an expected behaviour as of now, rendering this issue obsolete.


Always set array bug

The issue was different behaviour when the destination object is first created. This should make things consistent.
Fixes #104

Thank you @midknight41 :)

@apricote Published as v3.7.5. Thanks for reporting the bug!


Doom not installing on windows.

What did you expect to happen?
I expected Doom to install normally, in accordance with this guide.
What actually happened?
Doom did not install properly, and something got messed up.
Additional details:

I have done nothing except attempt to install Doom.
This is what happened when I invoked Emacs from the command line.
When I got to the point of running ./doom install, it returned Can't find emacs in your PATH.
If you remember, the command emacs does work bc I added it to PATH.

Steps to reproduce:

Follow Earvingad's guide up to ./doom install
Run said command
Witness how it doesn't work.

System information:

 I have no idea how to do this if doom is not installed.

Hi @SirAxolot,
It seems that you don't have emacs in your PATH variable.
I assume that you tried to run doom install from Git bash. What happens when you run which emacs from Git bash?

This is being closed because it hasn't received a response. Feel free to follow up and I'll reopen it.
Side note: Can't find emacs in your PATH means that emacs cannot be found in your PATH. Set the EMACS environment variable to specify the full path of the executable.

This is being closed because it hasn't received a response. Feel free to follow up and I'll reopen it.
Side note: Can't find emacs in your PATH means that emacs cannot be found in your PATH. Set the EMACS environment variable to specify the full path of the executable.


URL of 5km & 10km fuel station is NULL/Unknown

There seems to be an issue in the way URL's are generated for fuelstations. See screenshots. Maybe only an NL issue?
When I go to Developer Tools>States and compare the attributes for

sensor.carbu_com_super95_3731_ge_10km
sensor.carbu_com_super95_3731_ge_5km
sensor.carbu_com_super95_3731_ge_price

Only the sensor ending with _price has a valid URL for the fuelstation. The other ones have null as URL.
In this situation the cheapest station for all the 3 sensors are one and the same. So all three should have the same URL

just forgot to set the url apparently, thanks for reporting, fixed in 7.1.2


"Custom content" toasts

Describe the feature in detail (code, mocks, or screenshots encouraged)
Toasts are cool, but I personally like having loading indicators in toasts.
The current system does not allow something like these.

What type of pull request would this be?
Enhancement
Provide relevant links or additional information.
Probably something similar to how Modals work.
Chakra also has these component toasts.

This was discussed here lately: https://github.com/skeletonlabs/skeleton/issues/1311#issuecomment-1587863963
I still think this is a good idea for the future of toasts, but also agree with Chris on holding this for the moment.


Stream getObject responses

would be nice to send back a ReadableStream<Uint8Array> as opposed to the current Uint8Array

Closed by #24. Released in 0.4.0

Closed by #24. Released in 0.4.0


Add pyup.io instructions

Implements #207
I've crated a new Step 7 and moved Step 7 to Step 8. Is this what you had in mind @audreyr?

Looks good! pyup.io is awesome! 😸

Thanks @pydanny 👍


Passing safe references to empty enums

On IRC, @mystor asked me whether it would be illegal to pass around &SafeType or &mut SafeType given this definition:
enum Impossible {}

#[repr(C)]
pub struct SafeType {
    _prohibit_constructor: Impossible
}

In particular, is it ok to have an empty enum "by-value" in a struct in this fashion?

I think it should definitely be possible to include such an enum in a struct, especially considering the fact that Impossible may come from a generic parameter. This of course means that in practice there is no way to create an instance of SafeType.
&SafeType and &mut SafeType are therefore roughly equivalent to &Impossible and &mut Impossible. I'm still not sure whether we should allow these and only trigger UB when they are dereferenced (or lvalue to rvalue conversion), or whether a reference alone should be UB.

Personally, I'd argue that we should follow Weeping Angels rules here :P

The image of an empty type is an empty type

In particular, a reference's lifetime contract is that it can only exist for a lifetime strictly included in the referent's lifetime. As one cannot construct an instance of an empty type, no value of such a type can have a non-empty lifetime. Constructing a reference with an invalid lifetime is (I think?) UB. QED.
I personally feel that generic parameters are a red herring here: In the absence of unsafe {}, one can only obtain a reference from either an existing value, or an existing reference. As a result, all possible ways to obtain such a reference without unsafe {} is dead code, in the generic case.
Creating such a reference with unsafe {}, meanwhile, is violently error-prone:

If the user tries to unsafely allocate memory, transmute it, and return a reference, this is already UB.
Point (1) is also UB for non-empty types, unless filled with some value (likely via ptr::write()), and as one cannot obtain such a value for the empty type, any code that is safe against (1) for non-empty types is dead code for empty types.

This is equivalent creating references to invalid enum variants.

@eternaleye

If the user tries to unsafely allocate memory, transmute it, and return a reference, this is already UB.

Can you say more about why you feel this should be UB? I am not persuaded. =) I agree that dereferencing of trying to load from such a pointer (at least without transmuting it back...) seems problematic, but I'm not sure that creating a pointer is bad.
That said, if the original intention of this pattern is to make something that can't be created, it seems like privacy could do that more easily and somewhat less problematically. =)

@nikomatsakis
As the person who asked the question, I can clarify the original goal of this question.
I want to have an object Foo which has a representation in C++, which is opaque to the Rust code. Consumers of my library would be defining extern "C" methods which would accept and return pointers to this type. The in-rust version of this type was to have a series of methods and traits implemented on it, which would invoke the C++ FFI among other things. I wanted this object to feel as natural to use as other rust types, which meant that in safe code, it could be passed around as &Foo or &mut Foo, where Foo is the type.
The type enum Foo {} is, of course, unsafe to use in this context. By exposing it directly to safe code, the safe code can invoke undefined behavior by attempting to match against it. In addition, any non-zero-sized-type could not be used for Foo, as mem::swap()-ing any number of bytes between two &mut Foo objects would cause the object to be in an invalid state (the object is not safe to move, and has a variable size).
I originally tried to implement this by creating a wrapper type around a private member:
#[repr(C)]
pub struct Foo {
    _prevent_construction: (),
}

However, when consumers would put this type in extern "C" functions like so:
extern "C" {
    fn pass_a_foo(foo: *const Foo);
}

the improper_ctypes warning would fire. I needed a zero sized type which would not fire that warning when passed behind a raw pointer. The only type which I know of which acts this way is the empty enum. I was hoping that I could use:
enum Impossible {}
#[repr(C)]
pub struct Foo {
    _prevent_construction: Impossible,
}

and simply make sure that within the module where this type was defined (which is littered with unsafe code anyways), references to Foo were never dereferenced. That way I both have a zero-sized type (which means that the user hopefully can't break things with a mem::swap), and the nice ergonomics of not having a warning whenever the type is passed behind a raw pointer in an extern "C" block.

That sounds like an issue with the improper_ctypes lint.

I agree that this would be best accomplished by changing the improper_ctypes lint, I was just trying to explain the motivation.
I still am curious as to whether or not it's safe, whether or not it is the best solution to the problem at hand.

@nikomatsakis: I was referring to transmuting the value, not the pointer to the value, and so it runs afoul of "actually constructing an instance of an empty type". Converting the pointer falls under (2), not (1).
@mystor: Out of curiousity, why use *{const,mut} Foo rather than defining struct Foo { cpp_type: *{const,mut} Impossible and then using plain Foo? By hiding the raw pointer behind a privacy boundary, that should resolve your concerns, no?

Is it possible to invoke Undefined Behavior in this program without modifying the module foo, and while only using safe code? (I think that this is the root of the question which I'm asking here) https://is.gd/P7dQBf

Yes, it allows you to trigger UB from safe code, but this is fine since you need unsafe code to create such a reference in the first place. It is your responsibility to ensure that you do not leak this reference to safe code outside your module.
With that said, I think simply manipulating the reference without dereferencing it (inside your unsafe module) should not be UB.

But can you trigger Undefined Behavior from the outside module? The outside module cannot see the empty enum due to privacy, and thus cannot match on it. I'm handing the reference to safe code, but the safe code can't do anything with the reference, so I think it might be okay.

Hmm I think that would allow UB since you can do let x = *foo::get_bar();. IMO creating an instance of an empty enum type should be instant UB. This matches the semantics of the ! type: as soon as such a value is returned from a function, the code effectively becomes "unreachable".

I don't think that's possible. Bar is not Copy or Clone, so it can't be copied out.

I agree with @eternaleye's original comment. References (&T, &mut T) can only be created by referring to a live value of type T. If you have a live value of type !, it is UB by definition. Therefore creating an &! or &mut ! is also UB. Put another way, if a live value of type &T or &mut T exists, then a live value of type T exists which it refers to, a live value of type ! is UB, so a live value of type &! or &mut ! is also UB.  I don't see why it has to be any more subtle or complicated than that.
(Requiring (or hypothesizing) a value of such a type, that is fn foo(x: &mut !) is not UB, it is just dead code, just like in the fn bar(x: !) case.)

https://doc.rust-lang.org/src/core/up/src/libcore/fmt/mod.rs.html#185

According to many of the arguments here, the answer is yes. It is currently not optimized as UB afaik, so it should be OK for now.

@mystor I would agree. Just pointing out that it's used in real code.

That use seems like another use case for my opaque struct idea (https://internals.rust-lang.org/t/pre-rfc-opaque-structs/4005). It could also just use raw pointers and a PhantomData however.

cc #36976.

cc rust-lang/rust#36976 - the plain old "reference to undef" case is also interesting.

Revisiting my comment from earlier....

References (&T, &mut T) can only be created by referring to a live value of type T. If you have a live value of type !, it is UB by definition. Therefore creating an &! or &mut ! must also be UB. Put another way, if a live value of type &T or &mut T exists, then a live value of type T exists which it refers to, and a live value of type ! is UB, so a live value of type &! or &mut ! is also UB.  I don't see why it has to be any more subtle or complicated than that.

I'm struck anew by what treacherous ground this question of "should it be legal, or should it be undefined behavior" really is. When other people express the sentiment that some particular unsafe hack is "obviously wrong" and shouldn't be allowed, I'm usually quick to observe that preventing people from doing it is not a realistic possibility -- that the only decision we have the power to make is whether to introduce potential security vulnerabilities into peoples' code when (not if) they do it. In other words, that in these questions we should be attuned to practical consequences at least as much as theoretical elegance. And here I am, expressing the sentiment that having a reference to an uninhabited type is obviously wrong and shouldn't be allowed.
For what it's worth, I think my feelings on the subject attach more strongly to uninhabited types than to reference types. A live value of an uninhabited type is the very definition of undefined behavior (like GCC's __builtin_unreachable), what sound type systems everywhere exist to preclude, and the clarity of this really should not be muddied. If this isn't undefined behavior, then nothing is.
On the other hand, if we say that in the presence of unsafe code, reference types should not always be taken at their word, a principle that just happens to apply uniformly to references to uninhabited types as well as to every other type, that seems like a separate matter. In a tootsie pop model, it seems appropriate that in "safe code", &! and &mut ! really would be tantamount to !, as per the logical interpretation of reference types, while in "unsafe code", they would perhaps not be taken so seriously.

Merging https://github.com/rust-lang/rust/pull/36449 has kind of answered the question raised here, didn't it? Everything is_uninhabited considers uninhabited certainly cannot be safely passed around.

@RalfJung
No. We don't use is_uninhabited for anything except match exhaustiveness checking, and even that is a hack.

This is now basically being discussed at https://github.com/rust-lang/unsafe-code-guidelines/issues/77: does a reference always have to have a pointee that is valid for its type, or does it "just" have to be aligned and dereferencable?


Adding a Python version and the option to orient the target (if needed)

@lorensen Adding a transform into the pipeline for the target was the best approach I could think of, try it with greatWhite.stl as the target. You just need to uncomment the rotations in this case.


readme

Simplified first Answer to What problesm does Pixeltable solve? And moved remaining sentences to FAQ below
Update Header
Added Getting Started Notebook, Removed API Reference Column, Added Label Studio Link + New Button
Added Code Samples with link to relevant notebooks where snippets is extracted from
Remove Example of Use Cases section

This change is

I incorporated the latest comments. Thanks for the review. Looks great.


Ensure capacity freed by clear is made available to GKOP borrowers. J…

…IRA: POOL-391

Coverage increased (+0.006%) to 85.059% when pulling 8951c17bcc00fe3c0d2203516baa31ff2210b1fb on psteitz:master into 1c57be31e8dae6cd504ee7932d62f332eef69ec1 on apache:master.


[WIP] Feature/update kscrash 1.11.1

Current coverage is 73.28% (diff: 100%)

Merging #82 into develop will not change coverage

@@            develop        #82   diff @@
==========================================
  Files            23         23
  Lines          1606       1606
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
  Hits           1177       1177
  Misses          429        429
  Partials          0          0

Powered by Codecov. Last update 0db6a87...ed9b6de


Start several capsule processes from a config file

At the start of the primary process
Using the FaaS mode (using the API?)
Detect the changes in the file? (or just at start)

or it could be done by capsctl, but the interest is low IMHO


Upgrade package skopeo to 0.14.2, to take Docker Daemon fix

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

[x ] The toolchain has been rebuilt successfully (or no changes were made to it)
[x ] The toolchain/worker package manifests are up-to-date
[ ] Any updated packages successfully build (or no packages were changed)
[x ] Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
[ ] Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
[ ] All package sources are available
[x ] cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
[x ] LICENSE-MAP files are up-to-date (./SPECS/LICENSES-AND-NOTICES/data/licenses.json, ./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md, ./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON)
[x ] All source files have up-to-date hashes in the *.signatures.json files
[x ] sudo make go-tidy-all and sudo make go-test-coverage pass
[x ] Documentation has been updated to match any changes to the build system
[ ] Ready to merge

Summary
See https://github.com/containers/skopeo/compare/v1.14.1...v1.14.2 for the details of the update.
0.14.2 fixes version compatibility issues with docker 25.0.0 onwards.
Change Log

Update skopeo to 0.14.2 resolving Docker Daemon issue
Change
Change

Does this affect the toolchain?
NO
Test Methodology

Pipeline build id: xxxx

Please could I request that the skopeo 0.14.2 tarball be uploaded from https://github.com/containers/skopeo/releases/tag/v1.14.2 to https://cblmarinerstorage.blob.core.windows.net/sources/core/.
Once this is uploaded I should be able to test the build and checks.


Feat:To Add copyright and privacy policies of SwapReads.com

Describe the feature
Hello @anuragverma108
I hope this message finds you well! I'm reaching out regarding an important addition to our project, SwapReads.com. As we continue to develop and refine our platform, it's essential that we prioritize legal compliance and user trust. To that end, I propose the inclusion of comprehensive copyright and privacy policies.
Why is this important?
Legal Compliance: By having clearly defined copyright policies, we ensure that the intellectual property rights of all stakeholders, including content creators and users, are respected and upheld within the bounds of the law.
User Trust: Privacy policies are crucial for fostering trust with our users. They demonstrate our commitment to protecting their personal information and outline how we handle data, enhancing transparency and accountability.
How Can You Contribute?
Review and Feedback: Your expertise and insight would be invaluable in crafting policies that are not only legally sound but also align with the ethos of our platform. Your review and feedback on the drafted policies would greatly enrich the process.
Legal Expertise: If you have a background in law or experience in drafting similar documents, your direct contribution to the creation of these policies would be immensely beneficial.
Next Steps:
Collaborative Drafting: We can establish a collaborative space within our GitHub repository specifically for drafting these policies. This will allow for transparent communication and version control throughout the process.
Community Input: Once initial drafts are prepared, we can open the discussion to the wider community for input and suggestions. This not only ensures inclusivity but also enhances the quality and comprehensiveness of the policies.
Timeline:
I propose that we aim to have the initial drafts ready for review within the next [insert timeframe], with subsequent iterations and finalization to follow based on feedback received.
Your contribution to this endeavor would not only strengthen the legal foundation of SwapReads.com but also reinforce our commitment to ethical and responsible practices in the digital domain.
Looking forward to your thoughts and collaboration on this matter.
Warm regards,
Priya Ghosal
Add ScreenShots

I want to add this copyright and privacy policy in the footer section.
Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC'24 contributor
[X] I want to work on this issue

Assigned @PriyaGhosal
Make sure to star the repo before working on it! Happy open-source contributing!

Any Updates @PriyaGhosal
Please do the work within 1 week , if you didn't responded then I will assign it to some other contributor.

@PriyaGhosal Any update or I will close it by tomorrow EOD

@RitiChandak @anuragverma108 Not able to do this due to upcoming University exam.Will do after 19th June .

@PriyaGhosal For right now we are closing this issue you can raise again if you want.


C# ASP.NET

Problem encountered on https://dotnet.microsoft.com/en-us/learn/aspnet/hello-world-tutorial/create
Operating System: windows
Provide details about the problem you're experiencing. Include your operating system version, exact error message, code sample, and anything else that is relevant.

Closing as there is not enough information provided. Please make sure to include information about the task you were performing and the tools that you had installed.


avg waveform view: display channel numbers

See #8
Create a toggle button for turning on/off channel numbers. Question is... where should the channel labels be placed?

Implemented in version 0.2.27. (No toggle button yet, though)


 (Yoneda implemented in Haskell)
AND to WHAT is equal f (a -> result) -> f result ???? (Curried)
AND to WHAT is equal (a -> f result) -> f result ???? (Codensity)

Yoneda
(a -> result) -> f result HAS f a variants
data Color = Red | Green | Blue

g :: forall a . (Color -> a) -> Maybe a
g colorToA = Just $ colorToA Blue -- 3 + 1 variants

Curried
f (a -> result) -> f result HAS f a variants
data Color = Red | Green | Blue
data Pair a = Pair a a

-- if [f x] = x+1
-- and [a] = 3
-- then [(a -> f result) -> f result] is ???

f :: forall a . Maybe (Color -> a) -> Maybe a
f Nothing = Nothing -- 1 vairiant
f (Just colorToA) = Just (colorToA Blue) -- 3 variants

-- if [f x] = x*x
-- and [a] = 3
-- then [f (a -> result) -> f result] is 3*3

g :: forall a . Pair (Color -> a) -> Pair a
g (Pair colorToA1 colorToA2) = Pair output1 output2 -- I can do `Pair output1 output1` or `Pair output1 output2` or `Pair output2 output1` or `Pair output2 output2`, BUT only 3*3=9 distinct variants are possible
  where
    output1 = colorToA1 Blue -- 3 variants
    output2 = colorToA2 Blue -- 3 variants

Codensity
(a -> f result) -> f result HAS f a variants
data Color = Red | Green | Blue
data Pair a = Pair a a

-- if [f x] = x+1
-- and [a] = 3
-- then [(a -> f result) -> f result] is ???

f :: forall a . (Color -> Maybe a) -> Maybe a
f colorToMaybe = Nothing -- 1+3 vairiant
  where
  output = colorToMaybe Blue -- variants

-- if [f x] = x*x
-- and [a] = 3
-- then [f (a -> result) -> f result] is 3*3

g :: forall a . (Color -> Pair a) -> Pair a
g colorToPair = Pair output1 output2 -- I can do `Pair output1 output1` or `Pair output1 output2` or `Pair output2 output1` or `Pair output2 output2`, BUT only 3*3=9 distinct variants are possible
  where
    Pair output1 output2 = colorToPair Blue -- 3 variants

???
f (a -> f result) -> f result HAS f a variants

If Poll is Cont, that what is it's callCC ? (That allows to regain access to innards of Cont)
https://en.m.wikibooks.org/wiki/Haskell/Continuation_passing_style


Change return type of TemplateParameters' methods from Option to just…

…

Hi @hgallagher1993, did you figure out how to run the tests locally? It looks like this PR changed a lot of the bindings generated for the test headers, which I wouldn't expect.

@fitzgen I had a read through the contributing.md and do mean to just run cargo test?

I ran cargo test and the differences seem to be pretty much just white space that changed, in 16-byte-alignment.rs for example
fn bindgen_test_layout_rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1() {

    assert_eq!(::std::mem::size_of::<rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1>()

               , 4usize , concat ! (

               "Size of: " , stringify ! (

               rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1 ) ));

changed to
fn bindgen_test_layout_rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1() {

    assert_eq!(

        ::std::mem::size_of::<rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1>(),

        4usize,

        concat!(

            "Size of: ",

            stringify!(rte_ipv4_tuple__bindgen_ty_1__bindgen_ty_1)

        )

    );

And all the impl Clone. . . dissappeared and went in to the #[derive. . .]'s

@hgallagher1993 yes. Make sure you have the latest nightly and cargo +nightly install -f rustfmt-nightly. That should take care of the formatting issues.
The impl Clone moving to a derive is more worrying; that means that this PR changed something to do with how we decide whether to derive or implement Clone, which it probably shouldn't.
This is what src/codegen/mod.rs does before this PR:
        if item.can_derive_copy(ctx) && !item.annotations().disallow_copy() &&
            ctx.options().derive_copy
        {
            derives.push("Copy");
            if used_template_params.is_some() {
                // FIXME: This requires extra logic if you have a big array in a
                // templated struct. The reason for this is that the magic:
                //     fn clone(&self) -> Self { *self }
                // doesn't work for templates.
                //
                // It's not hard to fix though.
                derives.push("Clone");
            } else {
                needs_clone_impl = true;
            }
        }

Were we really getting Some(v) where v.is_empty() before with the tests that changed? Or did we subtly change the logic in other ways?

:umbrella: The latest upstream changes (presumably #1075) made this pull request unmergeable. Please resolve the merge conflicts.

@fitzgen I've ran the tests and added in the !. . .there's still the merge conflict to go though

Great! Let me know when you've rebased (or if you need any help rebasing) and then I'll take a final look and we can merge this thing :)

@fitzgen The merge conflict should be gone now

I ran the tests locally and they all passed so I'm not really sure why it's failed here

@hgallagher1993
Hello! According to the travis build log cargo test works fine on LLVM 3.8 and fails on other versions.
If we will take a look on the failing tests we will see these:

partial-specialization-and-inheritance.hpp
auto.hpp

These tests are special in the sense that they doesn't have the only one expected binding!
So for example there are 3 different bindings for auto.hpp depending on LLVM version:

tests/expectations/tests/libclang-3.8/auto.rs
tests/expectations/tests/libclang-3.9/auto.rs
tests/expectations/tests/libclang-4/auto.rs

You can read more here.
But unfortunatelly, this is not the only problem. If you take a look into expectations test logs you can see some failures.
The expectations tests just compile every binding and run layout in it.
Note that this isn't done when you issue cargo test.
You can run these tests with the following commands:
$ cd tests/expectations
$ cargo test

:umbrella: The latest upstream changes (presumably #1084) made this pull request unmergeable. Please resolve the merge conflicts.

@pepyakin Ya it was only cargo test I ran and I can see the tests that failed locally now so I should have this fixed up in the next day or 2

Closing because this bitrotted a lot and is inactive, but thanks for the patch @hgallagher1993! :)


python binding for director

Is there any python binding ?

Yes.  Director is implemented in c++ and python.  Nearly all of the c++ code in Director and its dependencies VTK and Qt are wrapped for Python.  When you run the Director application you can press F8 or go to the Tools menu to open the python console to interact with objects in Python.


Alpine based docker

Hi
Following the new repo for TheLounge docker, I duplicate this issue.
I made an alpine based docker for TheLounge, mainly to save space, the result is 23mb. Here are the source, and here is the automated build on docker's hub. Feel free to grab the source for mainstream or ignore it.

I find alpine-based images a nightmare to maintain, luckily lounge doesn't use any native extensions (yet) so that makes things a bit easier. Image layering makes the virtual size not that bad as well (ugh node_modules). However, if you feel like it, you could open a PR and we can continue from there.


esp-idf kconfig build error on macOS (Sierra) Undefined symbols for architecture x86_64

I got error: ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
while compile my component here's the full logs
https://gist.github.com/NAzT/b9c9a02cd17abcfbf3fb6bffc6d59aa0
I've compiled esp32 toolchain on this machine without any errors.
here's an error

built esp32 toolchain

Hi @NAzT,
Hoping you closed this issue because you figured out the problem. Are there any tips you can give for someone who finds this Issue in the future, or anything we can add to esp-idf?
Thanks,
Angus

@projectgus here's the details:
I'm using brew and fixed this issue the error by add PKG_CONFIG_PATH to my .profile
export LIBRARY_PATH="/usr/local/opt/gettext/lib:$LIBRARY_PATH";
export PKG_CONFIG_PATH="/usr/local/opt/ncurses/lib/pkgconfig:$PKG_CONFIG_PATH"
export CPATH="/usr/local/opt/gettext/include:$CPATH";
screen shot 2559-10-04 at 3 26 18 pm
reference to this thread:
https://www.facebook.com/groups/ChiangMaiMakerClub/permalink/1072272859559473/?comment_id=1073069399479819&comment_tracking={"tn"%3A"R"}
FYI, I've install following packages using homebrew.
$ brew tap homebrew/dupes
$ brew install binutils coreutils automake wget gawk libtool help2man gperf gnu-sed --with-default-names grep
$ export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"


Homepage Card graphics missing in contrast themes

Describe the bug
The graphics for the four section cards on the homepage are missing when UIO contrast themes are active.
To Reproduce
Steps to reproduce the behavior:

Go to the home page
Open UIO and activate a contrast theme
Scroll down to the four cards
See error

Expected behavior
The four cards should have graphics that comply with the contrast themes, similar to the logo in the header.
Screenshots

Additional context
No environment info is included as all users are affected.
This may not be a major issue, given that the majority of the meaning of each card is provided by the text which remains visible. If this is determined not to be an issue, this should be closed and have the wontfix label applied to it.

This is not a bug. It's intentional to hide these background images on cards.

Not an issue, then :)


citation

Hello,
If we use this in a paper, how would you like us to cite it?

We are about to submit a paper for publication. I will add the citation information to GitHub when it is available.


Adding File Size to the download options table.  Updated tests to inc…

This PR replaces the # Selected column on the download options table with File Size.  The Data Provider level has the file size of everything if they were to download all, otherwise, the individual file sizes are displayed for each task.

Coverage increased (+0.01%) to 83.234% when pulling 0ad0e625bc2776129773fa0f23a53bee11a193a5 on DisplayFileSize into 32fa16ef2adb620d284404f9a68cc38f44c2afd8 on master.

Coverage increased (+0.01%) to 83.325% when pulling c7429e74dd518d35205eb021fac6518abf8cd975 on DisplayFileSize into 6037121de7b2c0eb210d90537711857894cd686a on master.

Coverage increased (+0.01%) to 83.538% when pulling a3f86bc13fd0644efa5efadbc64f014f3bc6fa18 on DisplayFileSize into 909cf6befd9dd75eadf2a1f01ea6b079787dd107 on master.

Coverage increased (+0.01%) to 83.538% when pulling 3cf21ea261289d7e455771461f954b30905373d0 on DisplayFileSize into 909cf6befd9dd75eadf2a1f01ea6b079787dd107 on master.


Update MultiCompiler and lib/webpack to better support multiple watchOptions

What kind of change does this PR introduce?
Fixes https://github.com/webpack/webpack/issues/4156

Did you add tests for your changes?
Updated existing tests which checked for the previous (broken) behavior. Let me know if this is sufficient or you'd like more.

If relevant, link to documentation update:
N/A that I'm aware of, but let me know if I'm missing something and happy to update.

Summary
Previously, MultiCompiler.watch would apply the watchOptions only from the first set of options to all compilers, regardless of how many options with watchOptions were passed. This changes MultiCompiler to correctly treat those options as an array and apply the relevant watchOptions to each compiler.

Does this PR introduce a breaking change?
Possibly... if someone was depending on being able to pass a single set of watchOptions to a multicompile and have them applied to all compilers, they will no longer be able to do that.
I believe that behavior was an implementation side effect and not something anyone would depend on, but if they were the migration path is to duplicate the options into an array with one entry for each compiler.

Other information

Thanks


Custom models not showing in UI

System Health details
System Information

version
core-2024.1.3

installation_type
Home Assistant OS

dev
false

hassio
true

docker
true

user
root

virtualenv
false

python_version
3.11.6

os_name
Linux

os_version
6.1.63-haos-raspi

arch
aarch64

timezone
Europe/London

config_dir
/config

Home Assistant Community Store

GitHub API
ok

GitHub Content
ok

GitHub Web
ok

GitHub API Calls Remaining
5000

Installed Version
1.33.0

Stage
running

Available Repositories
1382

Downloaded Repositories
46

Home Assistant Cloud

logged_in
false

can_reach_cert_server
ok

can_reach_cloud_auth
ok

can_reach_cloud
ok

Home Assistant Supervisor

host_os
Home Assistant OS 11.4

update_channel
stable

supervisor_version
supervisor-2023.12.1

agent_version
1.6.0

docker_version
24.0.7

disk_total
116.7 GB

disk_used
19.4 GB

healthy
true

supported
true

board
rpi4-64

supervisor_api
ok

version_api
ok

installed_addons
Git pull (7.13.1), Samba share (12.2.0), File editor (5.7.0), Terminal & SSH (9.8.1), Home Assistant Google Drive Backup (0.112.1), pigpio (1.5.2), Node-RED (17.0.2), Custom deps deployment (1.3.4), MariaDB (2.6.1), Bookstack (2.0.0), Mosquitto broker (6.4.0), SQLite Web (4.1.0), Uptime Kuma (0.12.0)

Dashboards

dashboards
4

resources
23

views
32

mode
storage

Recorder

oldest_recorder_run
8 January 2024 at 03:45

current_recorder_run
17 January 2024 at 06:03

estimated_db_size
575.18 MiB

database_engine
sqlite

database_version
3.41.2

Checklist

[X] I have read the FAQ to see if there is a known solution to my problem.
[X] I have enabled debug logging for my installation.
[X] I have filled out the issue template to the best of my ability.
[X] This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
[X] This issue is not a duplicate issue of currently previous issues..

Describe the issue
Following using powercalc-measure on separate VM I move the created model.json and hs.csv.gz files to HA, placing them in a model folder (e.g. LED Strip Lights, Chromecast Audio) nested in a manufacturer folder (e.g. Tuya, Google) within powercalc-custom-models.
Once populated the Powercalc UI will show the newly created (if new) Manufacturer in the drop down when adding a light/sensor but the Model ID’s are not in the subsequent drop down, the drop down is blank (if the manufacturer is new) or populated only with the library devices (if manufacturer not new).
An existing manufacturer/model for a linear profile is already working in this folder tree.
Reproduction steps

Perform Measure
Connect to HA via SMB, navigate to folder tree, use PUT to copy model.json and hs.csv.gz

...
Debug logs
2024-01-17 11:04:12.005 DEBUG (MainThread) [custom_components.powercalc.discovery] light.office_strip_light: Auto discovered model (manufacturer=Tuya, model=LED Strip Lights (unsupported))
2024-01-17 11:04:12.006 DEBUG (MainThread) [custom_components.powercalc.discovery] light.office_strip_light: Auto discovered model (manufacturer=Tuya, model=LED Strip Lights (unsupported))

Diagnostics dump or YAML config
No response

Please add the full directory / file tree which you have now under powercalc-custom-models directory.
Might help in reproducing / finding out why it's not working as expected.

Hey, please see below, let me know if you need anything else.
[core-ssh powercalc-custom-models]$ tree
.
├── Google inc
│   └── Chromecast Audio
│       └── model.json
├── Tuya
│   └── Strip
│       ├── hs.csv.gz
│       └── model.json
└── innr
└── RS 225
└── model.json
6 directories, 4 files

Unable to reproduce yet.
I have tried with the Tuya -> Strip directory.
After selecting tuya at manufacturer the Strip model is appearing.

You are sure you did restart after putting the directory and files? Anything relevant in the logs?

Yeah I’ve rebooted and no change, I tried to manually add the model to a sensor in configuration and get the following;
2024-01-17 13:36:53.466 ERROR (MainThread) [custom_components.powercalc.sensors.power] light.office_strip_light: Skipping sensor setup Model not found in library (manufacturer: Tuya, model: Strip)
2024-01-17 13:36:53.466 ERROR (MainThread) [custom_components.powercalc.sensors.power] light.office_strip_light: Skipping sensor setup: Model not found in library (manufacturer: Tuya, model: Strip)

Should the hierarchy be enough for it to show? Is the contents of the csv and json irrelevant at this point?

hmm strange. The data of csv is irrelevant at this point.
The model.json is important though. Can you share this?

Could you also try to lowercase both manufacturer and model directory, and remove whitespacing, and eliminate OS case sensitivity issues?
Just to keep it as simple as possible.

Hi - ok so I followed your instructions re naming (I was already in that directory) and now they are appearing. Interestingly I’d already tried doing what you suggested before raising a bug but all my renames were performed using the File Editor add-in, so I rebuilt the directories via ssh and now things are working (this is such a cool integration btw, thank you for building and maintaining it). So perhaps File Editor was adding extra characters or whitespace? It’s not very clear…

Nice you got it working now.
It should also work with spaces, so not really sure why it wasn't working for you before.
But let's not waste any more of our time on it ;-)
Glad you like the integration, yes I do my best to maintain it to my best abilities.
Closing this issue.


RabbitMQ: Infinite loop when missing dead letter queue

Contact Details
No response
Version
8.x
On which operating system(s) are you experiencing the issue?
Windows, Linux
Using which broker(s) did you encounter the issue?
RabbitMQ
What are the steps required to reproduce the issue?
Hi, I found the following problem in Masstransit + RabbitMQ when the dead letter queue is missing / removed during the application execution:

1. I start my application, and send a faulty message (an Iconsumer throwing any Exception).
2. A dead letter queue is created with my message => OK .
3. I delete the dead letter queue in the RabbitMQ interface.
4. I send another faulty message => KO: the message stays in the queue and is consumed again and again, creating an infinite loop.

The error message logged by MassTransit is the following:

"MassTransit.MessageReturnedException: exchange:order-events-listener_error => The message was returned by RabbitMQ: 312-NO_ROUTE"

What is the expected behavior?
Best possible behavior: The dead letter queue should be re-created. If this is not an option, the message should be deleted.
What actually happened?
The message remains in the queue, and is consumed again and again, in an infinite loop.
Related log output, including any exceptions
namespace OrderSystem.Events
{
    public class SubmitOrder
    {
        public string OrderId { get; set; }
    }
}

namespace RabbitMqConsoleListener
{
    using MassTransit;
    using OrderSystem.Events;
    using System;
    using System.Threading;
    using System.Threading.Tasks;

    public class Program
    {
        public static async Task Main()
        {
            var busControl = Bus.Factory.CreateUsingRabbitMq(cfg =>
            {
                cfg.Host("localhost", "/", h =>
                {
                    h.Username("guest");
                    h.Password("guest");
                });

                cfg.ReceiveEndpoint("order-events-listener", e =>
                {
                    e.Consumer<OrderSubmittedEventConsumer>();
                });
            });

            var source = new CancellationTokenSource(TimeSpan.FromSeconds(10));
            await busControl.StartAsync(source.Token);

            try
            {
                while (true)
                {
                    var endpoint = await busControl.GetSendEndpoint(new Uri("rabbitmq://localhost/order-events-listener"));
                    await endpoint.Send(new SubmitOrder { OrderId = "123" });

                    Console.WriteLine("Press enter to send an error to the dead letter queue");
                    Console.ReadLine();
                }
            }
            finally
            {
                await busControl.StopAsync();
            }
        }

        private class OrderSubmittedEventConsumer : IConsumer<SubmitOrder>
        {
            public Task Consume(ConsumeContext<SubmitOrder> context)
            {
                Console.WriteLine("Sending error");

                // Infinite retries when the dead letter queue does not exists
                throw new InvalidOperationException("Something went wrong in the code");
            }
        }
    }
}

Link to repository that demonstrates/reproduces the issue
No response

Simple answer, don't delete queues while services are running. This isn't a new issue, it's been brought up several times.

@phatboyg , my apologies if this issue has already been brought up, I couldn't find it in github nor in the discord.
In our case the dead letter queue was not deleted manually but expired "naturally" (x-expiration on the queue). Is there any way to prevent the message from being ran again, for instance with a max retries for transport issues?


Add link to getting started guide(RU)

There's also a few other translated(RU) articles available, so please let me know if you want me to add them as well (I personally think that it's better to only add essential guides and articles as the list might become messy going forward).

There's also a few other translated(RU) articles available, so please let me know if you want me to add them as well (I personally think that it's better to only add essential guides and articles as the list might become messy going forward).

Yes i agree with you, if anything we should make a sub-page and start created one master community peer reviewed copy, and consolidate all of the community versions into one that has as little errors as possible.


initial support for wandb

See updated readme for how to use it, and a demo below.
Known issues:

there's a bug in wandb and/or its pytorch lightning integration, that makes it impossible to display the correct step (i.e. iteration) number in the slider of images and video. I opened a ticket with wandb to address it. For now, the step number is automatically incremented for each images and video.

@bennyguo @thuliu-yt16: if you'd like access to our threestudio project on Stability's wandb server, let me know, I'll ask whether I can add you two. :-)

Looks great! This is very useful. Haven't tried using wandb in my project yet, but it seems that the wandb logger has many useful features. One question: do I need to wandb login before using the wandb logger?
I'd like to access the stability's wandb server. I'll send you my email :)

I'll do some testing and refactoring. Is it ok to directly push to your branch (I'm not sure I have the permission but github here says I could `Add more commits by pushing to the claforte/wandb branch on claforte/threestudio)?


Issue #56 - After successful login with token, use signed cookie to allow login with login step only

(scoped to settings.LOGIN_URL). If cookie exists/is valid
on the next login, token steps are skipped

1 - if user checks checkbox to token step "Remember this device for %s days"
2 - create signed cookie with the desired end date
3 - on next login, if cookie is present/valid, allow login with login step only
Description
added a method token_required() that returns False when a valid
signed cookie ('rememberdevice') is present. If not required, methods has_token_step()
and has_backup_step() will return None (skipping that logic).
To enable OTPRequiredMixin() to grant access, if token_required()
returns False, a device will be added to user
Motivation and Context

issue #56

How Has This Been Tested?

yes, tests were added to test_views_login.test_with_backup_phone()
testing both the form change and the cookie logic.

Ubuntu 16.04, Postgres 9.3, Python 3.5.2
Django==2.0.3
django-bootstrap-form==3.4
django-debug-toolbar==1.9.1
django-formtools==2.1
django-otp==0.4.3
django-phonenumber-field==1.3.0
django-two-factor-auth==1.7.0

ran "make test" with no errors
Screenshots (if appropriate):
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[X] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[X] My code follows the code style of this project. - I tried to :)
[X] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly. (I will, if the changes are OK with you)
[X] I have added tests to cover my changes.
[X] All new and existing tests passed.

Also; as this package is build on django-otp, there's also django-agent-trust and the otp implementation django-otp-agents from the same author. Instead of re-implementing those packages, we could also investigate re-using those. What do you think?

Using this version I am receiving this error message sometimes after login (using the same username in diferents devices):
Traceback:

File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/exception.py" in inner
  35.             response = get_response(request)

File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/base.py" in _get_response
  128.                 response = self.process_exception_by_middleware(e, request)

File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/base.py" in _get_response
  126.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/usr/local/lib/python3.5/dist-packages/django/views/generic/base.py" in view
  69.             return self.dispatch(request, *args, **kwargs)

File "/usr/local/lib/python3.5/dist-packages/django/utils/decorators.py" in _wrapper
  62.             return bound_func(*args, **kwargs)

File "/usr/local/lib/python3.5/dist-packages/django/views/decorators/debug.py" in sensitive_post_parameters_wrapper
  76.             return view(request, *args, **kwargs)

File "/usr/local/lib/python3.5/dist-packages/django/utils/decorators.py" in bound_func
  58.                 return func.__get__(self, type(self))(*args2, **kwargs2)

File "/usr/local/lib/python3.5/dist-packages/django/utils/decorators.py" in _wrapper
  62.             return bound_func(*args, **kwargs)

File "/usr/local/lib/python3.5/dist-packages/django/views/decorators/cache.py" in _wrapped_view_func
  44.         response = view_func(request, *args, **kwargs)

File "/usr/local/lib/python3.5/dist-packages/django/utils/decorators.py" in bound_func
  58.                 return func.__get__(self, type(self))(*args2, **kwargs2)

File "/usr/local/lib/python3.5/dist-packages/django/utils/decorators.py" in _wrapper
  62.             return bound_func(*args, **kwargs)

File "/usr/local/lib/python3.5/dist-packages/django/views/decorators/debug.py" in sensitive_post_parameters_wrapper
  76.             return view(request, *args, **kwargs)

File "/usr/local/lib/python3.5/dist-packages/django/utils/decorators.py" in bound_func
  58.                 return func.__get__(self, type(self))(*args2, **kwargs2)

File "/usr/local/lib/python3.5/dist-packages/django/utils/decorators.py" in _wrapper
  62.             return bound_func(*args, **kwargs)

File "/usr/local/lib/python3.5/dist-packages/django/views/decorators/cache.py" in _wrapped_view_func
  44.         response = view_func(request, *args, **kwargs)

File "/usr/local/lib/python3.5/dist-packages/django/utils/decorators.py" in bound_func
  58.                 return func.__get__(self, type(self))(*args2, **kwargs2)

File "/usr/local/lib/python3.5/dist-packages/formtools/wizard/views.py" in dispatch
  248.         response = super(WizardView, self).dispatch(request, *args, **kwargs)

File "/usr/local/lib/python3.5/dist-packages/django/views/generic/base.py" in dispatch
  89.         return handler(request, *args, **kwargs)

File "/usr/local/lib/python3.5/dist-packages/two_factor/views/core.py" in post
  105.         return super(LoginView, self).post(*args, **kwargs)

File "/usr/local/lib/python3.5/dist-packages/two_factor/views/utils.py" in post
  145.         return super(IdempotentSessionWizardView, self).post(*args, **kwargs)

File "/usr/local/lib/python3.5/dist-packages/formtools/wizard/views.py" in post
  309.                 return self.render_done(form, **kwargs)

File "/usr/local/lib/python3.5/dist-packages/two_factor/views/utils.py" in render_done
  195.         done_response = self.done(final_form_list, **kwargs)

File "/u/django/ZZZ/XXX/YYY/views.py" in done
  687.         return super(LoginView, self).done(form_list, **kwargs)

File "/usr/local/lib/python3.5/dist-packages/two_factor/views/core.py" in done
  116.             user.otp_device.token_step_skipped = True

Exception Type: AttributeError at /YYY/login/
Exception Value: 'NoneType' object has no attribute 'token_step_skipped'

Thanks diegobill. I got derailed with something else and expect to return to this in about a week. Appreciate the stack trace.
On Tuesday, August 21, 2018, 6:09:55 AM EDT, diegobill<EMAIL_ADDRESS>wrote:

Using this version I am receiving this error message sometimes after login (using the same username in diferents devices):
Traceback:
File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/exception.py" in inner
35.             response = get_response(request)
File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/base.py" in _get_response
128.                 response = self.process_exception_by_middleware(e, request)
File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/base.py" in _get_response
126.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python3.5/dist-packages/django/views/generic/base.py" in view
69.             return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/django/utils/decorators.py" in _wrapper
62.             return bound_func(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/django/views/decorators/debug.py" in sensitive_post_parameters_wrapper
76.             return view(request, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/django/utils/decorators.py" in bound_func
58.                 return func.get(self, type(self))(*args2, **kwargs2)
File "/usr/local/lib/python3.5/dist-packages/django/utils/decorators.py" in _wrapper
62.             return bound_func(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/django/views/decorators/cache.py" in _wrapped_view_func
44.         response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/django/utils/decorators.py" in bound_func
58.                 return func.get(self, type(self))(*args2, **kwargs2)
File "/usr/local/lib/python3.5/dist-packages/django/utils/decorators.py" in _wrapper
62.             return bound_func(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/django/views/decorators/debug.py" in sensitive_post_parameters_wrapper
76.             return view(request, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/django/utils/decorators.py" in bound_func
58.                 return func.get(self, type(self))(*args2, **kwargs2)
File "/usr/local/lib/python3.5/dist-packages/django/utils/decorators.py" in _wrapper
62.             return bound_func(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/django/views/decorators/cache.py" in _wrapped_view_func
44.         response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/django/utils/decorators.py" in bound_func
58.                 return func.get(self, type(self))(*args2, **kwargs2)
File "/usr/local/lib/python3.5/dist-packages/formtools/wizard/views.py" in dispatch
248.         response = super(WizardView, self).dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/django/views/generic/base.py" in dispatch
89.         return handler(request, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/two_factor/views/core.py" in post
105.         return super(LoginView, self).post(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/two_factor/views/utils.py" in post
145.         return super(IdempotentSessionWizardView, self).post(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/formtools/wizard/views.py" in post
309.                 return self.render_done(form, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/two_factor/views/utils.py" in render_done
195.         done_response = self.done(final_form_list, **kwargs)
File "/u/django/ZZZ/XXX/YYY/views.py" in done
687.         return super(LoginView, self).done(form_list, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/two_factor/views/core.py" in done
116.             user.otp_device.token_step_skipped = True
Exception Type: AttributeError at /YYY/login/
Exception Value: 'NoneType' object has no attribute 'token_step_skipped'
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Hi @compsult ,
I found another bug, when the user enables the 2fa and set a device to be remember, after a user disable the 2fa and enable again the 2fa does not require the token, because the cookie rememberdevice keeps working.

Hi @compsult ,
I found another bug, when the user enables the 2fa and set a device to be remember, after a user disable the 2fa and enable again the 2fa does not require the token, because the cookie rememberdevice keeps working.

Bouke,
If I define Yubi column in the TrustedAgent table as (FK → otp_yubikey_remoteyubikeydevice), otp_yubikey becomes required instead of optional.

However, this would have the advantage of cascading the delete to the TrustedAgent, so in the example diegobill cites, this would automatically disable all user agents associated with a given Yubi.
If I just save the otp_yubikey_remoteyubikeydevice id field in the TrustedAgent table, the otp_yubikey app remains optional but it would up to admin to manually delete TrustedAgent's associated with the Yubi (which seems like an error prone process).
Thoughts?

@diegobill I believe I have corrected the issues with the latest commit

@Bouke , I checked in the latest changes several hours ago but the coverage reports have not appeared. Did I do something wrong?

I've restarted the travis build to see if that helps.

In using these changes, I've found that when 2 users share a machine, they overwrite the others' rememberdevice cookie, (forcing them to use a token again).
One way to allow multiple users to have a trusted device (using the same device) could be to append the first letters of their username to the end of the cookie (like 'rememberdevice_joe'), then they would step on each others cookies. Just an idea

Explanation of Changes

'rememberdevice' cookie now requires back end validation to allow skip of token step (user and user_agent must match a row in the TrustedAgent table)

Yubi device is verified to still exist before allowing cookie to skip token step (this is not necessary for Phones, as TrustedAgent rows are automatically deleted when the Phone is deleted)

Optional email of 'New sign in to your account' when new device succeeds in logging in

disabling 2FA will clear out all TrustedDevices table rows for that account

stolen/lost devices can be rendered invalid by removing the row from PhoneDevice or RemoteYubiKey Devices

Now, if a bad actor gains a users credentials and is able to obtain the 'rememberdevice' cookie, s/he will only be able to use the cookie if s/he is using the same user agent associated with that cookie

Are there any plans on adding this in the near future? Would be such a great addition to an already great package!

This would be a great addition.

Also, with regard to django-otp-agents: if there are features missing from that package which mean we can't use it, I think it would be better to contribute them there so we can.

On Friday, November 15, 2019, 02:52:59 PM EST, Matt Molyneaux<EMAIL_ADDRESS>wrote:

@moggers87 requested changes on this pull request.
There are quite a few changes that don't really belong in this PR! I agree
I've also made some comments on the TrustedAgent model
In Makefile:

@@ -24,7 +24,7 @@ migrations:
coverage:
coverage erase
DJANGO_SETTINGS_MODULE=tests.settings PYTHONPATH=. \

  coverage run ---parallel --source=two_factor \

  coverage run -p --source=two_factor \

Not sure why you've made this change.I can't remember why
In example/forms.py:

+from django.utils.translation import ugettext_lazy as _

+class UserCreateForm(UserCreationForm):

email = forms.EmailField(label=("Email address"), required=True, help_text=("Required."))

class Meta:

   model = User

   fields = ("username", "email", "password1", "password2")

def save(self, commit=True):

   user = super(UserCreateForm, self).save(commit=False)

   user.email = self.cleaned_data["email"]

   if commit:

       user.save()

   return user

I think we can get rid of this (see my comments on TWO_FACTOR_NEW_DEV_ALERTS)I added a form to create allow entry of email while registering
In two_factor/views/utils.py:

logger = logging.getLogger(name)

+def send_new_device(request):

prevent circular imports

from two_factor import signals
signals.login_alert(sender=None, request=request)

+def send_user_verified(request, user, device):

prevent circular imports

from two_factor import signals
signals.user_verified.send(sender=None, request=request,

                          user=user, device=device)

+def login_alerts(request):
This really should not be part of this PR. It's nothing to do with skipping 2fa and assumes the user has an email address.The email is optional by setting TWO_FACTOR_NEW_DEV_ALERTS to False, so it does not assume an email address, though it’ hard to imagine allowing registration without one.
In two_factor/models.py:

+class TrustedAgent(models.Model):

"""
When a login comes in with a skip token cookie, a corresponding
TrustedAgent record will need to match both the user id and user_agent.
If there is no matching record in the TrustedAgent table,
the token step will be required, even if it is a valid cookie.
Disabling 2FA will clear the TrustedAgent table for that user.
Stolen/lost phones can be handled by removing them from the PhoneDevice table.
Stolen/lost Yubi devices can be handled by removing them from the
Remote YubiKey device table
"""
user = models.ForeignKey(getattr(settings, 'AUTH_USER_MODEL', 'auth.User'),

                       null=False, on_delete=models.CASCADE)

user_agent = models.CharField(null=False, blank=True, max_length=200)
yubi_id = models.IntegerField(null=True)
phone = models.ForeignKey(PhoneDevice, on_delete=models.CASCADE, null=True)
What about other django-otp plugins? E.g. what happens if I lose my TOTP device?I looked at other django-otp plugins (see comments above)

You might want to use a GenericForeignKey here… but I thinik that would break delete cascades?
In two_factor/models.py:

If there is no matching record in the TrustedAgent table,

the token step will be required, even if it is a valid cookie.
Disabling 2FA will clear the TrustedAgent table for that user.
Stolen/lost phones can be handled by removing them from the PhoneDevice table.
Stolen/lost Yubi devices can be handled by removing them from the
Remote YubiKey device table
"""
user = models.ForeignKey(getattr(settings, 'AUTH_USER_MODEL', 'auth.User'),

                       null=False, on_delete=models.CASCADE)

user_agent = models.CharField(null=False, blank=True, max_length=200)
yubi_id = models.IntegerField(null=True)
phone = models.ForeignKey(PhoneDevice, on_delete=models.CASCADE, null=True)
ip = models.GenericIPAddressField(null=True, blank=True, verbose_name='IP')

class Meta:

   unique_together = (('user', 'user_agent'))

What happens when I log in on both my desktop and laptop? They both have the same browser and OS.What you describe is an issue common to using a user agent subset. Better than nothing but not perfect
In two_factor/signals.py:

user_verified = Signal(providing_args=['request', 'user', 'device'])
+login_alert = Signal(providing_args=['request'])
+
+
+@receiver(login_alert, sender=LoginView)
+def login_alert(sender, **kwargs):

login_alerts(kwargs['request'])

See my comments on TWO_FACTOR_NEW_DEV_ALERTS below.
In two_factor/templatetags/device_format.py:

(re.compile('Mac OS X 10[._]11'), _('OS X El Capitan')),

(re.compile('Mac OS X 10[._]12'), _('macOS Sierra')),
(re.compile('Mac OS X 10[._]13'), _('macOS High Sierra')),
(re.compile('Mac OS X'), _('OS X')),
(re.compile('NT 5.1'), _('Windows XP')),
(re.compile('NT 6.0'), _('Windows Vista')),
(re.compile('NT 6.1'), _('Windows 7')),
(re.compile('NT 6.2'), _('Windows 8')),
(re.compile('NT 6.3'), _('Windows 8.1')),
(re.compile('NT 10.0'), _('Windows 10')),
(re.compile('Windows'), _('Windows')),
+)

<EMAIL_ADDRESS>+def agent_format(value):
Rather than maintain our own regexes, why don't we use something like https://github.com/ua-parser/uap-python ?
TheRegex’s are an exact subset of the code from django-user-sessions
That said, I am going a different direction with 2FA but if I can offer any answers about this code, I'd be happy to
—You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

That said, I am going a different direction with 2FA but if I can offer any answers about this code, I'd be happy to

Does that mean you will no longer be working on this PR?

yes
On Saturday, November 16, 2019, 06:39:46 AM EST, Matt Molyneaux<EMAIL_ADDRESS>wrote:

That said, I am going a different direction with 2FA but if I can offer any answers about this code, I'd be happy to
Does that mean you will no longer be working on this PR?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

In that case, I'll close this PR.


Handle scenario where parent cannot add their child to a Dojo they are a member of

@DanielBrierton same as previous comment, handled by myChildren?

Yes, I'd say this is can be closed now.


Break out eventgrid, eventhub, and servicebus into their own namespaces.

Note: this should likely not go in until we cut our next release.  This will def be a breaking change.

@lukehoban Please take a look.  Note: there is likely a lot more to do here.  But this wa a fairly sane and simple change.  It matches both terraforms, and Azure's view on things afaict: https://azure.microsoft.com/en-us/blog/events-data-points-and-messages-choosing-the-right-azure-messaging-service-for-your-data/

Ping @lukehoban

@lukehoban Please take a look. Note: there is likely a lot more to do here. But this wa a fairly sane and simple change. It matches both terraform's, and Azure's view on things afaict: https://azure.microsoft.com/en-us/blog/events-data-points-and-messages-choosing-the-right-azure-messaging-service-for-your-data/

Ok.  Moving forward on this.


Implement Search Bar Component

Is your feature request related to a problem? Please describe.
The search bar is currently not implemented on the frontend. The search feature will allow users to search for posts, topics and users.

Describe the solution you'd like
The solution will implement a search bar which will find matches based on a search request for specific posts, topics, users, etc. The results will be displayed in a list view for the user. The design should follow the Figma mock-ups.
The user can search in three categories: Top, Latest and People.

Top will show the best match search results.
Latest will show the most recent search results.
People will show any users who match the search.

This search feature will not implement a drop down of recommended search finds, it will only output the final search results.
Describe alternatives you've considered
n/a
Additional context
n/a

@arathibiju @KirstyGong Review please?

LGTM!

@shreyasingaraju Maybe add a line about which meeting we discussed this issue but other wise looks good 😊


bug: hints break ui-router

Can we have a way to disable hints?  Angular-hint has some hard-coded directive types that are incompatible with ui-router.  My app fails to load because ng-grid cannot find it's controller in the scope.  With batarang disabled it is in the scope.  I think this is due to the use of 'ui-view' instead of 'ng-view'.
 TypeError: Cannot set property 'gridDim' of undefined
    at ngGridDirectives.directive.ngGridDirective.compile.pre (http://localhost:9000/bower_components/ng-grid/build/ng-grid.js:2962:37)
    at invokeLinkFn (http://localhost:9000/bower_components/angular/angular.js:8194:9)
    at nodeLinkFn (http://localhost:9000/bower_components/angular/angular.js:7685:11)
    at compositeLinkFn (http://localhost:9000/bower_components/angular/angular.js:7062:13)
    at compositeLinkFn (http://localhost:9000/bower_components/angular/angular.js:7065:13)
    at compositeLinkFn (http://localhost:9000/bower_components/angular/angular.js:7065:13)
    at compositeLinkFn (http://localhost:9000/bower_components/angular/angular.js:7065:13)
    at publicLinkFn (http://localhost:9000/bower_components/angular/angular.js:6941:30)
    at newCompile (chrome-extension://ighdmehidhipcmcojjgiloacoafjmpfk/dist/hint.js:2622:22)
    at compile (http://localhost:9000/bower_components/angular-ui-router/release/angular-ui-router.js:3905:9) <div class="gridStyle ng-scope" ng-grid="workTypeCtrl.gridOptions">

Batarang works with UI-Router now.


[FLINK-2061] CSVReader: quotedStringParsing and includeFields yields ParseException

Fix the bug in GenericCsvInputFormat when skipped field is quoted string. I also added a unit test for this case.

Hi @chiwanpark , thanks for the PR!
I'm a bit busy right now but will have a look at the PR soon.
Thanks, Fabian

Okay. :)
Because there is Stephen's email address in test code, I modified test code.

Nice fix and good test case, thanks!
Will run the tests and merge it.